htt_stats.h 372 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927
  1. /*
  2. * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * @file htt_stats.h
  21. *
  22. * @details the public header file of HTT STATS
  23. */
  24. #ifndef __HTT_STATS_H__
  25. #define __HTT_STATS_H__
  26. #include <htt_deps.h> /* A_UINT32 */
  27. #include <htt_common.h>
  28. #include <htt.h> /* HTT stats TLV struct def and tag defs */
  29. /**
  30. * htt_dbg_ext_stats_type -
  31. * The base structure for each of the stats_type is only for reference
  32. * Host should use this information to know the type of TLVs to expect
  33. * for a particular stats type.
  34. *
  35. * Max supported stats :- 256.
  36. */
  37. enum htt_dbg_ext_stats_type {
  38. /** HTT_DBG_EXT_STATS_RESET
  39. * PARAM:
  40. * - config_param0 : start_offset (stats type)
  41. * - config_param1 : stats bmask from start offset
  42. * - config_param2 : stats bmask from start offset + 32
  43. * - config_param3 : stats bmask from start offset + 64
  44. * RESP MSG:
  45. * - No response sent.
  46. */
  47. HTT_DBG_EXT_STATS_RESET = 0,
  48. /** HTT_DBG_EXT_STATS_PDEV_TX
  49. * PARAMS:
  50. * - No Params
  51. * RESP MSG:
  52. * - htt_tx_pdev_stats_t
  53. */
  54. HTT_DBG_EXT_STATS_PDEV_TX = 1,
  55. /** HTT_DBG_EXT_STATS_PDEV_RX
  56. * PARAMS:
  57. * - No Params
  58. * RESP MSG:
  59. * - htt_rx_pdev_stats_t
  60. */
  61. HTT_DBG_EXT_STATS_PDEV_RX = 2,
  62. /** HTT_DBG_EXT_STATS_PDEV_TX_HWQ
  63. * PARAMS:
  64. * - config_param0: [Bit31: Bit0] HWQ mask
  65. * RESP MSG:
  66. * - htt_tx_hwq_stats_t
  67. */
  68. HTT_DBG_EXT_STATS_PDEV_TX_HWQ = 3,
  69. /** HTT_DBG_EXT_STATS_PDEV_TX_SCHED
  70. * PARAMS:
  71. * - config_param0: [Bit31: Bit0] TXQ mask
  72. * RESP MSG:
  73. * - htt_stats_tx_sched_t
  74. */
  75. HTT_DBG_EXT_STATS_PDEV_TX_SCHED = 4,
  76. /** HTT_DBG_EXT_STATS_PDEV_ERROR
  77. * PARAMS:
  78. * - No Params
  79. * RESP MSG:
  80. * - htt_hw_err_stats_t
  81. */
  82. HTT_DBG_EXT_STATS_PDEV_ERROR = 5,
  83. /** HTT_DBG_EXT_STATS_PDEV_TQM
  84. * PARAMS:
  85. * - No Params
  86. * RESP MSG:
  87. * - htt_tx_tqm_pdev_stats_t
  88. */
  89. HTT_DBG_EXT_STATS_PDEV_TQM = 6,
  90. /** HTT_DBG_EXT_STATS_TQM_CMDQ
  91. * PARAMS:
  92. * - config_param0:
  93. * [Bit15: Bit0 ] cmdq id :if 0xFFFF print all cmdq's
  94. * [Bit31: Bit16] reserved
  95. * RESP MSG:
  96. * - htt_tx_tqm_cmdq_stats_t
  97. */
  98. HTT_DBG_EXT_STATS_TQM_CMDQ = 7,
  99. /** HTT_DBG_EXT_STATS_TX_DE_INFO
  100. * PARAMS:
  101. * - No Params
  102. * RESP MSG:
  103. * - htt_tx_de_stats_t
  104. */
  105. HTT_DBG_EXT_STATS_TX_DE_INFO = 8,
  106. /** HTT_DBG_EXT_STATS_PDEV_TX_RATE
  107. * PARAMS:
  108. * - No Params
  109. * RESP MSG:
  110. * - htt_tx_pdev_rate_stats_t
  111. */
  112. HTT_DBG_EXT_STATS_PDEV_TX_RATE = 9,
  113. /** HTT_DBG_EXT_STATS_PDEV_RX_RATE
  114. * PARAMS:
  115. * - No Params
  116. * RESP MSG:
  117. * - htt_rx_pdev_rate_stats_t
  118. */
  119. HTT_DBG_EXT_STATS_PDEV_RX_RATE = 10,
  120. /** HTT_DBG_EXT_STATS_PEER_INFO
  121. * PARAMS:
  122. * - config_param0:
  123. * [Bit0] - [0] for sw_peer_id, [1] for mac_addr based request
  124. * [Bit15 : Bit 1] htt_peer_stats_req_mode_t
  125. * [Bit31 : Bit16] sw_peer_id
  126. * config_param1:
  127. * peer_stats_req_type_mask:32 (enum htt_peer_stats_tlv_enum)
  128. * 0 bit htt_peer_stats_cmn_tlv
  129. * 1 bit htt_peer_details_tlv
  130. * 2 bit htt_tx_peer_rate_stats_tlv
  131. * 3 bit htt_rx_peer_rate_stats_tlv
  132. * 4 bit htt_tx_tid_stats_tlv/htt_tx_tid_stats_v1_tlv
  133. * 5 bit htt_rx_tid_stats_tlv
  134. * 6 bit htt_msdu_flow_stats_tlv
  135. * 7 bit htt_peer_sched_stats_tlv
  136. * 8 bit htt_peer_ax_ofdma_stats_tlv
  137. * 9 bit htt_peer_be_ofdma_stats_tlv
  138. * - config_param2: [Bit31 : Bit0] mac_addr31to0
  139. * - config_param3: [Bit15 : Bit0] mac_addr47to32
  140. * [Bit 16] If this bit is set, reset per peer stats
  141. * of corresponding tlv indicated by config
  142. * param 1.
  143. * HTT_DBG_EXT_PEER_STATS_RESET_GET will be
  144. * used to get this bit position.
  145. * WMI_SERVICE_PER_PEER_HTT_STATS_RESET
  146. * indicates that FW supports per peer HTT
  147. * stats reset.
  148. * [Bit31 : Bit17] reserved
  149. * RESP MSG:
  150. * - htt_peer_stats_t
  151. */
  152. HTT_DBG_EXT_STATS_PEER_INFO = 11,
  153. /** HTT_DBG_EXT_STATS_TX_SELFGEN_INFO
  154. * PARAMS:
  155. * - No Params
  156. * RESP MSG:
  157. * - htt_tx_pdev_selfgen_stats_t
  158. */
  159. HTT_DBG_EXT_STATS_TX_SELFGEN_INFO = 12,
  160. /** HTT_DBG_EXT_STATS_TX_MU_HWQ
  161. * PARAMS:
  162. * - config_param0: [Bit31: Bit0] HWQ mask
  163. * RESP MSG:
  164. * - htt_tx_hwq_mu_mimo_stats_t
  165. */
  166. HTT_DBG_EXT_STATS_TX_MU_HWQ = 13,
  167. /** HTT_DBG_EXT_STATS_RING_IF_INFO
  168. * PARAMS:
  169. * - config_param0:
  170. * [Bit15: Bit0 ] ring id :if 0xFFFF print all rings
  171. * [Bit31: Bit16] reserved
  172. * RESP MSG:
  173. * - htt_ring_if_stats_t
  174. */
  175. HTT_DBG_EXT_STATS_RING_IF_INFO = 14,
  176. /** HTT_DBG_EXT_STATS_SRNG_INFO
  177. * PARAMS:
  178. * - config_param0:
  179. * [Bit15: Bit0 ] ring id :if 0xFFFF print all rings
  180. * [Bit31: Bit16] reserved
  181. * - No Params
  182. * RESP MSG:
  183. * - htt_sring_stats_t
  184. */
  185. HTT_DBG_EXT_STATS_SRNG_INFO = 15,
  186. /** HTT_DBG_EXT_STATS_SFM_INFO
  187. * PARAMS:
  188. * - No Params
  189. * RESP MSG:
  190. * - htt_sfm_stats_t
  191. */
  192. HTT_DBG_EXT_STATS_SFM_INFO = 16,
  193. /** HTT_DBG_EXT_STATS_PDEV_TX_MU
  194. * PARAMS:
  195. * - No Params
  196. * RESP MSG:
  197. * - htt_tx_pdev_mu_mimo_stats_t
  198. */
  199. HTT_DBG_EXT_STATS_PDEV_TX_MU = 17,
  200. /** HTT_DBG_EXT_STATS_ACTIVE_PEERS_LIST
  201. * PARAMS:
  202. * - config_param0:
  203. * [Bit7 : Bit0] vdev_id:8
  204. * note:0xFF to get all active peers based on pdev_mask.
  205. * [Bit31 : Bit8] rsvd:24
  206. * RESP MSG:
  207. * - htt_active_peer_details_list_t
  208. */
  209. HTT_DBG_EXT_STATS_ACTIVE_PEERS_LIST = 18,
  210. /** HTT_DBG_EXT_STATS_PDEV_CCA_STATS
  211. * PARAMS:
  212. * - config_param0:
  213. * [Bit0] - Clear bit0 to read 1sec,100ms & cumulative CCA stats.
  214. * Set bit0 to 1 to read 1sec interval histogram.
  215. * [Bit1] - 100ms interval histogram
  216. * [Bit3] - Cumulative CCA stats
  217. * RESP MSG:
  218. * - htt_pdev_cca_stats_t
  219. */
  220. HTT_DBG_EXT_STATS_PDEV_CCA_STATS = 19,
  221. /** HTT_DBG_EXT_STATS_TWT_SESSIONS
  222. * PARAMS:
  223. * - config_param0:
  224. * No params
  225. * RESP MSG:
  226. * - htt_pdev_twt_sessions_stats_t
  227. */
  228. HTT_DBG_EXT_STATS_TWT_SESSIONS = 20,
  229. /** HTT_DBG_EXT_STATS_REO_CNTS
  230. * PARAMS:
  231. * - config_param0:
  232. * No params
  233. * RESP MSG:
  234. * - htt_soc_reo_resource_stats_t
  235. */
  236. HTT_DBG_EXT_STATS_REO_RESOURCE_STATS = 21,
  237. /** HTT_DBG_EXT_STATS_TX_SOUNDING_INFO
  238. * PARAMS:
  239. * - config_param0:
  240. * [Bit0] vdev_id_set:1
  241. * set to 1 if vdev_id is set and vdev stats are requested.
  242. * set to 0 if pdev_stats sounding stats are requested.
  243. * [Bit8 : Bit1] vdev_id:8
  244. * note:0xFF to get all active vdevs based on pdev_mask.
  245. * [Bit31 : Bit9] rsvd:22
  246. *
  247. * RESP MSG:
  248. * - htt_tx_sounding_stats_t
  249. */
  250. HTT_DBG_EXT_STATS_TX_SOUNDING_INFO = 22,
  251. /** HTT_DBG_EXT_STATS_PDEV_OBSS_PD_STATS
  252. * PARAMS:
  253. * - config_param0:
  254. * No params
  255. * RESP MSG:
  256. * - htt_pdev_obss_pd_stats_t
  257. */
  258. HTT_DBG_EXT_STATS_PDEV_OBSS_PD_STATS = 23,
  259. /** HTT_DBG_EXT_STATS_RING_BACKPRESSURE_STATS
  260. * PARAMS:
  261. * - config_param0:
  262. * No params
  263. * RESP MSG:
  264. * - htt_stats_ring_backpressure_stats_t
  265. */
  266. HTT_DBG_EXT_STATS_RING_BACKPRESSURE_STATS = 24,
  267. /** HTT_DBG_EXT_STATS_LATENCY_PROF_STATS
  268. * PARAMS:
  269. *
  270. * RESP MSG:
  271. * - htt_soc_latency_prof_t
  272. */
  273. HTT_DBG_EXT_STATS_LATENCY_PROF_STATS = 25,
  274. /** HTT_DBG_EXT_STATS_PDEV_UL_TRIGGER
  275. * PARAMS:
  276. * - No Params
  277. * RESP MSG:
  278. * - htt_rx_pdev_ul_trig_stats_t
  279. */
  280. HTT_DBG_EXT_STATS_PDEV_UL_TRIG_STATS = 26,
  281. /** HTT_DBG_EXT_STATS_PDEV_UL_MUMIMO_TRIG_STATS = 27
  282. * PARAMS:
  283. * - No Params
  284. * RESP MSG:
  285. * - htt_rx_pdev_ul_mumimo_trig_stats_t
  286. */
  287. HTT_DBG_EXT_STATS_PDEV_UL_MUMIMO_TRIG_STATS = 27,
  288. /** HTT_DBG_EXT_STATS_FSE_RX
  289. * PARAMS:
  290. * - No Params
  291. * RESP MSG:
  292. * - htt_rx_fse_stats_t
  293. */
  294. HTT_DBG_EXT_STATS_FSE_RX = 28,
  295. /** HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS
  296. * PARAMS:
  297. * - config_param0: [Bit0] : [1] for mac_addr based request
  298. * - config_param1: [Bit31 : Bit0] mac_addr31to0
  299. * - config_param2: [Bit15 : Bit0] mac_addr47to32
  300. * RESP MSG:
  301. * - htt_ctrl_path_txrx_stats_t
  302. */
  303. HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS = 29,
  304. /** HTT_DBG_EXT_STATS_PDEV_RX_RATE_EXT
  305. * PARAMS:
  306. * - No Params
  307. * RESP MSG:
  308. * - htt_rx_pdev_rate_ext_stats_t
  309. */
  310. HTT_DBG_EXT_STATS_PDEV_RX_RATE_EXT = 30,
  311. /** HTT_DBG_EXT_STATS_PDEV_TX_RATE_TXBF
  312. * PARAMS:
  313. * - No Params
  314. * RESP MSG:
  315. * - htt_tx_pdev_txbf_rate_stats_t
  316. */
  317. HTT_DBG_EXT_STATS_PDEV_TX_RATE_TXBF = 31,
  318. /** HTT_DBG_EXT_STATS_TXBF_OFDMA
  319. */
  320. HTT_DBG_EXT_STATS_TXBF_OFDMA = 32,
  321. /** HTT_DBG_EXT_STA_11AX_UL_STATS
  322. * PARAMS:
  323. * - No Params
  324. * RESP MSG:
  325. * - htt_sta_11ax_ul_stats
  326. */
  327. HTT_DBG_EXT_STA_11AX_UL_STATS = 33,
  328. /** HTT_DBG_EXT_VDEV_RTT_RESP_STATS
  329. * PARAMS:
  330. * - config_param0:
  331. * [Bit7 : Bit0] vdev_id:8
  332. * [Bit31 : Bit8] rsvd:24
  333. * RESP MSG:
  334. * -
  335. */
  336. HTT_DBG_EXT_VDEV_RTT_RESP_STATS = 34,
  337. /** HTT_DBG_EXT_PKTLOG_AND_HTT_RING_STATS
  338. * PARAMS:
  339. * - No Params
  340. * RESP MSG:
  341. * - htt_pktlog_and_htt_ring_stats_t
  342. */
  343. HTT_DBG_EXT_PKTLOG_AND_HTT_RING_STATS = 35,
  344. /** HTT_DBG_EXT_STATS_DLPAGER_STATS
  345. * PARAMS:
  346. *
  347. * RESP MSG:
  348. * - htt_dlpager_stats_t
  349. */
  350. HTT_DBG_EXT_STATS_DLPAGER_STATS = 36,
  351. /** HTT_DBG_EXT_PHY_COUNTERS_AND_PHY_STATS
  352. * PARAMS:
  353. * - No Params
  354. * RESP MSG:
  355. * - htt_phy_counters_and_phy_stats_t
  356. */
  357. HTT_DBG_EXT_PHY_COUNTERS_AND_PHY_STATS = 37,
  358. /** HTT_DBG_EXT_VDEVS_TXRX_STATS
  359. * PARAMS:
  360. * - No Params
  361. * RESP MSG:
  362. * - htt_vdevs_txrx_stats_t
  363. */
  364. HTT_DBG_EXT_VDEVS_TXRX_STATS = 38,
  365. HTT_DBG_EXT_VDEV_RTT_INITIATOR_STATS = 39,
  366. /** HTT_DBG_EXT_PDEV_PER_STATS
  367. * PARAMS:
  368. * - No Params
  369. * RESP MSG:
  370. * - htt_tx_pdev_per_stats_t
  371. */
  372. HTT_DBG_EXT_PDEV_PER_STATS = 40,
  373. HTT_DBG_EXT_AST_ENTRIES = 41,
  374. /** HTT_DBG_EXT_RX_RING_STATS
  375. * PARAMS:
  376. * - No Params
  377. * RESP MSG:
  378. * - htt_rx_fw_ring_stats_tlv_v
  379. */
  380. HTT_DBG_EXT_RX_RING_STATS = 42,
  381. /** HTT_STRM_GEN_MPDUS_STATS, HTT_STRM_GEN_MPDUS_DETAILS_STATS
  382. * PARAMS:
  383. * - No params
  384. * RESP MSG: HTT_T2H STREAMING_STATS_IND (not EXT_STATS_CONF)
  385. * - HTT_STRM_GEN_MPDUS_STATS:
  386. * htt_stats_strm_gen_mpdus_tlv_t
  387. * - HTT_STRM_GEN_MPDUS_DETAILS_STATS:
  388. * htt_stats_strm_gen_mpdus_details_tlv_t
  389. */
  390. HTT_STRM_GEN_MPDUS_STATS = 43,
  391. HTT_STRM_GEN_MPDUS_DETAILS_STATS = 44,
  392. /** HTT_DBG_SOC_ERROR_STATS
  393. * PARAMS:
  394. * - No Params
  395. * RESP MSG:
  396. * - htt_dmac_reset_stats_tlv
  397. */
  398. HTT_DBG_SOC_ERROR_STATS = 45,
  399. /** HTT_DBG_PDEV_PUNCTURE_STATS
  400. * PARAMS:
  401. * - param 0: enum from htt_tx_pdev_puncture_stats_upload_t, indicating
  402. * the stats to upload
  403. * RESP MSG:
  404. * - one or more htt_pdev_puncture_stats_tlv, depending on param 0
  405. */
  406. HTT_DBG_PDEV_PUNCTURE_STATS = 46,
  407. /** HTT_DBG_EXT_STATS_ML_PEERS_INFO
  408. * PARAMS:
  409. * - param 0:
  410. * Bit 0 -> HTT_ML_PEER_DETAILS_TLV always enabled by default
  411. * Bit 1 -> HTT_ML_PEER_EXT_DETAILS_TLV will be uploaded when
  412. * this bit is set
  413. * Bit 2 -> HTT_ML_LINK_INFO_TLV will be uploaded when this bit is set
  414. * RESP MSG:
  415. * - htt_ml_peer_stats_t
  416. */
  417. HTT_DBG_EXT_STATS_ML_PEERS_INFO = 47,
  418. /** HTT_DBG_ODD_MANDATORY_STATS
  419. * params:
  420. * None
  421. * Response MSG:
  422. * htt_odd_mandatory_pdev_stats_tlv
  423. */
  424. HTT_DBG_ODD_MANDATORY_STATS = 48,
  425. /** HTT_DBG_PDEV_SCHED_ALGO_STATS
  426. * PARAMS:
  427. * - No Params
  428. * RESP MSG:
  429. * - htt_pdev_sched_algo_ofdma_stats_tlv
  430. */
  431. HTT_DBG_PDEV_SCHED_ALGO_STATS = 49,
  432. /** HTT_DBG_ODD_MANDATORY_MUMIMO_STATS
  433. * params:
  434. * None
  435. * Response MSG:
  436. * htt_odd_mandatory_mumimo_pdev_stats_tlv
  437. */
  438. HTT_DBG_ODD_MANDATORY_MUMIMO_STATS = 50,
  439. /** HTT_DBG_ODD_MANDATORY_MUOFDMA_STATS
  440. * params:
  441. * None
  442. * Response MSG:
  443. * htt_odd_mandatory_muofdma_pdev_stats_tlv
  444. */
  445. HTT_DBG_ODD_MANDATORY_MUOFDMA_STATS = 51,
  446. /** HTT_DBG_EXT_PHY_PROF_CAL_STATS
  447. * params:
  448. * None
  449. * Response MSG:
  450. * htt_latency_prof_cal_stats_tlv
  451. */
  452. HTT_DBG_EXT_PHY_PROF_CAL_STATS = 52,
  453. /** HTT_DBG_EXT_STATS_PDEV_BW_MGR
  454. * PARAMS:
  455. * - No Params
  456. * RESP MSG:
  457. * - htt_pdev_bw_mgr_stats_t
  458. */
  459. HTT_DBG_EXT_STATS_PDEV_BW_MGR = 53,
  460. /** HTT_DBG_PDEV_MBSSID_CTRL_FRAME_STATS
  461. * PARAMS:
  462. * - No Params
  463. * RESP MSG:
  464. * - htt_pdev_mbssid_ctrl_frame_stats
  465. */
  466. HTT_DBG_PDEV_MBSSID_CTRL_FRAME_STATS = 54,
  467. /** HTT_DBG_SOC_SSR_STATS
  468. * Used for non-MLO UMAC recovery stats.
  469. * PARAMS:
  470. * - No Params
  471. * RESP MSG:
  472. * - htt_umac_ssr_stats_tlv
  473. */
  474. HTT_DBG_SOC_SSR_STATS = 55,
  475. /** HTT_DBG_MLO_UMAC_SSR_STATS
  476. * Used for MLO UMAC recovery stats.
  477. * PARAMS:
  478. * - No Params
  479. * RESP MSG:
  480. * - htt_mlo_umac_ssr_stats_tlv
  481. */
  482. HTT_DBG_MLO_UMAC_SSR_STATS = 56,
  483. /** HTT_DBG_PDEV_TDMA_STATS
  484. * PARAMS:
  485. * - No Params
  486. * RESP MSG:
  487. * - htt_pdev_tdma_stats_tlv
  488. */
  489. HTT_DBG_PDEV_TDMA_STATS = 57,
  490. /** HTT_DBG_CODEL_STATS
  491. * PARAMS:
  492. * - No Params
  493. * RESP MSG:
  494. * - htt_codel_svc_class_stats_tlv
  495. * - htt_codel_msduq_stats_tlv
  496. */
  497. HTT_DBG_CODEL_STATS = 58,
  498. /** HTT_DBG_ODD_PDEV_BE_TX_MU_OFDMA_STATS
  499. * PARAMS:
  500. * - No Params
  501. * RESP MSG:
  502. * - htt_tx_pdev_mpdu_stats_tlv
  503. */
  504. HTT_DBG_ODD_PDEV_BE_TX_MU_OFDMA_STATS = 59,
  505. /** HTT_DBG_EXT_STATS_PDEV_UL_TRIGGER
  506. * PARAMS:
  507. * - No Params
  508. * RESP MSG:
  509. * - htt_rx_pdev_be_ul_ofdma_user_stats_tlv
  510. */
  511. HTT_DBG_ODD_UL_BE_OFDMA_STATS = 60,
  512. /** HTT_DBG_ODD_BE_TXBF_OFDMA_STATS
  513. */
  514. HTT_DBG_ODD_BE_TXBF_OFDMA_STATS = 61,
  515. /** HTT_DBG_ODD_STATS_PDEV_BE_UL_MUMIMO_TRIG_STATS
  516. * PARAMS:
  517. * - No Params
  518. * RESP MSG:
  519. * - htt_rx_pdev_be_ul_ofdma_user_stats_tlv
  520. */
  521. HTT_DBG_ODD_STATS_PDEV_BE_UL_MUMIMO_TRIG_STATS = 62,
  522. /** HTT_DBG_MLO_SCHED_STATS
  523. * PARAMS:
  524. * - No Params
  525. * RESP MSG:
  526. * - htt_pdev_mlo_sched_stats_tlv
  527. */
  528. HTT_DBG_MLO_SCHED_STATS = 63,
  529. /** HTT_DBG_PDEV_MLO_IPC_STATS
  530. * PARAMS:
  531. * - No Params
  532. * RESP MSG:
  533. * - htt_pdev_mlo_ipc_stats_tlv
  534. */
  535. HTT_DBG_PDEV_MLO_IPC_STATS = 64,
  536. /* keep this last */
  537. HTT_DBG_NUM_EXT_STATS = 256,
  538. };
  539. /*
  540. * Macros to get/set the bit field in config param[3] that indicates to
  541. * clear corresponding per peer stats specified by config param 1
  542. */
  543. #define HTT_DBG_EXT_PEER_STATS_RESET_M 0x00010000
  544. #define HTT_DBG_EXT_PEER_STATS_RESET_S 16
  545. #define HTT_DBG_EXT_PEER_STATS_RESET_GET(_var) \
  546. (((_var) & HTT_DBG_EXT_PEER_STATS_RESET_M) >> \
  547. HTT_DBG_EXT_PEER_STATS_RESET_S)
  548. #define HTT_DBG_EXT_PEER_STATS_RESET_SET(_var, _val) \
  549. do { \
  550. HTT_CHECK_SET_VAL(HTT_DBG_EXT_PEER_STATS_RESET, _val); \
  551. ((_var) |= ((_val) << HTT_DBG_EXT_PEER_STATS_RESET_S)); \
  552. } while (0)
  553. #define HTT_STATS_SUBTYPE_MAX 16
  554. /* htt_mu_stats_upload_t
  555. * Enumerations for specifying whether to upload all MU stats in response to
  556. * HTT_DBG_EXT_STATS_PDEV_TX_MU, or if not all, then which subset.
  557. */
  558. typedef enum {
  559. /* HTT_UPLOAD_MU_STATS: upload all MU stats:
  560. * UL MU-MIMO + DL MU-MIMO + UL MU-OFDMA + DL MU-OFDMA
  561. * (note: included OFDMA stats are limited to 11ax)
  562. */
  563. HTT_UPLOAD_MU_STATS,
  564. /* HTT_UPLOAD_MU_MIMO_STATS: upload UL MU-MIMO + DL MU-MIMO stats */
  565. HTT_UPLOAD_MU_MIMO_STATS,
  566. /* HTT_UPLOAD_MU_OFDMA_STATS:
  567. * upload UL MU-OFDMA + DL MU-OFDMA stats (note: 11ax only stats)
  568. */
  569. HTT_UPLOAD_MU_OFDMA_STATS,
  570. HTT_UPLOAD_DL_MU_MIMO_STATS,
  571. HTT_UPLOAD_UL_MU_MIMO_STATS,
  572. /* HTT_UPLOAD_DL_MU_OFDMA_STATS:
  573. * upload DL MU-OFDMA stats (note: 11ax only stats)
  574. */
  575. HTT_UPLOAD_DL_MU_OFDMA_STATS,
  576. /* HTT_UPLOAD_UL_MU_OFDMA_STATS:
  577. * upload UL MU-OFDMA stats (note: 11ax only stats)
  578. */
  579. HTT_UPLOAD_UL_MU_OFDMA_STATS,
  580. /*
  581. * Upload BE UL MU-OFDMA + BE DL MU-OFDMA stats,
  582. * TLV: htt_tx_pdev_dl_be_mu_ofdma_sch_stats_tlv and
  583. * htt_tx_pdev_ul_be_mu_ofdma_sch_stats_tlv
  584. */
  585. HTT_UPLOAD_BE_MU_OFDMA_STATS,
  586. /*
  587. * Upload BE DL MU-OFDMA
  588. * TLV: htt_tx_pdev_dl_be_mu_ofdma_sch_stats_tlv
  589. */
  590. HTT_UPLOAD_BE_DL_MU_OFDMA_STATS,
  591. /*
  592. * Upload BE UL MU-OFDMA
  593. * TLV: htt_tx_pdev_ul_be_mu_ofdma_sch_stats_tlv
  594. */
  595. HTT_UPLOAD_BE_UL_MU_OFDMA_STATS,
  596. } htt_mu_stats_upload_t;
  597. /* htt_tx_rate_stats_upload_t
  598. * Enumerations for specifying which stats to upload in response to
  599. * HTT_DBG_EXT_STATS_PDEV_TX_RATE.
  600. */
  601. typedef enum {
  602. /* 11abgn, 11ac, and 11ax TX stats, and a few 11be SU stats
  603. *
  604. * TLV: htt_tx_pdev_rate_stats_tlv
  605. */
  606. HTT_TX_RATE_STATS_DEFAULT,
  607. /*
  608. * Upload 11be OFDMA TX stats
  609. *
  610. * TLV: htt_tx_pdev_rate_stats_be_ofdma_tlv
  611. */
  612. HTT_TX_RATE_STATS_UPLOAD_11BE_OFDMA,
  613. } htt_tx_rate_stats_upload_t;
  614. /* htt_rx_ul_trigger_stats_upload_t
  615. * Enumerations for specifying which stats to upload in response to
  616. * HTT_DBG_EXT_STATS_PDEV_TX_RATE.
  617. */
  618. typedef enum {
  619. /* Upload 11ax UL OFDMA RX Trigger stats
  620. *
  621. * TLV: htt_rx_pdev_ul_trigger_stats_tlv
  622. */
  623. HTT_RX_UL_TRIGGER_STATS_UPLOAD_11AX_OFDMA,
  624. /*
  625. * Upload 11be UL OFDMA RX Trigger stats
  626. *
  627. * TLV: htt_rx_pdev_be_ul_trigger_stats_tlv
  628. */
  629. HTT_RX_UL_TRIGGER_STATS_UPLOAD_11BE_OFDMA,
  630. } htt_rx_ul_trigger_stats_upload_t;
  631. /*
  632. * The htt_rx_ul_mumimo_trigger_stats_upload_t enum values are
  633. * provided by the host as one of the config param elements in
  634. * the HTT_H2T EXT_STATS_REQ message, for stats type ==
  635. * HTT_DBG_EXT_STATS_PDEV_UL_MUMIMO_TRIG_STATS.
  636. */
  637. typedef enum {
  638. /*
  639. * Upload 11ax UL MUMIMO RX Trigger stats
  640. * TLV: htt_rx_pdev_ul_mumimo_trig_stats_tlv
  641. */
  642. HTT_RX_UL_MUMIMO_TRIGGER_STATS_UPLOAD_11AX,
  643. /*
  644. * Upload 11be UL MUMIMO RX Trigger stats
  645. * TLV: htt_rx_pdev_ul_mumimo_trig_be_stats_tlv
  646. */
  647. HTT_RX_UL_MUMIMO_TRIGGER_STATS_UPLOAD_11BE,
  648. } htt_rx_ul_mumimo_trigger_stats_upload_t;
  649. /* htt_tx_pdev_txbf_ofdma_stats_upload_t
  650. * Enumerations for specifying which stats to upload in response to
  651. * HTT_DBG_EXT_STATS_TXBF_OFDMA.
  652. */
  653. typedef enum {
  654. /* upload 11ax TXBF OFDMA stats
  655. *
  656. * TLV: htt_tx_pdev_ax_txbf_ofdma_stats_t
  657. */
  658. HTT_UPLOAD_AX_TXBF_OFDMA_STATS,
  659. /*
  660. * Upload 11be TXBF OFDMA stats
  661. *
  662. * TLV: htt_tx_pdev_be_txbf_ofdma_stats_t
  663. */
  664. HTT_UPLOAD_BE_TXBF_OFDMA_STATS,
  665. } htt_tx_pdev_txbf_ofdma_stats_upload_t;
  666. /* htt_tx_pdev_puncture_stats_upload_t
  667. * Enumerations for specifying which stats to upload in response to
  668. * HTT_DBG_PDEV_PUNCTURE_STATS.
  669. */
  670. typedef enum {
  671. /* upload puncture stats for all supported modes, both TX and RX */
  672. HTT_UPLOAD_PUNCTURE_STATS_ALL,
  673. /* upload puncture stats for all supported TX modes */
  674. HTT_UPLOAD_PUNCTURE_STATS_TX,
  675. /* upload puncture stats for all supported RX modes */
  676. HTT_UPLOAD_PUNCTURE_STATS_RX,
  677. } htt_tx_pdev_puncture_stats_upload_t;
  678. #define HTT_STATS_MAX_STRING_SZ32 4
  679. #define HTT_STATS_MACID_INVALID 0xff
  680. #define HTT_TX_HWQ_MAX_DIFS_LATENCY_BINS 10
  681. #define HTT_TX_HWQ_MAX_CMD_RESULT_STATS 13
  682. #define HTT_TX_HWQ_MAX_CMD_STALL_STATS 5
  683. #define HTT_TX_HWQ_MAX_FES_RESULT_STATS 10
  684. #define HTT_PDEV_STATS_PPDU_DUR_HIST_BINS 16
  685. #define HTT_PDEV_STATS_PPDU_DUR_HIST_INTERVAL_US 250
  686. typedef enum {
  687. HTT_STATS_TX_PDEV_NO_DATA_UNDERRUN = 0,
  688. HTT_STATS_TX_PDEV_DATA_UNDERRUN_BETWEEN_MPDU = 1,
  689. HTT_STATS_TX_PDEV_DATA_UNDERRUN_WITHIN_MPDU = 2,
  690. HTT_TX_PDEV_MAX_URRN_STATS = 3,
  691. } htt_tx_pdev_underrun_enum;
  692. #define HTT_TX_PDEV_MAX_FLUSH_REASON_STATS 150
  693. #define HTT_TX_PDEV_MAX_SIFS_BURST_STATS 9
  694. #define HTT_TX_PDEV_MAX_SIFS_BURST_HIST_STATS 10
  695. #define HTT_TX_PDEV_MAX_PHY_ERR_STATS 18
  696. /* HTT_TX_PDEV_SCHED_TX_MODE_MAX:
  697. * DEPRECATED - num sched tx mode max is 8
  698. */
  699. #define HTT_TX_PDEV_SCHED_TX_MODE_MAX 4
  700. #define HTT_TX_PDEV_NUM_SCHED_ORDER_LOG 20
  701. #define HTT_RX_STATS_REFILL_MAX_RING 4
  702. #define HTT_RX_STATS_RXDMA_MAX_ERR 16
  703. #define HTT_RX_STATS_FW_DROP_REASON_MAX 16
  704. /* Bytes stored in little endian order */
  705. /* Length should be multiple of DWORD */
  706. typedef struct {
  707. htt_tlv_hdr_t tlv_hdr;
  708. A_UINT32 data[1]; /* Can be variable length */
  709. } htt_stats_string_tlv;
  710. #define HTT_TX_PDEV_STATS_CMN_MAC_ID_M 0x000000ff
  711. #define HTT_TX_PDEV_STATS_CMN_MAC_ID_S 0
  712. #define HTT_TX_PDEV_STATS_CMN_MAC_ID_GET(_var) \
  713. (((_var) & HTT_TX_PDEV_STATS_CMN_MAC_ID_M) >> \
  714. HTT_TX_PDEV_STATS_CMN_MAC_ID_S)
  715. #define HTT_TX_PDEV_STATS_CMN_MAC_ID_SET(_var, _val) \
  716. do { \
  717. HTT_CHECK_SET_VAL(HTT_TX_PDEV_STATS_CMN_MAC_ID, _val); \
  718. ((_var) |= ((_val) << HTT_TX_PDEV_STATS_CMN_MAC_ID_S)); \
  719. } while (0)
  720. /* == TX PDEV STATS == */
  721. typedef struct {
  722. htt_tlv_hdr_t tlv_hdr;
  723. /**
  724. * BIT [ 7 : 0] :- mac_id
  725. * BIT [31 : 8] :- reserved
  726. */
  727. A_UINT32 mac_id__word;
  728. /** Num PPDUs queued to HW */
  729. A_UINT32 hw_queued;
  730. /** Num PPDUs reaped from HW */
  731. A_UINT32 hw_reaped;
  732. /** Num underruns */
  733. A_UINT32 underrun;
  734. /** Num HW Paused counter */
  735. A_UINT32 hw_paused;
  736. /** Num HW flush counter */
  737. A_UINT32 hw_flush;
  738. /** Num HW filtered counter */
  739. A_UINT32 hw_filt;
  740. /** Num PPDUs cleaned up in TX abort */
  741. A_UINT32 tx_abort;
  742. /** Num MPDUs requeued by SW */
  743. A_UINT32 mpdu_requed;
  744. /** excessive retries */
  745. A_UINT32 tx_xretry;
  746. /** Last used data hw rate code */
  747. A_UINT32 data_rc;
  748. /** frames dropped due to excessive SW retries */
  749. A_UINT32 mpdu_dropped_xretry;
  750. /** illegal rate phy errors */
  751. A_UINT32 illgl_rate_phy_err;
  752. /** wal pdev continuous xretry */
  753. A_UINT32 cont_xretry;
  754. /** wal pdev tx timeout */
  755. A_UINT32 tx_timeout;
  756. /** wal pdev resets */
  757. A_UINT32 pdev_resets;
  758. /** PHY/BB underrun */
  759. A_UINT32 phy_underrun;
  760. /** MPDU is more than txop limit */
  761. A_UINT32 txop_ovf;
  762. /** Number of Sequences posted */
  763. A_UINT32 seq_posted;
  764. /** Number of Sequences failed queueing */
  765. A_UINT32 seq_failed_queueing;
  766. /** Number of Sequences completed */
  767. A_UINT32 seq_completed;
  768. /** Number of Sequences restarted */
  769. A_UINT32 seq_restarted;
  770. /** Number of MU Sequences posted */
  771. A_UINT32 mu_seq_posted;
  772. /** Number of time HW ring is paused between seq switch within ISR */
  773. A_UINT32 seq_switch_hw_paused;
  774. /** Number of times seq continuation in DSR */
  775. A_UINT32 next_seq_posted_dsr;
  776. /** Number of times seq continuation in ISR */
  777. A_UINT32 seq_posted_isr;
  778. /** Number of seq_ctrl cached. */
  779. A_UINT32 seq_ctrl_cached;
  780. /** Number of MPDUs successfully transmitted */
  781. A_UINT32 mpdu_count_tqm;
  782. /** Number of MSDUs successfully transmitted */
  783. A_UINT32 msdu_count_tqm;
  784. /** Number of MPDUs dropped */
  785. A_UINT32 mpdu_removed_tqm;
  786. /** Number of MSDUs dropped */
  787. A_UINT32 msdu_removed_tqm;
  788. /** Num MPDUs flushed by SW, HWPAUSED, SW TXABORT (Reset,channel change) */
  789. A_UINT32 mpdus_sw_flush;
  790. /** Num MPDUs filtered by HW, all filter condition (TTL expired) */
  791. A_UINT32 mpdus_hw_filter;
  792. /**
  793. * Num MPDUs truncated by PDG
  794. * (TXOP, TBTT, PPDU_duration based on rate, dyn_bw)
  795. */
  796. A_UINT32 mpdus_truncated;
  797. /** Num MPDUs that was tried but didn't receive ACK or BA */
  798. A_UINT32 mpdus_ack_failed;
  799. /** Num MPDUs that was dropped due to expiry (MSDU TTL) */
  800. A_UINT32 mpdus_expired;
  801. /** Num MPDUs that was retried within seq_ctrl (MGMT/LEGACY) */
  802. A_UINT32 mpdus_seq_hw_retry;
  803. /** Num of TQM acked cmds processed */
  804. A_UINT32 ack_tlv_proc;
  805. /** coex_abort_mpdu_cnt valid */
  806. A_UINT32 coex_abort_mpdu_cnt_valid;
  807. /** coex_abort_mpdu_cnt from TX FES stats */
  808. A_UINT32 coex_abort_mpdu_cnt;
  809. /**
  810. * Number of total PPDUs
  811. * (DATA, MGMT, excludes selfgen) tried over the air (OTA)
  812. */
  813. A_UINT32 num_total_ppdus_tried_ota;
  814. /** Number of data PPDUs tried over the air (OTA) */
  815. A_UINT32 num_data_ppdus_tried_ota;
  816. /** Num Local control/mgmt frames (MSDUs) queued */
  817. A_UINT32 local_ctrl_mgmt_enqued;
  818. /**
  819. * Num Local control/mgmt frames (MSDUs) done
  820. * It includes all local ctrl/mgmt completions
  821. * (acked, no ack, flush, TTL, etc)
  822. */
  823. A_UINT32 local_ctrl_mgmt_freed;
  824. /** Num Local data frames (MSDUs) queued */
  825. A_UINT32 local_data_enqued;
  826. /**
  827. * Num Local data frames (MSDUs) done
  828. * It includes all local data completions
  829. * (acked, no ack, flush, TTL, etc)
  830. */
  831. A_UINT32 local_data_freed;
  832. /** Num MPDUs tried by SW */
  833. A_UINT32 mpdu_tried;
  834. /** Num of waiting seq posted in ISR completion handler */
  835. A_UINT32 isr_wait_seq_posted;
  836. A_UINT32 tx_active_dur_us_low;
  837. A_UINT32 tx_active_dur_us_high;
  838. /** Number of MPDUs dropped after max retries */
  839. A_UINT32 remove_mpdus_max_retries;
  840. /** Num HTT cookies dispatched */
  841. A_UINT32 comp_delivered;
  842. /** successful ppdu transmissions */
  843. A_UINT32 ppdu_ok;
  844. /** Scheduler self triggers */
  845. A_UINT32 self_triggers;
  846. /** FES duration of last tx data PPDU in us (sch_eval_end - ppdu_start) */
  847. A_UINT32 tx_time_dur_data;
  848. /** Num of times sequence terminated due to ppdu duration < burst limit */
  849. A_UINT32 seq_qdepth_repost_stop;
  850. /** Num of times MU sequence terminated due to MSDUs reaching threshold */
  851. A_UINT32 mu_seq_min_msdu_repost_stop;
  852. /** Num of times SU sequence terminated due to MSDUs reaching threshold */
  853. A_UINT32 seq_min_msdu_repost_stop;
  854. /** Num of times sequence terminated due to no TXOP available */
  855. A_UINT32 seq_txop_repost_stop;
  856. /** Num of times the next sequence got cancelled */
  857. A_UINT32 next_seq_cancel;
  858. /** Num of times fes offset was misaligned */
  859. A_UINT32 fes_offsets_err_cnt;
  860. /** Num of times peer denylisted for MU-MIMO transmission */
  861. A_UINT32 num_mu_peer_blacklisted;
  862. /** Num of times mu_ofdma seq posted */
  863. A_UINT32 mu_ofdma_seq_posted;
  864. /** Num of times UL MU MIMO seq posted */
  865. A_UINT32 ul_mumimo_seq_posted;
  866. /** Num of times UL OFDMA seq posted */
  867. A_UINT32 ul_ofdma_seq_posted;
  868. /** Num of times Thermal module suspended scheduler */
  869. A_UINT32 thermal_suspend_cnt;
  870. /** Num of times DFS module suspended scheduler */
  871. A_UINT32 dfs_suspend_cnt;
  872. /** Num of times TX abort module suspended scheduler */
  873. A_UINT32 tx_abort_suspend_cnt;
  874. /**
  875. * This field is a target-specific bit mask of suspended PPDU tx queues.
  876. * Since the bit mask definition is different for different targets,
  877. * this field is not meant for general use, but rather for debugging use.
  878. */
  879. A_UINT32 tgt_specific_opaque_txq_suspend_info;
  880. /**
  881. * Last SCHEDULER suspend reason
  882. * 1 -> Thermal Module
  883. * 2 -> DFS Module
  884. * 3 -> Tx Abort Module
  885. */
  886. A_UINT32 last_suspend_reason;
  887. /** Num of dynamic mimo ps dlmumimo sequences posted */
  888. A_UINT32 num_dyn_mimo_ps_dlmumimo_sequences;
  889. /** Num of times su bf sequences are denylisted */
  890. A_UINT32 num_su_txbf_denylisted;
  891. /** pdev uptime in microseconds **/
  892. A_UINT32 pdev_up_time_us_low;
  893. A_UINT32 pdev_up_time_us_high;
  894. } htt_tx_pdev_stats_cmn_tlv;
  895. #define HTT_TX_PDEV_STATS_URRN_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  896. /* NOTE: Variable length TLV, use length spec to infer array size */
  897. typedef struct {
  898. htt_tlv_hdr_t tlv_hdr;
  899. A_UINT32 urrn_stats[1]; /* HTT_TX_PDEV_MAX_URRN_STATS */
  900. } htt_tx_pdev_stats_urrn_tlv_v;
  901. #define HTT_TX_PDEV_STATS_FLUSH_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  902. /* NOTE: Variable length TLV, use length spec to infer array size */
  903. typedef struct {
  904. htt_tlv_hdr_t tlv_hdr;
  905. A_UINT32 flush_errs[1]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */
  906. } htt_tx_pdev_stats_flush_tlv_v;
  907. #define HTT_TX_PDEV_STATS_MLO_ABORT_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  908. /* NOTE: Variable length TLV, use length spec to infer array size */
  909. typedef struct {
  910. htt_tlv_hdr_t tlv_hdr;
  911. A_UINT32 mlo_abort_cnt[]; /* HTT_TX_PDEV_MAX_MLO_ABORT_REASON_STATS */
  912. } htt_tx_pdev_stats_mlo_abort_tlv_v;
  913. #define HTT_TX_PDEV_STATS_MLO_TXOP_ABORT_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  914. /* NOTE: Variable length TLV, use length spec to infer array size */
  915. typedef struct {
  916. htt_tlv_hdr_t tlv_hdr;
  917. A_UINT32 mlo_txop_abort_cnt[]; /* HTT_TX_PDEV_MAX_MLO_ABORT_REASON_STATS */
  918. } htt_tx_pdev_stats_mlo_txop_abort_tlv_v;
  919. #define HTT_TX_PDEV_STATS_SIFS_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  920. /* NOTE: Variable length TLV, use length spec to infer array size */
  921. typedef struct {
  922. htt_tlv_hdr_t tlv_hdr;
  923. A_UINT32 sifs_status[1]; /* HTT_TX_PDEV_MAX_SIFS_BURST_STATS */
  924. } htt_tx_pdev_stats_sifs_tlv_v;
  925. #define HTT_TX_PDEV_STATS_PHY_ERR_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  926. /* NOTE: Variable length TLV, use length spec to infer array size */
  927. typedef struct {
  928. htt_tlv_hdr_t tlv_hdr;
  929. A_UINT32 phy_errs[1]; /* HTT_TX_PDEV_MAX_PHY_ERR_STATS */
  930. } htt_tx_pdev_stats_phy_err_tlv_v;
  931. /*
  932. * Each array in the below struct has 16 elements, to cover the 16 possible
  933. * values for the CW and AIFS parameters. Each element within the array
  934. * stores the counter indicating how many transmissions have occurred with
  935. * that particular value for the MU EDCA parameter in question.
  936. */
  937. #define HTT_STATS_MUEDCA_VALUE_MAX 16
  938. typedef struct { /* DEPRECATED */
  939. htt_tlv_hdr_t tlv_hdr;
  940. A_UINT32 aifs[HTT_NUM_AC_WMM][HTT_STATS_MUEDCA_VALUE_MAX];
  941. A_UINT32 cw_min[HTT_NUM_AC_WMM][HTT_STATS_MUEDCA_VALUE_MAX];
  942. A_UINT32 cw_max[HTT_NUM_AC_WMM][HTT_STATS_MUEDCA_VALUE_MAX];
  943. } htt_tx_pdev_muedca_params_stats_tlv_v;
  944. typedef struct {
  945. htt_tlv_hdr_t tlv_hdr;
  946. A_UINT32 relaxed_mu_edca[HTT_NUM_AC_WMM];
  947. A_UINT32 mumimo_aggressive_mu_edca[HTT_NUM_AC_WMM];
  948. A_UINT32 mumimo_relaxed_mu_edca[HTT_NUM_AC_WMM];
  949. A_UINT32 muofdma_aggressive_mu_edca[HTT_NUM_AC_WMM];
  950. A_UINT32 muofdma_relaxed_mu_edca[HTT_NUM_AC_WMM];
  951. A_UINT32 latency_mu_edca[HTT_NUM_AC_WMM];
  952. A_UINT32 psd_boost_mu_edca[HTT_NUM_AC_WMM];
  953. } htt_tx_pdev_mu_edca_params_stats_tlv_v;
  954. typedef struct {
  955. htt_tlv_hdr_t tlv_hdr;
  956. A_UINT32 ul_mumimo_less_aggressive[HTT_NUM_AC_WMM];
  957. A_UINT32 ul_mumimo_medium_aggressive[HTT_NUM_AC_WMM];
  958. A_UINT32 ul_mumimo_highly_aggressive[HTT_NUM_AC_WMM];
  959. A_UINT32 ul_mumimo_default_relaxed[HTT_NUM_AC_WMM];
  960. A_UINT32 ul_muofdma_less_aggressive[HTT_NUM_AC_WMM];
  961. A_UINT32 ul_muofdma_medium_aggressive[HTT_NUM_AC_WMM];
  962. A_UINT32 ul_muofdma_highly_aggressive[HTT_NUM_AC_WMM];
  963. A_UINT32 ul_muofdma_default_relaxed[HTT_NUM_AC_WMM];
  964. } htt_tx_pdev_ap_edca_params_stats_tlv_v;
  965. #define HTT_TX_PDEV_SIFS_BURST_HIST_STATS 10
  966. #define HTT_TX_PDEV_STATS_SIFS_HIST_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  967. /* NOTE: Variable length TLV, use length spec to infer array size */
  968. typedef struct {
  969. htt_tlv_hdr_t tlv_hdr;
  970. A_UINT32 sifs_hist_status[1]; /* HTT_TX_PDEV_SIFS_BURST_HIST_STATS */
  971. } htt_tx_pdev_stats_sifs_hist_tlv_v;
  972. typedef struct {
  973. htt_tlv_hdr_t tlv_hdr;
  974. A_UINT32 num_data_ppdus_legacy_su;
  975. A_UINT32 num_data_ppdus_ac_su;
  976. A_UINT32 num_data_ppdus_ax_su;
  977. A_UINT32 num_data_ppdus_ac_su_txbf;
  978. A_UINT32 num_data_ppdus_ax_su_txbf;
  979. } htt_tx_pdev_stats_tx_ppdu_stats_tlv_v;
  980. typedef enum {
  981. HTT_TX_WAL_ISR_SCHED_SUCCESS,
  982. HTT_TX_WAL_ISR_SCHED_FILTER,
  983. HTT_TX_WAL_ISR_SCHED_RESP_TIMEOUT,
  984. HTT_TX_WAL_ISR_SCHED_RATES_EXHAUSTED,
  985. HTT_TX_WAL_ISR_SCHED_DATA_EXHAUSTED,
  986. HTT_TX_WAL_ISR_SCHED_SEQ_ABORT,
  987. HTT_TX_WAL_ISR_SCHED_NOTIFY_FRAME_ENCOUNTERED,
  988. HTT_TX_WAL_ISR_SCHED_COMPLETION,
  989. HTT_TX_WAL_ISR_SCHED_IN_PROGRESS,
  990. } htt_tx_wal_tx_isr_sched_status;
  991. /* [0]- nr4 , [1]- nr8 */
  992. #define HTT_STATS_NUM_NR_BINS 2
  993. /* Termination status stated in htt_tx_wal_tx_isr_sched_status */
  994. #define HTT_STATS_MAX_NUM_SCHED_STATUS 9
  995. #define HTT_STATS_MAX_NUM_MU_PPDU_PER_BURST 10
  996. #define HTT_STATS_MAX_NUM_SCHED_STATUS_WORDS \
  997. (HTT_STATS_NUM_NR_BINS * HTT_STATS_MAX_NUM_SCHED_STATUS)
  998. #define HTT_STATS_MAX_NUM_MU_PPDU_PER_BURST_WORDS \
  999. (HTT_STATS_NUM_NR_BINS * HTT_STATS_MAX_NUM_MU_PPDU_PER_BURST)
  1000. typedef enum {
  1001. HTT_STATS_HWMODE_AC = 0,
  1002. HTT_STATS_HWMODE_AX = 1,
  1003. HTT_STATS_HWMODE_BE = 2,
  1004. } htt_stats_hw_mode;
  1005. typedef struct {
  1006. htt_tlv_hdr_t tlv_hdr;
  1007. A_UINT32 hw_mode; /* HTT_STATS_HWMODE_xx */
  1008. A_UINT32 mu_mimo_num_seq_term_status[HTT_STATS_MAX_NUM_SCHED_STATUS_WORDS];
  1009. A_UINT32 mu_mimo_num_ppdu_completed_per_burst[HTT_STATS_MAX_NUM_MU_PPDU_PER_BURST_WORDS];
  1010. A_UINT32 mu_mimo_num_seq_posted[HTT_STATS_NUM_NR_BINS];
  1011. A_UINT32 mu_mimo_num_ppdu_posted_per_burst[HTT_STATS_MAX_NUM_MU_PPDU_PER_BURST_WORDS];
  1012. } htt_pdev_mu_ppdu_dist_tlv_v;
  1013. #define HTT_TX_PDEV_STATS_TRIED_MPDU_CNT_HIST_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  1014. /* NOTE: Variable length TLV, use length spec to infer array size .
  1015. *
  1016. * Tried_mpdu_cnt_hist is the histogram of MPDUs tries per HWQ.
  1017. * The tries here is the count of the MPDUS within a PPDU that the
  1018. * HW had attempted to transmit on air, for the HWSCH Schedule
  1019. * command submitted by FW.It is not the retry attempts.
  1020. * The histogram bins are 0-29, 30-59, 60-89 and so on. The are
  1021. * 10 bins in this histogram. They are defined in FW using the
  1022. * following macros
  1023. * #define WAL_MAX_TRIED_MPDU_CNT_HISTOGRAM 9
  1024. * #define WAL_TRIED_MPDU_CNT_HISTOGRAM_INTERVAL 30
  1025. *
  1026. */
  1027. typedef struct {
  1028. htt_tlv_hdr_t tlv_hdr;
  1029. A_UINT32 hist_bin_size;
  1030. A_UINT32 tried_mpdu_cnt_hist[1]; /* HTT_TX_PDEV_TRIED_MPDU_CNT_HIST */
  1031. } htt_tx_pdev_stats_tried_mpdu_cnt_hist_tlv_v;
  1032. typedef struct {
  1033. htt_tlv_hdr_t tlv_hdr;
  1034. /* Num MGMT MPDU transmitted by the target */
  1035. A_UINT32 fw_tx_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  1036. } htt_pdev_ctrl_path_tx_stats_tlv_v;
  1037. /* STATS_TYPE: HTT_DBG_EXT_STATS_PDEV_TX
  1038. * TLV_TAGS:
  1039. * - HTT_STATS_TX_PDEV_CMN_TAG
  1040. * - HTT_STATS_TX_PDEV_URRN_TAG
  1041. * - HTT_STATS_TX_PDEV_SIFS_TAG
  1042. * - HTT_STATS_TX_PDEV_FLUSH_TAG
  1043. * - HTT_STATS_TX_PDEV_PHY_ERR_TAG
  1044. * - HTT_STATS_TX_PDEV_SIFS_HIST_TAG
  1045. * - HTT_STATS_TX_PDEV_TX_PPDU_STATS_TAG
  1046. * - HTT_STATS_TX_PDEV_TRIED_MPDU_CNT_HIST_TAG
  1047. * - HTT_STATS_PDEV_CTRL_PATH_TX_STATS_TAG
  1048. * - HTT_STATS_MU_PPDU_DIST_TAG
  1049. */
  1050. /* NOTE:
  1051. * This structure is for documentation, and cannot be safely used directly.
  1052. * Instead, use the constituent TLV structures to fill/parse.
  1053. */
  1054. typedef struct _htt_tx_pdev_stats {
  1055. htt_tx_pdev_stats_cmn_tlv cmn_tlv;
  1056. htt_tx_pdev_stats_urrn_tlv_v underrun_tlv;
  1057. htt_tx_pdev_stats_sifs_tlv_v sifs_tlv;
  1058. htt_tx_pdev_stats_flush_tlv_v flush_tlv;
  1059. htt_tx_pdev_stats_phy_err_tlv_v phy_err_tlv;
  1060. htt_tx_pdev_stats_sifs_hist_tlv_v sifs_hist_tlv;
  1061. htt_tx_pdev_stats_tx_ppdu_stats_tlv_v tx_su_tlv;
  1062. htt_tx_pdev_stats_tried_mpdu_cnt_hist_tlv_v tried_mpdu_cnt_hist_tlv;
  1063. htt_pdev_ctrl_path_tx_stats_tlv_v ctrl_path_tx_tlv;
  1064. htt_pdev_mu_ppdu_dist_tlv_v mu_ppdu_dist_tlv;
  1065. } htt_tx_pdev_stats_t;
  1066. /* == SOC ERROR STATS == */
  1067. /* =============== PDEV ERROR STATS ============== */
  1068. #define HTT_STATS_MAX_HW_INTR_NAME_LEN 8
  1069. typedef struct {
  1070. htt_tlv_hdr_t tlv_hdr;
  1071. /* Stored as little endian */
  1072. A_UINT8 hw_intr_name[HTT_STATS_MAX_HW_INTR_NAME_LEN];
  1073. A_UINT32 mask;
  1074. A_UINT32 count;
  1075. } htt_hw_stats_intr_misc_tlv;
  1076. #define HTT_STATS_MAX_HW_MODULE_NAME_LEN 8
  1077. typedef struct {
  1078. htt_tlv_hdr_t tlv_hdr;
  1079. /* Stored as little endian */
  1080. A_UINT8 hw_module_name[HTT_STATS_MAX_HW_MODULE_NAME_LEN];
  1081. A_UINT32 count;
  1082. } htt_hw_stats_wd_timeout_tlv;
  1083. #define HTT_HW_STATS_PDEV_ERRS_MAC_ID_M 0x000000ff
  1084. #define HTT_HW_STATS_PDEV_ERRS_MAC_ID_S 0
  1085. #define HTT_HW_STATS_PDEV_ERRS_MAC_ID_GET(_var) \
  1086. (((_var) & HTT_HW_STATS_PDEV_ERRS_MAC_ID_M) >> \
  1087. HTT_HW_STATS_PDEV_ERRS_MAC_ID_S)
  1088. #define HTT_HW_STATS_PDEV_ERRS_MAC_ID_SET(_var, _val) \
  1089. do { \
  1090. HTT_CHECK_SET_VAL(HTT_HW_STATS_PDEV_ERRS_MAC_ID, _val); \
  1091. ((_var) |= ((_val) << HTT_HW_STATS_PDEV_ERRS_MAC_ID_S)); \
  1092. } while (0)
  1093. typedef struct {
  1094. htt_tlv_hdr_t tlv_hdr;
  1095. /* BIT [ 7 : 0] :- mac_id
  1096. * BIT [31 : 8] :- reserved
  1097. */
  1098. A_UINT32 mac_id__word;
  1099. A_UINT32 tx_abort;
  1100. A_UINT32 tx_abort_fail_count;
  1101. A_UINT32 rx_abort;
  1102. A_UINT32 rx_abort_fail_count;
  1103. A_UINT32 warm_reset;
  1104. A_UINT32 cold_reset;
  1105. A_UINT32 tx_flush;
  1106. A_UINT32 tx_glb_reset;
  1107. A_UINT32 tx_txq_reset;
  1108. A_UINT32 rx_timeout_reset;
  1109. A_UINT32 mac_cold_reset_restore_cal;
  1110. A_UINT32 mac_cold_reset;
  1111. A_UINT32 mac_warm_reset;
  1112. A_UINT32 mac_only_reset;
  1113. A_UINT32 phy_warm_reset;
  1114. A_UINT32 phy_warm_reset_ucode_trig;
  1115. A_UINT32 mac_warm_reset_restore_cal;
  1116. A_UINT32 mac_sfm_reset;
  1117. A_UINT32 phy_warm_reset_m3_ssr;
  1118. A_UINT32 phy_warm_reset_reason_phy_m3;
  1119. A_UINT32 phy_warm_reset_reason_tx_hw_stuck;
  1120. A_UINT32 phy_warm_reset_reason_num_cca_rx_frame_stuck;
  1121. A_UINT32 phy_warm_reset_reason_wal_rx_recovery_rst_rx_busy;
  1122. A_UINT32 phy_warm_reset_reason_wal_rx_recovery_rst_mac_hang;
  1123. A_UINT32 phy_warm_reset_reason_mac_reset_converted_phy_reset;
  1124. A_UINT32 wal_rx_recovery_rst_mac_hang_count;
  1125. A_UINT32 wal_rx_recovery_rst_known_sig_count;
  1126. A_UINT32 wal_rx_recovery_rst_no_rx_count;
  1127. A_UINT32 wal_rx_recovery_rst_no_rx_consecutive_count;
  1128. A_UINT32 wal_rx_recovery_rst_rx_busy_count;
  1129. A_UINT32 wal_rx_recovery_rst_phy_mac_hang_count;
  1130. A_UINT32 rx_flush_cnt; /* Num rx flush issued */
  1131. A_UINT32 phy_warm_reset_reason_tx_lifetime_expiry_cca_stuck;
  1132. A_UINT32 phy_warm_reset_reason_tx_consecutive_flush9_war;
  1133. A_UINT32 phy_warm_reset_reason_tx_hwsch_reset_war;
  1134. A_UINT32 phy_warm_reset_reason_hwsch_wdog_or_cca_wdog_war;
  1135. A_UINT32 fw_rx_rings_reset;
  1136. /**
  1137. * Num of iterations rx leak prevention successfully done.
  1138. */
  1139. A_UINT32 rx_dest_drain_rx_descs_leak_prevention_done;
  1140. /**
  1141. * Num of rx descs successfully saved by rx leak prevention.
  1142. */
  1143. A_UINT32 rx_dest_drain_rx_descs_saved_cnt;
  1144. /*
  1145. * Stats to debug reason Rx leak prevention
  1146. * was not required to be kicked in.
  1147. */
  1148. A_UINT32 rx_dest_drain_rxdma2reo_leak_detected;
  1149. A_UINT32 rx_dest_drain_rxdma2fw_leak_detected;
  1150. A_UINT32 rx_dest_drain_rxdma2wbm_leak_detected;
  1151. A_UINT32 rx_dest_drain_rxdma1_2sw_leak_detected;
  1152. A_UINT32 rx_dest_drain_rx_drain_ok_mac_idle;
  1153. A_UINT32 rx_dest_drain_ok_mac_not_idle;
  1154. A_UINT32 rx_dest_drain_prerequisite_invld;
  1155. A_UINT32 rx_dest_drain_skip_for_non_lmac_reset;
  1156. A_UINT32 rx_dest_drain_hw_fifo_not_empty_post_drain_wait;
  1157. } htt_hw_stats_pdev_errs_tlv;
  1158. typedef struct {
  1159. htt_tlv_hdr_t tlv_hdr;
  1160. /* BIT [ 7 : 0] :- mac_id
  1161. * BIT [31 : 8] :- reserved
  1162. */
  1163. A_UINT32 mac_id__word;
  1164. A_UINT32 last_unpause_ppdu_id;
  1165. A_UINT32 hwsch_unpause_wait_tqm_write;
  1166. A_UINT32 hwsch_dummy_tlv_skipped;
  1167. A_UINT32 hwsch_misaligned_offset_received;
  1168. A_UINT32 hwsch_reset_count;
  1169. A_UINT32 hwsch_dev_reset_war;
  1170. A_UINT32 hwsch_delayed_pause;
  1171. A_UINT32 hwsch_long_delayed_pause;
  1172. A_UINT32 sch_rx_ppdu_no_response;
  1173. A_UINT32 sch_selfgen_response;
  1174. A_UINT32 sch_rx_sifs_resp_trigger;
  1175. } htt_hw_stats_whal_tx_tlv;
  1176. typedef struct {
  1177. htt_tlv_hdr_t tlv_hdr;
  1178. /**
  1179. * BIT [ 7 : 0] :- mac_id
  1180. * BIT [31 : 8] :- reserved
  1181. */
  1182. union {
  1183. struct {
  1184. A_UINT32 mac_id: 8,
  1185. reserved: 24;
  1186. };
  1187. A_UINT32 mac_id__word;
  1188. };
  1189. /**
  1190. * hw_wars is a variable-length array, with each element counting
  1191. * the number of occurrences of the corresponding type of HW WAR.
  1192. * That is, hw_wars[0] indicates how many times HW WAR 0 occurred,
  1193. * hw_wars[1] indicates how many times HW WAR 1 occurred, etc.
  1194. * The target has an internal HW WAR mapping that it uses to keep
  1195. * track of which HW WAR is WAR 0, which HW WAR is WAR 1, etc.
  1196. */
  1197. A_UINT32 hw_wars[1/*or more*/];
  1198. } htt_hw_war_stats_tlv;
  1199. /* STATS_TYPE: HTT_DBG_EXT_STATS_PDEV_ERROR
  1200. * TLV_TAGS:
  1201. * - HTT_STATS_HW_PDEV_ERRS_TAG
  1202. * - HTT_STATS_HW_INTR_MISC_TAG (multiple)
  1203. * - HTT_STATS_HW_WD_TIMEOUT_TAG (multiple)
  1204. * - HTT_STATS_WHAL_TX_TAG
  1205. * - HTT_STATS_HW_WAR_TAG
  1206. */
  1207. /* NOTE:
  1208. * This structure is for documentation, and cannot be safely used directly.
  1209. * Instead, use the constituent TLV structures to fill/parse.
  1210. */
  1211. typedef struct _htt_pdev_err_stats {
  1212. htt_hw_stats_pdev_errs_tlv pdev_errs;
  1213. htt_hw_stats_intr_misc_tlv misc_stats[1];
  1214. htt_hw_stats_wd_timeout_tlv wd_timeout[1];
  1215. htt_hw_stats_whal_tx_tlv whal_tx_stats;
  1216. htt_hw_war_stats_tlv hw_war;
  1217. } htt_hw_err_stats_t;
  1218. /* ============ PEER STATS ============ */
  1219. #define HTT_MSDU_FLOW_STATS_TX_FLOW_NUM_M 0x0000ffff
  1220. #define HTT_MSDU_FLOW_STATS_TX_FLOW_NUM_S 0
  1221. #define HTT_MSDU_FLOW_STATS_TID_NUM_M 0x000f0000
  1222. #define HTT_MSDU_FLOW_STATS_TID_NUM_S 16
  1223. #define HTT_MSDU_FLOW_STATS_DROP_M 0x00100000
  1224. #define HTT_MSDU_FLOW_STATS_DROP_S 20
  1225. #define HTT_MSDU_FLOW_STATS_TX_FLOW_NUM_GET(_var) \
  1226. (((_var) & HTT_MSDU_FLOW_STATS_TX_FLOW_NUM_M) >> \
  1227. HTT_MSDU_FLOW_STATS_TX_FLOW_NUM_S)
  1228. #define HTT_MSDU_FLOW_STATS_TX_FLOW_NUM_SET(_var, _val) \
  1229. do { \
  1230. HTT_CHECK_SET_VAL(HTT_MSDU_FLOW_STATS_TX_FLOW_NUM, _val); \
  1231. ((_var) |= ((_val) << HTT_MSDU_FLOW_STATS_TX_FLOW_NUM_S)); \
  1232. } while (0)
  1233. #define HTT_MSDU_FLOW_STATS_TID_NUM_GET(_var) \
  1234. (((_var) & HTT_MSDU_FLOW_STATS_TID_NUM_M) >> \
  1235. HTT_MSDU_FLOW_STATS_TID_NUM_S)
  1236. #define HTT_MSDU_FLOW_STATS_TID_NUM_SET(_var, _val) \
  1237. do { \
  1238. HTT_CHECK_SET_VAL(HTT_MSDU_FLOW_STATS_TID_NUM, _val); \
  1239. ((_var) |= ((_val) << HTT_MSDU_FLOW_STATS_TID_NUM_S)); \
  1240. } while (0)
  1241. #define HTT_MSDU_FLOW_STATS_DROP_GET(_var) \
  1242. (((_var) & HTT_MSDU_FLOW_STATS_DROP_M) >> \
  1243. HTT_MSDU_FLOW_STATS_DROP_S)
  1244. #define HTT_MSDU_FLOW_STATS_DROP_SET(_var, _val) \
  1245. do { \
  1246. HTT_CHECK_SET_VAL(HTT_MSDU_FLOW_STATS_DROP, _val); \
  1247. ((_var) |= ((_val) << HTT_MSDU_FLOW_STATS_DROP_S)); \
  1248. } while (0)
  1249. typedef struct _htt_msdu_flow_stats_tlv {
  1250. htt_tlv_hdr_t tlv_hdr;
  1251. A_UINT32 last_update_timestamp;
  1252. A_UINT32 last_add_timestamp;
  1253. A_UINT32 last_remove_timestamp;
  1254. A_UINT32 total_processed_msdu_count;
  1255. A_UINT32 cur_msdu_count_in_flowq;
  1256. /** This will help to find which peer_id is stuck state */
  1257. A_UINT32 sw_peer_id;
  1258. /**
  1259. * BIT [15 : 0] :- tx_flow_number
  1260. * BIT [19 : 16] :- tid_num
  1261. * BIT [20 : 20] :- drop_rule
  1262. * BIT [31 : 21] :- reserved
  1263. */
  1264. A_UINT32 tx_flow_no__tid_num__drop_rule;
  1265. A_UINT32 last_cycle_enqueue_count;
  1266. A_UINT32 last_cycle_dequeue_count;
  1267. A_UINT32 last_cycle_drop_count;
  1268. /**
  1269. * BIT [15 : 0] :- current_drop_th
  1270. * BIT [31 : 16] :- reserved
  1271. */
  1272. A_UINT32 current_drop_th;
  1273. } htt_msdu_flow_stats_tlv;
  1274. #define MAX_HTT_TID_NAME 8
  1275. /* DWORD sw_peer_id__tid_num */
  1276. #define HTT_TX_TID_STATS_SW_PEER_ID_M 0x0000ffff
  1277. #define HTT_TX_TID_STATS_SW_PEER_ID_S 0
  1278. #define HTT_TX_TID_STATS_TID_NUM_M 0xffff0000
  1279. #define HTT_TX_TID_STATS_TID_NUM_S 16
  1280. #define HTT_TX_TID_STATS_SW_PEER_ID_GET(_var) \
  1281. (((_var) & HTT_TX_TID_STATS_SW_PEER_ID_M) >> \
  1282. HTT_TX_TID_STATS_SW_PEER_ID_S)
  1283. #define HTT_TX_TID_STATS_SW_PEER_ID_SET(_var, _val) \
  1284. do { \
  1285. HTT_CHECK_SET_VAL(HTT_TX_TID_STATS_SW_PEER_ID, _val); \
  1286. ((_var) |= ((_val) << HTT_TX_TID_STATS_SW_PEER_ID_S)); \
  1287. } while (0)
  1288. #define HTT_TX_TID_STATS_TID_NUM_GET(_var) \
  1289. (((_var) & HTT_TX_TID_STATS_TID_NUM_M) >> \
  1290. HTT_TX_TID_STATS_TID_NUM_S)
  1291. #define HTT_TX_TID_STATS_TID_NUM_SET(_var, _val) \
  1292. do { \
  1293. HTT_CHECK_SET_VAL(HTT_TX_TID_STATS_TID_NUM, _val); \
  1294. ((_var) |= ((_val) << HTT_TX_TID_STATS_TID_NUM_S)); \
  1295. } while (0)
  1296. /* DWORD num_sched_pending__num_ppdu_in_hwq */
  1297. #define HTT_TX_TID_STATS_NUM_SCHED_PENDING_M 0x000000ff
  1298. #define HTT_TX_TID_STATS_NUM_SCHED_PENDING_S 0
  1299. #define HTT_TX_TID_STATS_NUM_PPDU_IN_HWQ_M 0x0000ff00
  1300. #define HTT_TX_TID_STATS_NUM_PPDU_IN_HWQ_S 8
  1301. #define HTT_TX_TID_STATS_NUM_SCHED_PENDING_GET(_var) \
  1302. (((_var) & HTT_TX_TID_STATS_NUM_SCHED_PENDING_M) >> \
  1303. HTT_TX_TID_STATS_NUM_SCHED_PENDING_S)
  1304. #define HTT_TX_TID_STATS_NUM_SCHED_PENDING_SET(_var, _val) \
  1305. do { \
  1306. HTT_CHECK_SET_VAL(HTT_TX_TID_STATS_NUM_SCHED_PENDING, _val); \
  1307. ((_var) |= ((_val) << HTT_TX_TID_STATS_NUM_SCHED_PENDING_S)); \
  1308. } while (0)
  1309. #define HTT_TX_TID_STATS_NUM_PPDU_IN_HWQ_GET(_var) \
  1310. (((_var) & HTT_TX_TID_STATS_NUM_PPDU_IN_HWQ_M) >> \
  1311. HTT_TX_TID_STATS_NUM_PPDU_IN_HWQ_S)
  1312. #define HTT_TX_TID_STATS_NUM_PPDU_IN_HWQ_SET(_var, _val) \
  1313. do { \
  1314. HTT_CHECK_SET_VAL(HTT_TX_TID_STATS_NUM_PPDU_IN_HWQ, _val); \
  1315. ((_var) |= ((_val) << HTT_TX_TID_STATS_NUM_PPDU_IN_HWQ_S)); \
  1316. } while (0)
  1317. /* Tidq stats */
  1318. typedef struct _htt_tx_tid_stats_tlv {
  1319. htt_tlv_hdr_t tlv_hdr;
  1320. /** Stored as little endian */
  1321. A_UINT8 tid_name[MAX_HTT_TID_NAME];
  1322. /**
  1323. * BIT [15 : 0] :- sw_peer_id
  1324. * BIT [31 : 16] :- tid_num
  1325. */
  1326. A_UINT32 sw_peer_id__tid_num;
  1327. /**
  1328. * BIT [ 7 : 0] :- num_sched_pending
  1329. * BIT [15 : 8] :- num_ppdu_in_hwq
  1330. * BIT [31 : 16] :- reserved
  1331. */
  1332. A_UINT32 num_sched_pending__num_ppdu_in_hwq;
  1333. A_UINT32 tid_flags;
  1334. /** per tid # of hw_queued ppdu */
  1335. A_UINT32 hw_queued;
  1336. /** number of per tid successful PPDU */
  1337. A_UINT32 hw_reaped;
  1338. /** per tid Num MPDUs filtered by HW */
  1339. A_UINT32 mpdus_hw_filter;
  1340. A_UINT32 qdepth_bytes;
  1341. A_UINT32 qdepth_num_msdu;
  1342. A_UINT32 qdepth_num_mpdu;
  1343. A_UINT32 last_scheduled_tsmp;
  1344. A_UINT32 pause_module_id;
  1345. A_UINT32 block_module_id;
  1346. /** tid tx airtime in sec */
  1347. A_UINT32 tid_tx_airtime;
  1348. } htt_tx_tid_stats_tlv;
  1349. /* Tidq stats */
  1350. typedef struct _htt_tx_tid_stats_v1_tlv {
  1351. htt_tlv_hdr_t tlv_hdr;
  1352. /** Stored as little endian */
  1353. A_UINT8 tid_name[MAX_HTT_TID_NAME];
  1354. /**
  1355. * BIT [15 : 0] :- sw_peer_id
  1356. * BIT [31 : 16] :- tid_num
  1357. */
  1358. A_UINT32 sw_peer_id__tid_num;
  1359. /**
  1360. * BIT [ 7 : 0] :- num_sched_pending
  1361. * BIT [15 : 8] :- num_ppdu_in_hwq
  1362. * BIT [31 : 16] :- reserved
  1363. */
  1364. A_UINT32 num_sched_pending__num_ppdu_in_hwq;
  1365. A_UINT32 tid_flags;
  1366. /** Max qdepth in bytes reached by this tid */
  1367. A_UINT32 max_qdepth_bytes;
  1368. /** number of msdus qdepth reached max */
  1369. A_UINT32 max_qdepth_n_msdus;
  1370. A_UINT32 rsvd;
  1371. A_UINT32 qdepth_bytes;
  1372. A_UINT32 qdepth_num_msdu;
  1373. A_UINT32 qdepth_num_mpdu;
  1374. A_UINT32 last_scheduled_tsmp;
  1375. A_UINT32 pause_module_id;
  1376. A_UINT32 block_module_id;
  1377. /** tid tx airtime in sec */
  1378. A_UINT32 tid_tx_airtime;
  1379. A_UINT32 allow_n_flags;
  1380. /**
  1381. * BIT [15 : 0] :- sendn_frms_allowed
  1382. * BIT [31 : 16] :- reserved
  1383. */
  1384. A_UINT32 sendn_frms_allowed;
  1385. /*
  1386. * tid_ext_flags, tid_ext2_flags, and tid_flush_reason are opaque fields
  1387. * that cannot be interpreted by the host.
  1388. * They are only for off-line debug.
  1389. */
  1390. A_UINT32 tid_ext_flags;
  1391. A_UINT32 tid_ext2_flags;
  1392. A_UINT32 tid_flush_reason;
  1393. A_UINT32 mlo_flush_tqm_status_pending_low;
  1394. A_UINT32 mlo_flush_tqm_status_pending_high;
  1395. A_UINT32 mlo_flush_partner_info_low;
  1396. A_UINT32 mlo_flush_partner_info_high;
  1397. A_UINT32 mlo_flush_initator_info_low;
  1398. A_UINT32 mlo_flush_initator_info_high;
  1399. /*
  1400. * head_msdu_tqm_timestamp_us:
  1401. * MSDU enqueue timestamp (TQM reference timestamp) for the MSDU
  1402. * at the head of the MPDU queue
  1403. * head_msdu_tqm_latency_us:
  1404. * The age of the MSDU that is at the head of the MPDU queue,
  1405. * i.e. the delta between the current TQM time and the MSDU's
  1406. * enqueue timestamp.
  1407. */
  1408. A_UINT32 head_msdu_tqm_timestamp_us;
  1409. A_UINT32 head_msdu_tqm_latency_us;
  1410. } htt_tx_tid_stats_v1_tlv;
  1411. #define HTT_RX_TID_STATS_SW_PEER_ID_M 0x0000ffff
  1412. #define HTT_RX_TID_STATS_SW_PEER_ID_S 0
  1413. #define HTT_RX_TID_STATS_TID_NUM_M 0xffff0000
  1414. #define HTT_RX_TID_STATS_TID_NUM_S 16
  1415. #define HTT_RX_TID_STATS_SW_PEER_ID_GET(_var) \
  1416. (((_var) & HTT_RX_TID_STATS_SW_PEER_ID_M) >> \
  1417. HTT_RX_TID_STATS_SW_PEER_ID_S)
  1418. #define HTT_RX_TID_STATS_SW_PEER_ID_SET(_var, _val) \
  1419. do { \
  1420. HTT_CHECK_SET_VAL(HTT_RX_TID_STATS_SW_PEER_ID, _val); \
  1421. ((_var) |= ((_val) << HTT_RX_TID_STATS_SW_PEER_ID_S)); \
  1422. } while (0)
  1423. #define HTT_RX_TID_STATS_TID_NUM_GET(_var) \
  1424. (((_var) & HTT_RX_TID_STATS_TID_NUM_M) >> \
  1425. HTT_RX_TID_STATS_TID_NUM_S)
  1426. #define HTT_RX_TID_STATS_TID_NUM_SET(_var, _val) \
  1427. do { \
  1428. HTT_CHECK_SET_VAL(HTT_RX_TID_STATS_TID_NUM, _val); \
  1429. ((_var) |= ((_val) << HTT_RX_TID_STATS_TID_NUM_S)); \
  1430. } while (0)
  1431. typedef struct _htt_rx_tid_stats_tlv {
  1432. htt_tlv_hdr_t tlv_hdr;
  1433. /**
  1434. * BIT [15 : 0] : sw_peer_id
  1435. * BIT [31 : 16] : tid_num
  1436. */
  1437. A_UINT32 sw_peer_id__tid_num;
  1438. /** Stored as little endian */
  1439. A_UINT8 tid_name[MAX_HTT_TID_NAME];
  1440. /**
  1441. * dup_in_reorder not collected per tid for now,
  1442. * as there is no wal_peer back ptr in data rx peer.
  1443. */
  1444. A_UINT32 dup_in_reorder;
  1445. A_UINT32 dup_past_outside_window;
  1446. A_UINT32 dup_past_within_window;
  1447. /** Number of per tid MSDUs with flag of decrypt_err */
  1448. A_UINT32 rxdesc_err_decrypt;
  1449. /** tid rx airtime in sec */
  1450. A_UINT32 tid_rx_airtime;
  1451. } htt_rx_tid_stats_tlv;
  1452. #define HTT_MAX_COUNTER_NAME 8
  1453. typedef struct {
  1454. htt_tlv_hdr_t tlv_hdr;
  1455. /** Stored as little endian */
  1456. A_UINT8 counter_name[HTT_MAX_COUNTER_NAME];
  1457. A_UINT32 count;
  1458. } htt_counter_tlv;
  1459. typedef struct {
  1460. htt_tlv_hdr_t tlv_hdr;
  1461. /** Number of rx PPDU */
  1462. A_UINT32 ppdu_cnt;
  1463. /** Number of rx MPDU */
  1464. A_UINT32 mpdu_cnt;
  1465. /** Number of rx MSDU */
  1466. A_UINT32 msdu_cnt;
  1467. /** pause bitmap */
  1468. A_UINT32 pause_bitmap;
  1469. /** block bitmap */
  1470. A_UINT32 block_bitmap;
  1471. /** current timestamp */
  1472. A_UINT32 current_timestamp;
  1473. /** Peer cumulative tx airtime in sec */
  1474. A_UINT32 peer_tx_airtime;
  1475. /** Peer cumulative rx airtime in sec */
  1476. A_UINT32 peer_rx_airtime;
  1477. /** Peer current rssi in dBm */
  1478. A_INT32 rssi;
  1479. /** Total enqueued, dequeued and dropped MSDU's for peer */
  1480. A_UINT32 peer_enqueued_count_low;
  1481. A_UINT32 peer_enqueued_count_high;
  1482. A_UINT32 peer_dequeued_count_low;
  1483. A_UINT32 peer_dequeued_count_high;
  1484. A_UINT32 peer_dropped_count_low;
  1485. A_UINT32 peer_dropped_count_high;
  1486. /** Total ppdu transmitted bytes for peer: includes MAC header overhead */
  1487. A_UINT32 ppdu_transmitted_bytes_low;
  1488. A_UINT32 ppdu_transmitted_bytes_high;
  1489. A_UINT32 peer_ttl_removed_count;
  1490. /**
  1491. * inactive_time
  1492. * Running duration of the time since last tx/rx activity by this peer,
  1493. * units = seconds.
  1494. * If the peer is currently active, this inactive_time will be 0x0.
  1495. */
  1496. A_UINT32 inactive_time;
  1497. /** Number of MPDUs dropped after max retries */
  1498. A_UINT32 remove_mpdus_max_retries;
  1499. } htt_peer_stats_cmn_tlv;
  1500. #define HTT_PEER_DETAILS_ML_PEER_OFFSET_BYTES 32
  1501. #define HTT_PEER_DETAILS_ML_PEER_OFFSET_DWORD 8
  1502. #define HTT_PEER_DETAILS_ML_PEER_ID_VALID_M 0x00000001
  1503. #define HTT_PEER_DETAILS_ML_PEER_ID_VALID_S 0
  1504. #define HTT_PEER_DETAILS_ML_PEER_ID_M 0x00001ffe
  1505. #define HTT_PEER_DETAILS_ML_PEER_ID_S 1
  1506. #define HTT_PEER_DETAILS_LINK_IDX_M 0x001fe000
  1507. #define HTT_PEER_DETAILS_LINK_IDX_S 13
  1508. #define HTT_PEER_DETAILS_USE_PPE_M 0x00200000
  1509. #define HTT_PEER_DETAILS_USE_PPE_S 21
  1510. #define HTT_PEER_DETAILS_SRC_INFO_M 0x00000fff
  1511. #define HTT_PEER_DETAILS_SRC_INFO_S 0
  1512. #define HTT_PEER_DETAILS_SET(word, httsym, val) \
  1513. do { \
  1514. HTT_CHECK_SET_VAL(HTT_PEER_DETAILS_ ## httsym, val); \
  1515. (word) |= ((val) << HTT_PEER_DETAILS_ ## httsym ## _S); \
  1516. } while(0)
  1517. #define HTT_PEER_DETAILS_GET(word, httsym) \
  1518. (((word) & HTT_PEER_DETAILS_ ## httsym ## _M) >> HTT_PEER_DETAILS_ ## httsym ## _S)
  1519. typedef struct {
  1520. htt_tlv_hdr_t tlv_hdr;
  1521. /** This enum type of HTT_PEER_TYPE */
  1522. A_UINT32 peer_type;
  1523. A_UINT32 sw_peer_id;
  1524. /**
  1525. * BIT [7 : 0] :- vdev_id
  1526. * BIT [15 : 8] :- pdev_id
  1527. * BIT [31 : 16] :- ast_indx
  1528. */
  1529. A_UINT32 vdev_pdev_ast_idx;
  1530. htt_mac_addr mac_addr;
  1531. A_UINT32 peer_flags;
  1532. A_UINT32 qpeer_flags;
  1533. /* Dword 8 */
  1534. A_UINT32 ml_peer_id_valid : 1, /* [0:0] */
  1535. ml_peer_id : 12, /* [12:1] */
  1536. link_idx : 8, /* [20:13] */
  1537. use_ppe : 1, /* [21:21] */
  1538. rsvd0 : 10; /* [31:22] */
  1539. /* Dword 9 */
  1540. A_UINT32 src_info : 12, /* [11:0] */
  1541. rsvd1 : 20; /* [31:12] */
  1542. } htt_peer_details_tlv;
  1543. typedef struct {
  1544. htt_tlv_hdr_t tlv_hdr;
  1545. A_UINT32 sw_peer_id;
  1546. A_UINT32 ast_index;
  1547. htt_mac_addr mac_addr;
  1548. A_UINT32
  1549. pdev_id : 2,
  1550. vdev_id : 8,
  1551. next_hop : 1,
  1552. mcast : 1,
  1553. monitor_direct : 1,
  1554. mesh_sta : 1,
  1555. mec : 1,
  1556. intra_bss : 1,
  1557. chip_id : 2,
  1558. ml_peer_id : 13,
  1559. on_chip : 1;
  1560. A_UINT32
  1561. tx_monitor_override_sta : 1,
  1562. rx_monitor_override_sta : 1,
  1563. reserved1 : 30;
  1564. } htt_ast_entry_tlv;
  1565. typedef enum {
  1566. HTT_STATS_DIRECTION_TX,
  1567. HTT_STATS_DIRECTION_RX,
  1568. } HTT_STATS_DIRECTION;
  1569. typedef enum {
  1570. HTT_STATS_PPDU_TYPE_MODE_SU,
  1571. HTT_STATS_PPDU_TYPE_DL_MU_MIMO,
  1572. HTT_STATS_PPDU_TYPE_UL_MU_MIMO,
  1573. HTT_STATS_PPDU_TYPE_DL_MU_OFDMA,
  1574. HTT_STATS_PPDU_TYPE_UL_MU_OFDMA,
  1575. } HTT_STATS_PPDU_TYPE;
  1576. typedef enum {
  1577. HTT_STATS_PREAM_OFDM,
  1578. HTT_STATS_PREAM_CCK,
  1579. HTT_STATS_PREAM_HT,
  1580. HTT_STATS_PREAM_VHT,
  1581. HTT_STATS_PREAM_HE,
  1582. HTT_STATS_PREAM_EHT,
  1583. HTT_STATS_PREAM_RSVD1,
  1584. HTT_STATS_PREAM_COUNT,
  1585. } HTT_STATS_PREAM_TYPE;
  1586. #define HTT_TX_PEER_STATS_NUM_MCS_COUNTERS 12 /* 0-11 */
  1587. #define HTT_TX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS 2 /* 12, 13 */
  1588. /* HTT_TX_PEER_STATS_NUM_GI_COUNTERS:
  1589. * GI Index 0: WHAL_GI_800
  1590. * GI Index 1: WHAL_GI_400
  1591. * GI Index 2: WHAL_GI_1600
  1592. * GI Index 3: WHAL_GI_3200
  1593. */
  1594. #define HTT_TX_PEER_STATS_NUM_GI_COUNTERS 4
  1595. #define HTT_TX_PEER_STATS_NUM_DCM_COUNTERS 5
  1596. /* HTT_TX_PEER_STATS_NUM_BW_COUNTERS:
  1597. * bw index 0: rssi_pri20_chain0
  1598. * bw index 1: rssi_ext20_chain0
  1599. * bw index 2: rssi_ext40_low20_chain0
  1600. * bw index 3: rssi_ext40_high20_chain0
  1601. */
  1602. #define HTT_TX_PEER_STATS_NUM_BW_COUNTERS 4
  1603. /* HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS:
  1604. * bw index 4 (bw ext index 0): rssi_ext80_low20_chain0
  1605. * bw index 5 (bw ext index 1): rssi_ext80_low_high20_chain0
  1606. * bw index 6 (bw ext index 2): rssi_ext80_high_low20_chain0
  1607. * bw index 7 (bw ext index 3): rssi_ext80_high20_chain0
  1608. */
  1609. #define HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS 4
  1610. #define HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS 4
  1611. /* HTT_RX STATS_NUM_BW_EXT_2_COUNTERS:
  1612. * bw index 8 (bw ext_2 index 0): rssi_ext160_0_chainX
  1613. * bw index 9 (bw ext_2 index 1): rssi_ext160_1_chainX
  1614. * bw index 10 (bw ext_2 index 2): rssi_ext160_2_chainX
  1615. * bw index 11 (bw ext_2 index 3): rssi_ext160_3_chainX
  1616. * bw index 12 (bw ext_2 index 4): rssi_ext160_4_chainX
  1617. * bw index 13 (bw ext_2 index 5): rssi_ext160_5_chainX
  1618. * bw index 14 (bw ext_2 index 6): rssi_ext160_6_chainX
  1619. * bw index 15 (bw ext_2 index 7): rssi_ext160_7_chainX
  1620. */
  1621. #define HTT_RX_PDEV_STATS_NUM_BW_EXT_2_COUNTERS 8
  1622. #define HTT_TX_PEER_STATS_NUM_SPATIAL_STREAMS 8
  1623. #define HTT_TX_PEER_STATS_NUM_PREAMBLE_TYPES HTT_STATS_PREAM_COUNT
  1624. #define HTT_TX_PEER_STATS_NUM_REDUCED_CHAN_TYPES 2 /* 0 - Half, 1 - Quarter */
  1625. typedef struct _htt_tx_peer_rate_stats_tlv {
  1626. htt_tlv_hdr_t tlv_hdr;
  1627. /** Number of tx LDPC packets */
  1628. A_UINT32 tx_ldpc;
  1629. /** Number of tx RTS packets */
  1630. A_UINT32 rts_cnt;
  1631. /** RSSI value of last ack packet (units = dB above noise floor) */
  1632. A_UINT32 ack_rssi;
  1633. A_UINT32 tx_mcs[HTT_TX_PEER_STATS_NUM_MCS_COUNTERS];
  1634. A_UINT32 tx_su_mcs[HTT_TX_PEER_STATS_NUM_MCS_COUNTERS];
  1635. A_UINT32 tx_mu_mcs[HTT_TX_PEER_STATS_NUM_MCS_COUNTERS];
  1636. /**
  1637. * element 0,1, ...7 -> NSS 1,2, ...8
  1638. */
  1639. A_UINT32 tx_nss[HTT_TX_PEER_STATS_NUM_SPATIAL_STREAMS];
  1640. /**
  1641. * element 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160 and 80+80 MHz
  1642. */
  1643. A_UINT32 tx_bw[HTT_TX_PEER_STATS_NUM_BW_COUNTERS];
  1644. A_UINT32 tx_stbc[HTT_TX_PEER_STATS_NUM_MCS_COUNTERS];
  1645. A_UINT32 tx_pream[HTT_TX_PEER_STATS_NUM_PREAMBLE_TYPES];
  1646. /**
  1647. * Counters to track number of tx packets in each GI
  1648. * (400us, 800us, 1600us & 3200us) in each mcs (0-11)
  1649. */
  1650. A_UINT32 tx_gi[HTT_TX_PEER_STATS_NUM_GI_COUNTERS][HTT_TX_PEER_STATS_NUM_MCS_COUNTERS];
  1651. /** Counters to track packets in dcm mcs (MCS 0, 1, 3, 4) */
  1652. A_UINT32 tx_dcm[HTT_TX_PEER_STATS_NUM_DCM_COUNTERS];
  1653. /** Stats for MCS 12/13 */
  1654. A_UINT32 tx_mcs_ext[HTT_TX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS];
  1655. A_UINT32 tx_su_mcs_ext[HTT_TX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS];
  1656. A_UINT32 tx_mu_mcs_ext[HTT_TX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS];
  1657. A_UINT32 tx_stbc_ext[HTT_TX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS];
  1658. A_UINT32 tx_gi_ext[HTT_TX_PEER_STATS_NUM_GI_COUNTERS][HTT_TX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS];
  1659. A_UINT32 reduced_tx_bw[HTT_TX_PEER_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_PEER_STATS_NUM_BW_COUNTERS];
  1660. A_UINT32 tx_bw_320mhz;
  1661. } htt_tx_peer_rate_stats_tlv;
  1662. #define HTT_RX_PEER_STATS_NUM_MCS_COUNTERS 12 /* 0-11 */
  1663. #define HTT_RX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS 2 /* 12, 13 */
  1664. #define HTT_RX_PEER_STATS_NUM_GI_COUNTERS 4
  1665. #define HTT_RX_PEER_STATS_NUM_DCM_COUNTERS 5
  1666. #define HTT_RX_PEER_STATS_NUM_BW_COUNTERS 4
  1667. #define HTT_RX_PEER_STATS_NUM_SPATIAL_STREAMS 8
  1668. #define HTT_RX_PEER_STATS_NUM_PREAMBLE_TYPES HTT_STATS_PREAM_COUNT
  1669. #define HTT_RX_PEER_STATS_NUM_REDUCED_CHAN_TYPES 2 /* 0 - Half, 1 - Quarter */
  1670. typedef struct _htt_rx_peer_rate_stats_tlv {
  1671. htt_tlv_hdr_t tlv_hdr;
  1672. A_UINT32 nsts;
  1673. /** Number of rx LDPC packets */
  1674. A_UINT32 rx_ldpc;
  1675. /** Number of rx RTS packets */
  1676. A_UINT32 rts_cnt;
  1677. /** units = dB above noise floor */
  1678. A_UINT32 rssi_mgmt;
  1679. /** units = dB above noise floor */
  1680. A_UINT32 rssi_data;
  1681. /** units = dB above noise floor */
  1682. A_UINT32 rssi_comb;
  1683. A_UINT32 rx_mcs[HTT_RX_PEER_STATS_NUM_MCS_COUNTERS];
  1684. /**
  1685. * element 0,1, ...7 -> NSS 1,2, ...8
  1686. */
  1687. A_UINT32 rx_nss[HTT_RX_PEER_STATS_NUM_SPATIAL_STREAMS];
  1688. A_UINT32 rx_dcm[HTT_RX_PEER_STATS_NUM_DCM_COUNTERS];
  1689. A_UINT32 rx_stbc[HTT_RX_PEER_STATS_NUM_MCS_COUNTERS];
  1690. /**
  1691. * element 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160 and 80+80 MHz
  1692. */
  1693. A_UINT32 rx_bw[HTT_RX_PEER_STATS_NUM_BW_COUNTERS];
  1694. A_UINT32 rx_pream[HTT_RX_PEER_STATS_NUM_PREAMBLE_TYPES];
  1695. /** units = dB above noise floor */
  1696. A_UINT8 rssi_chain[HTT_RX_PEER_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PEER_STATS_NUM_BW_COUNTERS];
  1697. /** Counters to track number of rx packets in each GI in each mcs (0-11) */
  1698. A_UINT32 rx_gi[HTT_RX_PEER_STATS_NUM_GI_COUNTERS][HTT_RX_PEER_STATS_NUM_MCS_COUNTERS];
  1699. A_UINT32 rx_ulofdma_non_data_ppdu; /** PPDU level */
  1700. A_UINT32 rx_ulofdma_data_ppdu; /** PPDU level */
  1701. A_UINT32 rx_ulofdma_mpdu_ok; /** MPDU level */
  1702. A_UINT32 rx_ulofdma_mpdu_fail; /** MPDU level */
  1703. A_INT8 rx_ul_fd_rssi[HTT_RX_PEER_STATS_NUM_SPATIAL_STREAMS]; /* dBm unit */
  1704. /* per_chain_rssi_pkt_type:
  1705. * This field shows what type of rx frame the per-chain RSSI was computed
  1706. * on, by recording the frame type and sub-type as bit-fields within this
  1707. * field:
  1708. * BIT [3 : 0] :- IEEE80211_FC0_TYPE
  1709. * BIT [7 : 4] :- IEEE80211_FC0_SUBTYPE
  1710. * BIT [31 : 8] :- Reserved
  1711. */
  1712. A_UINT32 per_chain_rssi_pkt_type;
  1713. A_INT8 rx_per_chain_rssi_in_dbm[HTT_RX_PEER_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PEER_STATS_NUM_BW_COUNTERS];
  1714. /** PPDU level */
  1715. A_UINT32 rx_ulmumimo_non_data_ppdu;
  1716. /** PPDU level */
  1717. A_UINT32 rx_ulmumimo_data_ppdu;
  1718. /** MPDU level */
  1719. A_UINT32 rx_ulmumimo_mpdu_ok;
  1720. /** mpdu level */
  1721. A_UINT32 rx_ulmumimo_mpdu_fail;
  1722. /** units = dB above noise floor */
  1723. A_UINT8 rssi_chain_ext[HTT_RX_PEER_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS];
  1724. /** Stats for MCS 12/13 */
  1725. A_UINT32 rx_mcs_ext[HTT_RX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS];
  1726. A_UINT32 rx_stbc_ext[HTT_RX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS];
  1727. A_UINT32 rx_gi_ext[HTT_RX_PEER_STATS_NUM_GI_COUNTERS][HTT_RX_PEER_STATS_NUM_EXTRA_MCS_COUNTERS];
  1728. A_UINT32 reduced_rx_bw[HTT_RX_PEER_STATS_NUM_REDUCED_CHAN_TYPES][HTT_RX_PEER_STATS_NUM_BW_COUNTERS];
  1729. A_INT8 rx_per_chain_rssi_in_dbm_ext[HTT_RX_PEER_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS];
  1730. } htt_rx_peer_rate_stats_tlv;
  1731. typedef enum {
  1732. HTT_PEER_STATS_REQ_MODE_NO_QUERY,
  1733. HTT_PEER_STATS_REQ_MODE_QUERY_TQM,
  1734. HTT_PEER_STATS_REQ_MODE_FLUSH_TQM,
  1735. } htt_peer_stats_req_mode_t;
  1736. typedef enum {
  1737. HTT_PEER_STATS_CMN_TLV = 0,
  1738. HTT_PEER_DETAILS_TLV = 1,
  1739. HTT_TX_PEER_RATE_STATS_TLV = 2,
  1740. HTT_RX_PEER_RATE_STATS_TLV = 3,
  1741. HTT_TX_TID_STATS_TLV = 4,
  1742. HTT_RX_TID_STATS_TLV = 5,
  1743. HTT_MSDU_FLOW_STATS_TLV = 6,
  1744. HTT_PEER_SCHED_STATS_TLV = 7,
  1745. HTT_PEER_AX_OFDMA_STATS_TLV = 8,
  1746. HTT_PEER_BE_OFDMA_STATS_TLV = 9,
  1747. HTT_PEER_STATS_MAX_TLV = 31,
  1748. } htt_peer_stats_tlv_enum;
  1749. typedef struct {
  1750. htt_tlv_hdr_t tlv_hdr;
  1751. A_UINT32 peer_id;
  1752. /** Num of DL schedules for peer */
  1753. A_UINT32 num_sched_dl;
  1754. /** Num od UL schedules for peer */
  1755. A_UINT32 num_sched_ul;
  1756. /** Peer TX time */
  1757. A_UINT32 peer_tx_active_dur_us_low;
  1758. A_UINT32 peer_tx_active_dur_us_high;
  1759. /** Peer RX time */
  1760. A_UINT32 peer_rx_active_dur_us_low;
  1761. A_UINT32 peer_rx_active_dur_us_high;
  1762. A_UINT32 peer_curr_rate_kbps;
  1763. } htt_peer_sched_stats_tlv;
  1764. typedef struct {
  1765. htt_tlv_hdr_t tlv_hdr;
  1766. A_UINT32 peer_id;
  1767. A_UINT32 ax_basic_trig_count;
  1768. A_UINT32 ax_basic_trig_err;
  1769. A_UINT32 ax_bsr_trig_count;
  1770. A_UINT32 ax_bsr_trig_err;
  1771. A_UINT32 ax_mu_bar_trig_count;
  1772. A_UINT32 ax_mu_bar_trig_err;
  1773. A_UINT32 ax_basic_trig_with_per;
  1774. A_UINT32 ax_bsr_trig_with_per;
  1775. A_UINT32 ax_mu_bar_trig_with_per;
  1776. /* is_airtime_large_for_dl_ofdma, is_airtime_large_for_ul_ofdma
  1777. * These fields contain 2 counters each. The first element in each
  1778. * array counts how many times the airtime is short enough to use
  1779. * OFDMA, and the second element in each array counts how many times the
  1780. * airtime is too large to select OFDMA for the PPDUs involving the peer.
  1781. */
  1782. A_UINT32 is_airtime_large_for_dl_ofdma[2];
  1783. A_UINT32 is_airtime_large_for_ul_ofdma[2];
  1784. /* Last updated value of DL and UL queue depths for each peer per AC */
  1785. A_UINT32 last_updated_dl_qdepth[HTT_NUM_AC_WMM];
  1786. A_UINT32 last_updated_ul_qdepth[HTT_NUM_AC_WMM];
  1787. /* Per peer Manual 11ax UL OFDMA trigger and trigger error counts */
  1788. A_UINT32 ax_manual_ulofdma_trig_count;
  1789. A_UINT32 ax_manual_ulofdma_trig_err_count;
  1790. } htt_peer_ax_ofdma_stats_tlv;
  1791. typedef struct {
  1792. htt_tlv_hdr_t tlv_hdr;
  1793. A_UINT32 peer_id;
  1794. /* Per peer Manual 11be UL OFDMA trigger and trigger error counts */
  1795. A_UINT32 be_manual_ulofdma_trig_count;
  1796. A_UINT32 be_manual_ulofdma_trig_err_count;
  1797. } htt_peer_be_ofdma_stats_tlv;
  1798. /* config_param0 */
  1799. #define HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR_M 0x00000001
  1800. #define HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR_S 0
  1801. #define HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR_GET(_var) \
  1802. (((_var) & HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR_M) >> \
  1803. HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR_S)
  1804. #define HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR_SET(_var, _val) \
  1805. do { \
  1806. HTT_CHECK_SET_VAL(HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR, _val); \
  1807. ((_var) |= ((_val) << HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR_S)); \
  1808. } while (0)
  1809. /* DEPRECATED
  1810. * The old IS_peer_MAC_ADDR_SET macro name is being retained for now,
  1811. * as an alias for the corrected macro name.
  1812. * If/when all references to the old name are removed, the definition of
  1813. * the old name will also be removed.
  1814. */
  1815. #define HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_peer_MAC_ADDR_SET HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR_SET
  1816. #define HTT_DBG_EXT_STATS_PEER_INFO_IS_MAC_ADDR_M 0x00000001
  1817. #define HTT_DBG_EXT_STATS_PEER_INFO_IS_MAC_ADDR_S 0
  1818. #define HTT_DBG_EXT_STATS_PEER_REQ_MODE_M 0x0000FFFE
  1819. #define HTT_DBG_EXT_STATS_PEER_REQ_MODE_S 1
  1820. #define HTT_DBG_EXT_STATS_PEER_INFO_SW_PEER_ID_M 0xFFFF0000
  1821. #define HTT_DBG_EXT_STATS_PEER_INFO_SW_PEER_ID_S 16
  1822. #define HTT_DBG_EXT_STATS_PEER_INFO_IS_MAC_ADDR_SET(_var, _val) \
  1823. do { \
  1824. HTT_CHECK_SET_VAL(HTT_DBG_EXT_STATS_PEER_INFO_IS_MAC_ADDR, _val); \
  1825. ((_var) |= ((_val) << HTT_DBG_EXT_STATS_PEER_INFO_IS_MAC_ADDR_S)); \
  1826. } while (0)
  1827. #define HTT_DBG_EXT_STATS_PEER_INFO_IS_MAC_ADDR_GET(_var) \
  1828. (((_var) & HTT_DBG_EXT_STATS_PEER_INFO_IS_MAC_ADDR_M) >> \
  1829. HTT_DBG_EXT_STATS_PEER_INFO_IS_MAC_ADDR_S)
  1830. #define HTT_DBG_EXT_STATS_PEER_REQ_MODE_GET(_var) \
  1831. (((_var) & HTT_DBG_EXT_STATS_PEER_REQ_MODE_M) >> \
  1832. HTT_DBG_EXT_STATS_PEER_REQ_MODE_S)
  1833. #define HTT_DBG_EXT_STATS_PEER_REQ_MODE_SET(_var, _val) \
  1834. do { \
  1835. ((_var) |= ((_val) << HTT_DBG_EXT_STATS_PEER_REQ_MODE_S)); \
  1836. } while (0)
  1837. #define HTT_DBG_EXT_STATS_PEER_INFO_SW_PEER_ID_GET(_var) \
  1838. (((_var) & HTT_DBG_EXT_STATS_PEER_INFO_SW_PEER_ID_M) >> \
  1839. HTT_DBG_EXT_STATS_PEER_INFO_SW_PEER_ID_S)
  1840. #define HTT_DBG_EXT_STATS_PEER_INFO_SW_PEER_ID_SET(_var, _val) \
  1841. do { \
  1842. ((_var) |= ((_val) << HTT_DBG_EXT_STATS_PEER_INFO_SW_PEER_ID_S)); \
  1843. } while (0)
  1844. /* STATS_TYPE : HTT_DBG_EXT_STATS_PEER_INFO
  1845. * TLV_TAGS:
  1846. * - HTT_STATS_PEER_STATS_CMN_TAG
  1847. * - HTT_STATS_PEER_DETAILS_TAG
  1848. * - HTT_STATS_PEER_TX_RATE_STATS_TAG
  1849. * - HTT_STATS_PEER_RX_RATE_STATS_TAG
  1850. * - HTT_STATS_TX_TID_DETAILS_TAG (multiple) (deprecated, so 0 elements in updated systems)
  1851. * - HTT_STATS_RX_TID_DETAILS_TAG (multiple)
  1852. * - HTT_STATS_PEER_MSDU_FLOWQ_TAG (multiple)
  1853. * - HTT_STATS_TX_TID_DETAILS_V1_TAG (multiple)
  1854. * - HTT_STATS_PEER_SCHED_STATS_TAG
  1855. * - HTT_STATS_PEER_AX_OFDMA_STATS_TAG
  1856. */
  1857. /* NOTE:
  1858. * This structure is for documentation, and cannot be safely used directly.
  1859. * Instead, use the constituent TLV structures to fill/parse.
  1860. */
  1861. typedef struct _htt_peer_stats {
  1862. htt_peer_stats_cmn_tlv cmn_tlv;
  1863. htt_peer_details_tlv peer_details;
  1864. /* from g_rate_info_stats */
  1865. htt_tx_peer_rate_stats_tlv tx_rate;
  1866. htt_rx_peer_rate_stats_tlv rx_rate;
  1867. htt_tx_tid_stats_tlv tx_tid_stats[1];
  1868. htt_rx_tid_stats_tlv rx_tid_stats[1];
  1869. htt_msdu_flow_stats_tlv msdu_flowq[1];
  1870. htt_tx_tid_stats_v1_tlv tx_tid_stats_v1[1];
  1871. htt_peer_sched_stats_tlv peer_sched_stats;
  1872. htt_peer_ax_ofdma_stats_tlv ax_ofdma_stats;
  1873. htt_peer_be_ofdma_stats_tlv be_ofdma_stats;
  1874. } htt_peer_stats_t;
  1875. /* =========== ACTIVE PEER LIST ========== */
  1876. /* STATS_TYPE: HTT_DBG_EXT_STATS_ACTIVE_PEERS_LIST
  1877. * TLV_TAGS:
  1878. * - HTT_STATS_PEER_DETAILS_TAG
  1879. */
  1880. /* NOTE:
  1881. * This structure is for documentation, and cannot be safely used directly.
  1882. * Instead, use the constituent TLV structures to fill/parse.
  1883. */
  1884. typedef struct {
  1885. htt_peer_details_tlv peer_details[1];
  1886. } htt_active_peer_details_list_t;
  1887. /* =========== MUMIMO HWQ stats =========== */
  1888. /* MU MIMO stats per hwQ */
  1889. typedef struct {
  1890. htt_tlv_hdr_t tlv_hdr;
  1891. /** number of MU MIMO schedules posted to HW */
  1892. A_UINT32 mu_mimo_sch_posted;
  1893. /** number of MU MIMO schedules failed to post */
  1894. A_UINT32 mu_mimo_sch_failed;
  1895. /** number of MU MIMO PPDUs posted to HW */
  1896. A_UINT32 mu_mimo_ppdu_posted;
  1897. } htt_tx_hwq_mu_mimo_sch_stats_tlv;
  1898. typedef struct {
  1899. htt_tlv_hdr_t tlv_hdr;
  1900. /** 11AC DL MU MIMO number of mpdus queued to HW, per user */
  1901. A_UINT32 mu_mimo_mpdus_queued_usr;
  1902. /** 11AC DL MU MIMO number of mpdus tried over the air, per user */
  1903. A_UINT32 mu_mimo_mpdus_tried_usr;
  1904. /** 11AC DL MU MIMO number of mpdus failed acknowledgement, per user */
  1905. A_UINT32 mu_mimo_mpdus_failed_usr;
  1906. /** 11AC DL MU MIMO number of mpdus re-queued to HW, per user */
  1907. A_UINT32 mu_mimo_mpdus_requeued_usr;
  1908. /** 11AC DL MU MIMO BA not received, per user */
  1909. A_UINT32 mu_mimo_err_no_ba_usr;
  1910. /** 11AC DL MU MIMO mpdu underrun encountered, per user */
  1911. A_UINT32 mu_mimo_mpdu_underrun_usr;
  1912. /** 11AC DL MU MIMO ampdu underrun encountered, per user */
  1913. A_UINT32 mu_mimo_ampdu_underrun_usr;
  1914. } htt_tx_hwq_mu_mimo_mpdu_stats_tlv;
  1915. #define HTT_TX_HWQ_MU_MIMO_CMN_STATS_MAC_ID_M 0x000000ff
  1916. #define HTT_TX_HWQ_MU_MIMO_CMN_STATS_MAC_ID_S 0
  1917. #define HTT_TX_HWQ_MU_MIMO_CMN_STATS_HWQ_ID_M 0x0000ff00
  1918. #define HTT_TX_HWQ_MU_MIMO_CMN_STATS_HWQ_ID_S 8
  1919. #define HTT_TX_HWQ_MU_MIMO_CMN_STATS_MAC_ID_GET(_var) \
  1920. (((_var) & HTT_TX_HWQ_MU_MIMO_CMN_STATS_MAC_ID_M) >> \
  1921. HTT_TX_HWQ_MU_MIMO_CMN_STATS_MAC_ID_S)
  1922. #define HTT_TX_HWQ_MU_MIMO_CMN_STATS_MAC_ID_SET(_var, _val) \
  1923. do { \
  1924. HTT_CHECK_SET_VAL(HTT_TX_HWQ_MU_MIMO_CMN_STATS_MAC_ID, _val); \
  1925. ((_var) |= ((_val) << HTT_TX_HWQ_MU_MIMO_CMN_STATS_MAC_ID_S)); \
  1926. } while (0)
  1927. #define HTT_TX_HWQ_MU_MIMO_CMN_STATS_HWQ_ID_GET(_var) \
  1928. (((_var) & HTT_TX_HWQ_MU_MIMO_CMN_STATS_HWQ_ID_M) >> \
  1929. HTT_TX_HWQ_MU_MIMO_CMN_STATS_HWQ_ID_S)
  1930. #define HTT_TX_HWQ_MU_MIMO_CMN_STATS_HWQ_ID_SET(_var, _val) \
  1931. do { \
  1932. HTT_CHECK_SET_VAL(HTT_TX_HWQ_MU_MIMO_CMN_STATS_HWQ_ID, _val); \
  1933. ((_var) |= ((_val) << HTT_TX_HWQ_MU_MIMO_CMN_STATS_HWQ_ID_S)); \
  1934. } while (0)
  1935. typedef struct {
  1936. htt_tlv_hdr_t tlv_hdr;
  1937. /**
  1938. * BIT [ 7 : 0] :- mac_id
  1939. * BIT [15 : 8] :- hwq_id
  1940. * BIT [31 : 16] :- reserved
  1941. */
  1942. A_UINT32 mac_id__hwq_id__word;
  1943. } htt_tx_hwq_mu_mimo_cmn_stats_tlv;
  1944. /* NOTE:
  1945. * This structure is for documentation, and cannot be safely used directly.
  1946. * Instead, use the constituent TLV structures to fill/parse.
  1947. */
  1948. typedef struct {
  1949. struct _hwq_mu_mimo_stats {
  1950. htt_tx_hwq_mu_mimo_cmn_stats_tlv cmn_tlv;
  1951. /** WAL_TX_STATS_MAX_GROUP_SIZE */
  1952. htt_tx_hwq_mu_mimo_sch_stats_tlv mu_mimo_sch_stats_tlv[1];
  1953. /** WAL_TX_STATS_TX_MAX_NUM_USERS */
  1954. htt_tx_hwq_mu_mimo_mpdu_stats_tlv mu_mimo_mpdu_stats_tlv[1];
  1955. } hwq[1];
  1956. } htt_tx_hwq_mu_mimo_stats_t;
  1957. /* == TX HWQ STATS == */
  1958. #define HTT_TX_HWQ_STATS_CMN_MAC_ID_M 0x000000ff
  1959. #define HTT_TX_HWQ_STATS_CMN_MAC_ID_S 0
  1960. #define HTT_TX_HWQ_STATS_CMN_HWQ_ID_M 0x0000ff00
  1961. #define HTT_TX_HWQ_STATS_CMN_HWQ_ID_S 8
  1962. #define HTT_TX_HWQ_STATS_CMN_MAC_ID_GET(_var) \
  1963. (((_var) & HTT_TX_HWQ_STATS_CMN_MAC_ID_M) >> \
  1964. HTT_TX_HWQ_STATS_CMN_MAC_ID_S)
  1965. #define HTT_TX_HWQ_STATS_CMN_MAC_ID_SET(_var, _val) \
  1966. do { \
  1967. HTT_CHECK_SET_VAL(HTT_TX_HWQ_STATS_CMN_MAC_ID, _val); \
  1968. ((_var) |= ((_val) << HTT_TX_HWQ_STATS_CMN_MAC_ID_S)); \
  1969. } while (0)
  1970. #define HTT_TX_HWQ_STATS_CMN_HWQ_ID_GET(_var) \
  1971. (((_var) & HTT_TX_HWQ_STATS_CMN_HWQ_ID_M) >> \
  1972. HTT_TX_HWQ_STATS_CMN_HWQ_ID_S)
  1973. #define HTT_TX_HWQ_STATS_CMN_HWQ_ID_SET(_var, _val) \
  1974. do { \
  1975. HTT_CHECK_SET_VAL(HTT_TX_HWQ_STATS_CMN_HWQ_ID, _val); \
  1976. ((_var) |= ((_val) << HTT_TX_HWQ_STATS_CMN_HWQ_ID_S)); \
  1977. } while (0)
  1978. typedef struct {
  1979. htt_tlv_hdr_t tlv_hdr;
  1980. /**
  1981. * BIT [ 7 : 0] :- mac_id
  1982. * BIT [15 : 8] :- hwq_id
  1983. * BIT [31 : 16] :- reserved
  1984. */
  1985. A_UINT32 mac_id__hwq_id__word;
  1986. /*--- PPDU level stats */
  1987. /** Number of times ack is failed for the PPDU scheduled on this txQ */
  1988. A_UINT32 xretry;
  1989. /** Number of times sched cmd status reported mpdu underrun */
  1990. A_UINT32 underrun_cnt;
  1991. /** Number of times sched cmd is flushed */
  1992. A_UINT32 flush_cnt;
  1993. /** Number of times sched cmd is filtered */
  1994. A_UINT32 filt_cnt;
  1995. /** Number of times HWSCH uploaded null mpdu bitmap */
  1996. A_UINT32 null_mpdu_bmap;
  1997. /**
  1998. * Number of times user ack or BA TLV is not seen on FES ring
  1999. * where it is expected to be
  2000. */
  2001. A_UINT32 user_ack_failure;
  2002. /** Number of times TQM processed ack TLV received from HWSCH */
  2003. A_UINT32 ack_tlv_proc;
  2004. /** Cache latest processed scheduler ID received from ack BA TLV */
  2005. A_UINT32 sched_id_proc;
  2006. /** Number of times TxPCU reported MPDUs transmitted for a user is zero */
  2007. A_UINT32 null_mpdu_tx_count;
  2008. /**
  2009. * Number of times SW did not see any MPDU info bitmap TLV
  2010. * on FES status ring
  2011. */
  2012. A_UINT32 mpdu_bmap_not_recvd;
  2013. /*--- Selfgen stats per hwQ */
  2014. /** Number of SU/MU BAR frames posted to hwQ */
  2015. A_UINT32 num_bar;
  2016. /** Number of RTS frames posted to hwQ */
  2017. A_UINT32 rts;
  2018. /** Number of cts2self frames posted to hwQ */
  2019. A_UINT32 cts2self;
  2020. /** Number of qos null frames posted to hwQ */
  2021. A_UINT32 qos_null;
  2022. /*--- MPDU level stats */
  2023. /** mpdus tried Tx by HWSCH/TQM */
  2024. A_UINT32 mpdu_tried_cnt;
  2025. /** mpdus queued to HWSCH */
  2026. A_UINT32 mpdu_queued_cnt;
  2027. /** mpdus tried but ack was not received */
  2028. A_UINT32 mpdu_ack_fail_cnt;
  2029. /** This will include sched cmd flush and time based discard */
  2030. A_UINT32 mpdu_filt_cnt;
  2031. /** Number of MPDUs for which ACK was successful but no Tx happened */
  2032. A_UINT32 false_mpdu_ack_count;
  2033. /** Number of times txq timeout happened */
  2034. A_UINT32 txq_timeout;
  2035. } htt_tx_hwq_stats_cmn_tlv;
  2036. #define HTT_TX_HWQ_DIFS_LATENCY_STATS_TLV_SZ(_num_elems) (sizeof(A_UINT32) + /* hist_intvl */ \
  2037. (sizeof(A_UINT32) * (_num_elems)))
  2038. /* NOTE: Variable length TLV, use length spec to infer array size */
  2039. typedef struct {
  2040. htt_tlv_hdr_t tlv_hdr;
  2041. A_UINT32 hist_intvl;
  2042. /** histogram of ppdu post to hwsch - > cmd status received */
  2043. A_UINT32 difs_latency_hist[1]; /* HTT_TX_HWQ_MAX_DIFS_LATENCY_BINS */
  2044. } htt_tx_hwq_difs_latency_stats_tlv_v;
  2045. #define HTT_TX_HWQ_CMD_RESULT_STATS_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  2046. /* NOTE: Variable length TLV, use length spec to infer array size */
  2047. typedef struct {
  2048. htt_tlv_hdr_t tlv_hdr;
  2049. /** Histogram of sched cmd result */
  2050. A_UINT32 cmd_result[1]; /* HTT_TX_HWQ_MAX_CMD_RESULT_STATS */
  2051. } htt_tx_hwq_cmd_result_stats_tlv_v;
  2052. #define HTT_TX_HWQ_CMD_STALL_STATS_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  2053. /* NOTE: Variable length TLV, use length spec to infer array size */
  2054. typedef struct {
  2055. htt_tlv_hdr_t tlv_hdr;
  2056. /** Histogram of various pause conitions */
  2057. A_UINT32 cmd_stall_status[1]; /* HTT_TX_HWQ_MAX_CMD_STALL_STATS */
  2058. } htt_tx_hwq_cmd_stall_stats_tlv_v;
  2059. #define HTT_TX_HWQ_FES_RESULT_STATS_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  2060. /* NOTE: Variable length TLV, use length spec to infer array size */
  2061. typedef struct {
  2062. htt_tlv_hdr_t tlv_hdr;
  2063. /** Histogram of number of user fes result */
  2064. A_UINT32 fes_result[1]; /* HTT_TX_HWQ_MAX_FES_RESULT_STATS */
  2065. } htt_tx_hwq_fes_result_stats_tlv_v;
  2066. #define HTT_TX_HWQ_TRIED_MPDU_CNT_HIST_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  2067. /* NOTE: Variable length TLV, use length spec to infer array size
  2068. *
  2069. * The hwq_tried_mpdu_cnt_hist is a histogram of MPDUs tries per HWQ.
  2070. * The tries here is the count of the MPDUS within a PPDU that the HW
  2071. * had attempted to transmit on air, for the HWSCH Schedule command
  2072. * submitted by FW in this HWQ .It is not the retry attempts. The
  2073. * histogram bins are 0-29, 30-59, 60-89 and so on. The are 10 bins
  2074. * in this histogram.
  2075. * they are defined in FW using the following macros
  2076. * #define WAL_MAX_TRIED_MPDU_CNT_HISTOGRAM 9
  2077. * #define WAL_TRIED_MPDU_CNT_HISTOGRAM_INTERVAL 30
  2078. *
  2079. * */
  2080. typedef struct {
  2081. htt_tlv_hdr_t tlv_hdr;
  2082. A_UINT32 hist_bin_size;
  2083. /** Histogram of number of mpdus on tried mpdu */
  2084. A_UINT32 tried_mpdu_cnt_hist[1]; /* HTT_TX_HWQ_TRIED_MPDU_CNT_HIST */
  2085. } htt_tx_hwq_tried_mpdu_cnt_hist_tlv_v;
  2086. #define HTT_TX_HWQ_TXOP_USED_CNT_HIST_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  2087. /* NOTE: Variable length TLV, use length spec to infer array size
  2088. *
  2089. * The txop_used_cnt_hist is the histogram of txop per burst. After
  2090. * completing the burst, we identify the txop used in the burst and
  2091. * incr the corresponding bin.
  2092. * Each bin represents 1ms & we have 10 bins in this histogram.
  2093. * they are defined in FW using the following macros
  2094. * #define WAL_MAX_TXOP_USED_CNT_HISTOGRAM 10
  2095. * #define WAL_TXOP_USED_HISTOGRAM_INTERVAL 1000 ( 1 ms )
  2096. *
  2097. * */
  2098. typedef struct {
  2099. htt_tlv_hdr_t tlv_hdr;
  2100. /** Histogram of txop used cnt */
  2101. A_UINT32 txop_used_cnt_hist[1]; /* HTT_TX_HWQ_TXOP_USED_CNT_HIST */
  2102. } htt_tx_hwq_txop_used_cnt_hist_tlv_v;
  2103. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_TX_HWQ
  2104. * TLV_TAGS:
  2105. * - HTT_STATS_STRING_TAG
  2106. * - HTT_STATS_TX_HWQ_CMN_TAG
  2107. * - HTT_STATS_TX_HWQ_DIFS_LATENCY_TAG
  2108. * - HTT_STATS_TX_HWQ_CMD_RESULT_TAG
  2109. * - HTT_STATS_TX_HWQ_CMD_STALL_TAG
  2110. * - HTT_STATS_TX_HWQ_FES_STATUS_TAG
  2111. * - HTT_STATS_TX_HWQ_TRIED_MPDU_CNT_HIST_TAG
  2112. * - HTT_STATS_TX_HWQ_TXOP_USED_CNT_HIST_TAG
  2113. */
  2114. /* NOTE:
  2115. * This structure is for documentation, and cannot be safely used directly.
  2116. * Instead, use the constituent TLV structures to fill/parse.
  2117. * General HWQ stats Mechanism:
  2118. * Once the host request for the stats, FW fill all the HWQ TAGS in a buffer
  2119. * for all the HWQ requested. & the FW send the buffer to host. In the
  2120. * buffer the HWQ ID is filled in mac_id__hwq_id, thus identifying each
  2121. * HWQ distinctly.
  2122. */
  2123. typedef struct _htt_tx_hwq_stats {
  2124. htt_stats_string_tlv hwq_str_tlv;
  2125. htt_tx_hwq_stats_cmn_tlv cmn_tlv;
  2126. htt_tx_hwq_difs_latency_stats_tlv_v difs_tlv;
  2127. htt_tx_hwq_cmd_result_stats_tlv_v cmd_result_tlv;
  2128. htt_tx_hwq_cmd_stall_stats_tlv_v cmd_stall_tlv;
  2129. htt_tx_hwq_fes_result_stats_tlv_v fes_stats_tlv;
  2130. htt_tx_hwq_tried_mpdu_cnt_hist_tlv_v tried_mpdu_tlv;
  2131. htt_tx_hwq_txop_used_cnt_hist_tlv_v txop_used_tlv;
  2132. } htt_tx_hwq_stats_t;
  2133. /* == TX SELFGEN STATS == */
  2134. #define HTT_TX_SELFGEN_CMN_STATS_MAC_ID_M 0x000000ff
  2135. #define HTT_TX_SELFGEN_CMN_STATS_MAC_ID_S 0
  2136. #define HTT_TX_SELFGEN_CMN_STATS_MAC_ID_GET(_var) \
  2137. (((_var) & HTT_TX_SELFGEN_CMN_STATS_MAC_ID_M) >> \
  2138. HTT_TX_SELFGEN_CMN_STATS_MAC_ID_S)
  2139. #define HTT_TX_SELFGEN_CMN_STATS_MAC_ID_SET(_var, _val) \
  2140. do { \
  2141. HTT_CHECK_SET_VAL(HTT_TX_SELFGEN_CMN_STATS_MAC_ID, _val); \
  2142. ((_var) |= ((_val) << HTT_TX_SELFGEN_CMN_STATS_MAC_ID_S)); \
  2143. } while (0)
  2144. typedef enum {
  2145. HTT_TXERR_NONE,
  2146. HTT_TXERR_RESP, /* response timeout, mismatch,
  2147. * BW mismatch, mimo ctrl mismatch,
  2148. * CRC error.. */
  2149. HTT_TXERR_FILT, /* blocked by tx filtering */
  2150. HTT_TXERR_FIFO, /* fifo, misc errors in HW */
  2151. HTT_TXERR_SWABORT, /* software initialted abort (TX_ABORT) */
  2152. HTT_TXERR_RESERVED1,
  2153. HTT_TXERR_RESERVED2,
  2154. HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS = 7,
  2155. HTT_TXERR_INVALID = 0xff,
  2156. } htt_tx_err_status_t;
  2157. /* Matching enum for htt_tx_selfgen_sch_tsflag_error_stats */
  2158. typedef enum {
  2159. HTT_TX_SELFGEN_SCH_TSFLAG_FLUSH_RCVD_ERR,
  2160. HTT_TX_SELFGEN_SCH_TSFLAG_FILT_SCHED_CMD_ERR,
  2161. HTT_TX_SELFGEN_SCH_TSFLAG_RESP_MISMATCH_ERR,
  2162. HTT_TX_SELFGEN_SCH_TSFLAG_RESP_CBF_MIMO_CTRL_MISMATCH_ERR,
  2163. HTT_TX_SELFGEN_SCH_TSFLAG_RESP_CBF_BW_MISMATCH_ERR,
  2164. HTT_TX_SELFGEN_SCH_TSFLAG_RETRY_COUNT_FAIL_ERR,
  2165. HTT_TX_SELFGEN_SCH_TSFLAG_RESP_TOO_LATE_RECEIVED_ERR,
  2166. HTT_TX_SELFGEN_SCH_TSFLAG_SIFS_STALL_NO_NEXT_CMD_ERR,
  2167. HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS = 8,
  2168. HTT_TX_SELFGEN_SCH_TSFLAG_ERROR_STATS_VALID = 8
  2169. } htt_tx_selfgen_sch_tsflag_error_stats;
  2170. typedef enum {
  2171. HTT_TX_MUMIMO_GRP_VALID,
  2172. HTT_TX_MUMIMO_GRP_INVALID_NUM_MU_USERS_EXCEEDED_MU_MAX_USERS,
  2173. HTT_TX_MUMIMO_GRP_INVALID_SCHED_ALGO_NOT_MU_COMPATIBLE_GID,
  2174. HTT_TX_MUMIMO_GRP_INVALID_NON_PRIMARY_GRP,
  2175. HTT_TX_MUMIMO_GRP_INVALID_ZERO_CANDIDATES,
  2176. HTT_TX_MUMIMO_GRP_INVALID_MORE_CANDIDATES,
  2177. HTT_TX_MUMIMO_GRP_INVALID_GROUP_SIZE_EXCEED_NSS,
  2178. HTT_TX_MUMIMO_GRP_INVALID_GROUP_INELIGIBLE,
  2179. HTT_TX_MUMIMO_GRP_INVALID,
  2180. HTT_TX_MUMIMO_GRP_INVALID_GROUP_EFF_MU_TPUT_OMBPS,
  2181. HTT_TX_MUMIMO_GRP_INVALID_MAX_REASON_CODE,
  2182. } htt_tx_mumimo_grp_invalid_reason_code_stats;
  2183. #define HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS 4
  2184. #define HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS 8
  2185. #define HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS 8
  2186. #define HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS 74
  2187. #define HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS 8
  2188. #define HTT_STATS_MAX_MUMIMO_GRP_SZ 8
  2189. /*
  2190. * Each bin represents a 300 mbps throughput
  2191. * [0] - 0-300mbps; [1] - 300-600mbps [2] - 600-900mbps; [3] - 900-1200mbps; [4] - 1200-1500mbps
  2192. * [5] - 1500-1800mbps; [6] - 1800-2100mbps; [7] - 2100-2400mbps; [8] - 2400-2700mbps; [9] - >=2700mbps
  2193. */
  2194. #define HTT_STATS_MUMIMO_TPUT_NUM_BINS 10
  2195. #define HTT_STATS_MAX_INVALID_REASON_CODE \
  2196. HTT_TX_MUMIMO_GRP_INVALID_MAX_REASON_CODE
  2197. /* Reasons stated in htt_tx_mumimo_grp_invalid_reason_code_stats */
  2198. #define HTT_TX_NUM_MUMIMO_GRP_INVALID_WORDS \
  2199. (HTT_STATS_MAX_MUMIMO_GRP_SZ * HTT_STATS_MAX_INVALID_REASON_CODE)
  2200. #define HTT_MAX_NUM_SBT_INTR 4
  2201. typedef struct {
  2202. htt_tlv_hdr_t tlv_hdr;
  2203. /*
  2204. * BIT [ 7 : 0] :- mac_id
  2205. * BIT [31 : 8] :- reserved
  2206. */
  2207. A_UINT32 mac_id__word;
  2208. /** BAR sent out for SU transmission */
  2209. A_UINT32 su_bar;
  2210. /** SW generated RTS frame sent */
  2211. A_UINT32 rts;
  2212. /** SW generated CTS-to-self frame sent */
  2213. A_UINT32 cts2self;
  2214. /** SW generated QOS NULL frame sent */
  2215. A_UINT32 qos_null;
  2216. /** BAR sent for MU user 1 */
  2217. A_UINT32 delayed_bar_1;
  2218. /** BAR sent for MU user 2 */
  2219. A_UINT32 delayed_bar_2;
  2220. /** BAR sent for MU user 3 */
  2221. A_UINT32 delayed_bar_3;
  2222. /** BAR sent for MU user 4 */
  2223. A_UINT32 delayed_bar_4;
  2224. /** BAR sent for MU user 5 */
  2225. A_UINT32 delayed_bar_5;
  2226. /** BAR sent for MU user 6 */
  2227. A_UINT32 delayed_bar_6;
  2228. /** BAR sent for MU user 7 */
  2229. A_UINT32 delayed_bar_7;
  2230. A_UINT32 bar_with_tqm_head_seq_num;
  2231. A_UINT32 bar_with_tid_seq_num;
  2232. /** SW generated RTS frame queued to the HW */
  2233. A_UINT32 su_sw_rts_queued;
  2234. /** SW generated RTS frame sent over the air */
  2235. A_UINT32 su_sw_rts_tried;
  2236. /** SW generated RTS frame completed with error */
  2237. A_UINT32 su_sw_rts_err;
  2238. /** SW generated RTS frame flushed */
  2239. A_UINT32 su_sw_rts_flushed;
  2240. /** CTS (RTS response) received in different BW */
  2241. A_UINT32 su_sw_rts_rcvd_cts_diff_bw;
  2242. /* START DEPRECATED FIELDS */
  2243. /** 11AX HE MU Combined Freq. BSRP Trigger frame sent over the air */
  2244. A_UINT32 combined_ax_bsr_trigger_tried[HTT_NUM_AC_WMM];
  2245. /** 11AX HE MU Combined Freq. BSRP Trigger completed with error(s) */
  2246. A_UINT32 combined_ax_bsr_trigger_err[HTT_NUM_AC_WMM];
  2247. /** 11AX HE MU Standalone Freq. BSRP Trigger frame sent over the air */
  2248. A_UINT32 standalone_ax_bsr_trigger_tried[HTT_NUM_AC_WMM];
  2249. /** 11AX HE MU Standalone Freq. BSRP Trigger completed with error(s) */
  2250. A_UINT32 standalone_ax_bsr_trigger_err[HTT_NUM_AC_WMM];
  2251. /* END DEPRECATED FIELDS */
  2252. /** smart_basic_trig_sch_histogram:
  2253. * Count how many times the interval between predictive basic triggers
  2254. * sent to a given STA based on analysis of that STA's traffic patterns
  2255. * is within a given range:
  2256. *
  2257. * smart_basic_trig_sch_histogram[0]: SBT interval <= 10 ms
  2258. * smart_basic_trig_sch_histogram[1]: 10 ms < SBT interval <= 20 ms
  2259. * smart_basic_trig_sch_histogram[2]: 20 ms < SBT interval <= 30 ms
  2260. * smart_basic_trig_sch_histogram[3]: 30 ms < SBT interval <= 40 ms
  2261. *
  2262. * (Smart basic triggers are only used with intervals <= 40 ms.)
  2263. */
  2264. A_UINT32 smart_basic_trig_sch_histogram[HTT_MAX_NUM_SBT_INTR];
  2265. } htt_tx_selfgen_cmn_stats_tlv;
  2266. typedef struct {
  2267. htt_tlv_hdr_t tlv_hdr;
  2268. /** 11AC VHT SU NDPA frame sent over the air */
  2269. A_UINT32 ac_su_ndpa;
  2270. /** 11AC VHT SU NDP frame sent over the air */
  2271. A_UINT32 ac_su_ndp;
  2272. /** 11AC VHT MU MIMO NDPA frame sent over the air */
  2273. A_UINT32 ac_mu_mimo_ndpa;
  2274. /** 11AC VHT MU MIMO NDP frame sent over the air */
  2275. A_UINT32 ac_mu_mimo_ndp;
  2276. /** 11AC VHT MU MIMO BR-POLL for user 1 sent over the air */
  2277. A_UINT32 ac_mu_mimo_brpoll_1;
  2278. /** 11AC VHT MU MIMO BR-POLL for user 2 sent over the air */
  2279. A_UINT32 ac_mu_mimo_brpoll_2;
  2280. /** 11AC VHT MU MIMO BR-POLL for user 3 sent over the air */
  2281. A_UINT32 ac_mu_mimo_brpoll_3;
  2282. /** 11AC VHT SU NDPA frame queued to the HW */
  2283. A_UINT32 ac_su_ndpa_queued;
  2284. /** 11AC VHT SU NDP frame queued to the HW */
  2285. A_UINT32 ac_su_ndp_queued;
  2286. /** 11AC VHT MU MIMO NDPA frame queued to the HW */
  2287. A_UINT32 ac_mu_mimo_ndpa_queued;
  2288. /** 11AC VHT MU MIMO NDP frame queued to the HW */
  2289. A_UINT32 ac_mu_mimo_ndp_queued;
  2290. /** 11AC VHT MU MIMO BR-POLL for user 1 frame queued to the HW */
  2291. A_UINT32 ac_mu_mimo_brpoll_1_queued;
  2292. /** 11AC VHT MU MIMO BR-POLL for user 2 frame queued to the HW */
  2293. A_UINT32 ac_mu_mimo_brpoll_2_queued;
  2294. /** 11AC VHT MU MIMO BR-POLL for user 3 frame queued to the HW */
  2295. A_UINT32 ac_mu_mimo_brpoll_3_queued;
  2296. } htt_tx_selfgen_ac_stats_tlv;
  2297. typedef struct {
  2298. htt_tlv_hdr_t tlv_hdr;
  2299. /** 11AX HE SU NDPA frame sent over the air */
  2300. A_UINT32 ax_su_ndpa;
  2301. /** 11AX HE NDP frame sent over the air */
  2302. A_UINT32 ax_su_ndp;
  2303. /** 11AX HE MU MIMO NDPA frame sent over the air */
  2304. A_UINT32 ax_mu_mimo_ndpa;
  2305. /** 11AX HE MU MIMO NDP frame sent over the air */
  2306. A_UINT32 ax_mu_mimo_ndp;
  2307. union {
  2308. struct {
  2309. /* deprecated old names */
  2310. A_UINT32 ax_mu_mimo_brpoll_1;
  2311. A_UINT32 ax_mu_mimo_brpoll_2;
  2312. A_UINT32 ax_mu_mimo_brpoll_3;
  2313. A_UINT32 ax_mu_mimo_brpoll_4;
  2314. A_UINT32 ax_mu_mimo_brpoll_5;
  2315. A_UINT32 ax_mu_mimo_brpoll_6;
  2316. A_UINT32 ax_mu_mimo_brpoll_7;
  2317. };
  2318. /** 11AX HE MU BR-POLL frame for users 1 - 7 sent over the air */
  2319. A_UINT32 ax_mu_mimo_brpoll[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS - 1];
  2320. };
  2321. /** 11AX HE MU Basic Trigger frame sent over the air */
  2322. A_UINT32 ax_basic_trigger;
  2323. /** 11AX HE MU BSRP Trigger frame sent over the air */
  2324. A_UINT32 ax_bsr_trigger;
  2325. /** 11AX HE MU BAR Trigger frame sent over the air */
  2326. A_UINT32 ax_mu_bar_trigger;
  2327. /** 11AX HE MU RTS Trigger frame sent over the air */
  2328. A_UINT32 ax_mu_rts_trigger;
  2329. /** 11AX HE MU UL-MUMIMO Trigger frame sent over the air */
  2330. A_UINT32 ax_ulmumimo_trigger;
  2331. /** 11AX HE SU NDPA frame queued to the HW */
  2332. A_UINT32 ax_su_ndpa_queued;
  2333. /** 11AX HE SU NDP frame queued to the HW */
  2334. A_UINT32 ax_su_ndp_queued;
  2335. /** 11AX HE MU MIMO NDPA frame queued to the HW */
  2336. A_UINT32 ax_mu_mimo_ndpa_queued;
  2337. /** 11AX HE MU MIMO NDP frame queued to the HW */
  2338. A_UINT32 ax_mu_mimo_ndp_queued;
  2339. /** 11AX HE MU BR-POLL frame for users 1 - 7 queued to the HW */
  2340. A_UINT32 ax_mu_mimo_brpoll_queued[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS - 1];
  2341. /**
  2342. * 11AX HE UL-MUMIMO Trigger frame for users 0 - 7
  2343. * successfully sent over the air
  2344. */
  2345. A_UINT32 ax_ul_mumimo_trigger[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
  2346. /** 11AX HE MU Combined Freq. BSRP Trigger frame sent over the air */
  2347. A_UINT32 combined_ax_bsr_trigger_tried[HTT_NUM_AC_WMM];
  2348. /** 11AX HE MU Combined Freq. BSRP Trigger completed with error(s) */
  2349. A_UINT32 combined_ax_bsr_trigger_err[HTT_NUM_AC_WMM];
  2350. /** 11AX HE MU Standalone Freq. BSRP Trigger frame sent over the air */
  2351. A_UINT32 standalone_ax_bsr_trigger_tried[HTT_NUM_AC_WMM];
  2352. /** 11AX HE MU Standalone Freq. BSRP Trigger completed with error(s) */
  2353. A_UINT32 standalone_ax_bsr_trigger_err[HTT_NUM_AC_WMM];
  2354. /** 11AX HE Manual Single-User UL OFDMA Trigger frame sent over the air */
  2355. A_UINT32 manual_ax_su_ulofdma_basic_trigger[HTT_NUM_AC_WMM];
  2356. /** 11AX HE Manual Single-User UL OFDMA Trigger completed with error(s) */
  2357. A_UINT32 manual_ax_su_ulofdma_basic_trigger_err[HTT_NUM_AC_WMM];
  2358. /** 11AX HE Manual Multi-User UL OFDMA Trigger frame sent over the air */
  2359. A_UINT32 manual_ax_mu_ulofdma_basic_trigger[HTT_NUM_AC_WMM];
  2360. /** 11AX HE Manual Multi-User UL OFDMA Trigger completed with error(s) */
  2361. A_UINT32 manual_ax_mu_ulofdma_basic_trigger_err[HTT_NUM_AC_WMM];
  2362. } htt_tx_selfgen_ax_stats_tlv;
  2363. typedef struct {
  2364. htt_tlv_hdr_t tlv_hdr;
  2365. /** 11be EHT SU NDPA frame sent over the air */
  2366. A_UINT32 be_su_ndpa;
  2367. /** 11be EHT NDP frame sent over the air */
  2368. A_UINT32 be_su_ndp;
  2369. /** 11be EHT MU MIMO NDPA frame sent over the air */
  2370. A_UINT32 be_mu_mimo_ndpa;
  2371. /** 11be EHT MU MIMO NDP frame sent over theT air */
  2372. A_UINT32 be_mu_mimo_ndp;
  2373. /** 11be EHT MU BR-POLL frame for users 1 - 7 sent over the air */
  2374. A_UINT32 be_mu_mimo_brpoll[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS - 1];
  2375. /** 11be EHT MU Basic Trigger frame sent over the air */
  2376. A_UINT32 be_basic_trigger;
  2377. /** 11be EHT MU BSRP Trigger frame sent over the air */
  2378. A_UINT32 be_bsr_trigger;
  2379. /** 11be EHT MU BAR Trigger frame sent over the air */
  2380. A_UINT32 be_mu_bar_trigger;
  2381. /** 11be EHT MU RTS Trigger frame sent over the air */
  2382. A_UINT32 be_mu_rts_trigger;
  2383. /** 11be EHT MU UL-MUMIMO Trigger frame sent over the air */
  2384. A_UINT32 be_ulmumimo_trigger;
  2385. /** 11be EHT SU NDPA frame queued to the HW */
  2386. A_UINT32 be_su_ndpa_queued;
  2387. /** 11be EHT SU NDP frame queued to the HW */
  2388. A_UINT32 be_su_ndp_queued;
  2389. /** 11be EHT MU MIMO NDPA frame queued to the HW */
  2390. A_UINT32 be_mu_mimo_ndpa_queued;
  2391. /** 11be EHT MU MIMO NDP frame queued to the HW */
  2392. A_UINT32 be_mu_mimo_ndp_queued;
  2393. /** 11be EHT MU BR-POLL frame for users 1 - 7 queued to the HW */
  2394. A_UINT32 be_mu_mimo_brpoll_queued[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS - 1];
  2395. /**
  2396. * 11be EHT UL-MUMIMO Trigger frame for users 0 - 7
  2397. * successfully sent over the air
  2398. */
  2399. A_UINT32 be_ul_mumimo_trigger[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS];
  2400. /** 11BE EHT MU Combined Freq. BSRP Trigger frame sent over the air */
  2401. A_UINT32 combined_be_bsr_trigger_tried[HTT_NUM_AC_WMM];
  2402. /** 11BE EHT MU Combined Freq. BSRP Trigger completed with error(s) */
  2403. A_UINT32 combined_be_bsr_trigger_err[HTT_NUM_AC_WMM];
  2404. /** 11BE EHT MU Standalone Freq. BSRP Trigger frame sent over the air */
  2405. A_UINT32 standalone_be_bsr_trigger_tried[HTT_NUM_AC_WMM];
  2406. /** 11BE EHT MU Standalone Freq. BSRP Trigger completed with error(s) */
  2407. A_UINT32 standalone_be_bsr_trigger_err[HTT_NUM_AC_WMM];
  2408. /** 11BE EHT Manual Single-User UL OFDMA Trigger frame sent over the air */
  2409. A_UINT32 manual_be_su_ulofdma_basic_trigger[HTT_NUM_AC_WMM];
  2410. /** 11BE EHT Manual Single-User UL OFDMA Trigger completed with error(s) */
  2411. A_UINT32 manual_be_su_ulofdma_basic_trigger_err[HTT_NUM_AC_WMM];
  2412. /** 11BE EHT Manual Multi-User UL OFDMA Trigger frame sent over the air */
  2413. A_UINT32 manual_be_mu_ulofdma_basic_trigger[HTT_NUM_AC_WMM];
  2414. /** 11BE EHT Manual Multi-User UL OFDMA Trigger completed with error(s) */
  2415. A_UINT32 manual_be_mu_ulofdma_basic_trigger_err[HTT_NUM_AC_WMM];
  2416. } htt_tx_selfgen_be_stats_tlv;
  2417. typedef struct { /* DEPRECATED */
  2418. htt_tlv_hdr_t tlv_hdr;
  2419. /** 11AX HE OFDMA NDPA frame queued to the HW */
  2420. A_UINT32 ax_ofdma_ndpa_queued[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2421. /** 11AX HE OFDMA NDPA frame sent over the air */
  2422. A_UINT32 ax_ofdma_ndpa_tried[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2423. /** 11AX HE OFDMA NDPA frame flushed by HW */
  2424. A_UINT32 ax_ofdma_ndpa_flushed[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2425. /** 11AX HE OFDMA NDPA frame completed with error(s) */
  2426. A_UINT32 ax_ofdma_ndpa_err[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2427. } htt_txbf_ofdma_ndpa_stats_tlv;
  2428. typedef struct { /* DEPRECATED */
  2429. htt_tlv_hdr_t tlv_hdr;
  2430. /** 11AX HE OFDMA NDP frame queued to the HW */
  2431. A_UINT32 ax_ofdma_ndp_queued[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2432. /** 11AX HE OFDMA NDPA frame sent over the air */
  2433. A_UINT32 ax_ofdma_ndp_tried[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2434. /** 11AX HE OFDMA NDPA frame flushed by HW */
  2435. A_UINT32 ax_ofdma_ndp_flushed[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2436. /** 11AX HE OFDMA NDPA frame completed with error(s) */
  2437. A_UINT32 ax_ofdma_ndp_err[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2438. } htt_txbf_ofdma_ndp_stats_tlv;
  2439. typedef struct { /* DEPRECATED */
  2440. htt_tlv_hdr_t tlv_hdr;
  2441. /** 11AX HE OFDMA MU BRPOLL frame queued to the HW */
  2442. A_UINT32 ax_ofdma_brpoll_queued[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2443. /** 11AX HE OFDMA MU BRPOLL frame sent over the air */
  2444. A_UINT32 ax_ofdma_brpoll_tried[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2445. /** 11AX HE OFDMA MU BRPOLL frame flushed by HW */
  2446. A_UINT32 ax_ofdma_brpoll_flushed[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2447. /** 11AX HE OFDMA MU BRPOLL frame completed with error(s) */
  2448. A_UINT32 ax_ofdma_brp_err[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2449. /**
  2450. * Number of CBF(s) received when 11AX HE OFDMA MU BRPOLL frame
  2451. * completed with error(s)
  2452. */
  2453. A_UINT32 ax_ofdma_brp_err_num_cbf_rcvd[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS+1];
  2454. } htt_txbf_ofdma_brp_stats_tlv;
  2455. typedef struct { /* DEPRECATED */
  2456. htt_tlv_hdr_t tlv_hdr;
  2457. /**
  2458. * 11AX HE OFDMA PPDUs that were sent over the air with steering
  2459. * (TXBF + OFDMA)
  2460. */
  2461. A_UINT32 ax_ofdma_num_ppdu_steer[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2462. /** 11AX HE OFDMA PPDUs that were sent over the air in open loop */
  2463. A_UINT32 ax_ofdma_num_ppdu_ol[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2464. /**
  2465. * 11AX HE OFDMA number of users for which CBF prefetch was initiated
  2466. * to PHY HW during TX
  2467. */
  2468. A_UINT32 ax_ofdma_num_usrs_prefetch[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2469. /**
  2470. * 11AX HE OFDMA number of users for which sounding was initiated
  2471. * during TX
  2472. */
  2473. A_UINT32 ax_ofdma_num_usrs_sound[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2474. /** 11AX HE OFDMA number of users for which sounding was forced during TX */
  2475. A_UINT32 ax_ofdma_num_usrs_force_sound[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  2476. } htt_txbf_ofdma_steer_stats_tlv;
  2477. /* Note:
  2478. * This struct htt_tx_pdev_txbf_ofdma_stats_t and all its constituent
  2479. * struct TLVs are deprecated, due to the need for restructuring these
  2480. * stats into a variable length array
  2481. */
  2482. typedef struct { /* DEPRECATED */
  2483. htt_txbf_ofdma_ndpa_stats_tlv ofdma_ndpa_tlv;
  2484. htt_txbf_ofdma_ndp_stats_tlv ofdma_ndp_tlv;
  2485. htt_txbf_ofdma_brp_stats_tlv ofdma_brp_tlv;
  2486. htt_txbf_ofdma_steer_stats_tlv ofdma_steer_tlv;
  2487. } htt_tx_pdev_txbf_ofdma_stats_t;
  2488. typedef struct {
  2489. /** 11AX HE OFDMA NDPA frame queued to the HW */
  2490. A_UINT32 ax_ofdma_ndpa_queued;
  2491. /** 11AX HE OFDMA NDPA frame sent over the air */
  2492. A_UINT32 ax_ofdma_ndpa_tried;
  2493. /** 11AX HE OFDMA NDPA frame flushed by HW */
  2494. A_UINT32 ax_ofdma_ndpa_flushed;
  2495. /** 11AX HE OFDMA NDPA frame completed with error(s) */
  2496. A_UINT32 ax_ofdma_ndpa_err;
  2497. } htt_txbf_ofdma_ax_ndpa_stats_elem_t;
  2498. typedef struct {
  2499. htt_tlv_hdr_t tlv_hdr;
  2500. /**
  2501. * This field is populated with the num of elems in the ax_ndpa[]
  2502. * variable length array.
  2503. */
  2504. A_UINT32 num_elems_ax_ndpa_arr;
  2505. /**
  2506. * This field will be filled by target with value of
  2507. * sizeof(htt_txbf_ofdma_ax_ndpa_stats_elem_t).
  2508. * This is for allowing host to infer how much data target has provided,
  2509. * even if it using different version of the struct def than what target
  2510. * had used.
  2511. */
  2512. A_UINT32 arr_elem_size_ax_ndpa;
  2513. htt_txbf_ofdma_ax_ndpa_stats_elem_t ax_ndpa[1]; /* variable length */
  2514. } htt_txbf_ofdma_ax_ndpa_stats_tlv;
  2515. typedef struct {
  2516. /** 11AX HE OFDMA NDP frame queued to the HW */
  2517. A_UINT32 ax_ofdma_ndp_queued;
  2518. /** 11AX HE OFDMA NDPA frame sent over the air */
  2519. A_UINT32 ax_ofdma_ndp_tried;
  2520. /** 11AX HE OFDMA NDPA frame flushed by HW */
  2521. A_UINT32 ax_ofdma_ndp_flushed;
  2522. /** 11AX HE OFDMA NDPA frame completed with error(s) */
  2523. A_UINT32 ax_ofdma_ndp_err;
  2524. } htt_txbf_ofdma_ax_ndp_stats_elem_t;
  2525. typedef struct {
  2526. htt_tlv_hdr_t tlv_hdr;
  2527. /**
  2528. * This field is populated with the num of elems in the the ax_ndp[]
  2529. * variable length array.
  2530. */
  2531. A_UINT32 num_elems_ax_ndp_arr;
  2532. /**
  2533. * This field will be filled by target with value of
  2534. * sizeof(htt_txbf_ofdma_ax_ndp_stats_elem_t).
  2535. * This is for allowing host to infer how much data target has provided,
  2536. * even if it using different version of the struct def than what target
  2537. * had used.
  2538. */
  2539. A_UINT32 arr_elem_size_ax_ndp;
  2540. htt_txbf_ofdma_ax_ndp_stats_elem_t ax_ndp[1]; /* variable length */
  2541. } htt_txbf_ofdma_ax_ndp_stats_tlv;
  2542. typedef struct {
  2543. /** 11AX HE OFDMA MU BRPOLL frame queued to the HW */
  2544. A_UINT32 ax_ofdma_brpoll_queued;
  2545. /** 11AX HE OFDMA MU BRPOLL frame sent over the air */
  2546. A_UINT32 ax_ofdma_brpoll_tried;
  2547. /** 11AX HE OFDMA MU BRPOLL frame flushed by HW */
  2548. A_UINT32 ax_ofdma_brpoll_flushed;
  2549. /** 11AX HE OFDMA MU BRPOLL frame completed with error(s) */
  2550. A_UINT32 ax_ofdma_brp_err;
  2551. /**
  2552. * Number of CBF(s) received when 11AX HE OFDMA MU BRPOLL frame
  2553. * completed with error(s)
  2554. */
  2555. A_UINT32 ax_ofdma_brp_err_num_cbf_rcvd;
  2556. } htt_txbf_ofdma_ax_brp_stats_elem_t;
  2557. typedef struct {
  2558. htt_tlv_hdr_t tlv_hdr;
  2559. /**
  2560. * This field is populated with the num of elems in the the ax_brp[]
  2561. * variable length array.
  2562. */
  2563. A_UINT32 num_elems_ax_brp_arr;
  2564. /**
  2565. * This field will be filled by target with value of
  2566. * sizeof(htt_txbf_ofdma_ax_brp_stats_elem_t).
  2567. * This is for allowing host to infer how much data target has provided,
  2568. * even if it using different version of the struct than what target
  2569. * had used.
  2570. */
  2571. A_UINT32 arr_elem_size_ax_brp;
  2572. htt_txbf_ofdma_ax_brp_stats_elem_t ax_brp[1]; /* variable length */
  2573. } htt_txbf_ofdma_ax_brp_stats_tlv;
  2574. typedef struct {
  2575. /**
  2576. * 11AX HE OFDMA PPDUs that were sent over the air with steering
  2577. * (TXBF + OFDMA)
  2578. */
  2579. A_UINT32 ax_ofdma_num_ppdu_steer;
  2580. /** 11AX HE OFDMA PPDUs that were sent over the air in open loop */
  2581. A_UINT32 ax_ofdma_num_ppdu_ol;
  2582. /**
  2583. * 11AX HE OFDMA number of users for which CBF prefetch was initiated
  2584. * to PHY HW during TX
  2585. */
  2586. A_UINT32 ax_ofdma_num_usrs_prefetch;
  2587. /**
  2588. * 11AX HE OFDMA number of users for which sounding was initiated
  2589. * during TX
  2590. */
  2591. A_UINT32 ax_ofdma_num_usrs_sound;
  2592. /** 11AX HE OFDMA number of users for which sounding was forced during TX */
  2593. A_UINT32 ax_ofdma_num_usrs_force_sound;
  2594. } htt_txbf_ofdma_ax_steer_stats_elem_t;
  2595. typedef struct {
  2596. htt_tlv_hdr_t tlv_hdr;
  2597. /**
  2598. * This field is populated with the num of elems in the ax_steer[]
  2599. * variable length array.
  2600. */
  2601. A_UINT32 num_elems_ax_steer_arr;
  2602. /**
  2603. * This field will be filled by target with value of
  2604. * sizeof(htt_txbf_ofdma_ax_steer_stats_elem_t).
  2605. * This is for allowing host to infer how much data target has provided,
  2606. * even if it using different version of the struct than what target
  2607. * had used.
  2608. */
  2609. A_UINT32 arr_elem_size_ax_steer;
  2610. htt_txbf_ofdma_ax_steer_stats_elem_t ax_steer[1]; /* variable length */
  2611. } htt_txbf_ofdma_ax_steer_stats_tlv;
  2612. typedef struct {
  2613. htt_tlv_hdr_t tlv_hdr;
  2614. /* 11AX HE OFDMA MPDUs tried in rbo steering */
  2615. A_UINT32 ax_ofdma_rbo_steer_mpdus_tried;
  2616. /* 11AX HE OFDMA MPDUs failed in rbo steering */
  2617. A_UINT32 ax_ofdma_rbo_steer_mpdus_failed;
  2618. /* 11AX HE OFDMA MPDUs tried in sifs steering */
  2619. A_UINT32 ax_ofdma_sifs_steer_mpdus_tried;
  2620. /* 11AX HE OFDMA MPDUs failed in sifs steering */
  2621. A_UINT32 ax_ofdma_sifs_steer_mpdus_failed;
  2622. } htt_txbf_ofdma_ax_steer_mpdu_stats_tlv;
  2623. typedef struct {
  2624. /** 11BE EHT OFDMA NDPA frame queued to the HW */
  2625. A_UINT32 be_ofdma_ndpa_queued;
  2626. /** 11BE EHT OFDMA NDPA frame sent over the air */
  2627. A_UINT32 be_ofdma_ndpa_tried;
  2628. /** 11BE EHT OFDMA NDPA frame flushed by HW */
  2629. A_UINT32 be_ofdma_ndpa_flushed;
  2630. /** 11BE EHT OFDMA NDPA frame completed with error(s) */
  2631. A_UINT32 be_ofdma_ndpa_err;
  2632. } htt_txbf_ofdma_be_ndpa_stats_elem_t;
  2633. typedef struct {
  2634. htt_tlv_hdr_t tlv_hdr;
  2635. /**
  2636. * This field is populated with the num of elems in the be_ndpa[]
  2637. * variable length array.
  2638. */
  2639. A_UINT32 num_elems_be_ndpa_arr;
  2640. /**
  2641. * This field will be filled by target with value of
  2642. * sizeof(htt_txbf_ofdma_be_ndpa_stats_elem_t).
  2643. * This is for allowing host to infer how much data target has provided,
  2644. * even if it using different version of the struct than what target
  2645. * had used.
  2646. */
  2647. A_UINT32 arr_elem_size_be_ndpa;
  2648. htt_txbf_ofdma_be_ndpa_stats_elem_t be_ndpa[1]; /* variable length */
  2649. } htt_txbf_ofdma_be_ndpa_stats_tlv;
  2650. typedef struct {
  2651. /** 11BE EHT OFDMA NDP frame queued to the HW */
  2652. A_UINT32 be_ofdma_ndp_queued;
  2653. /** 11BE EHT OFDMA NDPA frame sent over the air */
  2654. A_UINT32 be_ofdma_ndp_tried;
  2655. /** 11BE EHT OFDMA NDPA frame flushed by HW */
  2656. A_UINT32 be_ofdma_ndp_flushed;
  2657. /** 11BE EHT OFDMA NDPA frame completed with error(s) */
  2658. A_UINT32 be_ofdma_ndp_err;
  2659. } htt_txbf_ofdma_be_ndp_stats_elem_t;
  2660. typedef struct {
  2661. htt_tlv_hdr_t tlv_hdr;
  2662. /**
  2663. * This field is populated with the num of elems in the be_ndp[]
  2664. * variable length array.
  2665. */
  2666. A_UINT32 num_elems_be_ndp_arr;
  2667. /**
  2668. * This field will be filled by target with value of
  2669. * sizeof(htt_txbf_ofdma_be_ndp_stats_elem_t).
  2670. * This is for allowing host to infer how much data target has provided,
  2671. * even if it using different version of the struct than what target
  2672. * had used.
  2673. */
  2674. A_UINT32 arr_elem_size_be_ndp;
  2675. htt_txbf_ofdma_be_ndp_stats_elem_t be_ndp[1]; /* variable length */
  2676. } htt_txbf_ofdma_be_ndp_stats_tlv;
  2677. typedef struct {
  2678. /** 11BE EHT OFDMA MU BRPOLL frame queued to the HW */
  2679. A_UINT32 be_ofdma_brpoll_queued;
  2680. /** 11BE EHT OFDMA MU BRPOLL frame sent over the air */
  2681. A_UINT32 be_ofdma_brpoll_tried;
  2682. /** 11BE EHT OFDMA MU BRPOLL frame flushed by HW */
  2683. A_UINT32 be_ofdma_brpoll_flushed;
  2684. /** 11BE EHT OFDMA MU BRPOLL frame completed with error(s) */
  2685. A_UINT32 be_ofdma_brp_err;
  2686. /**
  2687. * Number of CBF(s) received when 11BE EHT OFDMA MU BRPOLL frame
  2688. * completed with error(s)
  2689. */
  2690. A_UINT32 be_ofdma_brp_err_num_cbf_rcvd;
  2691. } htt_txbf_ofdma_be_brp_stats_elem_t;
  2692. typedef struct {
  2693. htt_tlv_hdr_t tlv_hdr;
  2694. /**
  2695. * This field is populated with the num of elems in the be_brp[]
  2696. * variable length array.
  2697. */
  2698. A_UINT32 num_elems_be_brp_arr;
  2699. /**
  2700. * This field will be filled by target with value of
  2701. * sizeof(htt_txbf_ofdma_be_brp_stats_elem_t).
  2702. * This is for allowing host to infer how much data target has provided,
  2703. * even if it using different version of the struct than what target
  2704. * had used
  2705. */
  2706. A_UINT32 arr_elem_size_be_brp;
  2707. htt_txbf_ofdma_be_brp_stats_elem_t be_brp[1]; /* variable length */
  2708. } htt_txbf_ofdma_be_brp_stats_tlv;
  2709. typedef struct {
  2710. /**
  2711. * 11BE EHT OFDMA PPDUs that were sent over the air with steering
  2712. * (TXBF + OFDMA)
  2713. */
  2714. A_UINT32 be_ofdma_num_ppdu_steer;
  2715. /** 11BE EHT OFDMA PPDUs that were sent over the air in open loop */
  2716. A_UINT32 be_ofdma_num_ppdu_ol;
  2717. /**
  2718. * 11BE EHT OFDMA number of users for which CBF prefetch was initiated
  2719. * to PHY HW during TX
  2720. */
  2721. A_UINT32 be_ofdma_num_usrs_prefetch;
  2722. /**
  2723. * 11BE EHT OFDMA number of users for which sounding was initiated
  2724. * during TX
  2725. */
  2726. A_UINT32 be_ofdma_num_usrs_sound;
  2727. /**
  2728. * 11BE EHT OFDMA number of users for which sounding was forced during TX
  2729. */
  2730. A_UINT32 be_ofdma_num_usrs_force_sound;
  2731. } htt_txbf_ofdma_be_steer_stats_elem_t;
  2732. typedef struct {
  2733. htt_tlv_hdr_t tlv_hdr;
  2734. /**
  2735. * This field is populated with the num of elems in the be_steer[]
  2736. * variable length array.
  2737. */
  2738. A_UINT32 num_elems_be_steer_arr;
  2739. /**
  2740. * This field will be filled by target with value of
  2741. * sizeof(htt_txbf_ofdma_be_steer_stats_elem_t).
  2742. * This is for allowing host to infer how much data target has provided,
  2743. * even if it using different version of the struct than what target
  2744. * had used.
  2745. */
  2746. A_UINT32 arr_elem_size_be_steer;
  2747. htt_txbf_ofdma_be_steer_stats_elem_t be_steer[1]; /* variable length */
  2748. } htt_txbf_ofdma_be_steer_stats_tlv;
  2749. typedef struct {
  2750. htt_tlv_hdr_t tlv_hdr;
  2751. /* 11BE EHT OFDMA MPDUs tried in rbo steering */
  2752. A_UINT32 be_ofdma_rbo_steer_mpdus_tried;
  2753. /* 11BE EHT OFDMA MPDUs failed in rbo steering */
  2754. A_UINT32 be_ofdma_rbo_steer_mpdus_failed;
  2755. /* 11BE EHT OFDMA MPDUs tried in sifs steering */
  2756. A_UINT32 be_ofdma_sifs_steer_mpdus_tried;
  2757. /* 11BE EHT OFDMA MPDUs failed in sifs steering */
  2758. A_UINT32 be_ofdma_sifs_steer_mpdus_failed;
  2759. } htt_txbf_ofdma_be_steer_mpdu_stats_tlv;
  2760. /* STATS_TYPE : HTT_DBG_EXT_STATS_TXBF_OFDMA
  2761. * TLV_TAGS:
  2762. * - HTT_STATS_TXBF_OFDMA_NDPA_STATS_TAG
  2763. * - HTT_STATS_TXBF_OFDMA_NDP_STATS_TAG
  2764. * - HTT_STATS_TXBF_OFDMA_BRP_STATS_TAG
  2765. * - HTT_STATS_TXBF_OFDMA_STEER_STATS_TAG
  2766. * - HTT_STATS_TXBF_OFDMA_AX_STEER_MPDU_STATS_TAG
  2767. * - HTT_STATS_TXBF_OFDMA_BE_NDPA_STATS_TAG
  2768. * - HTT_STATS_TXBF_OFDMA_BE_NDP_STATS_TAG
  2769. * - HTT_STATS_TXBF_OFDMA_BE_BRP_STATS_TAG
  2770. * - HTT_STATS_TXBF_OFDMA_BE_STEER_STATS_TAG
  2771. * - HTT_STATS_TXBF_OFDMA_BE_STEER_MPDU_STATS_TAG
  2772. */
  2773. typedef struct {
  2774. htt_tlv_hdr_t tlv_hdr;
  2775. /** 11AC VHT SU NDP frame completed with error(s) */
  2776. A_UINT32 ac_su_ndp_err;
  2777. /** 11AC VHT SU NDPA frame completed with error(s) */
  2778. A_UINT32 ac_su_ndpa_err;
  2779. /** 11AC VHT MU MIMO NDPA frame completed with error(s) */
  2780. A_UINT32 ac_mu_mimo_ndpa_err;
  2781. /** 11AC VHT MU MIMO NDP frame completed with error(s) */
  2782. A_UINT32 ac_mu_mimo_ndp_err;
  2783. /** 11AC VHT MU MIMO BRPOLL for user 1 frame completed with error(s) */
  2784. A_UINT32 ac_mu_mimo_brp1_err;
  2785. /** 11AC VHT MU MIMO BRPOLL for user 2 frame completed with error(s) */
  2786. A_UINT32 ac_mu_mimo_brp2_err;
  2787. /** 11AC VHT MU MIMO BRPOLL for user 3 frame completed with error(s) */
  2788. A_UINT32 ac_mu_mimo_brp3_err;
  2789. /** 11AC VHT SU NDPA frame flushed by HW */
  2790. A_UINT32 ac_su_ndpa_flushed;
  2791. /** 11AC VHT SU NDP frame flushed by HW */
  2792. A_UINT32 ac_su_ndp_flushed;
  2793. /** 11AC VHT MU MIMO NDPA frame flushed by HW */
  2794. A_UINT32 ac_mu_mimo_ndpa_flushed;
  2795. /** 11AC VHT MU MIMO NDP frame flushed by HW */
  2796. A_UINT32 ac_mu_mimo_ndp_flushed;
  2797. /** 11AC VHT MU MIMO BRPOLL for user 1 frame flushed by HW */
  2798. A_UINT32 ac_mu_mimo_brpoll1_flushed;
  2799. /** 11AC VHT MU MIMO BRPOLL for user 2 frame flushed by HW */
  2800. A_UINT32 ac_mu_mimo_brpoll2_flushed;
  2801. /** 11AC VHT MU MIMO BRPOLL for user 3 frame flushed by HW */
  2802. A_UINT32 ac_mu_mimo_brpoll3_flushed;
  2803. } htt_tx_selfgen_ac_err_stats_tlv;
  2804. typedef struct {
  2805. htt_tlv_hdr_t tlv_hdr;
  2806. /** 11AX HE SU NDP frame completed with error(s) */
  2807. A_UINT32 ax_su_ndp_err;
  2808. /** 11AX HE SU NDPA frame completed with error(s) */
  2809. A_UINT32 ax_su_ndpa_err;
  2810. /** 11AX HE MU MIMO NDPA frame completed with error(s) */
  2811. A_UINT32 ax_mu_mimo_ndpa_err;
  2812. /** 11AX HE MU MIMO NDP frame completed with error(s) */
  2813. A_UINT32 ax_mu_mimo_ndp_err;
  2814. union {
  2815. struct {
  2816. /* deprecated old names */
  2817. A_UINT32 ax_mu_mimo_brp1_err;
  2818. A_UINT32 ax_mu_mimo_brp2_err;
  2819. A_UINT32 ax_mu_mimo_brp3_err;
  2820. A_UINT32 ax_mu_mimo_brp4_err;
  2821. A_UINT32 ax_mu_mimo_brp5_err;
  2822. A_UINT32 ax_mu_mimo_brp6_err;
  2823. A_UINT32 ax_mu_mimo_brp7_err;
  2824. };
  2825. /** 11AX HE MU BR-POLL frame for 1 - 7 users completed with error(s) */
  2826. A_UINT32 ax_mu_mimo_brp_err[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS - 1];
  2827. };
  2828. /** 11AX HE MU Basic Trigger frame completed with error(s) */
  2829. A_UINT32 ax_basic_trigger_err;
  2830. /** 11AX HE MU BSRP Trigger frame completed with error(s) */
  2831. A_UINT32 ax_bsr_trigger_err;
  2832. /** 11AX HE MU BAR Trigger frame completed with error(s) */
  2833. A_UINT32 ax_mu_bar_trigger_err;
  2834. /** 11AX HE MU RTS Trigger frame completed with error(s) */
  2835. A_UINT32 ax_mu_rts_trigger_err;
  2836. /** 11AX HE MU ULMUMIMO Trigger frame completed with error(s) */
  2837. A_UINT32 ax_ulmumimo_trigger_err;
  2838. /**
  2839. * Number of CBF(s) received when 11AX HE MU MIMO BRPOLL
  2840. * frame completed with error(s)
  2841. */
  2842. A_UINT32 ax_mu_mimo_brp_err_num_cbf_received[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
  2843. /** 11AX HE SU NDPA frame flushed by HW */
  2844. A_UINT32 ax_su_ndpa_flushed;
  2845. /** 11AX HE SU NDP frame flushed by HW */
  2846. A_UINT32 ax_su_ndp_flushed;
  2847. /** 11AX HE MU MIMO NDPA frame flushed by HW */
  2848. A_UINT32 ax_mu_mimo_ndpa_flushed;
  2849. /** 11AX HE MU MIMO NDP frame flushed by HW */
  2850. A_UINT32 ax_mu_mimo_ndp_flushed;
  2851. /** 11AX HE MU BR-POLL frame for users 1 - 7 flushed by HW */
  2852. A_UINT32 ax_mu_mimo_brpoll_flushed[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS - 1];
  2853. /**
  2854. * 11AX HE UL-MUMIMO Trigger frame for users 0 - 7 completed with error(s)
  2855. */
  2856. A_UINT32 ax_ul_mumimo_trigger_err[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
  2857. /** 11AX HE MU OFDMA Basic Trigger frame completed with partial user response */
  2858. A_UINT32 ax_basic_trigger_partial_resp;
  2859. /** 11AX HE MU BSRP Trigger frame completed with partial user response */
  2860. A_UINT32 ax_bsr_trigger_partial_resp;
  2861. /** 11AX HE MU BAR Trigger frame completed with partial user response */
  2862. A_UINT32 ax_mu_bar_trigger_partial_resp;
  2863. } htt_tx_selfgen_ax_err_stats_tlv;
  2864. typedef struct {
  2865. htt_tlv_hdr_t tlv_hdr;
  2866. /** 11BE EHT SU NDP frame completed with error(s) */
  2867. A_UINT32 be_su_ndp_err;
  2868. /** 11BE EHT SU NDPA frame completed with error(s) */
  2869. A_UINT32 be_su_ndpa_err;
  2870. /** 11BE EHT MU MIMO NDPA frame completed with error(s) */
  2871. A_UINT32 be_mu_mimo_ndpa_err;
  2872. /** 11BE EHT MU MIMO NDP frame completed with error(s) */
  2873. A_UINT32 be_mu_mimo_ndp_err;
  2874. /** 11BE EHT MU BR-POLL frame for 1 - 7 users completed with error(s) */
  2875. A_UINT32 be_mu_mimo_brp_err[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS - 1];
  2876. /** 11BE EHT MU Basic Trigger frame completed with error(s) */
  2877. A_UINT32 be_basic_trigger_err;
  2878. /** 11BE EHT MU BSRP Trigger frame completed with error(s) */
  2879. A_UINT32 be_bsr_trigger_err;
  2880. /** 11BE EHT MU BAR Trigger frame completed with error(s) */
  2881. A_UINT32 be_mu_bar_trigger_err;
  2882. /** 11BE EHT MU RTS Trigger frame completed with error(s) */
  2883. A_UINT32 be_mu_rts_trigger_err;
  2884. /** 11BE EHT MU ULMUMIMO Trigger frame completed with error(s) */
  2885. A_UINT32 be_ulmumimo_trigger_err;
  2886. /**
  2887. * Number of CBF(s) received when 11BE EHT MU MIMO BRPOLL frame
  2888. * completed with error(s)
  2889. */
  2890. A_UINT32 be_mu_mimo_brp_err_num_cbf_received[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS];
  2891. /** 11BE EHT SU NDPA frame flushed by HW */
  2892. A_UINT32 be_su_ndpa_flushed;
  2893. /** 11BE EHT SU NDP frame flushed by HW */
  2894. A_UINT32 be_su_ndp_flushed;
  2895. /** 11BE EHT MU MIMO NDPA frame flushed by HW */
  2896. A_UINT32 be_mu_mimo_ndpa_flushed;
  2897. /** 11BE HT MU MIMO NDP frame flushed by HW */
  2898. A_UINT32 be_mu_mimo_ndp_flushed;
  2899. /** 11BE EHT MU BR-POLL frame for users 1 - 7 flushed by HW */
  2900. A_UINT32 be_mu_mimo_brpoll_flushed[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS - 1];
  2901. /**
  2902. * 11BE EHT UL-MUMIMO Trigger frame for users 0 - 7 completed with error(s)
  2903. */
  2904. A_UINT32 be_ul_mumimo_trigger_err[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS];
  2905. /** 11BE EHT MU OFDMA Basic Trigger frame completed with partial user response */
  2906. A_UINT32 be_basic_trigger_partial_resp;
  2907. /** 11BE EHT MU BSRP Trigger frame completed with partial user response */
  2908. A_UINT32 be_bsr_trigger_partial_resp;
  2909. /** 11BE EHT MU BAR Trigger frame completed with partial user response */
  2910. A_UINT32 be_mu_bar_trigger_partial_resp;
  2911. } htt_tx_selfgen_be_err_stats_tlv;
  2912. /*
  2913. * Scheduler completion status reason code.
  2914. * (0) HTT_TXERR_NONE - No error (Success).
  2915. * (1) HTT_TXERR_RESP - Response timeout, response mismatch, BW mismatch,
  2916. * MIMO control mismatch, CRC error etc.
  2917. * (2) HTT_TXERR_FILT - Blocked by HW tx filtering.
  2918. * (3) HTT_TXERR_FIFO - FIFO, misc. errors in HW.
  2919. * (4) HTT_TXERR_SWABORT - Software initialted abort (TX_ABORT).
  2920. * (5) HTT_TXERR_RESERVED1 - Currently reserved.
  2921. * (6) HTT_TXERR_RESERVED2 - Currently reserved.
  2922. */
  2923. /* Scheduler error code.
  2924. * (0) HTT_TX_SELFGEN_SCH_TSFLAG_FLUSH_RCVD_ERR - Flush received from HW.
  2925. * (1) HTT_TX_SELFGEN_SCH_TSFLAG_FILT_SCHED_CMD_ERR - Scheduler command was
  2926. * filtered by HW.
  2927. * (2) HTT_TX_SELFGEN_SCH_TSFLAG_RESP_MISMATCH_ERR - Response frame mismatch
  2928. * error.
  2929. * (3) HTT_TX_SELFGEN_SCH_TSFLAG_RESP_CBF_MIMO_CTRL_MISMATCH_ERR - CBF
  2930. * received with MIMO control mismatch.
  2931. * (4) HTT_TX_SELFGEN_SCH_TSFLAG_RESP_CBF_BW_MISMATCH_ERR - CBF received with
  2932. * BW mismatch.
  2933. * (5) HTT_TX_SELFGEN_SCH_TSFLAG_RETRY_COUNT_FAIL_ERR - Error in transmitting
  2934. * frame even after maximum retries.
  2935. * (6) HTT_TX_SELFGEN_SCH_TSFLAG_RESP_TOO_LATE_RECEIVED_ERR - Response frame
  2936. * received outside RX window.
  2937. * (7) HTT_TX_SELFGEN_SCH_TSFLAG_SIFS_STALL_NO_NEXT_CMD_ERR - No frame
  2938. * received by HW for queuing within SIFS interval.
  2939. */
  2940. typedef struct {
  2941. htt_tlv_hdr_t tlv_hdr;
  2942. /** 11AC VHT SU NDPA scheduler completion status reason code */
  2943. A_UINT32 ac_su_ndpa_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2944. /** 11AC VHT SU NDP scheduler completion status reason code */
  2945. A_UINT32 ac_su_ndp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2946. /** 11AC VHT SU NDP scheduler error code */
  2947. A_UINT32 ac_su_ndp_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  2948. /** 11AC VHT MU MIMO NDPA scheduler completion status reason code */
  2949. A_UINT32 ac_mu_mimo_ndpa_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2950. /** 11AC VHT MU MIMO NDP scheduler completion status reason code */
  2951. A_UINT32 ac_mu_mimo_ndp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2952. /** 11AC VHT MU MIMO NDP scheduler error code */
  2953. A_UINT32 ac_mu_mimo_ndp_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  2954. /** 11AC VHT MU MIMO BRPOLL scheduler completion status reason code */
  2955. A_UINT32 ac_mu_mimo_brp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2956. /** 11AC VHT MU MIMO BRPOLL scheduler error code */
  2957. A_UINT32 ac_mu_mimo_brp_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  2958. } htt_tx_selfgen_ac_sched_status_stats_tlv;
  2959. typedef struct {
  2960. htt_tlv_hdr_t tlv_hdr;
  2961. /** 11AX HE SU NDPA scheduler completion status reason code */
  2962. A_UINT32 ax_su_ndpa_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2963. /** 11AX SU NDP scheduler completion status reason code */
  2964. A_UINT32 ax_su_ndp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2965. /** 11AX HE SU NDP scheduler error code */
  2966. A_UINT32 ax_su_ndp_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  2967. /** 11AX HE MU MIMO NDPA scheduler completion status reason code */
  2968. A_UINT32 ax_mu_mimo_ndpa_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2969. /** 11AX HE MU MIMO NDP scheduler completion status reason code */
  2970. A_UINT32 ax_mu_mimo_ndp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2971. /** 11AX HE MU MIMO NDP scheduler error code */
  2972. A_UINT32 ax_mu_mimo_ndp_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  2973. /** 11AX HE MU MIMO MU BRPOLL scheduler completion status reason code */
  2974. A_UINT32 ax_mu_brp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2975. /** 11AX HE MU MIMO MU BRPOLL scheduler error code */
  2976. A_UINT32 ax_mu_brp_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  2977. /** 11AX HE MU BAR scheduler completion status reason code */
  2978. A_UINT32 ax_mu_bar_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2979. /** 11AX HE MU BAR scheduler error code */
  2980. A_UINT32 ax_mu_bar_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  2981. /**
  2982. * 11AX HE UL OFDMA Basic Trigger scheduler completion status reason code
  2983. */
  2984. A_UINT32 ax_basic_trig_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2985. /** 11AX HE UL OFDMA Basic Trigger scheduler error code */
  2986. A_UINT32 ax_basic_trig_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  2987. /**
  2988. * 11AX HE UL MUMIMO Basic Trigger scheduler completion status reason code
  2989. */
  2990. A_UINT32 ax_ulmumimo_trig_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2991. /** 11AX HE UL MUMIMO Basic Trigger scheduler error code */
  2992. A_UINT32 ax_ulmumimo_trig_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  2993. } htt_tx_selfgen_ax_sched_status_stats_tlv;
  2994. typedef struct {
  2995. htt_tlv_hdr_t tlv_hdr;
  2996. /** 11BE EHT SU NDPA scheduler completion status reason code */
  2997. A_UINT32 be_su_ndpa_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  2998. /** 11BE SU NDP scheduler completion status reason code */
  2999. A_UINT32 be_su_ndp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  3000. /** 11BE EHT SU NDP scheduler error code */
  3001. A_UINT32 be_su_ndp_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  3002. /** 11BE EHT MU MIMO NDPA scheduler completion status reason code */
  3003. A_UINT32 be_mu_mimo_ndpa_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  3004. /** 11BE EHT MU MIMO NDP scheduler completion status reason code */
  3005. A_UINT32 be_mu_mimo_ndp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  3006. /** 11BE EHT MU MIMO NDP scheduler error code */
  3007. A_UINT32 be_mu_mimo_ndp_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  3008. /** 11BE EHT MU MIMO MU BRPOLL scheduler completion status reason code */
  3009. A_UINT32 be_mu_brp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  3010. /** 11BE EHT MU MIMO MU BRPOLL scheduler error code */
  3011. A_UINT32 be_mu_brp_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  3012. /** 11BE EHT MU BAR scheduler completion status reason code */
  3013. A_UINT32 be_mu_bar_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  3014. /** 11BE EHT MU BAR scheduler error code */
  3015. A_UINT32 be_mu_bar_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  3016. /**
  3017. * 11BE EHT UL OFDMA Basic Trigger scheduler completion status reason code
  3018. */
  3019. A_UINT32 be_basic_trig_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  3020. /** 11BE EHT UL OFDMA Basic Trigger scheduler error code */
  3021. A_UINT32 be_basic_trig_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  3022. /**
  3023. * 11BE EHT UL MUMIMO Basic Trigger scheduler completion status reason code
  3024. */
  3025. A_UINT32 be_ulmumimo_trig_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  3026. /** 11BE EHT UL MUMIMO Basic Trigger scheduler error code */
  3027. A_UINT32 be_ulmumimo_trig_sch_flag_err[HTT_TX_SELFGEN_NUM_SCH_TSFLAG_ERROR_STATS];
  3028. } htt_tx_selfgen_be_sched_status_stats_tlv;
  3029. /* STATS_TYPE : HTT_DBG_EXT_STATS_TX_SELFGEN_INFO
  3030. * TLV_TAGS:
  3031. * - HTT_STATS_TX_SELFGEN_CMN_STATS_TAG
  3032. * - HTT_STATS_TX_SELFGEN_AC_STATS_TAG
  3033. * - HTT_STATS_TX_SELFGEN_AX_STATS_TAG
  3034. * - HTT_STATS_TX_SELFGEN_AC_ERR_STATS_TAG
  3035. * - HTT_STATS_TX_SELFGEN_AX_ERR_STATS_TAG
  3036. * - HTT_STATS_TX_SELFGEN_AC_SCHED_STATUS_STATS_TAG
  3037. * - HTT_STATS_TX_SELFGEN_AX_SCHED_STATUS_STATS_TAG
  3038. * - HTT_STATS_TX_SELFGEN_BE_STATS_TAG
  3039. * - HTT_STATS_TX_SELFGEN_BE_ERR_STATS_TAG
  3040. * - HTT_STATS_TX_SELFGEN_BE_SCHED_STATUS_STATS_TAG
  3041. */
  3042. /* NOTE:
  3043. * This structure is for documentation, and cannot be safely used directly.
  3044. * Instead, use the constituent TLV structures to fill/parse.
  3045. */
  3046. typedef struct {
  3047. htt_tx_selfgen_cmn_stats_tlv cmn_tlv;
  3048. htt_tx_selfgen_ac_stats_tlv ac_tlv;
  3049. htt_tx_selfgen_ax_stats_tlv ax_tlv;
  3050. htt_tx_selfgen_ac_err_stats_tlv ac_err_tlv;
  3051. htt_tx_selfgen_ax_err_stats_tlv ax_err_tlv;
  3052. htt_tx_selfgen_ac_sched_status_stats_tlv ac_sched_status_tlv;
  3053. htt_tx_selfgen_ax_sched_status_stats_tlv ax_sched_status_tlv;
  3054. htt_tx_selfgen_be_stats_tlv be_tlv;
  3055. htt_tx_selfgen_be_err_stats_tlv be_err_tlv;
  3056. htt_tx_selfgen_be_sched_status_stats_tlv be_sched_status_tlv;
  3057. } htt_tx_pdev_selfgen_stats_t;
  3058. /* == TX MU STATS == */
  3059. typedef struct {
  3060. htt_tlv_hdr_t tlv_hdr;
  3061. /** Number of MU MIMO schedules posted to HW */
  3062. A_UINT32 mu_mimo_sch_posted;
  3063. /** Number of MU MIMO schedules failed to post */
  3064. A_UINT32 mu_mimo_sch_failed;
  3065. /** Number of MU MIMO PPDUs posted to HW */
  3066. A_UINT32 mu_mimo_ppdu_posted;
  3067. /*
  3068. * This is the common description for the below sch stats.
  3069. * Counts the number of transmissions of each number of MU users
  3070. * in each TX mode.
  3071. * The array index is the "number of users - 1".
  3072. * For example, ac_mu_mimo_sch_nusers[1] counts the number of 11AC MU2
  3073. * TX PPDUs, ac_mu_mimo_sch_nusers[2] counts the number of 11AC MU3
  3074. * TX PPDUs and so on.
  3075. * The same is applicable for the other TX mode stats.
  3076. */
  3077. /** Represents the count for 11AC DL MU MIMO sequences */
  3078. A_UINT32 ac_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS];
  3079. /** Represents the count for 11AX DL MU MIMO sequences */
  3080. A_UINT32 ax_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
  3081. /** Represents the count for 11AX DL MU OFDMA sequences */
  3082. A_UINT32 ax_ofdma_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3083. /**
  3084. * Represents the count for 11AX UL MU OFDMA sequences with Basic Triggers
  3085. */
  3086. A_UINT32 ax_ul_ofdma_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3087. /** Represents the count for 11AX UL MU OFDMA sequences with BSRP Triggers */
  3088. A_UINT32 ax_ul_ofdma_bsr_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3089. /** Represents the count for 11AX UL MU OFDMA sequences with BAR Triggers */
  3090. A_UINT32 ax_ul_ofdma_bar_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3091. /** Represents the count for 11AX UL MU OFDMA sequences with BRP Triggers */
  3092. A_UINT32 ax_ul_ofdma_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3093. /**
  3094. * Represents the count for 11AX UL MU MIMO sequences with Basic Triggers
  3095. */
  3096. A_UINT32 ax_ul_mumimo_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS];
  3097. /** Represents the count for 11AX UL MU MIMO sequences with BRP Triggers */
  3098. A_UINT32 ax_ul_mumimo_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS];
  3099. /** Number of 11AC DL MU MIMO schedules posted per group size (0-3) */
  3100. A_UINT32 ac_mu_mimo_sch_posted_per_grp_sz[HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS];
  3101. /** Number of 11AX DL MU MIMO schedules posted per group size */
  3102. A_UINT32 ax_mu_mimo_sch_posted_per_grp_sz[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
  3103. /** Represents the count for 11BE DL MU MIMO sequences */
  3104. A_UINT32 be_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS];
  3105. /** Number of 11BE DL MU MIMO schedules posted per group size */
  3106. A_UINT32 be_mu_mimo_sch_posted_per_grp_sz[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS];
  3107. /** Number of 11AC DL MU MIMO schedules posted per group size (4-7) */
  3108. A_UINT32 ac_mu_mimo_sch_posted_per_grp_sz_ext[HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS];
  3109. } htt_tx_pdev_mu_mimo_sch_stats_tlv;
  3110. typedef struct {
  3111. htt_tlv_hdr_t tlv_hdr;
  3112. A_UINT32 dl_mumimo_grp_best_grp_size[HTT_STATS_MAX_MUMIMO_GRP_SZ];
  3113. A_UINT32 dl_mumimo_grp_best_num_usrs[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
  3114. A_UINT32 dl_mumimo_grp_eligible[HTT_STATS_MAX_MUMIMO_GRP_SZ];
  3115. A_UINT32 dl_mumimo_grp_ineligible[HTT_STATS_MAX_MUMIMO_GRP_SZ];
  3116. A_UINT32 dl_mumimo_grp_invalid[HTT_TX_NUM_MUMIMO_GRP_INVALID_WORDS];
  3117. A_UINT32 dl_mumimo_grp_tputs[HTT_STATS_MUMIMO_TPUT_NUM_BINS];
  3118. A_UINT32 ul_mumimo_grp_best_grp_size[HTT_STATS_MAX_MUMIMO_GRP_SZ];
  3119. A_UINT32 ul_mumimo_grp_best_num_usrs[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
  3120. A_UINT32 ul_mumimo_grp_tputs[HTT_STATS_MUMIMO_TPUT_NUM_BINS];
  3121. } htt_tx_pdev_mumimo_grp_stats_tlv;
  3122. typedef struct {
  3123. htt_tlv_hdr_t tlv_hdr;
  3124. /** Number of MU MIMO schedules posted to HW */
  3125. A_UINT32 mu_mimo_sch_posted;
  3126. /** Number of MU MIMO schedules failed to post */
  3127. A_UINT32 mu_mimo_sch_failed;
  3128. /** Number of MU MIMO PPDUs posted to HW */
  3129. A_UINT32 mu_mimo_ppdu_posted;
  3130. /*
  3131. * This is the common description for the below sch stats.
  3132. * Counts the number of transmissions of each number of MU users
  3133. * in each TX mode.
  3134. * The array index is the "number of users - 1".
  3135. * For example, ac_mu_mimo_sch_nusers[1] counts the number of 11AC MU2
  3136. * TX PPDUs, ac_mu_mimo_sch_nusers[2] counts the number of 11AC MU3
  3137. * TX PPDUs and so on.
  3138. * The same is applicable for the other TX mode stats.
  3139. */
  3140. /** Represents the count for 11AC DL MU MIMO sequences */
  3141. A_UINT32 ac_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS];
  3142. /** Represents the count for 11AX DL MU MIMO sequences */
  3143. A_UINT32 ax_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
  3144. /** Number of 11AC DL MU MIMO schedules posted per group size (0-3) */
  3145. A_UINT32 ac_mu_mimo_sch_posted_per_grp_sz[HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS];
  3146. /** Number of 11AX DL MU MIMO schedules posted per group size */
  3147. A_UINT32 ax_mu_mimo_sch_posted_per_grp_sz[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
  3148. /** Represents the count for 11BE DL MU MIMO sequences */
  3149. A_UINT32 be_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS];
  3150. /** Number of 11BE DL MU MIMO schedules posted per group size */
  3151. A_UINT32 be_mu_mimo_sch_posted_per_grp_sz[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS];
  3152. /** Number of 11AC DL MU MIMO schedules posted per group size (4 - 7)*/
  3153. A_UINT32 ac_mu_mimo_sch_posted_per_grp_sz_ext[HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS];
  3154. } htt_tx_pdev_dl_mu_mimo_sch_stats_tlv;
  3155. typedef struct {
  3156. htt_tlv_hdr_t tlv_hdr;
  3157. /** Represents the count for 11AX DL MU OFDMA sequences */
  3158. A_UINT32 ax_mu_ofdma_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3159. } htt_tx_pdev_dl_mu_ofdma_sch_stats_tlv;
  3160. typedef struct {
  3161. htt_tlv_hdr_t tlv_hdr;
  3162. /** Represents the count for 11BE DL MU OFDMA sequences */
  3163. A_UINT32 be_mu_ofdma_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3164. } htt_tx_pdev_be_dl_mu_ofdma_sch_stats_tlv;
  3165. typedef struct {
  3166. htt_tlv_hdr_t tlv_hdr;
  3167. /**
  3168. * Represents the count for 11AX UL MU OFDMA sequences with Basic Triggers
  3169. */
  3170. A_UINT32 ax_ul_mu_ofdma_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3171. /**
  3172. * Represents the count for 11AX UL MU OFDMA sequences with BSRP Triggers
  3173. */
  3174. A_UINT32 ax_ul_mu_ofdma_bsr_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3175. /**
  3176. * Represents the count for 11AX UL MU OFDMA sequences with BAR Triggers
  3177. */
  3178. A_UINT32 ax_ul_mu_ofdma_bar_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3179. /**
  3180. * Represents the count for 11AX UL MU OFDMA sequences with BRP Triggers
  3181. */
  3182. A_UINT32 ax_ul_mu_ofdma_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3183. } htt_tx_pdev_ul_mu_ofdma_sch_stats_tlv;
  3184. typedef struct {
  3185. htt_tlv_hdr_t tlv_hdr;
  3186. /**
  3187. * Represents the count for 11BE UL MU OFDMA sequences with Basic Triggers
  3188. */
  3189. A_UINT32 be_ul_mu_ofdma_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3190. /**
  3191. * Represents the count for 11BE UL MU OFDMA sequences with BSRP Triggers
  3192. */
  3193. A_UINT32 be_ul_mu_ofdma_bsr_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3194. /**
  3195. * Represents the count for 11BE UL MU OFDMA sequences with BAR Triggers
  3196. */
  3197. A_UINT32 be_ul_mu_ofdma_bar_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3198. /**
  3199. * Represents the count for 11BE UL MU OFDMA sequences with BRP Triggers
  3200. */
  3201. A_UINT32 be_ul_mu_ofdma_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
  3202. } htt_tx_pdev_be_ul_mu_ofdma_sch_stats_tlv;
  3203. typedef struct {
  3204. htt_tlv_hdr_t tlv_hdr;
  3205. /**
  3206. * Represents the count for 11AX UL MU MIMO sequences with Basic Triggers
  3207. */
  3208. A_UINT32 ax_ul_mu_mimo_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS];
  3209. /**
  3210. * Represents the count for 11AX UL MU MIMO sequences with BRP Triggers
  3211. */
  3212. A_UINT32 ax_ul_mu_mimo_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS];
  3213. } htt_tx_pdev_ul_mu_mimo_sch_stats_tlv;
  3214. typedef struct {
  3215. htt_tlv_hdr_t tlv_hdr;
  3216. /**
  3217. * Represents the count for 11BE UL MU MIMO sequences with Basic Triggers
  3218. */
  3219. A_UINT32 be_ul_mu_mimo_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS];
  3220. /**
  3221. * Represents the count for 11BE UL MU MIMO sequences with BRP Triggers
  3222. */
  3223. A_UINT32 be_ul_mu_mimo_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS];
  3224. } htt_tx_pdev_be_ul_mu_mimo_sch_stats_tlv;
  3225. typedef struct {
  3226. htt_tlv_hdr_t tlv_hdr;
  3227. /** 11AC DL MU MIMO number of mpdus queued to HW, per user */
  3228. A_UINT32 mu_mimo_mpdus_queued_usr;
  3229. /** 11AC DL MU MIMO number of mpdus tried over the air, per user */
  3230. A_UINT32 mu_mimo_mpdus_tried_usr;
  3231. /** 11AC DL MU MIMO number of mpdus failed acknowledgement, per user */
  3232. A_UINT32 mu_mimo_mpdus_failed_usr;
  3233. /** 11AC DL MU MIMO number of mpdus re-queued to HW, per user */
  3234. A_UINT32 mu_mimo_mpdus_requeued_usr;
  3235. /** 11AC DL MU MIMO BA not received, per user */
  3236. A_UINT32 mu_mimo_err_no_ba_usr;
  3237. /** 11AC DL MU MIMO mpdu underrun encountered, per user */
  3238. A_UINT32 mu_mimo_mpdu_underrun_usr;
  3239. /** 11AC DL MU MIMO ampdu underrun encountered, per user */
  3240. A_UINT32 mu_mimo_ampdu_underrun_usr;
  3241. /** 11AX MU MIMO number of mpdus queued to HW, per user */
  3242. A_UINT32 ax_mu_mimo_mpdus_queued_usr;
  3243. /** 11AX MU MIMO number of mpdus tried over the air, per user */
  3244. A_UINT32 ax_mu_mimo_mpdus_tried_usr;
  3245. /** 11AX DL MU MIMO number of mpdus failed acknowledgement, per user */
  3246. A_UINT32 ax_mu_mimo_mpdus_failed_usr;
  3247. /** 11AX DL MU MIMO number of mpdus re-queued to HW, per user */
  3248. A_UINT32 ax_mu_mimo_mpdus_requeued_usr;
  3249. /** 11AX DL MU MIMO BA not received, per user */
  3250. A_UINT32 ax_mu_mimo_err_no_ba_usr;
  3251. /** 11AX DL MU MIMO mpdu underrun encountered, per user */
  3252. A_UINT32 ax_mu_mimo_mpdu_underrun_usr;
  3253. /** 11AX DL MU MIMO ampdu underrun encountered, per user */
  3254. A_UINT32 ax_mu_mimo_ampdu_underrun_usr;
  3255. /** 11AX MU OFDMA number of mpdus queued to HW, per user */
  3256. A_UINT32 ax_ofdma_mpdus_queued_usr;
  3257. /** 11AX MU OFDMA number of mpdus tried over the air, per user */
  3258. A_UINT32 ax_ofdma_mpdus_tried_usr;
  3259. /** 11AX MU OFDMA number of mpdus failed acknowledgement, per user */
  3260. A_UINT32 ax_ofdma_mpdus_failed_usr;
  3261. /** 11AX MU OFDMA number of mpdus re-queued to HW, per user */
  3262. A_UINT32 ax_ofdma_mpdus_requeued_usr;
  3263. /** 11AX MU OFDMA BA not received, per user */
  3264. A_UINT32 ax_ofdma_err_no_ba_usr;
  3265. /** 11AX MU OFDMA mpdu underrun encountered, per user */
  3266. A_UINT32 ax_ofdma_mpdu_underrun_usr;
  3267. /** 11AX MU OFDMA ampdu underrun encountered, per user */
  3268. A_UINT32 ax_ofdma_ampdu_underrun_usr;
  3269. } htt_tx_pdev_mu_mimo_mpdu_stats_tlv;
  3270. #define HTT_STATS_TX_SCHED_MODE_MU_MIMO_AC 1 /* SCHED_TX_MODE_MU_MIMO_AC */
  3271. #define HTT_STATS_TX_SCHED_MODE_MU_MIMO_AX 2 /* SCHED_TX_MODE_MU_MIMO_AX */
  3272. #define HTT_STATS_TX_SCHED_MODE_MU_OFDMA_AX 3 /* SCHED_TX_MODE_MU_OFDMA_AX */
  3273. #define HTT_STATS_TX_SCHED_MODE_MU_OFDMA_BE 4 /* SCHED_TX_MODE_MU_OFDMA_BE */
  3274. #define HTT_STATS_TX_SCHED_MODE_MU_MIMO_BE 5 /* SCHED_TX_MODE_MU_MIMO_BE */
  3275. typedef struct {
  3276. htt_tlv_hdr_t tlv_hdr;
  3277. /* mpdu level stats */
  3278. A_UINT32 mpdus_queued_usr;
  3279. A_UINT32 mpdus_tried_usr;
  3280. A_UINT32 mpdus_failed_usr;
  3281. A_UINT32 mpdus_requeued_usr;
  3282. A_UINT32 err_no_ba_usr;
  3283. A_UINT32 mpdu_underrun_usr;
  3284. A_UINT32 ampdu_underrun_usr;
  3285. A_UINT32 user_index;
  3286. /** HTT_STATS_TX_SCHED_MODE_xxx */
  3287. A_UINT32 tx_sched_mode;
  3288. } htt_tx_pdev_mpdu_stats_tlv;
  3289. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_TX_MU
  3290. * TLV_TAGS:
  3291. * - HTT_STATS_TX_PDEV_MU_MIMO_STATS_TAG (multiple)
  3292. * - HTT_STATS_TX_PDEV_MPDU_STATS_TAG (multiple)
  3293. */
  3294. /* NOTE:
  3295. * This structure is for documentation, and cannot be safely used directly.
  3296. * Instead, use the constituent TLV structures to fill/parse.
  3297. */
  3298. typedef struct {
  3299. htt_tx_pdev_mu_mimo_sch_stats_tlv mu_mimo_sch_stats_tlv[1]; /* WAL_TX_STATS_MAX_GROUP_SIZE */
  3300. htt_tx_pdev_dl_mu_mimo_sch_stats_tlv dl_mu_mimo_sch_stats_tlv[1];
  3301. htt_tx_pdev_ul_mu_mimo_sch_stats_tlv ul_mu_mimo_sch_stats_tlv[1];
  3302. htt_tx_pdev_dl_mu_ofdma_sch_stats_tlv dl_mu_ofdma_sch_stats_tlv[1];
  3303. htt_tx_pdev_ul_mu_ofdma_sch_stats_tlv ul_mu_ofdma_sch_stats_tlv[1];
  3304. /*
  3305. * Note that though mu_mimo_mpdu_stats_tlv is named MU-MIMO,
  3306. * it can also hold MU-OFDMA stats.
  3307. */
  3308. htt_tx_pdev_mpdu_stats_tlv mu_mimo_mpdu_stats_tlv[1]; /* WAL_TX_STATS_MAX_NUM_USERS */
  3309. htt_tx_pdev_mumimo_grp_stats_tlv mumimo_grp_stats_tlv;
  3310. } htt_tx_pdev_mu_mimo_stats_t;
  3311. /* == TX SCHED STATS == */
  3312. #define HTT_SCHED_TXQ_CMD_POSTED_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  3313. /* NOTE: Variable length TLV, use length spec to infer array size */
  3314. typedef struct {
  3315. htt_tlv_hdr_t tlv_hdr;
  3316. /** Scheduler command posted per tx_mode */
  3317. A_UINT32 sched_cmd_posted[1/* length = num tx modes */];
  3318. } htt_sched_txq_cmd_posted_tlv_v;
  3319. #define HTT_SCHED_TXQ_CMD_REAPED_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  3320. /* NOTE: Variable length TLV, use length spec to infer array size */
  3321. typedef struct {
  3322. htt_tlv_hdr_t tlv_hdr;
  3323. /** Scheduler command reaped per tx_mode */
  3324. A_UINT32 sched_cmd_reaped[1/* length = num tx modes */];
  3325. } htt_sched_txq_cmd_reaped_tlv_v;
  3326. #define HTT_SCHED_TXQ_SCHED_ORDER_SU_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  3327. /* NOTE: Variable length TLV, use length spec to infer array size */
  3328. typedef struct {
  3329. htt_tlv_hdr_t tlv_hdr;
  3330. /**
  3331. * sched_order_su contains the peer IDs of peers chosen in the last
  3332. * NUM_SCHED_ORDER_LOG scheduler instances.
  3333. * The array is circular; it's unspecified which array element corresponds
  3334. * to the most recent scheduler invocation, and which corresponds to
  3335. * the (NUM_SCHED_ORDER_LOG-1) most recent scheduler invocation.
  3336. */
  3337. A_UINT32 sched_order_su[1]; /* HTT_TX_PDEV_NUM_SCHED_ORDER_LOG */
  3338. } htt_sched_txq_sched_order_su_tlv_v;
  3339. typedef struct {
  3340. htt_tlv_hdr_t tlv_hdr;
  3341. A_UINT32 htt_stats_type;
  3342. } htt_stats_error_tlv_v;
  3343. typedef enum {
  3344. HTT_SCHED_TID_SKIP_SCHED_MASK_DISABLED = 0, /* Skip the tid when WAL_TID_DISABLE_TX_SCHED_MASK is true */
  3345. HTT_SCHED_TID_SKIP_NOTIFY_MPDU, /* Skip the tid's 2nd sched_cmd when 1st cmd is ongoing */
  3346. HTT_SCHED_TID_SKIP_MPDU_STATE_INVALID, /* Skip the tid when MPDU state is invalid */
  3347. HTT_SCHED_TID_SKIP_SCHED_DISABLED, /* Skip the tid when scheduling is disabled for that tid */
  3348. HTT_SCHED_TID_SKIP_TQM_BYPASS_CMD_PENDING, /* Skip the TQM bypass tid when it has pending sched_cmd */
  3349. HTT_SCHED_TID_SKIP_SECOND_SU_SCHEDULE, /* Skip tid from 2nd SU schedule when any of the following flag is set
  3350. WAL_TX_TID(SEND_BAR | TQM_MPDU_STATE_VALID | SEND_QOS_NULL | TQM_NOTIFY_MPDU | SENDN_PENDING) */
  3351. HTT_SCHED_TID_SKIP_CMD_SLOT_NOT_AVAIL, /* Skip the tid when command slot is not available */
  3352. HTT_SCHED_TID_SKIP_NO_DATA, /* Skip tid without data */
  3353. HTT_SCHED_TID_SKIP_NO_ENQ = HTT_SCHED_TID_SKIP_NO_DATA, /* deprecated old name */
  3354. HTT_SCHED_TID_SKIP_LOW_ENQ, /* Skip the tid when enqueue is low */
  3355. HTT_SCHED_TID_SKIP_PAUSED, /* Skipping the paused tid(sendn-frames) */
  3356. HTT_SCHED_TID_SKIP_UL_RESP, /* skip UL response tid */
  3357. HTT_SCHED_TID_SKIP_UL = HTT_SCHED_TID_SKIP_UL_RESP, /* deprecated old name */
  3358. HTT_SCHED_TID_REMOVE_PAUSED, /* Removing the paused tid when number of sendn frames is zero */
  3359. HTT_SCHED_TID_REMOVE_NO_ENQ, /* Remove tid with zero queue depth */
  3360. HTT_SCHED_TID_REMOVE_UL_RESP, /* Remove tid UL response */
  3361. HTT_SCHED_TID_REMOVE_UL = HTT_SCHED_TID_REMOVE_UL_RESP, /* deprecated old name */
  3362. HTT_SCHED_TID_QUERY, /* Moving to next user and adding tid in prepend list when qstats update is pending */
  3363. HTT_SCHED_TID_SU_ONLY, /* Tid is eligible and TX_SCHED_SU_ONLY is true */
  3364. HTT_SCHED_TID_ELIGIBLE, /* Tid is eligible for scheduling */
  3365. HTT_SCHED_TID_SKIP_EXCEPT_EAPOL, /* skip tid except eapol */
  3366. HTT_SCHED_TID_SU_LOW_PRI_ONLY, /* su low priority tid only */
  3367. HTT_SCHED_TID_SKIP_SOUND_IN_PROGRESS, /* skip tid sound in progress */
  3368. HTT_SCHED_TID_SKIP_NO_UL_DATA, /* skip ul tid when no ul data */
  3369. HTT_SCHED_TID_REMOVE_UL_NOT_CAPABLE, /* Remove tid that are not UL capable */
  3370. HTT_SCHED_TID_UL_ELIGIBLE, /* Tid is eligible for UL scheduling */
  3371. HTT_SCHED_TID_FALLBACK_TO_PREV_DECISION, /* Fall back to previous decision */
  3372. HTT_SCHED_TID_SKIP_PEER_ALREADY_IN_TXQ, /* skip tid, peer is already available in the txq */
  3373. HTT_SCHED_TID_SKIP_DELAY_UL_SCHED, /* skip tid delay UL schedule */
  3374. HTT_SCHED_TID_SKIP_PWR_SAVE_STATE_OFF, /* Limit UL scheduling to primary link if not in power save state */
  3375. HTT_SCHED_TID_SKIP_TWT_SUSPEND, /* Skip UL trigger for certain cases ex TWT suspend */
  3376. HTT_SCHED_TID_SKIP_DISABLE_160MHZ_OFDMA, /* Skip ul tid if peer supports 160MHZ */
  3377. HTT_SCHED_TID_SKIP_ULMU_DISABLE_FROM_OMI, /* Skip ul tid if sta send omi to indicate to disable UL mu data */
  3378. HTT_SCHED_TID_SKIP_UL_MAX_SCHED_CMD_EXCEEDED,/* skip ul tid if max sched cmd is exceeded */
  3379. HTT_SCHED_TID_SKIP_UL_SMALL_QDEPTH, /* Skip ul tid for small qdepth */
  3380. HTT_SCHED_TID_SKIP_UL_TWT_PAUSED, /* Skip ul tid if twt txq is paused */
  3381. HTT_SCHED_TID_SKIP_PEER_UL_RX_NOT_ACTIVE, /* Skip ul tid if peer ul rx is not active */
  3382. HTT_SCHED_TID_SKIP_NO_FORCE_TRIGGER, /* Skip ul tid if there is no force triggers */
  3383. HTT_SCHED_TID_SKIP_SMART_BASIC_TRIGGER, /* Skip ul tid if smart basic trigger doesn't have enough data */
  3384. HTT_SCHED_INELIGIBILITY_MAX,
  3385. } htt_sched_txq_sched_ineligibility_tlv_enum;
  3386. #define HTT_SCHED_TXQ_SCHED_INELIGIBILITY_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  3387. /* NOTE: Variable length TLV, use length spec to infer array size */
  3388. typedef struct {
  3389. htt_tlv_hdr_t tlv_hdr;
  3390. /**
  3391. * sched_ineligibility counts the number of occurrences of different
  3392. * reasons for tid ineligibility during eligibility checks per txq
  3393. * in scheduling
  3394. *
  3395. * Indexed by htt_sched_txq_sched_ineligibility_tlv_enum.
  3396. */
  3397. A_UINT32 sched_ineligibility[1];
  3398. } htt_sched_txq_sched_ineligibility_tlv_v;
  3399. typedef enum {
  3400. HTT_SCHED_SUPERCYCLE_TRIGGER_NONE = 0, /* Supercycle not triggered */
  3401. HTT_SCHED_SUPERCYCLE_TRIGGER_FORCED, /* forced supercycle trigger */
  3402. HTT_SCHED_SUPERCYCLE_TRIGGER_LESS_NUM_TIDQ_ENTRIES, /* Num tidq entries is less than max_client threshold */
  3403. HTT_SCHED_SUPERCYCLE_TRIGGER_LESS_NUM_ACTIVE_TIDS, /* Num active tids is less than max_client threshold */
  3404. HTT_SCHED_SUPERCYCLE_TRIGGER_MAX_ITR_REACHED, /* max sched iteration reached */
  3405. HTT_SCHED_SUPERCYCLE_TRIGGER_DUR_THRESHOLD_REACHED, /* duration threshold reached */
  3406. HTT_SCHED_SUPERCYCLE_TRIGGER_TWT_TRIGGER, /* TWT supercycle trigger */
  3407. HTT_SCHED_SUPERCYCLE_TRIGGER_MAX,
  3408. } htt_sched_txq_supercycle_triggers_tlv_enum;
  3409. #define HTT_SCHED_TXQ_SUPERCYCLE_TRIGGERS_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  3410. /* NOTE: Variable length TLV, use length spec to infer array size */
  3411. typedef struct {
  3412. htt_tlv_hdr_t tlv_hdr;
  3413. /**
  3414. * supercycle_triggers[] is a histogram that counts the number of
  3415. * occurrences of each different reason for a transmit scheduler
  3416. * supercycle to be triggered.
  3417. * The htt_sched_txq_supercycle_triggers_tlv_enum is used to index
  3418. * supercycle_triggers[], e.g. supercycle_triggers[1] holds the number
  3419. * of times a supercycle has been forced.
  3420. * These supercycle trigger counts are not automatically reset, but
  3421. * are reset upon request.
  3422. */
  3423. A_UINT32 supercycle_triggers[1/*HTT_SCHED_SUPERCYCLE_TRIGGER_MAX*/];
  3424. } htt_sched_txq_supercycle_triggers_tlv_v;
  3425. #define HTT_TX_PDEV_STATS_SCHED_PER_TXQ_MAC_ID_M 0x000000ff
  3426. #define HTT_TX_PDEV_STATS_SCHED_PER_TXQ_MAC_ID_S 0
  3427. #define HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TXQUEUE_ID_M 0x0000ff00
  3428. #define HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TXQUEUE_ID_S 8
  3429. #define HTT_TX_PDEV_STATS_SCHED_PER_TXQ_MAC_ID_GET(_var) \
  3430. (((_var) & HTT_TX_PDEV_STATS_SCHED_PER_TXQ_MAC_ID_M) >> \
  3431. HTT_TX_PDEV_STATS_SCHED_PER_TXQ_MAC_ID_S)
  3432. #define HTT_TX_PDEV_STATS_SCHED_PER_TXQ_MAC_ID_SET(_var, _val) \
  3433. do { \
  3434. HTT_CHECK_SET_VAL(HTT_TX_PDEV_STATS_SCHED_PER_TXQ_MAC_ID, _val); \
  3435. ((_var) |= ((_val) << HTT_TX_PDEV_STATS_SCHED_PER_TXQ_MAC_ID_S)); \
  3436. } while (0)
  3437. #define HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TXQUEUE_ID_GET(_var) \
  3438. (((_var) & HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TXQUEUE_ID_M) >> \
  3439. HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TXQUEUE_ID_S)
  3440. #define HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TXQUEUE_ID_SET(_var, _val) \
  3441. do { \
  3442. HTT_CHECK_SET_VAL(HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TXQUEUE_ID, _val); \
  3443. ((_var) |= ((_val) << HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TXQUEUE_ID_S)); \
  3444. } while (0)
  3445. typedef struct {
  3446. htt_tlv_hdr_t tlv_hdr;
  3447. /**
  3448. * BIT [ 7 : 0] :- mac_id
  3449. * BIT [15 : 8] :- txq_id
  3450. * BIT [31 : 16] :- reserved
  3451. */
  3452. A_UINT32 mac_id__txq_id__word;
  3453. /** Scheduler policy ised for this TxQ */
  3454. A_UINT32 sched_policy;
  3455. /** Timestamp of last scheduler command posted */
  3456. A_UINT32 last_sched_cmd_posted_timestamp;
  3457. /** Timestamp of last scheduler command completed */
  3458. A_UINT32 last_sched_cmd_compl_timestamp;
  3459. /** Num of Sched2TAC ring hit Low Water Mark condition */
  3460. A_UINT32 sched_2_tac_lwm_count;
  3461. /** Num of Sched2TAC ring full condition */
  3462. A_UINT32 sched_2_tac_ring_full;
  3463. /**
  3464. * Num of scheduler command post failures that includes SU/MU-MIMO/MU-OFDMA
  3465. * sequence type
  3466. */
  3467. A_UINT32 sched_cmd_post_failure;
  3468. /** Num of active tids for this TxQ at current instance */
  3469. A_UINT32 num_active_tids;
  3470. /** Num of powersave schedules */
  3471. A_UINT32 num_ps_schedules;
  3472. /** Num of scheduler commands pending for this TxQ */
  3473. A_UINT32 sched_cmds_pending;
  3474. /** Num of tidq registration for this TxQ */
  3475. A_UINT32 num_tid_register;
  3476. /** Num of tidq de-registration for this TxQ */
  3477. A_UINT32 num_tid_unregister;
  3478. /** Num of iterations msduq stats was updated */
  3479. A_UINT32 num_qstats_queried;
  3480. /** qstats query update status */
  3481. A_UINT32 qstats_update_pending;
  3482. /** Timestamp of Last query stats made */
  3483. A_UINT32 last_qstats_query_timestamp;
  3484. /** Num of sched2tqm command queue full condition */
  3485. A_UINT32 num_tqm_cmdq_full;
  3486. /** Num of scheduler trigger from DE Module */
  3487. A_UINT32 num_de_sched_algo_trigger;
  3488. /** Num of scheduler trigger from RT Module */
  3489. A_UINT32 num_rt_sched_algo_trigger;
  3490. /** Num of scheduler trigger from TQM Module */
  3491. A_UINT32 num_tqm_sched_algo_trigger;
  3492. /** Num of schedules for notify frame */
  3493. A_UINT32 notify_sched;
  3494. /** Duration based sendn termination */
  3495. A_UINT32 dur_based_sendn_term;
  3496. /** scheduled via NOTIFY2 */
  3497. A_UINT32 su_notify2_sched;
  3498. /** schedule if queued packets are greater than avg MSDUs in PPDU */
  3499. A_UINT32 su_optimal_queued_msdus_sched;
  3500. /** schedule due to timeout */
  3501. A_UINT32 su_delay_timeout_sched;
  3502. /** delay if txtime is less than 500us */
  3503. A_UINT32 su_min_txtime_sched_delay;
  3504. /** scheduled via no delay */
  3505. A_UINT32 su_no_delay;
  3506. /** Num of supercycles for this TxQ */
  3507. A_UINT32 num_supercycles;
  3508. /** Num of subcycles with sort for this TxQ */
  3509. A_UINT32 num_subcycles_with_sort;
  3510. /** Num of subcycles without sort for this Txq */
  3511. A_UINT32 num_subcycles_no_sort;
  3512. } htt_tx_pdev_stats_sched_per_txq_tlv;
  3513. #define HTT_STATS_TX_SCHED_CMN_MAC_ID_M 0x000000ff
  3514. #define HTT_STATS_TX_SCHED_CMN_MAC_ID_S 0
  3515. #define HTT_STATS_TX_SCHED_CMN_MAC_ID_GET(_var) \
  3516. (((_var) & HTT_STATS_TX_SCHED_CMN_MAC_ID_M) >> \
  3517. HTT_STATS_TX_SCHED_CMN_MAC_ID_S)
  3518. #define HTT_STATS_TX_SCHED_CMN_MAC_ID_SET(_var, _val) \
  3519. do { \
  3520. HTT_CHECK_SET_VAL(HTT_STATS_TX_SCHED_CMN_MAC_ID, _val); \
  3521. ((_var) |= ((_val) << HTT_STATS_TX_SCHED_CMN_MAC_ID_S)); \
  3522. } while (0)
  3523. typedef struct {
  3524. htt_tlv_hdr_t tlv_hdr;
  3525. /**
  3526. * BIT [ 7 : 0] :- mac_id
  3527. * BIT [31 : 8] :- reserved
  3528. */
  3529. A_UINT32 mac_id__word;
  3530. /** Current timestamp */
  3531. A_UINT32 current_timestamp;
  3532. } htt_stats_tx_sched_cmn_tlv;
  3533. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_TX_SCHED
  3534. * TLV_TAGS:
  3535. * - HTT_STATS_TX_SCHED_CMN_TAG
  3536. * - HTT_STATS_TX_PDEV_SCHEDULER_TXQ_STATS_TAG
  3537. * - HTT_STATS_SCHED_TXQ_CMD_POSTED_TAG
  3538. * - HTT_STATS_SCHED_TXQ_CMD_REAPED_TAG
  3539. * - HTT_STATS_SCHED_TXQ_SCHED_ORDER_SU_TAG
  3540. * - HTT_STATS_SCHED_TXQ_SCHED_INELIGIBILITY_TAG
  3541. * - HTT_STATS_SCHED_TXQ_SUPERCYCLE_TRIGGER_TAG
  3542. */
  3543. /* NOTE:
  3544. * This structure is for documentation, and cannot be safely used directly.
  3545. * Instead, use the constituent TLV structures to fill/parse.
  3546. */
  3547. typedef struct {
  3548. htt_stats_tx_sched_cmn_tlv cmn_tlv;
  3549. struct _txq_tx_sched_stats {
  3550. htt_tx_pdev_stats_sched_per_txq_tlv txq_tlv;
  3551. htt_sched_txq_cmd_posted_tlv_v cmd_posted_tlv;
  3552. htt_sched_txq_cmd_reaped_tlv_v cmd_reaped_tlv;
  3553. htt_sched_txq_sched_order_su_tlv_v sched_order_su_tlv;
  3554. htt_sched_txq_sched_ineligibility_tlv_v sched_ineligibility_tlv;
  3555. htt_sched_txq_supercycle_triggers_tlv_v sched_supercycle_trigger_tlv;
  3556. } txq[1];
  3557. } htt_stats_tx_sched_t;
  3558. /* == TQM STATS == */
  3559. #define HTT_TX_TQM_MAX_GEN_MPDU_END_REASON 17
  3560. #define HTT_TX_TQM_MAX_LIST_MPDU_END_REASON 16
  3561. #define HTT_TX_TQM_MAX_LIST_MPDU_CNT_HISTOGRAM_BINS 16
  3562. #define HTT_TX_TQM_GEN_MPDU_STATS_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  3563. /* NOTE: Variable length TLV, use length spec to infer array size */
  3564. typedef struct {
  3565. htt_tlv_hdr_t tlv_hdr;
  3566. A_UINT32 gen_mpdu_end_reason[1]; /* HTT_TX_TQM_MAX_GEN_MPDU_END_REASON */
  3567. } htt_tx_tqm_gen_mpdu_stats_tlv_v;
  3568. #define HTT_TX_TQM_LIST_MPDU_STATS_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  3569. /* NOTE: Variable length TLV, use length spec to infer array size */
  3570. typedef struct {
  3571. htt_tlv_hdr_t tlv_hdr;
  3572. A_UINT32 list_mpdu_end_reason[1]; /* HTT_TX_TQM_MAX_LIST_MPDU_END_REASON */
  3573. } htt_tx_tqm_list_mpdu_stats_tlv_v;
  3574. #define HTT_TX_TQM_LIST_MPDU_CNT_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  3575. /* NOTE: Variable length TLV, use length spec to infer array size */
  3576. typedef struct {
  3577. htt_tlv_hdr_t tlv_hdr;
  3578. A_UINT32 list_mpdu_cnt_hist[1]; /* HTT_TX_TQM_MAX_LIST_MPDU_CNT_HISTOGRAM_BINS */
  3579. } htt_tx_tqm_list_mpdu_cnt_tlv_v;
  3580. typedef struct {
  3581. htt_tlv_hdr_t tlv_hdr;
  3582. A_UINT32 msdu_count;
  3583. A_UINT32 mpdu_count;
  3584. A_UINT32 remove_msdu;
  3585. A_UINT32 remove_mpdu;
  3586. A_UINT32 remove_msdu_ttl;
  3587. A_UINT32 send_bar;
  3588. A_UINT32 bar_sync;
  3589. A_UINT32 notify_mpdu;
  3590. A_UINT32 sync_cmd;
  3591. A_UINT32 write_cmd;
  3592. A_UINT32 hwsch_trigger;
  3593. A_UINT32 ack_tlv_proc;
  3594. A_UINT32 gen_mpdu_cmd;
  3595. A_UINT32 gen_list_cmd;
  3596. A_UINT32 remove_mpdu_cmd;
  3597. A_UINT32 remove_mpdu_tried_cmd;
  3598. A_UINT32 mpdu_queue_stats_cmd;
  3599. A_UINT32 mpdu_head_info_cmd;
  3600. A_UINT32 msdu_flow_stats_cmd;
  3601. A_UINT32 remove_msdu_cmd;
  3602. A_UINT32 remove_msdu_ttl_cmd;
  3603. A_UINT32 flush_cache_cmd;
  3604. A_UINT32 update_mpduq_cmd;
  3605. A_UINT32 enqueue;
  3606. A_UINT32 enqueue_notify;
  3607. A_UINT32 notify_mpdu_at_head;
  3608. A_UINT32 notify_mpdu_state_valid;
  3609. /*
  3610. * On receiving TQM_FLOW_NOT_EMPTY_STATUS from TQM, (on MSDUs being enqueued
  3611. * the flow is non empty), if the number of MSDUs is greater than the threshold,
  3612. * notify is incremented. UDP_THRESH counters are for UDP MSDUs, and NONUDP are
  3613. * for non-UDP MSDUs.
  3614. * MSDUQ_SWNOTIFY_UDP_THRESH1 threshold - sched_udp_notify1 is incremented
  3615. * MSDUQ_SWNOTIFY_UDP_THRESH2 threshold - sched_udp_notify2 is incremented
  3616. * MSDUQ_SWNOTIFY_NONUDP_THRESH1 threshold - sched_nonudp_notify1 is incremented
  3617. * MSDUQ_SWNOTIFY_NONUDP_THRESH2 threshold - sched_nonudp_notify2 is incremented
  3618. *
  3619. * Notify signifies that we trigger the scheduler.
  3620. */
  3621. A_UINT32 sched_udp_notify1;
  3622. A_UINT32 sched_udp_notify2;
  3623. A_UINT32 sched_nonudp_notify1;
  3624. A_UINT32 sched_nonudp_notify2;
  3625. } htt_tx_tqm_pdev_stats_tlv_v;
  3626. #define HTT_TX_TQM_CMN_STATS_MAC_ID_M 0x000000ff
  3627. #define HTT_TX_TQM_CMN_STATS_MAC_ID_S 0
  3628. #define HTT_TX_TQM_CMN_STATS_MAC_ID_GET(_var) \
  3629. (((_var) & HTT_TX_TQM_CMN_STATS_MAC_ID_M) >> \
  3630. HTT_TX_TQM_CMN_STATS_MAC_ID_S)
  3631. #define HTT_TX_TQM_CMN_STATS_MAC_ID_SET(_var, _val) \
  3632. do { \
  3633. HTT_CHECK_SET_VAL(HTT_TX_TQM_CMN_STATS_MAC_ID, _val); \
  3634. ((_var) |= ((_val) << HTT_TX_TQM_CMN_STATS_MAC_ID_S)); \
  3635. } while (0)
  3636. typedef struct {
  3637. htt_tlv_hdr_t tlv_hdr;
  3638. /**
  3639. * BIT [ 7 : 0] :- mac_id
  3640. * BIT [31 : 8] :- reserved
  3641. */
  3642. A_UINT32 mac_id__word;
  3643. A_UINT32 max_cmdq_id;
  3644. A_UINT32 list_mpdu_cnt_hist_intvl;
  3645. /* Global stats */
  3646. A_UINT32 add_msdu;
  3647. A_UINT32 q_empty;
  3648. A_UINT32 q_not_empty;
  3649. A_UINT32 drop_notification;
  3650. A_UINT32 desc_threshold;
  3651. A_UINT32 hwsch_tqm_invalid_status;
  3652. A_UINT32 missed_tqm_gen_mpdus;
  3653. A_UINT32 tqm_active_tids;
  3654. A_UINT32 tqm_inactive_tids;
  3655. A_UINT32 tqm_active_msduq_flows;
  3656. /* SAWF system delay reference timestamp updation related stats */
  3657. A_UINT32 total_msduq_timestamp_updates;
  3658. A_UINT32 total_msduq_timestamp_updates_by_get_mpdu_head_info_cmd;
  3659. A_UINT32 total_msduq_timestamp_updates_by_empty_to_nonempty_status;
  3660. A_UINT32 total_get_mpdu_head_info_cmds_by_sched_algo_la_query;
  3661. A_UINT32 total_get_mpdu_head_info_cmds_by_tac;
  3662. A_UINT32 total_gen_mpdu_cmds_by_sched_algo_la_query;
  3663. A_UINT32 high_prio_q_not_empty;
  3664. } htt_tx_tqm_cmn_stats_tlv;
  3665. typedef struct {
  3666. htt_tlv_hdr_t tlv_hdr;
  3667. /* Error stats */
  3668. A_UINT32 q_empty_failure;
  3669. A_UINT32 q_not_empty_failure;
  3670. A_UINT32 add_msdu_failure;
  3671. /* TQM reset debug stats */
  3672. A_UINT32 tqm_cache_ctl_err;
  3673. A_UINT32 tqm_soft_reset;
  3674. A_UINT32 tqm_reset_total_num_in_use_link_descs;
  3675. A_UINT32 tqm_reset_worst_case_num_lost_link_descs;
  3676. A_UINT32 tqm_reset_worst_case_num_lost_host_tx_bufs_count;
  3677. A_UINT32 tqm_reset_num_in_use_link_descs_internal_tqm;
  3678. A_UINT32 tqm_reset_num_in_use_link_descs_wbm_idle_link_ring;
  3679. A_UINT32 tqm_reset_time_to_tqm_hang_delta_ms;
  3680. A_UINT32 tqm_reset_recovery_time_ms;
  3681. A_UINT32 tqm_reset_num_peers_hdl;
  3682. A_UINT32 tqm_reset_cumm_dirty_hw_mpduq_proc_cnt;
  3683. A_UINT32 tqm_reset_cumm_dirty_hw_msduq_proc;
  3684. A_UINT32 tqm_reset_flush_cache_cmd_su_cnt;
  3685. A_UINT32 tqm_reset_flush_cache_cmd_other_cnt;
  3686. A_UINT32 tqm_reset_flush_cache_cmd_trig_type;
  3687. A_UINT32 tqm_reset_flush_cache_cmd_trig_cfg;
  3688. A_UINT32 tqm_reset_flush_cache_cmd_skip_cmd_status_null;
  3689. } htt_tx_tqm_error_stats_tlv;
  3690. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_TQM
  3691. * TLV_TAGS:
  3692. * - HTT_STATS_TX_TQM_CMN_TAG
  3693. * - HTT_STATS_TX_TQM_ERROR_STATS_TAG
  3694. * - HTT_STATS_TX_TQM_GEN_MPDU_TAG
  3695. * - HTT_STATS_TX_TQM_LIST_MPDU_TAG
  3696. * - HTT_STATS_TX_TQM_LIST_MPDU_CNT_TAG
  3697. * - HTT_STATS_TX_TQM_PDEV_TAG
  3698. */
  3699. /* NOTE:
  3700. * This structure is for documentation, and cannot be safely used directly.
  3701. * Instead, use the constituent TLV structures to fill/parse.
  3702. */
  3703. typedef struct {
  3704. htt_tx_tqm_cmn_stats_tlv cmn_tlv;
  3705. htt_tx_tqm_error_stats_tlv err_tlv;
  3706. htt_tx_tqm_gen_mpdu_stats_tlv_v gen_mpdu_stats_tlv;
  3707. htt_tx_tqm_list_mpdu_stats_tlv_v list_mpdu_stats_tlv;
  3708. htt_tx_tqm_list_mpdu_cnt_tlv_v list_mpdu_cnt_tlv;
  3709. htt_tx_tqm_pdev_stats_tlv_v tqm_pdev_stats_tlv;
  3710. } htt_tx_tqm_pdev_stats_t;
  3711. /* == TQM CMDQ stats == */
  3712. #define HTT_TX_TQM_CMDQ_STATUS_MAC_ID_M 0x000000ff
  3713. #define HTT_TX_TQM_CMDQ_STATUS_MAC_ID_S 0
  3714. #define HTT_TX_TQM_CMDQ_STATUS_CMDQ_ID_M 0x0000ff00
  3715. #define HTT_TX_TQM_CMDQ_STATUS_CMDQ_ID_S 8
  3716. #define HTT_TX_TQM_CMDQ_STATUS_MAC_ID_GET(_var) \
  3717. (((_var) & HTT_TX_TQM_CMDQ_STATUS_MAC_ID_M) >> \
  3718. HTT_TX_TQM_CMDQ_STATUS_MAC_ID_S)
  3719. #define HTT_TX_TQM_CMDQ_STATUS_MAC_ID_SET(_var, _val) \
  3720. do { \
  3721. HTT_CHECK_SET_VAL(HTT_TX_TQM_CMDQ_STATUS_MAC_ID, _val); \
  3722. ((_var) |= ((_val) << HTT_TX_TQM_CMDQ_STATUS_MAC_ID_S)); \
  3723. } while (0)
  3724. #define HTT_TX_TQM_CMDQ_STATUS_CMDQ_ID_GET(_var) \
  3725. (((_var) & HTT_TX_TQM_CMDQ_STATUS_CMDQ_ID_M) >> \
  3726. HTT_TX_TQM_CMDQ_STATUS_CMDQ_ID_S)
  3727. #define HTT_TX_TQM_CMDQ_STATUS_CMDQ_ID_SET(_var, _val) \
  3728. do { \
  3729. HTT_CHECK_SET_VAL(HTT_TX_TQM_CMDQ_STATUS_CMDQ_ID, _val); \
  3730. ((_var) |= ((_val) << HTT_TX_TQM_CMDQ_STATUS_CMDQ_ID_S)); \
  3731. } while (0)
  3732. typedef struct {
  3733. htt_tlv_hdr_t tlv_hdr;
  3734. /*
  3735. * BIT [ 7 : 0] :- mac_id
  3736. * BIT [15 : 8] :- cmdq_id
  3737. * BIT [31 : 16] :- reserved
  3738. */
  3739. A_UINT32 mac_id__cmdq_id__word;
  3740. A_UINT32 sync_cmd;
  3741. A_UINT32 write_cmd;
  3742. A_UINT32 gen_mpdu_cmd;
  3743. A_UINT32 mpdu_queue_stats_cmd;
  3744. A_UINT32 mpdu_head_info_cmd;
  3745. A_UINT32 msdu_flow_stats_cmd;
  3746. A_UINT32 remove_mpdu_cmd;
  3747. A_UINT32 remove_msdu_cmd;
  3748. A_UINT32 flush_cache_cmd;
  3749. A_UINT32 update_mpduq_cmd;
  3750. A_UINT32 update_msduq_cmd;
  3751. } htt_tx_tqm_cmdq_status_tlv;
  3752. /* STATS_TYPE : HTT_DBG_EXT_STATS_TQM_CMDQ
  3753. * TLV_TAGS:
  3754. * - HTT_STATS_STRING_TAG
  3755. * - HTT_STATS_TX_TQM_CMDQ_STATUS_TAG
  3756. */
  3757. /* NOTE:
  3758. * This structure is for documentation, and cannot be safely used directly.
  3759. * Instead, use the constituent TLV structures to fill/parse.
  3760. */
  3761. typedef struct {
  3762. struct _cmdq_stats {
  3763. htt_stats_string_tlv cmdq_str_tlv;
  3764. htt_tx_tqm_cmdq_status_tlv status_tlv;
  3765. } q[1];
  3766. } htt_tx_tqm_cmdq_stats_t;
  3767. /* == TX-DE STATS == */
  3768. /* Structures for tx de stats */
  3769. typedef struct {
  3770. htt_tlv_hdr_t tlv_hdr;
  3771. A_UINT32 m1_packets;
  3772. A_UINT32 m2_packets;
  3773. A_UINT32 m3_packets;
  3774. A_UINT32 m4_packets;
  3775. A_UINT32 g1_packets;
  3776. A_UINT32 g2_packets;
  3777. A_UINT32 rc4_packets;
  3778. A_UINT32 eap_packets;
  3779. A_UINT32 eapol_start_packets;
  3780. A_UINT32 eapol_logoff_packets;
  3781. A_UINT32 eapol_encap_asf_packets;
  3782. } htt_tx_de_eapol_packets_stats_tlv;
  3783. typedef struct {
  3784. htt_tlv_hdr_t tlv_hdr;
  3785. A_UINT32 ap_bss_peer_not_found;
  3786. A_UINT32 ap_bcast_mcast_no_peer;
  3787. A_UINT32 sta_delete_in_progress;
  3788. A_UINT32 ibss_no_bss_peer;
  3789. A_UINT32 invaild_vdev_type;
  3790. A_UINT32 invalid_ast_peer_entry;
  3791. A_UINT32 peer_entry_invalid;
  3792. A_UINT32 ethertype_not_ip;
  3793. A_UINT32 eapol_lookup_failed;
  3794. A_UINT32 qpeer_not_allow_data;
  3795. A_UINT32 fse_tid_override;
  3796. A_UINT32 ipv6_jumbogram_zero_length;
  3797. A_UINT32 qos_to_non_qos_in_prog;
  3798. A_UINT32 ap_bcast_mcast_eapol;
  3799. A_UINT32 unicast_on_ap_bss_peer;
  3800. A_UINT32 ap_vdev_invalid;
  3801. A_UINT32 incomplete_llc;
  3802. A_UINT32 eapol_duplicate_m3;
  3803. A_UINT32 eapol_duplicate_m4;
  3804. } htt_tx_de_classify_failed_stats_tlv;
  3805. typedef struct {
  3806. htt_tlv_hdr_t tlv_hdr;
  3807. A_UINT32 arp_packets;
  3808. A_UINT32 igmp_packets;
  3809. A_UINT32 dhcp_packets;
  3810. A_UINT32 host_inspected;
  3811. A_UINT32 htt_included;
  3812. A_UINT32 htt_valid_mcs;
  3813. A_UINT32 htt_valid_nss;
  3814. A_UINT32 htt_valid_preamble_type;
  3815. A_UINT32 htt_valid_chainmask;
  3816. A_UINT32 htt_valid_guard_interval;
  3817. A_UINT32 htt_valid_retries;
  3818. A_UINT32 htt_valid_bw_info;
  3819. A_UINT32 htt_valid_power;
  3820. A_UINT32 htt_valid_key_flags;
  3821. A_UINT32 htt_valid_no_encryption;
  3822. A_UINT32 fse_entry_count;
  3823. A_UINT32 fse_priority_be;
  3824. A_UINT32 fse_priority_high;
  3825. A_UINT32 fse_priority_low;
  3826. A_UINT32 fse_traffic_ptrn_be;
  3827. A_UINT32 fse_traffic_ptrn_over_sub;
  3828. A_UINT32 fse_traffic_ptrn_bursty;
  3829. A_UINT32 fse_traffic_ptrn_interactive;
  3830. A_UINT32 fse_traffic_ptrn_periodic;
  3831. A_UINT32 fse_hwqueue_alloc;
  3832. A_UINT32 fse_hwqueue_created;
  3833. A_UINT32 fse_hwqueue_send_to_host;
  3834. A_UINT32 mcast_entry;
  3835. A_UINT32 bcast_entry;
  3836. A_UINT32 htt_update_peer_cache;
  3837. A_UINT32 htt_learning_frame;
  3838. A_UINT32 fse_invalid_peer;
  3839. /**
  3840. * mec_notify is HTT TX WBM multicast echo check notification
  3841. * from firmware to host. FW sends SA addresses to host for all
  3842. * multicast/broadcast packets received on STA side.
  3843. */
  3844. A_UINT32 mec_notify;
  3845. } htt_tx_de_classify_stats_tlv;
  3846. typedef struct {
  3847. htt_tlv_hdr_t tlv_hdr;
  3848. A_UINT32 eok;
  3849. A_UINT32 classify_done;
  3850. A_UINT32 lookup_failed;
  3851. A_UINT32 send_host_dhcp;
  3852. A_UINT32 send_host_mcast;
  3853. A_UINT32 send_host_unknown_dest;
  3854. A_UINT32 send_host;
  3855. A_UINT32 status_invalid;
  3856. } htt_tx_de_classify_status_stats_tlv;
  3857. typedef struct {
  3858. htt_tlv_hdr_t tlv_hdr;
  3859. A_UINT32 enqueued_pkts;
  3860. A_UINT32 to_tqm;
  3861. A_UINT32 to_tqm_bypass;
  3862. } htt_tx_de_enqueue_packets_stats_tlv;
  3863. typedef struct {
  3864. htt_tlv_hdr_t tlv_hdr;
  3865. A_UINT32 discarded_pkts;
  3866. A_UINT32 local_frames;
  3867. A_UINT32 is_ext_msdu;
  3868. } htt_tx_de_enqueue_discard_stats_tlv;
  3869. typedef struct {
  3870. htt_tlv_hdr_t tlv_hdr;
  3871. A_UINT32 tcl_dummy_frame;
  3872. A_UINT32 tqm_dummy_frame;
  3873. A_UINT32 tqm_notify_frame;
  3874. A_UINT32 fw2wbm_enq;
  3875. A_UINT32 tqm_bypass_frame;
  3876. } htt_tx_de_compl_stats_tlv;
  3877. #define HTT_TX_DE_CMN_STATS_MAC_ID_M 0x000000ff
  3878. #define HTT_TX_DE_CMN_STATS_MAC_ID_S 0
  3879. #define HTT_TX_DE_CMN_STATS_MAC_ID_GET(_var) \
  3880. (((_var) & HTT_TX_DE_CMN_STATS_MAC_ID_M) >> \
  3881. HTT_TX_DE_CMN_STATS_MAC_ID_S)
  3882. #define HTT_TX_DE_CMN_STATS_MAC_ID_SET(_var, _val) \
  3883. do { \
  3884. HTT_CHECK_SET_VAL(HTT_TX_DE_CMN_STATS_MAC_ID, _val); \
  3885. ((_var) |= ((_val) << HTT_TX_DE_CMN_STATS_MAC_ID_S)); \
  3886. } while (0)
  3887. /*
  3888. * The htt_tx_de_fw2wbm_ring_full_hist_tlv is a histogram of time we waited
  3889. * for the fw2wbm ring buffer. we are requesting a buffer in FW2WBM release
  3890. * ring,which may fail, due to non availability of buffer. Hence we sleep for
  3891. * 200us & again request for it. This is a histogram of time we wait, with
  3892. * bin of 200ms & there are 10 bin (2 seconds max)
  3893. * They are defined by the following macros in FW
  3894. * #define ENTRIES_PER_BIN_COUNT 1000 // per bin 1000 * 200us = 200ms
  3895. * #define RING_FULL_BIN_ENTRIES (WAL_TX_DE_FW2WBM_ALLOC_TIMEOUT_COUNT /
  3896. * ENTRIES_PER_BIN_COUNT)
  3897. */
  3898. typedef struct {
  3899. htt_tlv_hdr_t tlv_hdr;
  3900. A_UINT32 fw2wbm_ring_full_hist[1];
  3901. } htt_tx_de_fw2wbm_ring_full_hist_tlv;
  3902. typedef struct {
  3903. htt_tlv_hdr_t tlv_hdr;
  3904. /**
  3905. * BIT [ 7 : 0] :- mac_id
  3906. * BIT [31 : 8] :- reserved
  3907. */
  3908. A_UINT32 mac_id__word;
  3909. /* Global Stats */
  3910. A_UINT32 tcl2fw_entry_count;
  3911. A_UINT32 not_to_fw;
  3912. A_UINT32 invalid_pdev_vdev_peer;
  3913. A_UINT32 tcl_res_invalid_addrx;
  3914. A_UINT32 wbm2fw_entry_count;
  3915. A_UINT32 invalid_pdev;
  3916. A_UINT32 tcl_res_addrx_timeout;
  3917. A_UINT32 invalid_vdev;
  3918. A_UINT32 invalid_tcl_exp_frame_desc;
  3919. A_UINT32 vdev_id_mismatch_cnt;
  3920. } htt_tx_de_cmn_stats_tlv;
  3921. #define HTT_STATS_RX_FW_RING_SIZE_NUM_ENTRIES(dword) ((dword >> 0) & 0xffff)
  3922. #define HTT_STATS_RX_FW_RING_CURR_NUM_ENTRIES(dword) ((dword >> 16) & 0xffff)
  3923. /* Rx debug info for status rings */
  3924. typedef struct {
  3925. htt_tlv_hdr_t tlv_hdr;
  3926. /**
  3927. * BIT [15 : 0] :- max possible number of entries in respective ring
  3928. * (size of the ring in terms of entries)
  3929. * BIT [16 : 31] :- current number of entries occupied in respective ring
  3930. */
  3931. A_UINT32 entry_status_sw2rxdma;
  3932. A_UINT32 entry_status_rxdma2reo;
  3933. A_UINT32 entry_status_reo2sw1;
  3934. A_UINT32 entry_status_reo2sw4;
  3935. A_UINT32 entry_status_refillringipa;
  3936. A_UINT32 entry_status_refillringhost;
  3937. /** datarate - Moving Average of Number of Entries */
  3938. A_UINT32 datarate_refillringipa;
  3939. A_UINT32 datarate_refillringhost;
  3940. /**
  3941. * refillringhost_backpress_hist and refillringipa_backpress_hist are
  3942. * deprecated, and will be filled with 0x0 by the target.
  3943. */
  3944. A_UINT32 refillringhost_backpress_hist[3];
  3945. A_UINT32 refillringipa_backpress_hist[3];
  3946. /**
  3947. * Number of times reo2sw4(IPA_DEST_RING) ring is back-pressured
  3948. * in recent time periods
  3949. * element 0: in last 0 to 250ms
  3950. * element 1: 250ms to 500ms
  3951. * element 2: above 500ms
  3952. */
  3953. A_UINT32 reo2sw4ringipa_backpress_hist[3];
  3954. } htt_rx_fw_ring_stats_tlv_v;
  3955. /* STATS_TYPE : HTT_DBG_EXT_STATS_TX_DE_INFO
  3956. * TLV_TAGS:
  3957. * - HTT_STATS_TX_DE_CMN_TAG
  3958. * - HTT_STATS_TX_DE_FW2WBM_RING_FULL_HIST_TAG
  3959. * - HTT_STATS_TX_DE_EAPOL_PACKETS_TAG
  3960. * - HTT_STATS_TX_DE_CLASSIFY_STATS_TAG
  3961. * - HTT_STATS_TX_DE_CLASSIFY_FAILED_TAG
  3962. * - HTT_STATS_TX_DE_CLASSIFY_STATUS_TAG
  3963. * - HTT_STATS_TX_DE_ENQUEUE_PACKETS_TAG
  3964. * - HTT_STATS_TX_DE_ENQUEUE_DISCARD_TAG
  3965. * - HTT_STATS_TX_DE_COMPL_STATS_TAG
  3966. */
  3967. /* NOTE:
  3968. * This structure is for documentation, and cannot be safely used directly.
  3969. * Instead, use the constituent TLV structures to fill/parse.
  3970. */
  3971. typedef struct {
  3972. htt_tx_de_cmn_stats_tlv cmn_tlv;
  3973. htt_tx_de_fw2wbm_ring_full_hist_tlv fw2wbm_hist_tlv;
  3974. htt_tx_de_eapol_packets_stats_tlv eapol_stats_tlv;
  3975. htt_tx_de_classify_stats_tlv classify_stats_tlv;
  3976. htt_tx_de_classify_failed_stats_tlv classify_failed_tlv;
  3977. htt_tx_de_classify_status_stats_tlv classify_status_rlv;
  3978. htt_tx_de_enqueue_packets_stats_tlv enqueue_packets_tlv;
  3979. htt_tx_de_enqueue_discard_stats_tlv enqueue_discard_tlv;
  3980. htt_tx_de_compl_stats_tlv comp_status_tlv;
  3981. } htt_tx_de_stats_t;
  3982. /* == RING-IF STATS == */
  3983. /* DWORD num_elems__prefetch_tail_idx */
  3984. #define HTT_RING_IF_STATS_NUM_ELEMS_M 0x0000ffff
  3985. #define HTT_RING_IF_STATS_NUM_ELEMS_S 0
  3986. #define HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_M 0xffff0000
  3987. #define HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_S 16
  3988. #define HTT_RING_IF_STATS_NUM_ELEMS_GET(_var) \
  3989. (((_var) & HTT_RING_IF_STATS_NUM_ELEMS_M) >> \
  3990. HTT_RING_IF_STATS_NUM_ELEMS_S)
  3991. #define HTT_RING_IF_STATS_NUM_ELEMS_SET(_var, _val) \
  3992. do { \
  3993. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_NUM_ELEMS, _val); \
  3994. ((_var) |= ((_val) << HTT_RING_IF_STATS_NUM_ELEMS_S)); \
  3995. } while (0)
  3996. #define HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_GET(_var) \
  3997. (((_var) & HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_M) >> \
  3998. HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_S)
  3999. #define HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_SET(_var, _val) \
  4000. do { \
  4001. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_PREFETCH_TAIL_IDX, _val); \
  4002. ((_var) |= ((_val) << HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_S)); \
  4003. } while (0)
  4004. /* DWORD head_idx__tail_idx */
  4005. #define HTT_RING_IF_STATS_HEAD_IDX_M 0x0000ffff
  4006. #define HTT_RING_IF_STATS_HEAD_IDX_S 0
  4007. #define HTT_RING_IF_STATS_TAIL_IDX_M 0xffff0000
  4008. #define HTT_RING_IF_STATS_TAIL_IDX_S 16
  4009. #define HTT_RING_IF_STATS_HEAD_IDX_GET(_var) \
  4010. (((_var) & HTT_RING_IF_STATS_HEAD_IDX_M) >> \
  4011. HTT_RING_IF_STATS_HEAD_IDX_S)
  4012. #define HTT_RING_IF_STATS_HEAD_IDX_SET(_var, _val) \
  4013. do { \
  4014. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_HEAD_IDX, _val); \
  4015. ((_var) |= ((_val) << HTT_RING_IF_STATS_HEAD_IDX_S)); \
  4016. } while (0)
  4017. #define HTT_RING_IF_STATS_TAIL_IDX_GET(_var) \
  4018. (((_var) & HTT_RING_IF_STATS_TAIL_IDX_M) >> \
  4019. HTT_RING_IF_STATS_TAIL_IDX_S)
  4020. #define HTT_RING_IF_STATS_TAIL_IDX_SET(_var, _val) \
  4021. do { \
  4022. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_TAIL_IDX, _val); \
  4023. ((_var) |= ((_val) << HTT_RING_IF_STATS_TAIL_IDX_S)); \
  4024. } while (0)
  4025. /* DWORD shadow_head_idx__shadow_tail_idx */
  4026. #define HTT_RING_IF_STATS_SHADOW_HEAD_IDX_M 0x0000ffff
  4027. #define HTT_RING_IF_STATS_SHADOW_HEAD_IDX_S 0
  4028. #define HTT_RING_IF_STATS_SHADOW_TAIL_IDX_M 0xffff0000
  4029. #define HTT_RING_IF_STATS_SHADOW_TAIL_IDX_S 16
  4030. #define HTT_RING_IF_STATS_SHADOW_HEAD_IDX_GET(_var) \
  4031. (((_var) & HTT_RING_IF_STATS_SHADOW_HEAD_IDX_M) >> \
  4032. HTT_RING_IF_STATS_SHADOW_HEAD_IDX_S)
  4033. #define HTT_RING_IF_STATS_SHADOW_HEAD_IDX_SET(_var, _val) \
  4034. do { \
  4035. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_SHADOW_HEAD_IDX, _val); \
  4036. ((_var) |= ((_val) << HTT_RING_IF_STATS_SHADOW_HEAD_IDX_S)); \
  4037. } while (0)
  4038. #define HTT_RING_IF_STATS_SHADOW_TAIL_IDX_GET(_var) \
  4039. (((_var) & HTT_RING_IF_STATS_SHADOW_TAIL_IDX_M) >> \
  4040. HTT_RING_IF_STATS_SHADOW_TAIL_IDX_S)
  4041. #define HTT_RING_IF_STATS_SHADOW_TAIL_IDX_SET(_var, _val) \
  4042. do { \
  4043. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_SHADOW_TAIL_IDX, _val); \
  4044. ((_var) |= ((_val) << HTT_RING_IF_STATS_SHADOW_TAIL_IDX_S)); \
  4045. } while (0)
  4046. /* DWORD lwm_thresh__hwm_thresh */
  4047. #define HTT_RING_IF_STATS_LWM_THRESHOLD_M 0x0000ffff
  4048. #define HTT_RING_IF_STATS_LWM_THRESHOLD_S 0
  4049. #define HTT_RING_IF_STATS_HWM_THRESHOLD_M 0xffff0000
  4050. #define HTT_RING_IF_STATS_HWM_THRESHOLD_S 16
  4051. #define HTT_RING_IF_STATS_LWM_THRESHOLD_GET(_var) \
  4052. (((_var) & HTT_RING_IF_STATS_LWM_THRESHOLD_M) >> \
  4053. HTT_RING_IF_STATS_LWM_THRESHOLD_S)
  4054. #define HTT_RING_IF_STATS_LWM_THRESHOLD_SET(_var, _val) \
  4055. do { \
  4056. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_LWM_THRESHOLD, _val); \
  4057. ((_var) |= ((_val) << HTT_RING_IF_STATS_LWM_THRESHOLD_S)); \
  4058. } while (0)
  4059. #define HTT_RING_IF_STATS_HWM_THRESHOLD_GET(_var) \
  4060. (((_var) & HTT_RING_IF_STATS_HWM_THRESHOLD_M) >> \
  4061. HTT_RING_IF_STATS_HWM_THRESHOLD_S)
  4062. #define HTT_RING_IF_STATS_HWM_THRESHOLD_SET(_var, _val) \
  4063. do { \
  4064. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_HWM_THRESHOLD, _val); \
  4065. ((_var) |= ((_val) << HTT_RING_IF_STATS_HWM_THRESHOLD_S)); \
  4066. } while (0)
  4067. #define HTT_STATS_LOW_WM_BINS 5
  4068. #define HTT_STATS_HIGH_WM_BINS 5
  4069. typedef struct {
  4070. /** DWORD aligned base memory address of the ring */
  4071. A_UINT32 base_addr;
  4072. /** size of each ring element */
  4073. A_UINT32 elem_size;
  4074. /**
  4075. * BIT [15 : 0] :- num_elems
  4076. * BIT [31 : 16] :- prefetch_tail_idx
  4077. */
  4078. A_UINT32 num_elems__prefetch_tail_idx;
  4079. /**
  4080. * BIT [15 : 0] :- head_idx
  4081. * BIT [31 : 16] :- tail_idx
  4082. */
  4083. A_UINT32 head_idx__tail_idx;
  4084. /**
  4085. * BIT [15 : 0] :- shadow_head_idx
  4086. * BIT [31 : 16] :- shadow_tail_idx
  4087. */
  4088. A_UINT32 shadow_head_idx__shadow_tail_idx;
  4089. A_UINT32 num_tail_incr;
  4090. /**
  4091. * BIT [15 : 0] :- lwm_thresh
  4092. * BIT [31 : 16] :- hwm_thresh
  4093. */
  4094. A_UINT32 lwm_thresh__hwm_thresh;
  4095. A_UINT32 overrun_hit_count;
  4096. A_UINT32 underrun_hit_count;
  4097. A_UINT32 prod_blockwait_count;
  4098. A_UINT32 cons_blockwait_count;
  4099. A_UINT32 low_wm_hit_count[HTT_STATS_LOW_WM_BINS];
  4100. A_UINT32 high_wm_hit_count[HTT_STATS_HIGH_WM_BINS];
  4101. } htt_ring_if_stats_tlv;
  4102. #define HTT_RING_IF_CMN_MAC_ID_M 0x000000ff
  4103. #define HTT_RING_IF_CMN_MAC_ID_S 0
  4104. #define HTT_RING_IF_CMN_MAC_ID_GET(_var) \
  4105. (((_var) & HTT_RING_IF_CMN_MAC_ID_M) >> \
  4106. HTT_RING_IF_CMN_MAC_ID_S)
  4107. #define HTT_RING_IF_CMN_MAC_ID_SET(_var, _val) \
  4108. do { \
  4109. HTT_CHECK_SET_VAL(HTT_RING_IF_CMN_MAC_ID, _val); \
  4110. ((_var) |= ((_val) << HTT_RING_IF_CMN_MAC_ID_S)); \
  4111. } while (0)
  4112. typedef struct {
  4113. htt_tlv_hdr_t tlv_hdr;
  4114. /**
  4115. * BIT [ 7 : 0] :- mac_id
  4116. * BIT [31 : 8] :- reserved
  4117. */
  4118. A_UINT32 mac_id__word;
  4119. A_UINT32 num_records;
  4120. } htt_ring_if_cmn_tlv;
  4121. /* STATS_TYPE : HTT_DBG_EXT_STATS_RING_IF_INFO
  4122. * TLV_TAGS:
  4123. * - HTT_STATS_RING_IF_CMN_TAG
  4124. * - HTT_STATS_STRING_TAG
  4125. * - HTT_STATS_RING_IF_TAG
  4126. */
  4127. /* NOTE:
  4128. * This structure is for documentation, and cannot be safely used directly.
  4129. * Instead, use the constituent TLV structures to fill/parse.
  4130. */
  4131. typedef struct {
  4132. htt_ring_if_cmn_tlv cmn_tlv;
  4133. /** Variable based on the Number of records. */
  4134. struct _ring_if {
  4135. htt_stats_string_tlv ring_str_tlv;
  4136. htt_ring_if_stats_tlv ring_tlv;
  4137. } r[1];
  4138. } htt_ring_if_stats_t;
  4139. /* == SFM STATS == */
  4140. #define HTT_SFM_CLIENT_USER_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  4141. /* NOTE: Variable length TLV, use length spec to infer array size */
  4142. typedef struct {
  4143. htt_tlv_hdr_t tlv_hdr;
  4144. /** Number of DWORDS used per user and per client */
  4145. A_UINT32 dwords_used_by_user_n[1];
  4146. } htt_sfm_client_user_tlv_v;
  4147. typedef struct {
  4148. htt_tlv_hdr_t tlv_hdr;
  4149. /** Client ID */
  4150. A_UINT32 client_id;
  4151. /** Minimum number of buffers */
  4152. A_UINT32 buf_min;
  4153. /** Maximum number of buffers */
  4154. A_UINT32 buf_max;
  4155. /** Number of Busy buffers */
  4156. A_UINT32 buf_busy;
  4157. /** Number of Allocated buffers */
  4158. A_UINT32 buf_alloc;
  4159. /** Number of Available/Usable buffers */
  4160. A_UINT32 buf_avail;
  4161. /** Number of users */
  4162. A_UINT32 num_users;
  4163. } htt_sfm_client_tlv;
  4164. #define HTT_SFM_CMN_MAC_ID_M 0x000000ff
  4165. #define HTT_SFM_CMN_MAC_ID_S 0
  4166. #define HTT_SFM_CMN_MAC_ID_GET(_var) \
  4167. (((_var) & HTT_SFM_CMN_MAC_ID_M) >> \
  4168. HTT_SFM_CMN_MAC_ID_S)
  4169. #define HTT_SFM_CMN_MAC_ID_SET(_var, _val) \
  4170. do { \
  4171. HTT_CHECK_SET_VAL(HTT_SFM_CMN_MAC_ID, _val); \
  4172. ((_var) |= ((_val) << HTT_SFM_CMN_MAC_ID_S)); \
  4173. } while (0)
  4174. typedef struct {
  4175. htt_tlv_hdr_t tlv_hdr;
  4176. /**
  4177. * BIT [ 7 : 0] :- mac_id
  4178. * BIT [31 : 8] :- reserved
  4179. */
  4180. A_UINT32 mac_id__word;
  4181. /**
  4182. * Indicates the total number of 128 byte buffers in the CMEM
  4183. * that are available for buffer sharing
  4184. */
  4185. A_UINT32 buf_total;
  4186. /**
  4187. * Indicates for certain client or all the clients there is no
  4188. * dword saved in SFM, refer to SFM_R1_MEM_EMPTY
  4189. */
  4190. A_UINT32 mem_empty;
  4191. /** DEALLOCATE_BUFFERS, refer to register SFM_R0_DEALLOCATE_BUFFERS */
  4192. A_UINT32 deallocate_bufs;
  4193. /** Number of Records */
  4194. A_UINT32 num_records;
  4195. } htt_sfm_cmn_tlv;
  4196. /* STATS_TYPE : HTT_DBG_EXT_STATS_RING_IF_INFO
  4197. * TLV_TAGS:
  4198. * - HTT_STATS_SFM_CMN_TAG
  4199. * - HTT_STATS_STRING_TAG
  4200. * - HTT_STATS_SFM_CLIENT_TAG
  4201. * - HTT_STATS_SFM_CLIENT_USER_TAG
  4202. */
  4203. /* NOTE:
  4204. * This structure is for documentation, and cannot be safely used directly.
  4205. * Instead, use the constituent TLV structures to fill/parse.
  4206. */
  4207. typedef struct {
  4208. htt_sfm_cmn_tlv cmn_tlv;
  4209. /** Variable based on the Number of records. */
  4210. struct _sfm_client {
  4211. htt_stats_string_tlv client_str_tlv;
  4212. htt_sfm_client_tlv client_tlv;
  4213. htt_sfm_client_user_tlv_v user_tlv;
  4214. } r[1];
  4215. } htt_sfm_stats_t;
  4216. /* == SRNG STATS == */
  4217. /* DWORD mac_id__ring_id__arena__ep */
  4218. #define HTT_SRING_STATS_MAC_ID_M 0x000000ff
  4219. #define HTT_SRING_STATS_MAC_ID_S 0
  4220. #define HTT_SRING_STATS_RING_ID_M 0x0000ff00
  4221. #define HTT_SRING_STATS_RING_ID_S 8
  4222. #define HTT_SRING_STATS_ARENA_M 0x00ff0000
  4223. #define HTT_SRING_STATS_ARENA_S 16
  4224. #define HTT_SRING_STATS_EP_TYPE_M 0x01000000
  4225. #define HTT_SRING_STATS_EP_TYPE_S 24
  4226. #define HTT_SRING_STATS_MAC_ID_GET(_var) \
  4227. (((_var) & HTT_SRING_STATS_MAC_ID_M) >> \
  4228. HTT_SRING_STATS_MAC_ID_S)
  4229. #define HTT_SRING_STATS_MAC_ID_SET(_var, _val) \
  4230. do { \
  4231. HTT_CHECK_SET_VAL(HTT_SRING_STATS_MAC_ID, _val); \
  4232. ((_var) |= ((_val) << HTT_SRING_STATS_MAC_ID_S)); \
  4233. } while (0)
  4234. #define HTT_SRING_STATS_RING_ID_GET(_var) \
  4235. (((_var) & HTT_SRING_STATS_RING_ID_M) >> \
  4236. HTT_SRING_STATS_RING_ID_S)
  4237. #define HTT_SRING_STATS_RING_ID_SET(_var, _val) \
  4238. do { \
  4239. HTT_CHECK_SET_VAL(HTT_SRING_STATS_RING_ID, _val); \
  4240. ((_var) |= ((_val) << HTT_SRING_STATS_RING_ID_S)); \
  4241. } while (0)
  4242. #define HTT_SRING_STATS_ARENA_GET(_var) \
  4243. (((_var) & HTT_SRING_STATS_ARENA_M) >> \
  4244. HTT_SRING_STATS_ARENA_S)
  4245. #define HTT_SRING_STATS_ARENA_SET(_var, _val) \
  4246. do { \
  4247. HTT_CHECK_SET_VAL(HTT_SRING_STATS_ARENA, _val); \
  4248. ((_var) |= ((_val) << HTT_SRING_STATS_ARENA_S)); \
  4249. } while (0)
  4250. #define HTT_SRING_STATS_EP_TYPE_GET(_var) \
  4251. (((_var) & HTT_SRING_STATS_EP_TYPE_M) >> \
  4252. HTT_SRING_STATS_EP_TYPE_S)
  4253. #define HTT_SRING_STATS_EP_TYPE_SET(_var, _val) \
  4254. do { \
  4255. HTT_CHECK_SET_VAL(HTT_SRING_STATS_EP_TYPE, _val); \
  4256. ((_var) |= ((_val) << HTT_SRING_STATS_EP_TYPE_S)); \
  4257. } while (0)
  4258. /* DWORD num_avail_words__num_valid_words */
  4259. #define HTT_SRING_STATS_NUM_AVAIL_WORDS_M 0x0000ffff
  4260. #define HTT_SRING_STATS_NUM_AVAIL_WORDS_S 0
  4261. #define HTT_SRING_STATS_NUM_VALID_WORDS_M 0xffff0000
  4262. #define HTT_SRING_STATS_NUM_VALID_WORDS_S 16
  4263. #define HTT_SRING_STATS_NUM_AVAIL_WORDS_GET(_var) \
  4264. (((_var) & HTT_SRING_STATS_NUM_AVAIL_WORDS_M) >> \
  4265. HTT_SRING_STATS_NUM_AVAIL_WORDS_S)
  4266. #define HTT_SRING_STATS_NUM_AVAIL_WORDS_SET(_var, _val) \
  4267. do { \
  4268. HTT_CHECK_SET_VAL(HTT_SRING_STATS_NUM_AVAIL_WORDS, _val); \
  4269. ((_var) |= ((_val) << HTT_SRING_STATS_NUM_AVAIL_WORDS_S)); \
  4270. } while (0)
  4271. #define HTT_SRING_STATS_NUM_VALID_WORDS_GET(_var) \
  4272. (((_var) & HTT_SRING_STATS_NUM_VALID_WORDS_M) >> \
  4273. HTT_SRING_STATS_NUM_VALID_WORDS_S)
  4274. #define HTT_SRING_STATS_NUM_VALID_WORDS_SET(_var, _val) \
  4275. do { \
  4276. HTT_CHECK_SET_VAL(HTT_SRING_STATS_NUM_VALID_WORDS, _val); \
  4277. ((_var) |= ((_val) << HTT_SRING_STATS_NUM_VALID_WORDS_S)); \
  4278. } while (0)
  4279. /* DWORD head_ptr__tail_ptr */
  4280. #define HTT_SRING_STATS_HEAD_PTR_M 0x0000ffff
  4281. #define HTT_SRING_STATS_HEAD_PTR_S 0
  4282. #define HTT_SRING_STATS_TAIL_PTR_M 0xffff0000
  4283. #define HTT_SRING_STATS_TAIL_PTR_S 16
  4284. #define HTT_SRING_STATS_HEAD_PTR_GET(_var) \
  4285. (((_var) & HTT_SRING_STATS_HEAD_PTR_M) >> \
  4286. HTT_SRING_STATS_HEAD_PTR_S)
  4287. #define HTT_SRING_STATS_HEAD_PTR_SET(_var, _val) \
  4288. do { \
  4289. HTT_CHECK_SET_VAL(HTT_SRING_STATS_HEAD_PTR, _val); \
  4290. ((_var) |= ((_val) << HTT_SRING_STATS_HEAD_PTR_S)); \
  4291. } while (0)
  4292. #define HTT_SRING_STATS_TAIL_PTR_GET(_var) \
  4293. (((_var) & HTT_SRING_STATS_TAIL_PTR_M) >> \
  4294. HTT_SRING_STATS_TAIL_PTR_S)
  4295. #define HTT_SRING_STATS_TAIL_PTR_SET(_var, _val) \
  4296. do { \
  4297. HTT_CHECK_SET_VAL(HTT_SRING_STATS_TAIL_PTR, _val); \
  4298. ((_var) |= ((_val) << HTT_SRING_STATS_TAIL_PTR_S)); \
  4299. } while (0)
  4300. /* DWORD consumer_empty__producer_full */
  4301. #define HTT_SRING_STATS_CONSUMER_EMPTY_M 0x0000ffff
  4302. #define HTT_SRING_STATS_CONSUMER_EMPTY_S 0
  4303. #define HTT_SRING_STATS_PRODUCER_FULL_M 0xffff0000
  4304. #define HTT_SRING_STATS_PRODUCER_FULL_S 16
  4305. #define HTT_SRING_STATS_CONSUMER_EMPTY_GET(_var) \
  4306. (((_var) & HTT_SRING_STATS_CONSUMER_EMPTY_M) >> \
  4307. HTT_SRING_STATS_CONSUMER_EMPTY_S)
  4308. #define HTT_SRING_STATS_CONSUMER_EMPTY_SET(_var, _val) \
  4309. do { \
  4310. HTT_CHECK_SET_VAL(HTT_SRING_STATS_CONSUMER_EMPTY, _val); \
  4311. ((_var) |= ((_val) << HTT_SRING_STATS_CONSUMER_EMPTY_S)); \
  4312. } while (0)
  4313. #define HTT_SRING_STATS_PRODUCER_FULL_GET(_var) \
  4314. (((_var) & HTT_SRING_STATS_PRODUCER_FULL_M) >> \
  4315. HTT_SRING_STATS_PRODUCER_FULL_S)
  4316. #define HTT_SRING_STATS_PRODUCER_FULL_SET(_var, _val) \
  4317. do { \
  4318. HTT_CHECK_SET_VAL(HTT_SRING_STATS_PRODUCER_FULL, _val); \
  4319. ((_var) |= ((_val) << HTT_SRING_STATS_PRODUCER_FULL_S)); \
  4320. } while (0)
  4321. /* DWORD prefetch_count__internal_tail_ptr */
  4322. #define HTT_SRING_STATS_PREFETCH_COUNT_M 0x0000ffff
  4323. #define HTT_SRING_STATS_PREFETCH_COUNT_S 0
  4324. #define HTT_SRING_STATS_INTERNAL_TP_M 0xffff0000
  4325. #define HTT_SRING_STATS_INTERNAL_TP_S 16
  4326. #define HTT_SRING_STATS_PREFETCH_COUNT_GET(_var) \
  4327. (((_var) & HTT_SRING_STATS_PREFETCH_COUNT_M) >> \
  4328. HTT_SRING_STATS_PREFETCH_COUNT_S)
  4329. #define HTT_SRING_STATS_PREFETCH_COUNT_SET(_var, _val) \
  4330. do { \
  4331. HTT_CHECK_SET_VAL(HTT_SRING_STATS_PREFETCH_COUNT, _val); \
  4332. ((_var) |= ((_val) << HTT_SRING_STATS_PREFETCH_COUNT_S)); \
  4333. } while (0)
  4334. #define HTT_SRING_STATS_INTERNAL_TP_GET(_var) \
  4335. (((_var) & HTT_SRING_STATS_INTERNAL_TP_M) >> \
  4336. HTT_SRING_STATS_INTERNAL_TP_S)
  4337. #define HTT_SRING_STATS_INTERNAL_TP_SET(_var, _val) \
  4338. do { \
  4339. HTT_CHECK_SET_VAL(HTT_SRING_STATS_INTERNAL_TP, _val); \
  4340. ((_var) |= ((_val) << HTT_SRING_STATS_INTERNAL_TP_S)); \
  4341. } while (0)
  4342. typedef struct {
  4343. htt_tlv_hdr_t tlv_hdr;
  4344. /**
  4345. * BIT [ 7 : 0] :- mac_id
  4346. * BIT [15 : 8] :- ring_id
  4347. * BIT [23 : 16] :- arena 0 -SRING_HRAM, 1 - SRING_HCRAM, 2 - SRING_HW2HW.
  4348. * BIT [24 : 24] :- EP 0 -consumer, 1 - producer
  4349. * BIT [31 : 25] :- reserved
  4350. */
  4351. A_UINT32 mac_id__ring_id__arena__ep;
  4352. /** DWORD aligned base memory address of the ring */
  4353. A_UINT32 base_addr_lsb;
  4354. A_UINT32 base_addr_msb;
  4355. /** size of ring */
  4356. A_UINT32 ring_size;
  4357. /** size of each ring element */
  4358. A_UINT32 elem_size;
  4359. /** Ring status
  4360. *
  4361. * BIT [15 : 0] :- num_avail_words
  4362. * BIT [31 : 16] :- num_valid_words
  4363. */
  4364. A_UINT32 num_avail_words__num_valid_words;
  4365. /** Index of head and tail
  4366. * BIT [15 : 0] :- head_ptr
  4367. * BIT [31 : 16] :- tail_ptr
  4368. */
  4369. A_UINT32 head_ptr__tail_ptr;
  4370. /** Empty or full counter of rings
  4371. * BIT [15 : 0] :- consumer_empty
  4372. * BIT [31 : 16] :- producer_full
  4373. */
  4374. A_UINT32 consumer_empty__producer_full;
  4375. /** Prefetch status of consumer ring
  4376. * BIT [15 : 0] :- prefetch_count
  4377. * BIT [31 : 16] :- internal_tail_ptr
  4378. */
  4379. A_UINT32 prefetch_count__internal_tail_ptr;
  4380. } htt_sring_stats_tlv;
  4381. typedef struct {
  4382. htt_tlv_hdr_t tlv_hdr;
  4383. A_UINT32 num_records;
  4384. } htt_sring_cmn_tlv;
  4385. /* STATS_TYPE : HTT_DBG_EXT_STATS_SRNG_INFO
  4386. * TLV_TAGS:
  4387. * - HTT_STATS_SRING_CMN_TAG
  4388. * - HTT_STATS_STRING_TAG
  4389. * - HTT_STATS_SRING_STATS_TAG
  4390. */
  4391. /* NOTE:
  4392. * This structure is for documentation, and cannot be safely used directly.
  4393. * Instead, use the constituent TLV structures to fill/parse.
  4394. */
  4395. typedef struct {
  4396. htt_sring_cmn_tlv cmn_tlv;
  4397. /** Variable based on the Number of records */
  4398. struct _sring_stats {
  4399. htt_stats_string_tlv sring_str_tlv;
  4400. htt_sring_stats_tlv sring_stats_tlv;
  4401. } r[1];
  4402. } htt_sring_stats_t;
  4403. /* == PDEV TX RATE CTRL STATS == */
  4404. #define HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS 12 /* 0-11 */
  4405. #define HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS 2 /* 12, 13 */
  4406. #define HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS 2 /* 14, 15 */
  4407. #define HTT_TX_PDEV_STATS_NUM_GI_COUNTERS 4
  4408. #define HTT_TX_PDEV_STATS_NUM_DCM_COUNTERS 5
  4409. #define HTT_TX_PDEV_STATS_NUM_BW_COUNTERS 4
  4410. #define HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS 8
  4411. #define HTT_TX_PDEV_STATS_NUM_PREAMBLE_TYPES HTT_STATS_PREAM_COUNT
  4412. #define HTT_TX_PDEV_STATS_NUM_LEGACY_CCK_STATS 4
  4413. #define HTT_TX_PDEV_STATS_NUM_LEGACY_OFDM_STATS 8
  4414. #define HTT_TX_PDEV_STATS_NUM_LTF 4
  4415. #define HTT_TX_PDEV_STATS_NUM_11AX_TRIGGER_TYPES 6
  4416. #define HTT_TX_PDEV_STATS_NUM_11BE_TRIGGER_TYPES 6
  4417. #define HTT_TX_NUM_OF_SOUNDING_STATS_WORDS \
  4418. (HTT_TX_PDEV_STATS_NUM_BW_COUNTERS * \
  4419. HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS)
  4420. #define HTT_TX_PDEV_RATE_STATS_MAC_ID_M 0x000000ff
  4421. #define HTT_TX_PDEV_RATE_STATS_MAC_ID_S 0
  4422. #define HTT_TX_PDEV_RATE_STATS_MAC_ID_GET(_var) \
  4423. (((_var) & HTT_TX_PDEV_RATE_STATS_MAC_ID_M) >> \
  4424. HTT_TX_PDEV_RATE_STATS_MAC_ID_S)
  4425. #define HTT_TX_PDEV_RATE_STATS_MAC_ID_SET(_var, _val) \
  4426. do { \
  4427. HTT_CHECK_SET_VAL(HTT_TX_PDEV_RATE_STATS_MAC_ID, _val); \
  4428. ((_var) |= ((_val) << HTT_TX_PDEV_RATE_STATS_MAC_ID_S)); \
  4429. } while (0)
  4430. #define HTT_TX_PDEV_STATS_NUM_MCS_DROP_COUNTERS \
  4431. (HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS + \
  4432. HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS + \
  4433. HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS)
  4434. #define HTT_TX_PDEV_STATS_NUM_PER_COUNTERS 101
  4435. /*
  4436. * Introduce new TX counters to support 320MHz support and punctured modes
  4437. */
  4438. typedef enum {
  4439. HTT_TX_PDEV_STATS_PUNCTURED_NONE = 0,
  4440. HTT_TX_PDEV_STATS_PUNCTURED_20 = 1,
  4441. HTT_TX_PDEV_STATS_PUNCTURED_40 = 2,
  4442. HTT_TX_PDEV_STATS_PUNCTURED_80 = 3,
  4443. HTT_TX_PDEV_STATS_PUNCTURED_120 = 4,
  4444. HTT_TX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS = 5
  4445. } HTT_TX_PDEV_STATS_NUM_PUNCTURED_MODE_TYPE;
  4446. #define HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES 2 /* 0 - Half, 1 - Quarter */
  4447. /* 11be related updates */
  4448. #define HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS 16 /* 0...13,-2,-1 */
  4449. #define HTT_TX_PDEV_STATS_NUM_BE_BW_COUNTERS 5 /* 20,40,80,160,320 MHz */
  4450. #define HTT_TX_PDEV_STATS_NUM_HE_SIG_B_MCS_COUNTERS 6
  4451. #define HTT_TX_PDEV_STATS_NUM_EHT_SIG_MCS_COUNTERS 4
  4452. typedef enum {
  4453. HTT_TX_PDEV_STATS_AX_RU_SIZE_26,
  4454. HTT_TX_PDEV_STATS_AX_RU_SIZE_52,
  4455. HTT_TX_PDEV_STATS_AX_RU_SIZE_106,
  4456. HTT_TX_PDEV_STATS_AX_RU_SIZE_242,
  4457. HTT_TX_PDEV_STATS_AX_RU_SIZE_484,
  4458. HTT_TX_PDEV_STATS_AX_RU_SIZE_996,
  4459. HTT_TX_PDEV_STATS_AX_RU_SIZE_996x2,
  4460. HTT_TX_PDEV_STATS_NUM_AX_RU_SIZE_COUNTERS,
  4461. } HTT_TX_PDEV_STATS_AX_RU_SIZE;
  4462. typedef enum {
  4463. HTT_TX_PDEV_STATS_BE_RU_SIZE_26,
  4464. HTT_TX_PDEV_STATS_BE_RU_SIZE_52,
  4465. HTT_TX_PDEV_STATS_BE_RU_SIZE_52_26,
  4466. HTT_TX_PDEV_STATS_BE_RU_SIZE_106,
  4467. HTT_TX_PDEV_STATS_BE_RU_SIZE_106_26,
  4468. HTT_TX_PDEV_STATS_BE_RU_SIZE_242,
  4469. HTT_TX_PDEV_STATS_BE_RU_SIZE_484,
  4470. HTT_TX_PDEV_STATS_BE_RU_SIZE_484_242,
  4471. HTT_TX_PDEV_STATS_BE_RU_SIZE_996,
  4472. HTT_TX_PDEV_STATS_BE_RU_SIZE_996_484,
  4473. HTT_TX_PDEV_STATS_BE_RU_SIZE_996_484_242,
  4474. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x2,
  4475. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x2_484,
  4476. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x3,
  4477. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x3_484,
  4478. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x4,
  4479. HTT_TX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS,
  4480. } HTT_TX_PDEV_STATS_BE_RU_SIZE;
  4481. typedef struct {
  4482. htt_tlv_hdr_t tlv_hdr;
  4483. /**
  4484. * BIT [ 7 : 0] :- mac_id
  4485. * BIT [31 : 8] :- reserved
  4486. */
  4487. A_UINT32 mac_id__word;
  4488. /** Number of tx ldpc packets */
  4489. A_UINT32 tx_ldpc;
  4490. /** Number of tx rts packets */
  4491. A_UINT32 rts_cnt;
  4492. /** RSSI value of last ack packet (units = dB above noise floor) */
  4493. A_UINT32 ack_rssi;
  4494. A_UINT32 tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4495. /** tx_xx_mcs: currently unused */
  4496. A_UINT32 tx_su_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4497. A_UINT32 tx_mu_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4498. /* element 0,1, ...7 -> NSS 1,2, ...8 */
  4499. A_UINT32 tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4500. /* element 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160 and 80+80 MHz */
  4501. A_UINT32 tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4502. A_UINT32 tx_stbc[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4503. A_UINT32 tx_pream[HTT_TX_PDEV_STATS_NUM_PREAMBLE_TYPES];
  4504. /**
  4505. * Counters to track number of tx packets in each GI
  4506. * (400us, 800us, 1600us & 3200us) in each mcs (0-11)
  4507. */
  4508. A_UINT32 tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4509. /** Counters to track packets in dcm mcs (MCS 0, 1, 3, 4) */
  4510. A_UINT32 tx_dcm[HTT_TX_PDEV_STATS_NUM_DCM_COUNTERS];
  4511. /** Number of CTS-acknowledged RTS packets */
  4512. A_UINT32 rts_success;
  4513. /**
  4514. * Counters for legacy 11a and 11b transmissions.
  4515. *
  4516. * The index corresponds to:
  4517. *
  4518. * CCK: 0: 1 Mbps, 1: 2 Mbps, 2: 5.5 Mbps, 3: 11 Mbps
  4519. *
  4520. * OFDM: 0: 6 Mbps, 1: 9 Mbps, 2: 12 Mbps, 3: 18 Mbps,
  4521. * 4: 24 Mbps, 5: 36 Mbps, 6: 48 Mbps, 7: 54 Mbps
  4522. */
  4523. A_UINT32 tx_legacy_cck_rate[HTT_TX_PDEV_STATS_NUM_LEGACY_CCK_STATS];
  4524. A_UINT32 tx_legacy_ofdm_rate[HTT_TX_PDEV_STATS_NUM_LEGACY_OFDM_STATS];
  4525. /** 11AC VHT DL MU MIMO LDPC count */
  4526. A_UINT32 ac_mu_mimo_tx_ldpc;
  4527. /** 11AX HE DL MU MIMO LDPC count */
  4528. A_UINT32 ax_mu_mimo_tx_ldpc;
  4529. /** 11AX HE DL MU OFDMA LDPC count */
  4530. A_UINT32 ofdma_tx_ldpc;
  4531. /**
  4532. * Counters for 11ax HE LTF selection during TX.
  4533. *
  4534. * The index corresponds to:
  4535. *
  4536. * 0: unused, 1: 1x LTF, 2: 2x LTF, 3: 4x LTF
  4537. */
  4538. A_UINT32 tx_he_ltf[HTT_TX_PDEV_STATS_NUM_LTF];
  4539. /** 11AC VHT DL MU MIMO TX MCS stats */
  4540. A_UINT32 ac_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4541. /** 11AX HE DL MU MIMO TX MCS stats */
  4542. A_UINT32 ax_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4543. /** 11AX HE DL MU OFDMA TX MCS stats */
  4544. A_UINT32 ofdma_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4545. /** 11AC VHT DL MU MIMO TX NSS stats (Indicates NSS for individual users) */
  4546. A_UINT32 ac_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4547. /** 11AX HE DL MU MIMO TX NSS stats (Indicates NSS for individual users) */
  4548. A_UINT32 ax_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4549. /** 11AX HE DL MU OFDMA TX NSS stats (Indicates NSS for individual users) */
  4550. A_UINT32 ofdma_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4551. /** 11AC VHT DL MU MIMO TX BW stats */
  4552. A_UINT32 ac_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4553. /** 11AX HE DL MU MIMO TX BW stats */
  4554. A_UINT32 ax_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4555. /** 11AX HE DL MU OFDMA TX BW stats */
  4556. A_UINT32 ofdma_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4557. /** 11AC VHT DL MU MIMO TX guard interval stats */
  4558. A_UINT32 ac_mu_mimo_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4559. /** 11AX HE DL MU MIMO TX guard interval stats */
  4560. A_UINT32 ax_mu_mimo_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4561. /** 11AX HE DL MU OFDMA TX guard interval stats */
  4562. A_UINT32 ofdma_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4563. A_UINT32 trigger_type_11ax[HTT_TX_PDEV_STATS_NUM_11AX_TRIGGER_TYPES];
  4564. A_UINT32 tx_11ax_su_ext;
  4565. /* Stats for MCS 12/13 */
  4566. A_UINT32 tx_mcs_ext[HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4567. A_UINT32 tx_stbc_ext[HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4568. A_UINT32 tx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4569. /** 11AX VHT DL MU MIMO extended TX MCS stats for MCS 12/13 */
  4570. A_UINT32 ax_mu_mimo_tx_mcs_ext[HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4571. /** 11AX VHT DL MU OFDMA extended TX MCS stats for MCS 12/13 */
  4572. A_UINT32 ofdma_tx_mcs_ext[HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4573. /** 11AX VHT DL MU MIMO extended TX guard interval stats for MCS 12/13 */
  4574. A_UINT32 ax_mu_mimo_tx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4575. /** 11AX VHT DL MU OFDMA extended TX guard interval stats for MCS 12/13 */
  4576. A_UINT32 ofdma_tx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4577. /* Stats for MCS 14/15 */
  4578. A_UINT32 tx_mcs_ext_2[HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  4579. A_UINT32 tx_bw_320mhz;
  4580. A_UINT32 tx_gi_ext_2[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  4581. A_UINT32 tx_su_punctured_mode[HTT_TX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS];
  4582. A_UINT32 reduced_tx_bw[HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4583. /** 11AC VHT DL MU MIMO TX BW stats at reduced channel config */
  4584. A_UINT32 reduced_ac_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4585. /** 11AX HE DL MU MIMO TX BW stats at reduced channel config */
  4586. A_UINT32 reduced_ax_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4587. /** 11AX HE DL MU OFDMA TX BW stats at reduced channel config */
  4588. A_UINT32 reduced_ax_mu_ofdma_tx_bw[HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4589. /** 11AX HE DL MU OFDMA TX RU Size stats */
  4590. A_UINT32 ofdma_tx_ru_size[HTT_TX_PDEV_STATS_NUM_AX_RU_SIZE_COUNTERS];
  4591. /** 11AX HE DL MU OFDMA HE-SIG-B MCS stats */
  4592. A_UINT32 ofdma_he_sig_b_mcs[HTT_TX_PDEV_STATS_NUM_HE_SIG_B_MCS_COUNTERS];
  4593. /** 11AX HE SU data + embedded trigger PPDU success stats (stats for HETP ack success PPDU cnt) */
  4594. A_UINT32 ax_su_embedded_trigger_data_ppdu;
  4595. /** 11AX HE SU data + embedded trigger PPDU failure stats (stats for HETP ack failure PPDU cnt) */
  4596. A_UINT32 ax_su_embedded_trigger_data_ppdu_err;
  4597. /** sta side trigger stats */
  4598. A_UINT32 trigger_type_11be[HTT_TX_PDEV_STATS_NUM_11BE_TRIGGER_TYPES];
  4599. /** Stats for Extra EHT LTF */
  4600. A_UINT32 extra_eht_ltf;
  4601. } htt_tx_pdev_rate_stats_tlv;
  4602. typedef struct {
  4603. /* 11be mode pdev rate stats; placed in a separate TLV to adhere to size restrictions */
  4604. htt_tlv_hdr_t tlv_hdr;
  4605. /** 11BE EHT DL MU MIMO TX MCS stats */
  4606. A_UINT32 be_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  4607. /** 11BE EHT DL MU MIMO TX NSS stats (Indicates NSS for individual users) */
  4608. A_UINT32 be_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4609. /** 11BE EHT DL MU MIMO TX BW stats */
  4610. A_UINT32 be_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  4611. /** 11BE EHT DL MU MIMO TX guard interval stats */
  4612. A_UINT32 be_mu_mimo_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  4613. /** 11BE DL MU MIMO LDPC count */
  4614. A_UINT32 be_mu_mimo_tx_ldpc;
  4615. } htt_tx_pdev_rate_stats_be_tlv;
  4616. typedef struct {
  4617. /*
  4618. * SAWF pdev rate stats;
  4619. * placed in a separate TLV to adhere to size restrictions
  4620. */
  4621. htt_tlv_hdr_t tlv_hdr;
  4622. /**
  4623. * Counter incremented when MCS is dropped due to the successive retries
  4624. * to a peer reaching the configured limit.
  4625. */
  4626. A_UINT32 rate_retry_mcs_drop_cnt;
  4627. /**
  4628. * histogram of MCS rate drop down, indexed by pre-drop MCS
  4629. */
  4630. A_UINT32 mcs_drop_rate[HTT_TX_PDEV_STATS_NUM_MCS_DROP_COUNTERS];
  4631. /**
  4632. * PPDU PER histogram - each PPDU has its PER computed,
  4633. * and the bin corresponding to that PER percentage is incremented.
  4634. */
  4635. A_UINT32 per_histogram_cnt[HTT_TX_PDEV_STATS_NUM_PER_COUNTERS];
  4636. /**
  4637. * When the service class contains delay bound rate parameters which
  4638. * indicate low latency and we enable latency-based RA params then
  4639. * the low_latency_rate_count will be incremented.
  4640. * This counts the number of peer-TIDs that have been categorized as
  4641. * low-latency.
  4642. */
  4643. A_UINT32 low_latency_rate_cnt;
  4644. /** Indicate how many times rate drop happened within SIFS burst */
  4645. A_UINT32 su_burst_rate_drop_cnt;
  4646. /** Indicates how many within SIFS burst failed to deliver any pkt */
  4647. A_UINT32 su_burst_rate_drop_fail_cnt;
  4648. } htt_tx_pdev_rate_stats_sawf_tlv;
  4649. typedef struct {
  4650. htt_tlv_hdr_t tlv_hdr;
  4651. /**
  4652. * BIT [ 7 : 0] :- mac_id
  4653. * BIT [31 : 8] :- reserved
  4654. */
  4655. A_UINT32 mac_id__word;
  4656. /** 11BE EHT DL MU OFDMA LDPC count */
  4657. A_UINT32 be_ofdma_tx_ldpc;
  4658. /** 11BE EHT DL MU OFDMA TX MCS stats */
  4659. A_UINT32 be_ofdma_tx_mcs[HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  4660. /**
  4661. * 11BE EHT DL MU OFDMA TX NSS stats (Indicates NSS for individual users)
  4662. */
  4663. A_UINT32 be_ofdma_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4664. /** 11BE EHT DL MU OFDMA TX BW stats */
  4665. A_UINT32 be_ofdma_tx_bw[HTT_TX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  4666. /** 11BE EHT DL MU OFDMA TX guard interval stats */
  4667. A_UINT32 be_ofdma_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  4668. /** 11BE EHT DL MU OFDMA TX RU Size stats */
  4669. A_UINT32 be_ofdma_tx_ru_size[HTT_TX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS];
  4670. /** 11BE EHT DL MU OFDMA EHT-SIG MCS stats */
  4671. A_UINT32 be_ofdma_eht_sig_mcs[HTT_TX_PDEV_STATS_NUM_EHT_SIG_MCS_COUNTERS];
  4672. } htt_tx_pdev_rate_stats_be_ofdma_tlv;
  4673. typedef struct {
  4674. htt_tlv_hdr_t tlv_hdr;
  4675. /** Tx PPDU duration histogram **/
  4676. A_UINT32 tx_ppdu_dur_hist[HTT_PDEV_STATS_PPDU_DUR_HIST_BINS];
  4677. A_UINT32 tx_success_time_us_low;
  4678. A_UINT32 tx_success_time_us_high;
  4679. A_UINT32 tx_fail_time_us_low;
  4680. A_UINT32 tx_fail_time_us_high;
  4681. A_UINT32 pdev_up_time_us_low;
  4682. A_UINT32 pdev_up_time_us_high;
  4683. } htt_tx_pdev_ppdu_dur_stats_tlv;
  4684. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_TX_RATE
  4685. * TLV_TAGS:
  4686. * - HTT_STATS_TX_PDEV_RATE_STATS_TAG
  4687. */
  4688. /* NOTE:
  4689. * This structure is for documentation, and cannot be safely used directly.
  4690. * Instead, use the constituent TLV structures to fill/parse.
  4691. */
  4692. typedef struct {
  4693. htt_tx_pdev_rate_stats_tlv rate_tlv;
  4694. htt_tx_pdev_rate_stats_be_tlv rate_be_tlv;
  4695. htt_tx_pdev_rate_stats_sawf_tlv rate_sawf_tlv;
  4696. htt_tx_pdev_ppdu_dur_stats_tlv tx_ppdu_dur_tlv;
  4697. } htt_tx_pdev_rate_stats_t;
  4698. /* == PDEV RX RATE CTRL STATS == */
  4699. #define HTT_RX_PDEV_STATS_NUM_LEGACY_CCK_STATS 4
  4700. #define HTT_RX_PDEV_STATS_NUM_LEGACY_OFDM_STATS 8
  4701. #define HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS 12 /* 0-11 */
  4702. #define HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS 2 /* 12, 13 */
  4703. #define HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS 2 /* 14, 15 */
  4704. #define HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT 14 /* 0-13 */
  4705. #define HTT_RX_PDEV_STATS_NUM_GI_COUNTERS 4
  4706. #define HTT_RX_PDEV_STATS_NUM_DCM_COUNTERS 5
  4707. #define HTT_RX_PDEV_STATS_NUM_BW_COUNTERS 4
  4708. #define HTT_RX_PDEV_STATS_TOTAL_BW_COUNTERS \
  4709. (HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS + HTT_RX_PDEV_STATS_NUM_BW_COUNTERS)
  4710. #define HTT_RX_PDEV_STATS_NUM_BW_EXT2_COUNTERS 5 /* 20, 40, 80, 160, 320Mhz */
  4711. #define HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS 8
  4712. #define HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS 8
  4713. #define HTT_RX_PDEV_STATS_NUM_PREAMBLE_TYPES HTT_STATS_PREAM_COUNT
  4714. #define HTT_RX_PDEV_MAX_OFDMA_NUM_USER 8
  4715. #define HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER 8
  4716. #define HTT_RX_PDEV_STATS_RXEVM_MAX_PILOTS_PER_NSS 16
  4717. #define HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS 16 /* 0-13, -2, -1 */
  4718. #define HTT_RX_PDEV_STATS_NUM_BE_BW_COUNTERS 5 /* 20,40,80,160,320 MHz */
  4719. /* HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS:
  4720. * RU size index 0: HTT_UL_OFDMA_V0_RU_SIZE_RU_26
  4721. * RU size index 1: HTT_UL_OFDMA_V0_RU_SIZE_RU_52
  4722. * RU size index 2: HTT_UL_OFDMA_V0_RU_SIZE_RU_106
  4723. * RU size index 3: HTT_UL_OFDMA_V0_RU_SIZE_RU_242
  4724. * RU size index 4: HTT_UL_OFDMA_V0_RU_SIZE_RU_484
  4725. * RU size index 5: HTT_UL_OFDMA_V0_RU_SIZE_RU_996
  4726. */
  4727. #define HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS 6
  4728. /* HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS:
  4729. * RU size index 0: HTT_UL_OFDMA_V0_RU_SIZE_RU_26
  4730. * RU size index 1: HTT_UL_OFDMA_V0_RU_SIZE_RU_52
  4731. * RU size index 2: HTT_UL_OFDMA_V0_RU_SIZE_RU_106
  4732. * RU size index 3: HTT_UL_OFDMA_V0_RU_SIZE_RU_242
  4733. * RU size index 4: HTT_UL_OFDMA_V0_RU_SIZE_RU_484
  4734. * RU size index 5: HTT_UL_OFDMA_V0_RU_SIZE_RU_996
  4735. * RU size index 6: HTT_UL_OFDMA_V0_RU_SIZE_RU_996x2
  4736. */
  4737. #define HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS 7 /* includes 996x2 */
  4738. typedef enum {
  4739. HTT_RX_PDEV_STATS_BE_RU_SIZE_26,
  4740. HTT_RX_PDEV_STATS_BE_RU_SIZE_52,
  4741. HTT_RX_PDEV_STATS_BE_RU_SIZE_52_26,
  4742. HTT_RX_PDEV_STATS_BE_RU_SIZE_106,
  4743. HTT_RX_PDEV_STATS_BE_RU_SIZE_106_26,
  4744. HTT_RX_PDEV_STATS_BE_RU_SIZE_242,
  4745. HTT_RX_PDEV_STATS_BE_RU_SIZE_484,
  4746. HTT_RX_PDEV_STATS_BE_RU_SIZE_484_242,
  4747. HTT_RX_PDEV_STATS_BE_RU_SIZE_996,
  4748. HTT_RX_PDEV_STATS_BE_RU_SIZE_996_484,
  4749. HTT_RX_PDEV_STATS_BE_RU_SIZE_996_484_242,
  4750. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x2,
  4751. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x2_484,
  4752. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x3,
  4753. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x3_484,
  4754. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x4,
  4755. HTT_RX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS,
  4756. } HTT_RX_PDEV_STATS_BE_RU_SIZE;
  4757. #define HTT_RX_PDEV_RATE_STATS_MAC_ID_M 0x000000ff
  4758. #define HTT_RX_PDEV_RATE_STATS_MAC_ID_S 0
  4759. #define HTT_RX_PDEV_RATE_STATS_MAC_ID_GET(_var) \
  4760. (((_var) & HTT_RX_PDEV_RATE_STATS_MAC_ID_M) >> \
  4761. HTT_RX_PDEV_RATE_STATS_MAC_ID_S)
  4762. #define HTT_RX_PDEV_RATE_STATS_MAC_ID_SET(_var, _val) \
  4763. do { \
  4764. HTT_CHECK_SET_VAL(HTT_RX_PDEV_RATE_STATS_MAC_ID, _val); \
  4765. ((_var) |= ((_val) << HTT_RX_PDEV_RATE_STATS_MAC_ID_S)); \
  4766. } while (0)
  4767. /* Introduce new RX counters to support 320MHZ support and punctured modes */
  4768. typedef enum {
  4769. HTT_RX_PDEV_STATS_PUNCTURED_NONE = 0,
  4770. HTT_RX_PDEV_STATS_PUNCTURED_20 = 1,
  4771. HTT_RX_PDEV_STATS_PUNCTURED_40 = 2,
  4772. HTT_RX_PDEV_STATS_PUNCTURED_80 = 3,
  4773. HTT_RX_PDEV_STATS_PUNCTURED_120 = 4,
  4774. HTT_RX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS = 5
  4775. } HTT_RX_PDEV_STATS_NUM_PUNCTURED_MODE_TYPE;
  4776. #define HTT_RX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES 2 /* 0 - Half, 1 - Quarter */
  4777. typedef struct {
  4778. htt_tlv_hdr_t tlv_hdr;
  4779. /**
  4780. * BIT [ 7 : 0] :- mac_id
  4781. * BIT [31 : 8] :- reserved
  4782. */
  4783. A_UINT32 mac_id__word;
  4784. A_UINT32 nsts;
  4785. /** Number of rx ldpc packets */
  4786. A_UINT32 rx_ldpc;
  4787. /** Number of rx rts packets */
  4788. A_UINT32 rts_cnt;
  4789. /** units = dB above noise floor */
  4790. A_UINT32 rssi_mgmt;
  4791. /** units = dB above noise floor */
  4792. A_UINT32 rssi_data;
  4793. /** units = dB above noise floor */
  4794. A_UINT32 rssi_comb;
  4795. A_UINT32 rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  4796. /** element 0,1, ...7 -> NSS 1,2, ...8 */
  4797. A_UINT32 rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4798. A_UINT32 rx_dcm[HTT_RX_PDEV_STATS_NUM_DCM_COUNTERS];
  4799. A_UINT32 rx_stbc[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  4800. /** element 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160 and 80+80 MHz */
  4801. A_UINT32 rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  4802. A_UINT32 rx_pream[HTT_RX_PDEV_STATS_NUM_PREAMBLE_TYPES];
  4803. /** units = dB above noise floor */
  4804. A_UINT8 rssi_chain[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  4805. /** Counters to track number of rx packets in each GI in each mcs (0-11) */
  4806. A_UINT32 rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  4807. /** rx Signal Strength value in dBm unit */
  4808. A_INT32 rssi_in_dbm;
  4809. A_UINT32 rx_11ax_su_ext;
  4810. A_UINT32 rx_11ac_mumimo;
  4811. A_UINT32 rx_11ax_mumimo;
  4812. A_UINT32 rx_11ax_ofdma;
  4813. A_UINT32 txbf;
  4814. A_UINT32 rx_legacy_cck_rate[HTT_RX_PDEV_STATS_NUM_LEGACY_CCK_STATS];
  4815. A_UINT32 rx_legacy_ofdm_rate[HTT_RX_PDEV_STATS_NUM_LEGACY_OFDM_STATS];
  4816. A_UINT32 rx_active_dur_us_low;
  4817. A_UINT32 rx_active_dur_us_high;
  4818. /** number of times UL MU MIMO RX packets received */
  4819. A_UINT32 rx_11ax_ul_ofdma;
  4820. /** 11AX HE UL OFDMA RX TB PPDU MCS stats */
  4821. A_UINT32 ul_ofdma_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  4822. /** 11AX HE UL OFDMA RX TB PPDU GI stats */
  4823. A_UINT32 ul_ofdma_rx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  4824. /**
  4825. * 11AX HE UL OFDMA RX TB PPDU NSS stats
  4826. * (Increments the individual user NSS in the OFDMA PPDU received)
  4827. */
  4828. A_UINT32 ul_ofdma_rx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4829. /** 11AX HE UL OFDMA RX TB PPDU BW stats */
  4830. A_UINT32 ul_ofdma_rx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4831. /** Number of times UL OFDMA TB PPDUs received with stbc */
  4832. A_UINT32 ul_ofdma_rx_stbc;
  4833. /** Number of times UL OFDMA TB PPDUs received with ldpc */
  4834. A_UINT32 ul_ofdma_rx_ldpc;
  4835. /**
  4836. * Number of non data PPDUs received for each degree (number of users)
  4837. * in UL OFDMA
  4838. */
  4839. A_UINT32 rx_ulofdma_non_data_ppdu[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  4840. /**
  4841. * Number of data ppdus received for each degree (number of users)
  4842. * in UL OFDMA
  4843. */
  4844. A_UINT32 rx_ulofdma_data_ppdu[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  4845. /**
  4846. * Number of mpdus passed for each degree (number of users)
  4847. * in UL OFDMA TB PPDU
  4848. */
  4849. A_UINT32 rx_ulofdma_mpdu_ok[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  4850. /**
  4851. * Number of mpdus failed for each degree (number of users)
  4852. * in UL OFDMA TB PPDU
  4853. */
  4854. A_UINT32 rx_ulofdma_mpdu_fail[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  4855. A_UINT32 nss_count;
  4856. A_UINT32 pilot_count;
  4857. /** RxEVM stats in dB */
  4858. A_INT32 rx_pilot_evm_dB[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_RXEVM_MAX_PILOTS_PER_NSS];
  4859. /**
  4860. * EVM mean across pilots, computed as
  4861. * mean(10*log10(rx_pilot_evm_linear)) = mean(rx_pilot_evm_dB)
  4862. */
  4863. A_INT32 rx_pilot_evm_dB_mean[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4864. /** dBm units */
  4865. A_INT8 rx_ul_fd_rssi[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  4866. /** per_chain_rssi_pkt_type:
  4867. * This field shows what type of rx frame the per-chain RSSI was computed
  4868. * on, by recording the frame type and sub-type as bit-fields within this
  4869. * field:
  4870. * BIT [3 : 0] :- IEEE80211_FC0_TYPE
  4871. * BIT [7 : 4] :- IEEE80211_FC0_SUBTYPE
  4872. * BIT [31 : 8] :- Reserved
  4873. */
  4874. A_UINT32 per_chain_rssi_pkt_type;
  4875. A_INT8 rx_per_chain_rssi_in_dbm[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  4876. A_UINT32 rx_su_ndpa;
  4877. A_UINT32 rx_11ax_su_txbf_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  4878. A_UINT32 rx_mu_ndpa;
  4879. A_UINT32 rx_11ax_mu_txbf_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  4880. A_UINT32 rx_br_poll;
  4881. A_UINT32 rx_11ax_dl_ofdma_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  4882. A_UINT32 rx_11ax_dl_ofdma_ru[HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS];
  4883. /**
  4884. * Number of non data ppdus received for each degree (number of users)
  4885. * with UL MUMIMO
  4886. */
  4887. A_UINT32 rx_ulmumimo_non_data_ppdu[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
  4888. /**
  4889. * Number of data ppdus received for each degree (number of users)
  4890. * with UL MUMIMO
  4891. */
  4892. A_UINT32 rx_ulmumimo_data_ppdu[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
  4893. /**
  4894. * Number of mpdus passed for each degree (number of users)
  4895. * with UL MUMIMO TB PPDU
  4896. */
  4897. A_UINT32 rx_ulmumimo_mpdu_ok[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
  4898. /**
  4899. * Number of mpdus failed for each degree (number of users)
  4900. * with UL MUMIMO TB PPDU
  4901. */
  4902. A_UINT32 rx_ulmumimo_mpdu_fail[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
  4903. /**
  4904. * Number of non data ppdus received for each degree (number of users)
  4905. * in UL OFDMA
  4906. */
  4907. A_UINT32 rx_ulofdma_non_data_nusers[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  4908. /**
  4909. * Number of data ppdus received for each degree (number of users)
  4910. *in UL OFDMA
  4911. */
  4912. A_UINT32 rx_ulofdma_data_nusers[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  4913. /* Stats for MCS 12/13 */
  4914. A_UINT32 rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4915. /*
  4916. * NOTE - this TLV is already large enough that it causes the HTT message
  4917. * carrying it to be nearly at the message size limit that applies to
  4918. * many targets/hosts.
  4919. * No further fields should be added to this TLV without very careful
  4920. * review to ensure the size increase is acceptable.
  4921. */
  4922. } htt_rx_pdev_rate_stats_tlv;
  4923. typedef struct {
  4924. htt_tlv_hdr_t tlv_hdr;
  4925. /** Tx PPDU duration histogram **/
  4926. A_UINT32 rx_ppdu_dur_hist[HTT_PDEV_STATS_PPDU_DUR_HIST_BINS];
  4927. } htt_rx_pdev_ppdu_dur_stats_tlv;
  4928. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_RX_RATE
  4929. * TLV_TAGS:
  4930. * - HTT_STATS_RX_PDEV_RATE_STATS_TAG
  4931. */
  4932. /* NOTE:
  4933. * This structure is for documentation, and cannot be safely used directly.
  4934. * Instead, use the constituent TLV structures to fill/parse.
  4935. */
  4936. typedef struct {
  4937. htt_rx_pdev_rate_stats_tlv rate_tlv;
  4938. htt_rx_pdev_ppdu_dur_stats_tlv rx_ppdu_dur_tlv;
  4939. } htt_rx_pdev_rate_stats_t;
  4940. typedef struct {
  4941. htt_tlv_hdr_t tlv_hdr;
  4942. /** units = dB above noise floor */
  4943. A_UINT8 rssi_chain_ext[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS];
  4944. A_INT8 rx_per_chain_rssi_ext_in_dbm[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS];
  4945. /** rx mcast signal strength value in dBm unit */
  4946. A_INT32 rssi_mcast_in_dbm;
  4947. /** rx mgmt packet signal Strength value in dBm unit */
  4948. A_INT32 rssi_mgmt_in_dbm;
  4949. /*
  4950. * Stats for MCS 0-13 since rx_pdev_rate_stats_tlv cannot be updated,
  4951. * due to message size limitations.
  4952. */
  4953. A_UINT32 rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  4954. A_UINT32 rx_stbc_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  4955. A_UINT32 rx_gi_ext[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  4956. A_UINT32 ul_ofdma_rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  4957. A_UINT32 ul_ofdma_rx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  4958. A_UINT32 rx_11ax_su_txbf_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  4959. A_UINT32 rx_11ax_mu_txbf_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  4960. A_UINT32 rx_11ax_dl_ofdma_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  4961. /* MCS 14,15 */
  4962. A_UINT32 rx_mcs_ext_2[HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  4963. A_UINT32 rx_bw_ext[HTT_RX_PDEV_STATS_NUM_BW_EXT2_COUNTERS];
  4964. A_UINT32 rx_gi_ext_2[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  4965. A_UINT32 rx_su_punctured_mode[HTT_RX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS];
  4966. A_UINT32 reduced_rx_bw[HTT_RX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  4967. A_UINT8 rssi_chain_ext_2[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_EXT_2_COUNTERS]; /* units = dB above noise floor */
  4968. A_INT8 rx_per_chain_rssi_ext_2_in_dbm[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_EXT_2_COUNTERS];
  4969. } htt_rx_pdev_rate_ext_stats_tlv;
  4970. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_RX_RATE_EXT
  4971. * TLV_TAGS:
  4972. * - HTT_STATS_RX_PDEV_RATE_EXT_STATS_TAG
  4973. */
  4974. /* NOTE:
  4975. * This structure is for documentation, and cannot be safely used directly.
  4976. * Instead, use the constituent TLV structures to fill/parse.
  4977. */
  4978. typedef struct {
  4979. htt_rx_pdev_rate_ext_stats_tlv rate_tlv;
  4980. } htt_rx_pdev_rate_ext_stats_t;
  4981. #define HTT_STATS_CMN_MAC_ID_M 0x000000ff
  4982. #define HTT_STATS_CMN_MAC_ID_S 0
  4983. #define HTT_STATS_CMN_MAC_ID_GET(_var) \
  4984. (((_var) & HTT_STATS_CMN_MAC_ID_M) >> \
  4985. HTT_STATS_CMN_MAC_ID_S)
  4986. #define HTT_STATS_CMN_MAC_ID_SET(_var, _val) \
  4987. do { \
  4988. HTT_CHECK_SET_VAL(HTT_STATS_CMN_MAC_ID, _val); \
  4989. ((_var) |= ((_val) << HTT_STATS_CMN_MAC_ID_S)); \
  4990. } while (0)
  4991. #define HTT_RX_UL_MAX_UPLINK_RSSI_TRACK 5
  4992. typedef struct {
  4993. htt_tlv_hdr_t tlv_hdr;
  4994. /**
  4995. * BIT [ 7 : 0] :- mac_id
  4996. * BIT [31 : 8] :- reserved
  4997. */
  4998. A_UINT32 mac_id__word;
  4999. A_UINT32 rx_11ax_ul_ofdma;
  5000. A_UINT32 ul_ofdma_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5001. A_UINT32 ul_ofdma_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5002. A_UINT32 ul_ofdma_rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  5003. A_UINT32 ul_ofdma_rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5004. A_UINT32 ul_ofdma_rx_stbc;
  5005. A_UINT32 ul_ofdma_rx_ldpc;
  5006. /*
  5007. * These are arrays to hold the number of PPDUs that we received per RU.
  5008. * E.g. PPDUs (data or non data) received in RU26 will be incremented in
  5009. * array offset 0 and similarly RU52 will be incremented in array offset 1
  5010. */
  5011. A_UINT32 rx_ulofdma_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS]; /* ppdu level */
  5012. A_UINT32 rx_ulofdma_non_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS]; /* ppdu level */
  5013. /*
  5014. * These arrays hold Target RSSI (rx power the AP wants),
  5015. * FD RSSI (rx power the AP sees) & Power headroom values of STAs
  5016. * which can be identified by AIDs, during trigger based RX.
  5017. * Array acts a circular buffer and holds values for last 5 STAs
  5018. * in the same order as RX.
  5019. */
  5020. /**
  5021. * STA AID array for identifying which STA the
  5022. * Target-RSSI / FD-RSSI / pwr headroom stats are for
  5023. */
  5024. A_UINT32 uplink_sta_aid[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5025. /**
  5026. * Trig Target RSSI for STA AID in same index - UNIT(dBm)
  5027. */
  5028. A_INT32 uplink_sta_target_rssi[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5029. /**
  5030. * Trig FD RSSI from STA AID in same index - UNIT(dBm)
  5031. */
  5032. A_INT32 uplink_sta_fd_rssi[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5033. /**
  5034. * Trig power headroom for STA AID in same idx - UNIT(dB)
  5035. */
  5036. A_UINT32 uplink_sta_power_headroom[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5037. A_UINT32 reduced_ul_ofdma_rx_bw[HTT_RX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5038. /*
  5039. * Number of HE UL OFDMA per-user responses containing only a QoS null in
  5040. * response to basic trigger. Typically a data response is expected.
  5041. */
  5042. A_UINT32 ul_ofdma_basic_trigger_rx_qos_null_only;
  5043. } htt_rx_pdev_ul_trigger_stats_tlv;
  5044. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_UL_TRIG_STATS
  5045. * TLV_TAGS:
  5046. * - HTT_STATS_RX_PDEV_UL_TRIG_STATS_TAG
  5047. * NOTE:
  5048. * This structure is for documentation, and cannot be safely used directly.
  5049. * Instead, use the constituent TLV structures to fill/parse.
  5050. */
  5051. typedef struct {
  5052. htt_rx_pdev_ul_trigger_stats_tlv ul_trigger_tlv;
  5053. } htt_rx_pdev_ul_trigger_stats_t;
  5054. typedef struct {
  5055. htt_tlv_hdr_t tlv_hdr;
  5056. /**
  5057. * BIT [ 7 : 0] :- mac_id
  5058. * BIT [31 : 8] :- reserved
  5059. */
  5060. A_UINT32 mac_id__word;
  5061. A_UINT32 rx_11be_ul_ofdma;
  5062. A_UINT32 be_ul_ofdma_rx_mcs[HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  5063. A_UINT32 be_ul_ofdma_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  5064. A_UINT32 be_ul_ofdma_rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  5065. A_UINT32 be_ul_ofdma_rx_bw[HTT_RX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  5066. A_UINT32 be_ul_ofdma_rx_stbc;
  5067. A_UINT32 be_ul_ofdma_rx_ldpc;
  5068. /*
  5069. * These are arrays to hold the number of PPDUs that we received per RU.
  5070. * E.g. PPDUs (data or non data) received in RU26 will be incremented in
  5071. * array offset 0 and similarly RU52 will be incremented in array offset 1
  5072. */
  5073. /** PPDU level */
  5074. A_UINT32 be_rx_ulofdma_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS];
  5075. /** PPDU level */
  5076. A_UINT32 be_rx_ulofdma_non_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS];
  5077. /*
  5078. * These arrays hold Target RSSI (rx power the AP wants),
  5079. * FD RSSI (rx power the AP sees) & Power headroom values of STAs
  5080. * which can be identified by AIDs, during trigger based RX.
  5081. * Array acts a circular buffer and holds values for last 5 STAs
  5082. * in the same order as RX.
  5083. */
  5084. /**
  5085. * STA AID array for identifying which STA the
  5086. * Target-RSSI / FD-RSSI / pwr headroom stats are for
  5087. */
  5088. A_UINT32 be_uplink_sta_aid[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5089. /**
  5090. * Trig Target RSSI for STA AID in same index - UNIT(dBm)
  5091. */
  5092. A_INT32 be_uplink_sta_target_rssi[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5093. /**
  5094. * Trig FD RSSI from STA AID in same index - UNIT(dBm)
  5095. */
  5096. A_INT32 be_uplink_sta_fd_rssi[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5097. /**
  5098. * Trig power headroom for STA AID in same idx - UNIT(dB)
  5099. */
  5100. A_UINT32 be_uplink_sta_power_headroom[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5101. /*
  5102. * Number of EHT UL OFDMA per-user responses containing only a QoS null in
  5103. * response to basic trigger. Typically a data response is expected.
  5104. */
  5105. A_UINT32 be_ul_ofdma_basic_trigger_rx_qos_null_only;
  5106. /* UL MLO Queue Depth Sharing Stats */
  5107. A_UINT32 ul_mlo_send_qdepth_params_count;
  5108. A_UINT32 ul_mlo_proc_qdepth_params_count;
  5109. A_UINT32 ul_mlo_proc_accepted_qdepth_params_count;
  5110. A_UINT32 ul_mlo_proc_discarded_qdepth_params_count;
  5111. } htt_rx_pdev_be_ul_trigger_stats_tlv;
  5112. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_UL_TRIG_STATS
  5113. * TLV_TAGS:
  5114. * - HTT_STATS_RX_PDEV_BE_UL_TRIG_STATS_TAG
  5115. * NOTE:
  5116. * This structure is for documentation, and cannot be safely used directly.
  5117. * Instead, use the constituent TLV structures to fill/parse.
  5118. */
  5119. typedef struct {
  5120. htt_rx_pdev_be_ul_trigger_stats_tlv ul_trigger_tlv;
  5121. } htt_rx_pdev_be_ul_trigger_stats_t;
  5122. typedef struct {
  5123. htt_tlv_hdr_t tlv_hdr;
  5124. A_UINT32 user_index;
  5125. /** PPDU level */
  5126. A_UINT32 rx_ulofdma_non_data_ppdu;
  5127. /** PPDU level */
  5128. A_UINT32 rx_ulofdma_data_ppdu;
  5129. /** MPDU level */
  5130. A_UINT32 rx_ulofdma_mpdu_ok;
  5131. /** MPDU level */
  5132. A_UINT32 rx_ulofdma_mpdu_fail;
  5133. A_UINT32 rx_ulofdma_non_data_nusers;
  5134. A_UINT32 rx_ulofdma_data_nusers;
  5135. } htt_rx_pdev_ul_ofdma_user_stats_tlv;
  5136. typedef struct {
  5137. htt_tlv_hdr_t tlv_hdr;
  5138. A_UINT32 user_index;
  5139. /** PPDU level */
  5140. A_UINT32 be_rx_ulofdma_non_data_ppdu;
  5141. /** PPDU level */
  5142. A_UINT32 be_rx_ulofdma_data_ppdu;
  5143. /** MPDU level */
  5144. A_UINT32 be_rx_ulofdma_mpdu_ok;
  5145. /** MPDU level */
  5146. A_UINT32 be_rx_ulofdma_mpdu_fail;
  5147. A_UINT32 be_rx_ulofdma_non_data_nusers;
  5148. A_UINT32 be_rx_ulofdma_data_nusers;
  5149. } htt_rx_pdev_be_ul_ofdma_user_stats_tlv;
  5150. typedef struct {
  5151. htt_tlv_hdr_t tlv_hdr;
  5152. A_UINT32 user_index;
  5153. /** PPDU level */
  5154. A_UINT32 rx_ulmumimo_non_data_ppdu;
  5155. /** PPDU level */
  5156. A_UINT32 rx_ulmumimo_data_ppdu;
  5157. /** MPDU level */
  5158. A_UINT32 rx_ulmumimo_mpdu_ok;
  5159. /** MPDU level */
  5160. A_UINT32 rx_ulmumimo_mpdu_fail;
  5161. } htt_rx_pdev_ul_mimo_user_stats_tlv;
  5162. typedef struct {
  5163. htt_tlv_hdr_t tlv_hdr;
  5164. A_UINT32 user_index;
  5165. /** PPDU level */
  5166. A_UINT32 be_rx_ulmumimo_non_data_ppdu;
  5167. /** PPDU level */
  5168. A_UINT32 be_rx_ulmumimo_data_ppdu;
  5169. /** MPDU level */
  5170. A_UINT32 be_rx_ulmumimo_mpdu_ok;
  5171. /** MPDU level */
  5172. A_UINT32 be_rx_ulmumimo_mpdu_fail;
  5173. } htt_rx_pdev_be_ul_mimo_user_stats_tlv;
  5174. /* == RX PDEV/SOC STATS == */
  5175. typedef struct {
  5176. htt_tlv_hdr_t tlv_hdr;
  5177. /**
  5178. * BIT [7:0] :- mac_id
  5179. * BIT [31:8] :- reserved
  5180. *
  5181. * Refer to HTT_STATS_CMN_MAC_ID_GET/SET macros.
  5182. */
  5183. A_UINT32 mac_id__word;
  5184. /** Number of times UL MUMIMO RX packets received */
  5185. A_UINT32 rx_11ax_ul_mumimo;
  5186. /** 11AX HE UL MU-MIMO RX TB PPDU MCS stats */
  5187. A_UINT32 ul_mumimo_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5188. /**
  5189. * 11AX HE UL MU-MIMO RX GI & LTF stats.
  5190. * Index 0 indicates 1xLTF + 1.6 msec GI
  5191. * Index 1 indicates 2xLTF + 1.6 msec GI
  5192. * Index 2 indicates 4xLTF + 3.2 msec GI
  5193. */
  5194. A_UINT32 ul_mumimo_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5195. /**
  5196. * 11AX HE UL MU-MIMO RX TB PPDU NSS stats
  5197. * (Increments the individual user NSS in the UL MU MIMO PPDU received)
  5198. */
  5199. A_UINT32 ul_mumimo_rx_nss[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5200. /** 11AX HE UL MU-MIMO RX TB PPDU BW stats */
  5201. A_UINT32 ul_mumimo_rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5202. /** Number of times UL MUMIMO TB PPDUs received with STBC */
  5203. A_UINT32 ul_mumimo_rx_stbc;
  5204. /** Number of times UL MUMIMO TB PPDUs received with LDPC */
  5205. A_UINT32 ul_mumimo_rx_ldpc;
  5206. /* Stats for MCS 12/13 */
  5207. A_UINT32 ul_mumimo_rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  5208. A_UINT32 ul_mumimo_rx_gi_ext[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  5209. /** RSSI in dBm for Rx TB PPDUs */
  5210. A_INT8 rx_ul_mumimo_chain_rssi_in_dbm[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_TOTAL_BW_COUNTERS];
  5211. /** Target RSSI programmed in UL MUMIMO triggers (units dBm) */
  5212. A_INT8 rx_ul_mumimo_target_rssi[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5213. /** FD RSSI measured for Rx UL TB PPDUs (units dBm) */
  5214. A_INT8 rx_ul_mumimo_fd_rssi[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS][HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5215. /** Average pilot EVM measued for RX UL TB PPDU */
  5216. A_INT8 rx_ulmumimo_pilot_evm_dB_mean[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS][HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5217. A_UINT32 reduced_ul_mumimo_rx_bw[HTT_RX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5218. /*
  5219. * Number of HE UL MU-MIMO per-user responses containing only a QoS null in
  5220. * response to basic trigger. Typically a data response is expected.
  5221. */
  5222. A_UINT32 ul_mumimo_basic_trigger_rx_qos_null_only;
  5223. } htt_rx_pdev_ul_mumimo_trig_stats_tlv;
  5224. typedef struct {
  5225. htt_tlv_hdr_t tlv_hdr;
  5226. /**
  5227. * BIT [7:0] :- mac_id
  5228. * BIT [31:8] :- reserved
  5229. *
  5230. * Refer to HTT_STATS_CMN_MAC_ID_GET/SET macros.
  5231. */
  5232. A_UINT32 mac_id__word;
  5233. /** Number of times UL MUMIMO RX packets received */
  5234. A_UINT32 rx_11be_ul_mumimo;
  5235. /** 11BE EHT UL MU-MIMO RX TB PPDU MCS stats */
  5236. A_UINT32 be_ul_mumimo_rx_mcs[HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  5237. /**
  5238. * 11BE EHT UL MU-MIMO RX GI & LTF stats.
  5239. * Index 0 indicates 1xLTF + 1.6 msec GI
  5240. * Index 1 indicates 2xLTF + 1.6 msec GI
  5241. * Index 2 indicates 4xLTF + 3.2 msec GI
  5242. */
  5243. A_UINT32 be_ul_mumimo_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  5244. /**
  5245. * 11BE EHT UL MU-MIMO RX TB PPDU NSS stats
  5246. * (Increments the individual user NSS in the UL MU MIMO PPDU received)
  5247. */
  5248. A_UINT32 be_ul_mumimo_rx_nss[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5249. /** 11BE EHT UL MU-MIMO RX TB PPDU BW stats */
  5250. A_UINT32 be_ul_mumimo_rx_bw[HTT_RX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  5251. /** Number of times UL MUMIMO TB PPDUs received with STBC */
  5252. A_UINT32 be_ul_mumimo_rx_stbc;
  5253. /** Number of times UL MUMIMO TB PPDUs received with LDPC */
  5254. A_UINT32 be_ul_mumimo_rx_ldpc;
  5255. /** RSSI in dBm for Rx TB PPDUs */
  5256. A_INT8 be_rx_ul_mumimo_chain_rssi_in_dbm[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  5257. /** Target RSSI programmed in UL MUMIMO triggers (units dBm) */
  5258. A_INT8 be_rx_ul_mumimo_target_rssi[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER][HTT_RX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  5259. /** FD RSSI measured for Rx UL TB PPDUs (units dBm) */
  5260. A_INT8 be_rx_ul_mumimo_fd_rssi[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER][HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5261. /** Average pilot EVM measued for RX UL TB PPDU */
  5262. A_INT8 be_rx_ulmumimo_pilot_evm_dB_mean[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER][HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5263. /** Number of times UL MUMIMO TB PPDUs received in a punctured mode */
  5264. A_UINT32 rx_ul_mumimo_punctured_mode[HTT_RX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS];
  5265. /*
  5266. * Number of EHT UL MU-MIMO per-user responses containing only a QoS null
  5267. * in response to basic trigger. Typically a data response is expected.
  5268. */
  5269. A_UINT32 be_ul_mumimo_basic_trigger_rx_qos_null_only;
  5270. } htt_rx_pdev_ul_mumimo_trig_be_stats_tlv;
  5271. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_UL_MUMIMO_TRIG_STATS
  5272. * TLV_TAGS:
  5273. * - HTT_STATS_RX_PDEV_UL_MUMIMO_TRIG_STATS_TAG
  5274. * - HTT_STATS_RX_PDEV_UL_MUMIMO_TRIG_BE_STATS_TAG
  5275. */
  5276. typedef struct {
  5277. htt_rx_pdev_ul_mumimo_trig_stats_tlv ul_mumimo_trig_tlv;
  5278. htt_rx_pdev_ul_mumimo_trig_be_stats_tlv ul_mumimo_trig_be_tlv;
  5279. } htt_rx_pdev_ul_mumimo_trig_stats_t;
  5280. typedef struct {
  5281. htt_tlv_hdr_t tlv_hdr;
  5282. /** Num Packets received on REO FW ring */
  5283. A_UINT32 fw_reo_ring_data_msdu;
  5284. /** Num bc/mc packets indicated from fw to host */
  5285. A_UINT32 fw_to_host_data_msdu_bcmc;
  5286. /** Num unicast packets indicated from fw to host */
  5287. A_UINT32 fw_to_host_data_msdu_uc;
  5288. /** Num remote buf recycle from offload */
  5289. A_UINT32 ofld_remote_data_buf_recycle_cnt;
  5290. /** Num remote free buf given to offload */
  5291. A_UINT32 ofld_remote_free_buf_indication_cnt;
  5292. /** Num unicast packets from local path indicated to host */
  5293. A_UINT32 ofld_buf_to_host_data_msdu_uc;
  5294. /** Num unicast packets from REO indicated to host */
  5295. A_UINT32 reo_fw_ring_to_host_data_msdu_uc;
  5296. /** Num Packets received from WBM SW1 ring */
  5297. A_UINT32 wbm_sw_ring_reap;
  5298. /** Num packets from WBM forwarded from fw to host via WBM */
  5299. A_UINT32 wbm_forward_to_host_cnt;
  5300. /** Num packets from WBM recycled to target refill ring */
  5301. A_UINT32 wbm_target_recycle_cnt;
  5302. /**
  5303. * Total Num of recycled to refill ring,
  5304. * including packets from WBM and REO
  5305. */
  5306. A_UINT32 target_refill_ring_recycle_cnt;
  5307. } htt_rx_soc_fw_stats_tlv;
  5308. #define HTT_RX_SOC_FW_REFILL_RING_EMPTY_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  5309. /* NOTE: Variable length TLV, use length spec to infer array size */
  5310. typedef struct {
  5311. htt_tlv_hdr_t tlv_hdr;
  5312. /** Num ring empty encountered */
  5313. A_UINT32 refill_ring_empty_cnt[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  5314. } htt_rx_soc_fw_refill_ring_empty_tlv_v;
  5315. #define HTT_RX_SOC_FW_REFILL_RING_EMPTY_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  5316. /* NOTE: Variable length TLV, use length spec to infer array size */
  5317. typedef struct {
  5318. htt_tlv_hdr_t tlv_hdr;
  5319. /** Num total buf refilled from refill ring */
  5320. A_UINT32 refill_ring_num_refill[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  5321. } htt_rx_soc_fw_refill_ring_num_refill_tlv_v;
  5322. /* RXDMA error code from WBM released packets */
  5323. typedef enum {
  5324. HTT_RX_RXDMA_OVERFLOW_ERR = 0,
  5325. HTT_RX_RXDMA_MPDU_LENGTH_ERR = 1,
  5326. HTT_RX_RXDMA_FCS_ERR = 2,
  5327. HTT_RX_RXDMA_DECRYPT_ERR = 3,
  5328. HTT_RX_RXDMA_TKIP_MIC_ERR = 4,
  5329. HTT_RX_RXDMA_UNECRYPTED_ERR = 5,
  5330. HTT_RX_RXDMA_MSDU_LEN_ERR = 6,
  5331. HTT_RX_RXDMA_MSDU_LIMIT_ERR = 7,
  5332. HTT_RX_RXDMA_WIFI_PARSE_ERR = 8,
  5333. HTT_RX_RXDMA_AMSDU_PARSE_ERR = 9,
  5334. HTT_RX_RXDMA_SA_TIMEOUT_ERR = 10,
  5335. HTT_RX_RXDMA_DA_TIMEOUT_ERR = 11,
  5336. HTT_RX_RXDMA_FLOW_TIMEOUT_ERR = 12,
  5337. HTT_RX_RXDMA_FLUSH_REQUEST = 13,
  5338. HTT_RX_RXDMA_ERR_CODE_RVSD0 = 14,
  5339. HTT_RX_RXDMA_ERR_CODE_RVSD1 = 15,
  5340. /*
  5341. * This MAX_ERR_CODE should not be used in any host/target messages,
  5342. * so that even though it is defined within a host/target interface
  5343. * definition header file, it isn't actually part of the host/target
  5344. * interface, and thus can be modified.
  5345. */
  5346. HTT_RX_RXDMA_MAX_ERR_CODE
  5347. } htt_rx_rxdma_error_code_enum;
  5348. /* NOTE: Variable length TLV, use length spec to infer array size */
  5349. typedef struct {
  5350. htt_tlv_hdr_t tlv_hdr;
  5351. /** NOTE:
  5352. * The mapping of RXDMA error types to rxdma_err array elements is HW dependent.
  5353. * It is expected but not required that the target will provide a rxdma_err element
  5354. * for each of the htt_rx_rxdma_error_code_enum values, up to but not including
  5355. * MAX_ERR_CODE. The host should ignore any array elements whose
  5356. * indices are >= the MAX_ERR_CODE value the host was compiled with.
  5357. */
  5358. A_UINT32 rxdma_err[1]; /* HTT_RX_RXDMA_MAX_ERR_CODE */
  5359. } htt_rx_soc_fw_refill_ring_num_rxdma_err_tlv_v;
  5360. /* REO error code from WBM released packets */
  5361. typedef enum {
  5362. HTT_RX_REO_QUEUE_DESC_ADDR_ZERO = 0,
  5363. HTT_RX_REO_QUEUE_DESC_NOT_VALID = 1,
  5364. HTT_RX_AMPDU_IN_NON_BA = 2,
  5365. HTT_RX_NON_BA_DUPLICATE = 3,
  5366. HTT_RX_BA_DUPLICATE = 4,
  5367. HTT_RX_REGULAR_FRAME_2K_JUMP = 5,
  5368. HTT_RX_BAR_FRAME_2K_JUMP = 6,
  5369. HTT_RX_REGULAR_FRAME_OOR = 7,
  5370. HTT_RX_BAR_FRAME_OOR = 8,
  5371. HTT_RX_BAR_FRAME_NO_BA_SESSION = 9,
  5372. HTT_RX_BAR_FRAME_SN_EQUALS_SSN = 10,
  5373. HTT_RX_PN_CHECK_FAILED = 11,
  5374. HTT_RX_2K_ERROR_HANDLING_FLAG_SET = 12,
  5375. HTT_RX_PN_ERROR_HANDLING_FLAG_SET = 13,
  5376. HTT_RX_QUEUE_DESCRIPTOR_BLOCKED_SET = 14,
  5377. HTT_RX_REO_ERR_CODE_RVSD = 15,
  5378. /*
  5379. * This MAX_ERR_CODE should not be used in any host/target messages,
  5380. * so that even though it is defined within a host/target interface
  5381. * definition header file, it isn't actually part of the host/target
  5382. * interface, and thus can be modified.
  5383. */
  5384. HTT_RX_REO_MAX_ERR_CODE
  5385. } htt_rx_reo_error_code_enum;
  5386. /* NOTE: Variable length TLV, use length spec to infer array size */
  5387. typedef struct {
  5388. htt_tlv_hdr_t tlv_hdr;
  5389. /** NOTE:
  5390. * The mapping of REO error types to reo_err array elements is HW dependent.
  5391. * It is expected but not required that the target will provide a rxdma_err element
  5392. * for each of the htt_rx_reo_error_code_enum values, up to but not including
  5393. * MAX_ERR_CODE. The host should ignore any array elements whose
  5394. * indices are >= the MAX_ERR_CODE value the host was compiled with.
  5395. */
  5396. A_UINT32 reo_err[1]; /* HTT_RX_REO_MAX_ERR_CODE */
  5397. } htt_rx_soc_fw_refill_ring_num_reo_err_tlv_v;
  5398. /* NOTE:
  5399. * This structure is for documentation, and cannot be safely used directly.
  5400. * Instead, use the constituent TLV structures to fill/parse.
  5401. */
  5402. typedef struct {
  5403. htt_rx_soc_fw_stats_tlv fw_tlv;
  5404. htt_rx_soc_fw_refill_ring_empty_tlv_v fw_refill_ring_empty_tlv;
  5405. htt_rx_soc_fw_refill_ring_num_refill_tlv_v fw_refill_ring_num_refill_tlv;
  5406. htt_rx_soc_fw_refill_ring_num_rxdma_err_tlv_v fw_refill_ring_num_rxdma_err_tlv;
  5407. htt_rx_soc_fw_refill_ring_num_reo_err_tlv_v fw_refill_ring_num_reo_err_tlv;
  5408. } htt_rx_soc_stats_t;
  5409. /* == RX PDEV STATS == */
  5410. #define HTT_RX_PDEV_FW_STATS_MAC_ID_M 0x000000ff
  5411. #define HTT_RX_PDEV_FW_STATS_MAC_ID_S 0
  5412. #define HTT_RX_PDEV_FW_STATS_MAC_ID_GET(_var) \
  5413. (((_var) & HTT_RX_PDEV_FW_STATS_MAC_ID_M) >> \
  5414. HTT_RX_PDEV_FW_STATS_MAC_ID_S)
  5415. #define HTT_RX_PDEV_FW_STATS_MAC_ID_SET(_var, _val) \
  5416. do { \
  5417. HTT_CHECK_SET_VAL(HTT_RX_PDEV_FW_STATS_MAC_ID, _val); \
  5418. ((_var) |= ((_val) << HTT_RX_PDEV_FW_STATS_MAC_ID_S)); \
  5419. } while (0)
  5420. typedef struct {
  5421. htt_tlv_hdr_t tlv_hdr;
  5422. /**
  5423. * BIT [ 7 : 0] :- mac_id
  5424. * BIT [31 : 8] :- reserved
  5425. */
  5426. A_UINT32 mac_id__word;
  5427. /** Num PPDU status processed from HW */
  5428. A_UINT32 ppdu_recvd;
  5429. /** Num MPDU across PPDUs with FCS ok */
  5430. A_UINT32 mpdu_cnt_fcs_ok;
  5431. /** Num MPDU across PPDUs with FCS err */
  5432. A_UINT32 mpdu_cnt_fcs_err;
  5433. /** Num MSDU across PPDUs */
  5434. A_UINT32 tcp_msdu_cnt;
  5435. /** Num MSDU across PPDUs */
  5436. A_UINT32 tcp_ack_msdu_cnt;
  5437. /** Num MSDU across PPDUs */
  5438. A_UINT32 udp_msdu_cnt;
  5439. /** Num MSDU across PPDUs */
  5440. A_UINT32 other_msdu_cnt;
  5441. /** Num MPDU on FW ring indicated */
  5442. A_UINT32 fw_ring_mpdu_ind;
  5443. /** Num MGMT MPDU given to protocol */
  5444. A_UINT32 fw_ring_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  5445. /** Num ctrl MPDU given to protocol */
  5446. A_UINT32 fw_ring_ctrl_subtype[HTT_STATS_SUBTYPE_MAX];
  5447. /** Num mcast data packet received */
  5448. A_UINT32 fw_ring_mcast_data_msdu;
  5449. /** Num broadcast data packet received */
  5450. A_UINT32 fw_ring_bcast_data_msdu;
  5451. /** Num unicast data packet received */
  5452. A_UINT32 fw_ring_ucast_data_msdu;
  5453. /** Num null data packet received */
  5454. A_UINT32 fw_ring_null_data_msdu;
  5455. /** Num MPDU on FW ring dropped */
  5456. A_UINT32 fw_ring_mpdu_drop;
  5457. /** Num buf indication to offload */
  5458. A_UINT32 ofld_local_data_ind_cnt;
  5459. /** Num buf recycle from offload */
  5460. A_UINT32 ofld_local_data_buf_recycle_cnt;
  5461. /** Num buf indication to data_rx */
  5462. A_UINT32 drx_local_data_ind_cnt;
  5463. /** Num buf recycle from data_rx */
  5464. A_UINT32 drx_local_data_buf_recycle_cnt;
  5465. /** Num buf indication to protocol */
  5466. A_UINT32 local_nondata_ind_cnt;
  5467. /** Num buf recycle from protocol */
  5468. A_UINT32 local_nondata_buf_recycle_cnt;
  5469. /** Num buf fed */
  5470. A_UINT32 fw_status_buf_ring_refill_cnt;
  5471. /** Num ring empty encountered */
  5472. A_UINT32 fw_status_buf_ring_empty_cnt;
  5473. /** Num buf fed */
  5474. A_UINT32 fw_pkt_buf_ring_refill_cnt;
  5475. /** Num ring empty encountered */
  5476. A_UINT32 fw_pkt_buf_ring_empty_cnt;
  5477. /** Num buf fed */
  5478. A_UINT32 fw_link_buf_ring_refill_cnt;
  5479. /** Num ring empty encountered */
  5480. A_UINT32 fw_link_buf_ring_empty_cnt;
  5481. /** Num buf fed */
  5482. A_UINT32 host_pkt_buf_ring_refill_cnt;
  5483. /** Num ring empty encountered */
  5484. A_UINT32 host_pkt_buf_ring_empty_cnt;
  5485. /** Num buf fed */
  5486. A_UINT32 mon_pkt_buf_ring_refill_cnt;
  5487. /** Num ring empty encountered */
  5488. A_UINT32 mon_pkt_buf_ring_empty_cnt;
  5489. /** Num buf fed */
  5490. A_UINT32 mon_status_buf_ring_refill_cnt;
  5491. /** Num ring empty encountered */
  5492. A_UINT32 mon_status_buf_ring_empty_cnt;
  5493. /** Num buf fed */
  5494. A_UINT32 mon_desc_buf_ring_refill_cnt;
  5495. /** Num ring empty encountered */
  5496. A_UINT32 mon_desc_buf_ring_empty_cnt;
  5497. /** Num buf fed */
  5498. A_UINT32 mon_dest_ring_update_cnt;
  5499. /** Num ring full encountered */
  5500. A_UINT32 mon_dest_ring_full_cnt;
  5501. /** Num rx suspend is attempted */
  5502. A_UINT32 rx_suspend_cnt;
  5503. /** Num rx suspend failed */
  5504. A_UINT32 rx_suspend_fail_cnt;
  5505. /** Num rx resume attempted */
  5506. A_UINT32 rx_resume_cnt;
  5507. /** Num rx resume failed */
  5508. A_UINT32 rx_resume_fail_cnt;
  5509. /** Num rx ring switch */
  5510. A_UINT32 rx_ring_switch_cnt;
  5511. /** Num rx ring restore */
  5512. A_UINT32 rx_ring_restore_cnt;
  5513. /** Num rx flush issued */
  5514. A_UINT32 rx_flush_cnt;
  5515. /** Num rx recovery */
  5516. A_UINT32 rx_recovery_reset_cnt;
  5517. } htt_rx_pdev_fw_stats_tlv;
  5518. typedef struct {
  5519. htt_tlv_hdr_t tlv_hdr;
  5520. /** peer mac address */
  5521. htt_mac_addr peer_mac_addr;
  5522. /** Num of tx mgmt frames with subtype on peer level */
  5523. A_UINT32 peer_tx_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  5524. /** Num of rx mgmt frames with subtype on peer level */
  5525. A_UINT32 peer_rx_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  5526. } htt_peer_ctrl_path_txrx_stats_tlv;
  5527. #define HTT_STATS_PHY_ERR_MAX 43
  5528. typedef struct {
  5529. htt_tlv_hdr_t tlv_hdr;
  5530. /**
  5531. * BIT [ 7 : 0] :- mac_id
  5532. * BIT [31 : 8] :- reserved
  5533. */
  5534. A_UINT32 mac_id__word;
  5535. /** Num of phy err */
  5536. A_UINT32 total_phy_err_cnt;
  5537. /** Counts of different types of phy errs
  5538. * The mapping of PHY error types to phy_err array elements is HW dependent.
  5539. * The only currently-supported mapping is shown below:
  5540. *
  5541. * 0 phyrx_err_phy_off Reception aborted due to receiving a PHY_OFF TLV
  5542. * 1 phyrx_err_synth_off
  5543. * 2 phyrx_err_ofdma_timing
  5544. * 3 phyrx_err_ofdma_signal_parity
  5545. * 4 phyrx_err_ofdma_rate_illegal
  5546. * 5 phyrx_err_ofdma_length_illegal
  5547. * 6 phyrx_err_ofdma_restart
  5548. * 7 phyrx_err_ofdma_service
  5549. * 8 phyrx_err_ppdu_ofdma_power_drop
  5550. * 9 phyrx_err_cck_blokker
  5551. * 10 phyrx_err_cck_timing
  5552. * 11 phyrx_err_cck_header_crc
  5553. * 12 phyrx_err_cck_rate_illegal
  5554. * 13 phyrx_err_cck_length_illegal
  5555. * 14 phyrx_err_cck_restart
  5556. * 15 phyrx_err_cck_service
  5557. * 16 phyrx_err_cck_power_drop
  5558. * 17 phyrx_err_ht_crc_err
  5559. * 18 phyrx_err_ht_length_illegal
  5560. * 19 phyrx_err_ht_rate_illegal
  5561. * 20 phyrx_err_ht_zlf
  5562. * 21 phyrx_err_false_radar_ext
  5563. * 22 phyrx_err_green_field
  5564. * 23 phyrx_err_bw_gt_dyn_bw
  5565. * 24 phyrx_err_leg_ht_mismatch
  5566. * 25 phyrx_err_vht_crc_error
  5567. * 26 phyrx_err_vht_siga_unsupported
  5568. * 27 phyrx_err_vht_lsig_len_invalid
  5569. * 28 phyrx_err_vht_ndp_or_zlf
  5570. * 29 phyrx_err_vht_nsym_lt_zero
  5571. * 30 phyrx_err_vht_rx_extra_symbol_mismatch
  5572. * 31 phyrx_err_vht_rx_skip_group_id0
  5573. * 32 phyrx_err_vht_rx_skip_group_id1to62
  5574. * 33 phyrx_err_vht_rx_skip_group_id63
  5575. * 34 phyrx_err_ofdm_ldpc_decoder_disabled
  5576. * 35 phyrx_err_defer_nap
  5577. * 36 phyrx_err_fdomain_timeout
  5578. * 37 phyrx_err_lsig_rel_check
  5579. * 38 phyrx_err_bt_collision
  5580. * 39 phyrx_err_unsupported_mu_feedback
  5581. * 40 phyrx_err_ppdu_tx_interrupt_rx
  5582. * 41 phyrx_err_unsupported_cbf
  5583. * 42 phyrx_err_other
  5584. */
  5585. A_UINT32 phy_err[HTT_STATS_PHY_ERR_MAX];
  5586. } htt_rx_pdev_fw_stats_phy_err_tlv;
  5587. #define HTT_RX_PDEV_FW_RING_MPDU_ERR_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  5588. /* NOTE: Variable length TLV, use length spec to infer array size */
  5589. typedef struct {
  5590. htt_tlv_hdr_t tlv_hdr;
  5591. /** Num error MPDU for each RxDMA error type */
  5592. A_UINT32 fw_ring_mpdu_err[1]; /* HTT_RX_STATS_RXDMA_MAX_ERR */
  5593. } htt_rx_pdev_fw_ring_mpdu_err_tlv_v;
  5594. #define HTT_RX_PDEV_FW_MPDU_DROP_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  5595. /* NOTE: Variable length TLV, use length spec to infer array size */
  5596. typedef struct {
  5597. htt_tlv_hdr_t tlv_hdr;
  5598. /** Num MPDU dropped */
  5599. A_UINT32 fw_mpdu_drop[1]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */
  5600. } htt_rx_pdev_fw_mpdu_drop_tlv_v;
  5601. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_RX
  5602. * TLV_TAGS:
  5603. * - HTT_STATS_RX_SOC_FW_STATS_TAG (head TLV in soc_stats)
  5604. * - HTT_STATS_RX_SOC_FW_REFILL_RING_EMPTY_TAG (inside soc_stats)
  5605. * - HTT_STATS_RX_SOC_FW_REFILL_RING_NUM_REFILL_TAG (inside soc_stats)
  5606. * - HTT_STATS_RX_PDEV_FW_STATS_TAG
  5607. * - HTT_STATS_RX_PDEV_FW_RING_MPDU_ERR_TAG
  5608. * - HTT_STATS_RX_PDEV_FW_MPDU_DROP_TAG
  5609. */
  5610. /* NOTE:
  5611. * This structure is for documentation, and cannot be safely used directly.
  5612. * Instead, use the constituent TLV structures to fill/parse.
  5613. */
  5614. typedef struct {
  5615. htt_rx_soc_stats_t soc_stats;
  5616. htt_rx_pdev_fw_stats_tlv fw_stats_tlv;
  5617. htt_rx_pdev_fw_ring_mpdu_err_tlv_v fw_ring_mpdu_err_tlv;
  5618. htt_rx_pdev_fw_mpdu_drop_tlv_v fw_ring_mpdu_drop;
  5619. htt_rx_pdev_fw_stats_phy_err_tlv fw_stats_phy_err_tlv;
  5620. } htt_rx_pdev_stats_t;
  5621. /* STATS_TYPE : HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS
  5622. * TLV_TAGS:
  5623. * - HTT_STATS_PEER_CTRL_PATH_TXRX_STATS_TAG
  5624. *
  5625. */
  5626. typedef struct {
  5627. htt_peer_ctrl_path_txrx_stats_tlv peer_ctrl_path_txrx_stats_tlv;
  5628. } htt_ctrl_path_txrx_stats_t;
  5629. #define HTT_PDEV_CCA_STATS_TX_FRAME_INFO_PRESENT (0x1)
  5630. #define HTT_PDEV_CCA_STATS_RX_FRAME_INFO_PRESENT (0x2)
  5631. #define HTT_PDEV_CCA_STATS_RX_CLEAR_INFO_PRESENT (0x4)
  5632. #define HTT_PDEV_CCA_STATS_MY_RX_FRAME_INFO_PRESENT (0x8)
  5633. #define HTT_PDEV_CCA_STATS_USEC_CNT_INFO_PRESENT (0x10)
  5634. #define HTT_PDEV_CCA_STATS_MED_RX_IDLE_INFO_PRESENT (0x20)
  5635. #define HTT_PDEV_CCA_STATS_MED_TX_IDLE_GLOBAL_INFO_PRESENT (0x40)
  5636. #define HTT_PDEV_CCA_STATS_CCA_OBBS_USEC_INFO_PRESENT (0x80)
  5637. typedef struct {
  5638. htt_tlv_hdr_t tlv_hdr;
  5639. /* Below values are obtained from the HW Cycles counter registers */
  5640. A_UINT32 tx_frame_usec;
  5641. A_UINT32 rx_frame_usec;
  5642. A_UINT32 rx_clear_usec;
  5643. A_UINT32 my_rx_frame_usec;
  5644. A_UINT32 usec_cnt;
  5645. A_UINT32 med_rx_idle_usec;
  5646. A_UINT32 med_tx_idle_global_usec;
  5647. A_UINT32 cca_obss_usec;
  5648. A_UINT32 pre_rx_frame_usec;
  5649. } htt_pdev_stats_cca_counters_tlv;
  5650. /* NOTE: THIS htt_pdev_cca_stats_hist_tlv STRUCTURE IS DEPRECATED,
  5651. * due to lack of support in some host stats infrastructures for
  5652. * TLVs nested within TLVs.
  5653. */
  5654. typedef struct {
  5655. htt_tlv_hdr_t tlv_hdr;
  5656. /** The channel number on which these stats were collected */
  5657. A_UINT32 chan_num;
  5658. /** num of CCA records (Num of htt_pdev_stats_cca_counters_tlv)*/
  5659. A_UINT32 num_records;
  5660. /**
  5661. * Bit map of valid CCA counters
  5662. * Bit0 - tx_frame_usec
  5663. * Bit1 - rx_frame_usec
  5664. * Bit2 - rx_clear_usec
  5665. * Bit3 - my_rx_frame_usec
  5666. * bit4 - usec_cnt
  5667. * Bit5 - med_rx_idle_usec
  5668. * Bit6 - med_tx_idle_global_usec
  5669. * Bit7 - cca_obss_usec
  5670. *
  5671. * See HTT_PDEV_CCA_STATS_xxx_INFO_PRESENT defs
  5672. */
  5673. A_UINT32 valid_cca_counters_bitmap;
  5674. /** Indicates the stats collection interval
  5675. * Valid Values:
  5676. * 100 - For the 100ms interval CCA stats histogram
  5677. * 1000 - For 1sec interval CCA histogram
  5678. * 0xFFFFFFFF - For Cumulative CCA Stats
  5679. */
  5680. A_UINT32 collection_interval;
  5681. /**
  5682. * This will be followed by an array which contains the CCA stats
  5683. * collected in the last N intervals,
  5684. * if the indication is for last N intervals CCA stats.
  5685. * Then the pdev_cca_stats[0] element contains the oldest CCA stats
  5686. * and pdev_cca_stats[N-1] will have the most recent CCA stats.
  5687. */
  5688. htt_pdev_stats_cca_counters_tlv cca_hist_tlv[1];
  5689. } htt_pdev_cca_stats_hist_tlv;
  5690. typedef struct {
  5691. htt_tlv_hdr_t tlv_hdr;
  5692. /** The channel number on which these stats were collected */
  5693. A_UINT32 chan_num;
  5694. /** num of CCA records (Num of htt_pdev_stats_cca_counters_tlv)*/
  5695. A_UINT32 num_records;
  5696. /**
  5697. * Bit map of valid CCA counters
  5698. * Bit0 - tx_frame_usec
  5699. * Bit1 - rx_frame_usec
  5700. * Bit2 - rx_clear_usec
  5701. * Bit3 - my_rx_frame_usec
  5702. * bit4 - usec_cnt
  5703. * Bit5 - med_rx_idle_usec
  5704. * Bit6 - med_tx_idle_global_usec
  5705. * Bit7 - cca_obss_usec
  5706. *
  5707. * See HTT_PDEV_CCA_STATS_xxx_INFO_PRESENT defs
  5708. */
  5709. A_UINT32 valid_cca_counters_bitmap;
  5710. /** Indicates the stats collection interval
  5711. * Valid Values:
  5712. * 100 - For the 100ms interval CCA stats histogram
  5713. * 1000 - For 1sec interval CCA histogram
  5714. * 0xFFFFFFFF - For Cumulative CCA Stats
  5715. */
  5716. A_UINT32 collection_interval;
  5717. /**
  5718. * This will be followed by an array which contains the CCA stats
  5719. * collected in the last N intervals,
  5720. * if the indication is for last N intervals CCA stats.
  5721. * Then the pdev_cca_stats[0] element contains the oldest CCA stats
  5722. * and pdev_cca_stats[N-1] will have the most recent CCA stats.
  5723. * htt_pdev_stats_cca_counters_tlv cca_hist_tlv[1];
  5724. */
  5725. } htt_pdev_cca_stats_hist_v1_tlv;
  5726. #define HTT_TWT_SESSION_FLAG_FLOW_ID_M 0x0000000f
  5727. #define HTT_TWT_SESSION_FLAG_FLOW_ID_S 0
  5728. #define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_M 0x0000fff0
  5729. #define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_S 4
  5730. #define HTT_TWT_SESSION_FLAG_BCAST_TWT_M 0x00010000
  5731. #define HTT_TWT_SESSION_FLAG_BCAST_TWT_S 16
  5732. #define HTT_TWT_SESSION_FLAG_TRIGGER_TWT_M 0x00020000
  5733. #define HTT_TWT_SESSION_FLAG_TRIGGER_TWT_S 17
  5734. #define HTT_TWT_SESSION_FLAG_ANNOUN_TWT_M 0x00040000
  5735. #define HTT_TWT_SESSION_FLAG_ANNOUN_TWT_S 18
  5736. #define HTT_TWT_SESSION_FLAG_FLOW_ID_GET(_var) \
  5737. (((_var) & HTT_TWT_SESSION_FLAG_FLOW_ID_M) >> \
  5738. HTT_TWT_SESSION_FLAG_FLOW_ID_S)
  5739. #define HTT_TWT_SESSION_FLAG_FLOW_ID_SET(_var, _val) \
  5740. do { \
  5741. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_FLOW_ID, _val); \
  5742. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_FLOW_ID_S)); \
  5743. } while (0)
  5744. #define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_GET(_var) \
  5745. (((_var) & HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_M) >> \
  5746. HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_S)
  5747. #define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_SET(_var, _val) \
  5748. do { \
  5749. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT, _val); \
  5750. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_S)); \
  5751. } while (0)
  5752. #define HTT_TWT_SESSION_FLAG_BCAST_TWT_GET(_var) \
  5753. (((_var) & HTT_TWT_SESSION_FLAG_BCAST_TWT_M) >> \
  5754. HTT_TWT_SESSION_FLAG_BCAST_TWT_S)
  5755. #define HTT_TWT_SESSION_FLAG_BCAST_TWT_SET(_var, _val) \
  5756. do { \
  5757. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_BCAST_TWT, _val); \
  5758. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_BCAST_TWT_S)); \
  5759. } while (0)
  5760. #define HTT_TWT_SESSION_FLAG_TRIGGER_TWT_GET(_var) \
  5761. (((_var) & HTT_TWT_SESSION_FLAG_TRIGGER_TWT_M) >> \
  5762. HTT_TWT_SESSION_FLAG_TRIGGER_TWT_S)
  5763. #define HTT_TWT_SESSION_FLAG_TRIGGER_TWT_SET(_var, _val) \
  5764. do { \
  5765. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_TRIGGER_TWT, _val); \
  5766. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_TRIGGER_TWT_S)); \
  5767. } while (0)
  5768. #define HTT_TWT_SESSION_FLAG_ANNOUN_TWT_GET(_var) \
  5769. (((_var) & HTT_TWT_SESSION_FLAG_ANNOUN_TWT_M) >> \
  5770. HTT_TWT_SESSION_FLAG_ANNOUN_TWT_S)
  5771. #define HTT_TWT_SESSION_FLAG_ANNOUN_TWT_SET(_var, _val) \
  5772. do { \
  5773. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_ANNOUN_TWT, _val); \
  5774. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_ANNOUN_TWT_S)); \
  5775. } while (0)
  5776. #define TWT_DIALOG_ID_UNAVAILABLE 0xFFFFFFFF
  5777. typedef struct {
  5778. htt_tlv_hdr_t tlv_hdr;
  5779. A_UINT32 vdev_id;
  5780. htt_mac_addr peer_mac;
  5781. A_UINT32 flow_id_flags;
  5782. /**
  5783. * TWT_DIALOG_ID_UNAVAILABLE is used when TWT session is
  5784. * not initiated by host
  5785. */
  5786. A_UINT32 dialog_id;
  5787. A_UINT32 wake_dura_us;
  5788. A_UINT32 wake_intvl_us;
  5789. A_UINT32 sp_offset_us;
  5790. } htt_pdev_stats_twt_session_tlv;
  5791. typedef struct {
  5792. htt_tlv_hdr_t tlv_hdr;
  5793. A_UINT32 pdev_id;
  5794. A_UINT32 num_sessions;
  5795. htt_pdev_stats_twt_session_tlv twt_session[1];
  5796. } htt_pdev_stats_twt_sessions_tlv;
  5797. /* STATS_TYPE: HTT_DBG_EXT_STATS_TWT_SESSIONS
  5798. * TLV_TAGS:
  5799. * - HTT_STATS_PDEV_TWT_SESSIONS_TAG
  5800. * - HTT_STATS_PDEV_TWT_SESSION_TAG
  5801. */
  5802. /* NOTE:
  5803. * This structure is for documentation, and cannot be safely used directly.
  5804. * Instead, use the constituent TLV structures to fill/parse.
  5805. */
  5806. typedef struct {
  5807. htt_pdev_stats_twt_sessions_tlv twt_sessions[1];
  5808. } htt_pdev_twt_sessions_stats_t;
  5809. typedef enum {
  5810. /* Global link descriptor queued in REO */
  5811. HTT_RX_REO_RESOURCE_GLOBAL_LINK_DESC_COUNT_0 = 0,
  5812. HTT_RX_REO_RESOURCE_GLOBAL_LINK_DESC_COUNT_1 = 1,
  5813. HTT_RX_REO_RESOURCE_GLOBAL_LINK_DESC_COUNT_2 = 2,
  5814. /*Number of queue descriptors of this aging group */
  5815. HTT_RX_REO_RESOURCE_BUFFERS_USED_AC0 = 3,
  5816. HTT_RX_REO_RESOURCE_BUFFERS_USED_AC1 = 4,
  5817. HTT_RX_REO_RESOURCE_BUFFERS_USED_AC2 = 5,
  5818. HTT_RX_REO_RESOURCE_BUFFERS_USED_AC3 = 6,
  5819. /* Total number of MSDUs buffered in AC */
  5820. HTT_RX_REO_RESOURCE_AGING_NUM_QUEUES_AC0 = 7,
  5821. HTT_RX_REO_RESOURCE_AGING_NUM_QUEUES_AC1 = 8,
  5822. HTT_RX_REO_RESOURCE_AGING_NUM_QUEUES_AC2 = 9,
  5823. HTT_RX_REO_RESOURCE_AGING_NUM_QUEUES_AC3 = 10,
  5824. HTT_RX_REO_RESOURCE_STATS_MAX = 16
  5825. } htt_rx_reo_resource_sample_id_enum;
  5826. typedef struct {
  5827. htt_tlv_hdr_t tlv_hdr;
  5828. /* Variable based on the Number of records. HTT_RX_REO_RESOURCE_STATS_MAX */
  5829. /** htt_rx_reo_debug_sample_id_enum */
  5830. A_UINT32 sample_id;
  5831. /** Max value of all samples */
  5832. A_UINT32 total_max;
  5833. /** Average value of total samples */
  5834. A_UINT32 total_avg;
  5835. /** Num of samples including both zeros and non zeros ones*/
  5836. A_UINT32 total_sample;
  5837. /** Average value of all non zeros samples */
  5838. A_UINT32 non_zeros_avg;
  5839. /** Num of non zeros samples */
  5840. A_UINT32 non_zeros_sample;
  5841. /** Max value of last N non zero samples (N = last_non_zeros_sample) */
  5842. A_UINT32 last_non_zeros_max;
  5843. /** Min value of last N non zero samples (N = last_non_zeros_sample) */
  5844. A_UINT32 last_non_zeros_min;
  5845. /** Average value of last N non zero samples (N = last_non_zeros_sample) */
  5846. A_UINT32 last_non_zeros_avg;
  5847. /** Num of last non zero samples */
  5848. A_UINT32 last_non_zeros_sample;
  5849. } htt_rx_reo_resource_stats_tlv_v;
  5850. /* STATS_TYPE: HTT_DBG_EXT_STATS_REO_RESOURCE_STATS
  5851. * TLV_TAGS:
  5852. * - HTT_STATS_RX_REO_RESOURCE_STATS_TAG
  5853. */
  5854. /* NOTE:
  5855. * This structure is for documentation, and cannot be safely used directly.
  5856. * Instead, use the constituent TLV structures to fill/parse.
  5857. */
  5858. typedef struct {
  5859. htt_rx_reo_resource_stats_tlv_v reo_resource_stats;
  5860. } htt_soc_reo_resource_stats_t;
  5861. /* == TX SOUNDING STATS == */
  5862. /* config_param0 */
  5863. #define HTT_DBG_EXT_STATS_SET_VDEV_MASK(_var) ((_var << 1) | 0x1)
  5864. #define HTT_DBG_EXT_STATS_GET_VDEV_ID_FROM_VDEV_MASK(_var) ((_var >> 1) & 0xFF)
  5865. #define HTT_DBG_EXT_STATS_IS_VDEV_ID_SET(_var) ((_var) & 0x1)
  5866. typedef enum {
  5867. /* Implicit beamforming stats */
  5868. HTT_IMPLICIT_TXBF_STEER_STATS = 0,
  5869. /* Single user short inter frame sequence steer stats */
  5870. HTT_EXPLICIT_TXBF_SU_SIFS_STEER_STATS = 1,
  5871. /* Single user random back off steer stats */
  5872. HTT_EXPLICIT_TXBF_SU_RBO_STEER_STATS = 2,
  5873. /* Multi user short inter frame sequence steer stats */
  5874. HTT_EXPLICIT_TXBF_MU_SIFS_STEER_STATS = 3,
  5875. /* Multi user random back off steer stats */
  5876. HTT_EXPLICIT_TXBF_MU_RBO_STEER_STATS = 4,
  5877. /* For backward compatibility new modes cannot be added */
  5878. HTT_TXBF_MAX_NUM_OF_MODES = 5
  5879. } htt_txbf_sound_steer_modes;
  5880. typedef enum {
  5881. HTT_TX_AC_SOUNDING_MODE = 0,
  5882. HTT_TX_AX_SOUNDING_MODE = 1,
  5883. HTT_TX_BE_SOUNDING_MODE = 2,
  5884. HTT_TX_CMN_SOUNDING_MODE = 3,
  5885. HTT_TX_CV_CORR_MODE = 4,
  5886. } htt_stats_sounding_tx_mode;
  5887. #define HTT_TX_CV_CORR_MAX_NUM_COLUMNS 8
  5888. typedef struct {
  5889. htt_tlv_hdr_t tlv_hdr;
  5890. A_UINT32 tx_sounding_mode; /* HTT_TX_XX_SOUNDING_MODE */
  5891. /* Counts number of soundings for all steering modes in each bw */
  5892. A_UINT32 cbf_20[HTT_TXBF_MAX_NUM_OF_MODES];
  5893. A_UINT32 cbf_40[HTT_TXBF_MAX_NUM_OF_MODES];
  5894. A_UINT32 cbf_80[HTT_TXBF_MAX_NUM_OF_MODES];
  5895. A_UINT32 cbf_160[HTT_TXBF_MAX_NUM_OF_MODES];
  5896. /**
  5897. * The sounding array is a 2-D array stored as an 1-D array of
  5898. * A_UINT32. The stats for a particular user/bw combination is
  5899. * referenced with the following:
  5900. *
  5901. * sounding[(user* max_bw) + bw]
  5902. *
  5903. * ... where max_bw == 4 for 160mhz
  5904. */
  5905. A_UINT32 sounding[HTT_TX_NUM_OF_SOUNDING_STATS_WORDS];
  5906. /* cv upload handler stats */
  5907. /** total times CV nc mismatched */
  5908. A_UINT32 cv_nc_mismatch_err;
  5909. /** total times CV has FCS error */
  5910. A_UINT32 cv_fcs_err;
  5911. /** total times CV has invalid NSS index */
  5912. A_UINT32 cv_frag_idx_mismatch;
  5913. /** total times CV has invalid SW peer ID */
  5914. A_UINT32 cv_invalid_peer_id;
  5915. /** total times CV rejected because TXBF is not setup in peer */
  5916. A_UINT32 cv_no_txbf_setup;
  5917. /** total times CV expired while in updating state */
  5918. A_UINT32 cv_expiry_in_update;
  5919. /** total times Pkt b/w exceeding the cbf_bw */
  5920. A_UINT32 cv_pkt_bw_exceed;
  5921. /** total times CV DMA not completed */
  5922. A_UINT32 cv_dma_not_done_err;
  5923. /** total times CV update to peer failed */
  5924. A_UINT32 cv_update_failed;
  5925. /* cv query stats */
  5926. /** total times CV query happened */
  5927. A_UINT32 cv_total_query;
  5928. /** total pattern based CV query */
  5929. A_UINT32 cv_total_pattern_query;
  5930. /** total BW based CV query */
  5931. A_UINT32 cv_total_bw_query;
  5932. /** incorrect encoding in CV flags */
  5933. A_UINT32 cv_invalid_bw_coding;
  5934. /** forced sounding enabled for the peer */
  5935. A_UINT32 cv_forced_sounding;
  5936. /** standalone sounding sequence on-going */
  5937. A_UINT32 cv_standalone_sounding;
  5938. /** NC of available CV lower than expected */
  5939. A_UINT32 cv_nc_mismatch;
  5940. /** feedback type different from expected */
  5941. A_UINT32 cv_fb_type_mismatch;
  5942. /** CV BW not equal to expected BW for OFDMA */
  5943. A_UINT32 cv_ofdma_bw_mismatch;
  5944. /** CV BW not greater than or equal to expected BW */
  5945. A_UINT32 cv_bw_mismatch;
  5946. /** CV pattern not matching with the expected pattern */
  5947. A_UINT32 cv_pattern_mismatch;
  5948. /** CV available is of different preamble type than expected. */
  5949. A_UINT32 cv_preamble_mismatch;
  5950. /** NR of available CV is lower than expected. */
  5951. A_UINT32 cv_nr_mismatch;
  5952. /** CV in use count has exceeded threshold and cannot be used further. */
  5953. A_UINT32 cv_in_use_cnt_exceeded;
  5954. /** A valid CV has been found. */
  5955. A_UINT32 cv_found;
  5956. /** No valid CV was found. */
  5957. A_UINT32 cv_not_found;
  5958. /** Sounding per user in 320MHz bandwidth */
  5959. A_UINT32 sounding_320[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS];
  5960. /** Counts number of soundings for all steering modes in 320MHz bandwidth */
  5961. A_UINT32 cbf_320[HTT_TXBF_MAX_NUM_OF_MODES];
  5962. /* This part can be used for new counters added for CV query/upload. */
  5963. /** non-trigger based ranging sequence on-going */
  5964. A_UINT32 cv_ntbr_sounding;
  5965. /** CV found, but upload is in progress. */
  5966. A_UINT32 cv_found_upload_in_progress;
  5967. /** Expired CV found during query. */
  5968. A_UINT32 cv_expired_during_query;
  5969. /** total times CV dma timeout happened */
  5970. A_UINT32 cv_dma_timeout_error;
  5971. /** total times CV bufs uploaded for IBF case */
  5972. A_UINT32 cv_buf_ibf_uploads;
  5973. /** total times CV bufs uploaded for EBF case */
  5974. A_UINT32 cv_buf_ebf_uploads;
  5975. /** total times CV bufs received from IPC ring */
  5976. A_UINT32 cv_buf_received;
  5977. /** total times CV bufs fed back to the IPC ring */
  5978. A_UINT32 cv_buf_fed_back;
  5979. /** Total times CV query happened for IBF case */
  5980. A_UINT32 cv_total_query_ibf;
  5981. /** A valid CV has been found for IBF case */
  5982. A_UINT32 cv_found_ibf;
  5983. /** A valid CV has not been found for IBF case */
  5984. A_UINT32 cv_not_found_ibf;
  5985. /** Expired CV found during query for IBF case */
  5986. A_UINT32 cv_expired_during_query_ibf;
  5987. /** Total number of times adaptive sounding logic has been queried */
  5988. A_UINT32 adaptive_snd_total_query;
  5989. /**
  5990. * Total number of times adaptive sounding mcs drop has been computed
  5991. * and recorded.
  5992. */
  5993. A_UINT32 adaptive_snd_total_mcs_drop[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS + HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  5994. /** Total number of times adaptive sounding logic kicked in */
  5995. A_UINT32 adaptive_snd_kicked_in;
  5996. /** Total number of times we switched back to normal sounding interval */
  5997. A_UINT32 adaptive_snd_back_to_default;
  5998. /**
  5999. * Below are CV correlation feature related stats.
  6000. * This feature is used for DL MU MIMO, but is not available
  6001. * from certain legacy targets.
  6002. */
  6003. /** number of CV Correlation triggers for online mode */
  6004. A_UINT32 cv_corr_trigger_online_mode;
  6005. /** number of CV Correlation triggers for offline mode */
  6006. A_UINT32 cv_corr_trigger_offline_mode;
  6007. /** number of CV Correlation triggers for hybrid mode */
  6008. A_UINT32 cv_corr_trigger_hybrid_mode;
  6009. /** number of CV Correlation triggers with computation level 0 */
  6010. A_UINT32 cv_corr_trigger_computation_level_0;
  6011. /** number of CV Correlation triggers with computation level 1 */
  6012. A_UINT32 cv_corr_trigger_computation_level_1;
  6013. /** number of CV Correlation triggers with computation level 2 */
  6014. A_UINT32 cv_corr_trigger_computation_level_2;
  6015. /** number of users for which CV Correlation was triggered */
  6016. A_UINT32 cv_corr_trigger_num_users[HTT_TX_CV_CORR_MAX_NUM_COLUMNS];
  6017. /** number of streams for which CV Correlation was triggered */
  6018. A_UINT32 cv_corr_trigger_num_streams[HTT_TX_CV_CORR_MAX_NUM_COLUMNS];
  6019. /** number of CV Correlation buffers received through IPC tickle */
  6020. A_UINT32 cv_corr_upload_total_buf_received;
  6021. /** number of CV Correlation buffers fed back to the IPC ring */
  6022. A_UINT32 cv_corr_upload_total_buf_fed_back;
  6023. /** number of CV Correlation buffers for which processing failed */
  6024. A_UINT32 cv_corr_upload_total_processing_failed;
  6025. /**
  6026. * number of CV Correlation buffers for which processing failed,
  6027. * due to no users being present in parsed buffer
  6028. */
  6029. A_UINT32 cv_corr_upload_failed_total_users_zero;
  6030. /**
  6031. * number of CV Correlation buffers for which processing failed,
  6032. * due to number of users present in parsed buffer exceeded
  6033. * CV_CORR_MAX_NUM_COLUMNS
  6034. */
  6035. A_UINT32 cv_corr_upload_failed_total_users_exceeded;
  6036. /**
  6037. * number of CV Correlation buffers for which processing failed,
  6038. * due to peer pointer for parsed peer not available
  6039. */
  6040. A_UINT32 cv_corr_upload_failed_peer_not_found;
  6041. /**
  6042. * number of CV Correlation buffers for which processing encountered,
  6043. * Nss of peer exceeding SCHED_ALGO_MAX_SUPPORTED_MUMIMO_NSS
  6044. */
  6045. A_UINT32 cv_corr_upload_user_nss_exceeded;
  6046. /**
  6047. * number of CV Correlation buffers for which processing encountered,
  6048. * invalid reverse look up index for fetching CV correlation results
  6049. */
  6050. A_UINT32 cv_corr_upload_invalid_lookup_index;
  6051. /** number of users present in uploaded CV Correlation results buffer */
  6052. A_UINT32 cv_corr_upload_total_num_users[HTT_TX_CV_CORR_MAX_NUM_COLUMNS];
  6053. /** number of streams present in uploaded CV Correlation results buffer */
  6054. A_UINT32 cv_corr_upload_total_num_streams[HTT_TX_CV_CORR_MAX_NUM_COLUMNS];
  6055. } htt_tx_sounding_stats_tlv;
  6056. /* STATS_TYPE : HTT_DBG_EXT_STATS_TX_SOUNDING_INFO
  6057. * TLV_TAGS:
  6058. * - HTT_STATS_TX_SOUNDING_STATS_TAG
  6059. */
  6060. /* NOTE:
  6061. * This structure is for documentation, and cannot be safely used directly.
  6062. * Instead, use the constituent TLV structures to fill/parse.
  6063. */
  6064. typedef struct {
  6065. htt_tx_sounding_stats_tlv sounding_tlv;
  6066. } htt_tx_sounding_stats_t;
  6067. typedef struct {
  6068. htt_tlv_hdr_t tlv_hdr;
  6069. A_UINT32 num_obss_tx_ppdu_success;
  6070. A_UINT32 num_obss_tx_ppdu_failure;
  6071. /** num_sr_tx_transmissions:
  6072. * Counter of TX done by aborting other BSS RX with spatial reuse
  6073. * (for cases where rx RSSI from other BSS is below the packet-detection
  6074. * threshold for doing spatial reuse)
  6075. */
  6076. union {
  6077. A_UINT32 num_sr_tx_transmissions; /* CORRECTED - use this one */
  6078. A_UINT32 num_sr_tx_tranmissions; /* DEPRECATED - has typo in name */
  6079. };
  6080. union {
  6081. /**
  6082. * Count the number of times the RSSI from an other-BSS signal
  6083. * is below the spatial reuse power threshold, thus providing an
  6084. * opportunity for spatial reuse since OBSS interference will be
  6085. * inconsequential.
  6086. */
  6087. A_UINT32 num_spatial_reuse_opportunities;
  6088. /* DEPRECATED: num_sr_rx_ge_pd_rssi_thr
  6089. * This old name has been deprecated because it does not
  6090. * clearly and accurately reflect the information stored within
  6091. * this field.
  6092. * Use the new name (num_spatial_reuse_opportunities) instead of
  6093. * the deprecated old name (num_sr_rx_ge_pd_rssi_thr).
  6094. */
  6095. A_UINT32 num_sr_rx_ge_pd_rssi_thr;
  6096. };
  6097. /**
  6098. * Count of number of times OBSS frames were aborted and non-SRG
  6099. * opportunities were created. Non-SRG opportunities are created when
  6100. * incoming OBSS RSSI is lesser than the global configured non-SRG RSSI
  6101. * threshold and non-SRG OBSS color / non-SRG OBSS BSSID registers
  6102. * allow non-SRG TX.
  6103. */
  6104. A_UINT32 num_non_srg_opportunities;
  6105. /**
  6106. * Count of number of times TX PPDU were transmitted using non-SRG
  6107. * opportunities created. Incoming OBSS frame RSSI is compared with per
  6108. * PPDU non-SRG RSSI threshold configured in each PPDU. If incoming OBSS
  6109. * RSSI < non-SRG RSSI threshold configured in each PPDU, then non-SRG
  6110. * transmission happens.
  6111. */
  6112. A_UINT32 num_non_srg_ppdu_tried;
  6113. /**
  6114. * Count of number of times non-SRG based TX transmissions were successful
  6115. */
  6116. A_UINT32 num_non_srg_ppdu_success;
  6117. /**
  6118. * Count of number of times OBSS frames were aborted and SRG opportunities
  6119. * were created. Srg opportunities are created when incoming OBSS RSSI
  6120. * is less than the global configured SRG RSSI threshold and SRC OBSS
  6121. * color / SRG OBSS BSSID / SRG partial bssid / SRG BSS color bitmap
  6122. * registers allow SRG TX.
  6123. */
  6124. A_UINT32 num_srg_opportunities;
  6125. /**
  6126. * Count of number of times TX PPDU were transmitted using SRG
  6127. * opportunities created.
  6128. * Incoming OBSS frame RSSI is compared with per PPDU SRG RSSI
  6129. * threshold configured in each PPDU.
  6130. * If incoming OBSS RSSI < SRG RSSI threshold configured in each PPDU,
  6131. * then SRG transmission happens.
  6132. */
  6133. A_UINT32 num_srg_ppdu_tried;
  6134. /**
  6135. * Count of number of times SRG based TX transmissions were successful
  6136. */
  6137. A_UINT32 num_srg_ppdu_success;
  6138. /**
  6139. * Count of number of times PSR opportunities were created by aborting
  6140. * OBSS UL OFDMA HE-TB PPDU frame. HE-TB ppdu frames are aborted if the
  6141. * spatial reuse info in the OBSS trigger common field is set to allow PSR
  6142. * based spatial reuse.
  6143. */
  6144. A_UINT32 num_psr_opportunities;
  6145. /**
  6146. * Count of number of times TX PPDU were transmitted using PSR
  6147. * opportunities created.
  6148. */
  6149. A_UINT32 num_psr_ppdu_tried;
  6150. /**
  6151. * Count of number of times PSR based TX transmissions were successful.
  6152. */
  6153. A_UINT32 num_psr_ppdu_success;
  6154. /**
  6155. * Count of number of times TX PPDU per access category were transmitted
  6156. * using non-SRG opportunities created.
  6157. */
  6158. A_UINT32 num_non_srg_ppdu_tried_per_ac[HTT_NUM_AC_WMM];
  6159. /**
  6160. * Count of number of times non-SRG based TX transmissions per access
  6161. * category were successful
  6162. */
  6163. A_UINT32 num_non_srg_ppdu_success_per_ac[HTT_NUM_AC_WMM];
  6164. /**
  6165. * Count of number of times TX PPDU per access category were transmitted
  6166. * using SRG opportunities created.
  6167. */
  6168. A_UINT32 num_srg_ppdu_tried_per_ac[HTT_NUM_AC_WMM];
  6169. /**
  6170. * Count of number of times SRG based TX transmissions per access
  6171. * category were successful
  6172. */
  6173. A_UINT32 num_srg_ppdu_success_per_ac[HTT_NUM_AC_WMM];
  6174. /**
  6175. * Count of number of times ppdu was flushed due to ongoing OBSS
  6176. * frame duration value lesser than minimum required frame duration.
  6177. */
  6178. A_UINT32 num_obss_min_duration_check_flush_cnt;
  6179. /**
  6180. * Count of number of times ppdu was flushed due to ppdu duration
  6181. * exceeding aborted OBSS frame duration
  6182. */
  6183. A_UINT32 num_sr_ppdu_abort_flush_cnt;
  6184. } htt_pdev_obss_pd_stats_tlv;
  6185. /* NOTE:
  6186. * This structure is for documentation, and cannot be safely used directly.
  6187. * Instead, use the constituent TLV structures to fill/parse.
  6188. */
  6189. typedef struct {
  6190. htt_pdev_obss_pd_stats_tlv obss_pd_stat;
  6191. } htt_pdev_obss_pd_stats_t;
  6192. typedef struct {
  6193. htt_tlv_hdr_t tlv_hdr;
  6194. A_UINT32 pdev_id;
  6195. A_UINT32 current_head_idx;
  6196. A_UINT32 current_tail_idx;
  6197. A_UINT32 num_htt_msgs_sent;
  6198. /**
  6199. * Time in milliseconds for which the ring has been in
  6200. * its current backpressure condition
  6201. */
  6202. A_UINT32 backpressure_time_ms;
  6203. /** backpressure_hist -
  6204. * histogram showing how many times different degrees of backpressure
  6205. * duration occurred:
  6206. * Index 0 indicates the number of times ring was
  6207. * continuously in backpressure state for 100 - 200ms.
  6208. * Index 1 indicates the number of times ring was
  6209. * continuously in backpressure state for 200 - 300ms.
  6210. * Index 2 indicates the number of times ring was
  6211. * continuously in backpressure state for 300 - 400ms.
  6212. * Index 3 indicates the number of times ring was
  6213. * continuously in backpressure state for 400 - 500ms.
  6214. * Index 4 indicates the number of times ring was
  6215. * continuously in backpressure state beyond 500ms.
  6216. */
  6217. A_UINT32 backpressure_hist[5];
  6218. } htt_ring_backpressure_stats_tlv;
  6219. /* STATS_TYPE : HTT_STATS_RING_BACKPRESSURE_STATS_INFO
  6220. * TLV_TAGS:
  6221. * - HTT_STATS_RING_BACKPRESSURE_STATS_TAG
  6222. */
  6223. /* NOTE:
  6224. * This structure is for documentation, and cannot be safely used directly.
  6225. * Instead, use the constituent TLV structures to fill/parse.
  6226. */
  6227. typedef struct {
  6228. htt_sring_cmn_tlv cmn_tlv;
  6229. struct {
  6230. htt_stats_string_tlv sring_str_tlv;
  6231. htt_ring_backpressure_stats_tlv backpressure_stats_tlv;
  6232. } r[1]; /* variable-length array */
  6233. } htt_ring_backpressure_stats_t;
  6234. #define HTT_LATENCY_PROFILE_MAX_HIST 3
  6235. #define HTT_STATS_MAX_PROF_STATS_NAME_LEN 32
  6236. #define HTT_INTERRUPTS_LATENCY_PROFILE_MAX_HIST 3
  6237. typedef struct {
  6238. htt_tlv_hdr_t tlv_hdr;
  6239. /** print_header:
  6240. * This field suggests whether the host should print a header when
  6241. * displaying the TLV (because this is the first latency_prof_stats
  6242. * TLV within a series), or if only the TLV contents should be displayed
  6243. * without a header (because this is not the first TLV within the series).
  6244. */
  6245. A_UINT32 print_header;
  6246. A_UINT8 latency_prof_name[HTT_STATS_MAX_PROF_STATS_NAME_LEN];
  6247. /** number of data values included in the tot sum */
  6248. A_UINT32 cnt;
  6249. /** time in us */
  6250. A_UINT32 min;
  6251. /** time in us */
  6252. A_UINT32 max;
  6253. A_UINT32 last;
  6254. /** time in us */
  6255. A_UINT32 tot;
  6256. /** time in us */
  6257. A_UINT32 avg;
  6258. /** hist_intvl:
  6259. * Histogram interval, i.e. the latency range covered by each
  6260. * bin of the histogram, in microsecond units.
  6261. * hist[0] counts how many latencies were between 0 to hist_intvl
  6262. * hist[1] counts how many latencies were between hist_intvl to 2*hist_intvl
  6263. * hist[2] counts how many latencies were more than 2*hist_intvl
  6264. */
  6265. A_UINT32 hist_intvl;
  6266. A_UINT32 hist[HTT_LATENCY_PROFILE_MAX_HIST];
  6267. /** max page faults in any 1 sampling window */
  6268. A_UINT32 page_fault_max;
  6269. /** summed over all sampling windows */
  6270. A_UINT32 page_fault_total;
  6271. /** ignored_latency_count:
  6272. * ignore some of profile latency to avoid avg skewing
  6273. */
  6274. A_UINT32 ignored_latency_count;
  6275. /** interrupts_max: max interrupts within any single sampling window */
  6276. A_UINT32 interrupts_max;
  6277. /** interrupts_hist: histogram of interrupt rate
  6278. * bin0 contains the number of sampling windows that had 0 interrupts,
  6279. * bin1 contains the number of sampling windows that had 1-4 interrupts,
  6280. * bin2 contains the number of sampling windows that had > 4 interrupts
  6281. */
  6282. A_UINT32 interrupts_hist[HTT_INTERRUPTS_LATENCY_PROFILE_MAX_HIST];
  6283. } htt_latency_prof_stats_tlv;
  6284. typedef struct {
  6285. htt_tlv_hdr_t tlv_hdr;
  6286. /** duration:
  6287. * Time period over which counts were gathered, units = microseconds.
  6288. */
  6289. A_UINT32 duration;
  6290. A_UINT32 tx_msdu_cnt;
  6291. A_UINT32 tx_mpdu_cnt;
  6292. A_UINT32 tx_ppdu_cnt;
  6293. A_UINT32 rx_msdu_cnt;
  6294. A_UINT32 rx_mpdu_cnt;
  6295. } htt_latency_prof_ctx_tlv;
  6296. typedef struct {
  6297. htt_tlv_hdr_t tlv_hdr;
  6298. /** count of enabled profiles */
  6299. A_UINT32 prof_enable_cnt;
  6300. } htt_latency_prof_cnt_tlv;
  6301. /* STATS_TYPE : HTT_DBG_EXT_STATS_LATENCY_PROF_STATS
  6302. * TLV_TAGS:
  6303. * HTT_STATS_LATENCY_PROF_STATS_TAG / htt_latency_prof_stats_tlv
  6304. * HTT_STATS_LATENCY_CTX_TAG / htt_latency_prof_ctx_tlv
  6305. * HTT_STATS_LATENCY_CNT_TAG / htt_latency_prof_cnt_tlv
  6306. */
  6307. /* NOTE:
  6308. * This structure is for documentation, and cannot be safely used directly.
  6309. * Instead, use the constituent TLV structures to fill/parse.
  6310. */
  6311. typedef struct {
  6312. htt_latency_prof_stats_tlv latency_prof_stat;
  6313. htt_latency_prof_ctx_tlv latency_ctx_stat;
  6314. htt_latency_prof_cnt_tlv latency_cnt_stat;
  6315. } htt_soc_latency_stats_t;
  6316. #define HTT_RX_MAX_PEAK_OCCUPANCY_INDEX 10
  6317. #define HTT_RX_MAX_CURRENT_OCCUPANCY_INDEX 10
  6318. #define HTT_RX_SQUARE_INDEX 6
  6319. #define HTT_RX_MAX_PEAK_SEARCH_INDEX 4
  6320. #define HTT_RX_MAX_PENDING_SEARCH_INDEX 4
  6321. /* STATS_TYPE : HTT_DBG_EXT_RX_FSE_STATS
  6322. * TLV_TAGS:
  6323. * - HTT_STATS_RX_FSE_STATS_TAG
  6324. */
  6325. typedef struct {
  6326. htt_tlv_hdr_t tlv_hdr;
  6327. /**
  6328. * Number of times host requested for fse enable/disable
  6329. */
  6330. A_UINT32 fse_enable_cnt;
  6331. A_UINT32 fse_disable_cnt;
  6332. /**
  6333. * Number of times host requested for fse cache invalidation
  6334. * individual entries or full cache
  6335. */
  6336. A_UINT32 fse_cache_invalidate_entry_cnt;
  6337. A_UINT32 fse_full_cache_invalidate_cnt;
  6338. /**
  6339. * Cache hits count will increase if there is a matching flow in the cache
  6340. * There is no register for cache miss but the number of cache misses can
  6341. * be calculated as
  6342. * cache miss = (num_searches - cache_hits)
  6343. * Thus, there is no need to have a separate variable for cache misses.
  6344. * Num searches is flow search times done in the cache.
  6345. */
  6346. A_UINT32 fse_num_cache_hits_cnt;
  6347. A_UINT32 fse_num_searches_cnt;
  6348. /**
  6349. * Cache Occupancy holds 2 types of values: Peak and Current.
  6350. * 10 bins are used to keep track of peak occupancy.
  6351. * 8 of these bins represent ranges of values, while the first and last
  6352. * bins represent the extreme cases of the cache being completely empty
  6353. * or completely full.
  6354. * For the non-extreme bins, the number of cache occupancy values per
  6355. * bin is the maximum cache occupancy (128), divided by the number of
  6356. * non-extreme bins (8), so 128/8 = 16 values per bin.
  6357. * The range of values for each histogram bins is specified below:
  6358. * Bin0 = Counter increments when cache occupancy is empty
  6359. * Bin1 = Counter increments when cache occupancy is within [1 to 16]
  6360. * Bin2 = Counter increments when cache occupancy is within [17 to 32]
  6361. * Bin3 = Counter increments when cache occupancy is within [33 to 48]
  6362. * Bin4 = Counter increments when cache occupancy is within [49 to 64]
  6363. * Bin5 = Counter increments when cache occupancy is within [65 to 80]
  6364. * Bin6 = Counter increments when cache occupancy is within [81 to 96]
  6365. * Bin7 = Counter increments when cache occupancy is within [97 to 112]
  6366. * Bin8 = Counter increments when cache occupancy is within [113 to 127]
  6367. * Bin9 = Counter increments when cache occupancy is equal to 128
  6368. * The above histogram bin definitions apply to both the peak-occupancy
  6369. * histogram and the current-occupancy histogram.
  6370. *
  6371. * @fse_cache_occupancy_peak_cnt:
  6372. * Array records periodically PEAK cache occupancy values.
  6373. * Peak Occupancy will increment only if it is greater than current
  6374. * occupancy value.
  6375. *
  6376. * @fse_cache_occupancy_curr_cnt:
  6377. * Array records periodically current cache occupancy value.
  6378. * Current Cache occupancy always holds instant snapshot of
  6379. * current number of cache entries.
  6380. **/
  6381. A_UINT32 fse_cache_occupancy_peak_cnt[HTT_RX_MAX_PEAK_OCCUPANCY_INDEX];
  6382. A_UINT32 fse_cache_occupancy_curr_cnt[HTT_RX_MAX_CURRENT_OCCUPANCY_INDEX];
  6383. /**
  6384. * Square stat is sum of squares of cache occupancy to better understand
  6385. * any variation/deviation within each cache set, over a given time-window.
  6386. *
  6387. * Square stat is calculated this way:
  6388. * Square = SUM(Squares of all Occupancy in a Set) / 8
  6389. * The cache has 16-way set associativity, so the occupancy of a
  6390. * set can vary from 0 to 16. There are 8 sets within the cache.
  6391. * Therefore, the minimum possible square value is 0, and the maximum
  6392. * possible square value is (8*16^2) / 8 = 256.
  6393. *
  6394. * 6 bins are used to keep track of square stats:
  6395. * Bin0 = increments when square of current cache occupancy is zero
  6396. * Bin1 = increments when square of current cache occupancy is within
  6397. * [1 to 50]
  6398. * Bin2 = increments when square of current cache occupancy is within
  6399. * [51 to 100]
  6400. * Bin3 = increments when square of current cache occupancy is within
  6401. * [101 to 200]
  6402. * Bin4 = increments when square of current cache occupancy is within
  6403. * [201 to 255]
  6404. * Bin5 = increments when square of current cache occupancy is 256
  6405. */
  6406. A_UINT32 fse_search_stat_square_cnt[HTT_RX_SQUARE_INDEX];
  6407. /**
  6408. * Search stats has 2 types of values: Peak Pending and Number of
  6409. * Search Pending.
  6410. * GSE command ring for FSE can hold maximum of 5 Pending searches
  6411. * at any given time.
  6412. *
  6413. * 4 bins are used to keep track of search stats:
  6414. * Bin0 = Counter increments when there are NO pending searches
  6415. * (For peak, it will be number of pending searches greater
  6416. * than GSE command ring FIFO outstanding requests.
  6417. * For Search Pending, it will be number of pending search
  6418. * inside GSE command ring FIFO.)
  6419. * Bin1 = Counter increments when number of pending searches are within
  6420. * [1 to 2]
  6421. * Bin2 = Counter increments when number of pending searches are within
  6422. * [3 to 4]
  6423. * Bin3 = Counter increments when number of pending searches are
  6424. * greater/equal to [ >= 5]
  6425. */
  6426. A_UINT32 fse_search_stat_peak_cnt[HTT_RX_MAX_PEAK_SEARCH_INDEX];
  6427. A_UINT32 fse_search_stat_search_pending_cnt[HTT_RX_MAX_PENDING_SEARCH_INDEX];
  6428. } htt_rx_fse_stats_tlv;
  6429. /* NOTE:
  6430. * This structure is for documentation, and cannot be safely used directly.
  6431. * Instead, use the constituent TLV structures to fill/parse.
  6432. */
  6433. typedef struct {
  6434. htt_rx_fse_stats_tlv rx_fse_stats;
  6435. } htt_rx_fse_stats_t;
  6436. #define HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS 14
  6437. #define HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS 5 /* 20, 40, 80, 160, 320 */
  6438. #define HTT_TX_TXBF_RATE_STATS_NUM_REDUCED_CHAN_TYPES 2/* 0: Half, 1: Quarter */
  6439. typedef struct {
  6440. htt_tlv_hdr_t tlv_hdr;
  6441. /** SU TxBF TX MCS stats */
  6442. A_UINT32 tx_su_txbf_mcs[HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS];
  6443. /** Implicit BF TX MCS stats */
  6444. A_UINT32 tx_su_ibf_mcs[HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS];
  6445. /** Open loop TX MCS stats */
  6446. A_UINT32 tx_su_ol_mcs[HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS];
  6447. /** SU TxBF TX NSS stats */
  6448. A_UINT32 tx_su_txbf_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6449. /** Implicit BF TX NSS stats */
  6450. A_UINT32 tx_su_ibf_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6451. /** Open loop TX NSS stats */
  6452. A_UINT32 tx_su_ol_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6453. /** SU TxBF TX BW stats */
  6454. A_UINT32 tx_su_txbf_bw[HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6455. /** Implicit BF TX BW stats */
  6456. A_UINT32 tx_su_ibf_bw[HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6457. /** Open loop TX BW stats */
  6458. A_UINT32 tx_su_ol_bw[HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6459. /** Legacy and OFDM TX rate stats */
  6460. A_UINT32 tx_legacy_ofdm_rate[HTT_TX_PDEV_STATS_NUM_LEGACY_OFDM_STATS];
  6461. /** SU TxBF TX BW stats */
  6462. A_UINT32 reduced_tx_su_txbf_bw[HTT_TX_TXBF_RATE_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6463. /** Implicit BF TX BW stats */
  6464. A_UINT32 reduced_tx_su_ibf_bw[HTT_TX_TXBF_RATE_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6465. /** Open loop TX BW stats */
  6466. A_UINT32 reduced_tx_su_ol_bw[HTT_TX_TXBF_RATE_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6467. /** Txbf flag reason stats */
  6468. A_UINT32 txbf_flag_set_mu_mode;
  6469. A_UINT32 txbf_flag_set_final_status;
  6470. A_UINT32 txbf_flag_not_set_verified_txbf_mode;
  6471. A_UINT32 txbf_flag_not_set_disable_p2p_access;
  6472. A_UINT32 txbf_flag_not_set_max_nss_reached_in_he160;
  6473. A_UINT32 txbf_flag_not_set_disable_ul_dl_ofdma;
  6474. A_UINT32 txbf_flag_not_set_mcs_threshold_value;
  6475. A_UINT32 txbf_flag_not_set_final_status;
  6476. } htt_tx_pdev_txbf_rate_stats_tlv;
  6477. typedef enum {
  6478. HTT_STATS_RC_MODE_DLSU = 0,
  6479. HTT_STATS_RC_MODE_DLMUMIMO = 1,
  6480. HTT_STATS_RC_MODE_DLOFDMA = 2,
  6481. HTT_STATS_RC_MODE_ULMUMIMO = 3,
  6482. HTT_STATS_RC_MODE_ULOFDMA = 4,
  6483. } htt_stats_rc_mode;
  6484. typedef struct {
  6485. A_UINT32 ppdus_tried;
  6486. A_UINT32 ppdus_ack_failed;
  6487. A_UINT32 mpdus_tried;
  6488. A_UINT32 mpdus_failed;
  6489. } htt_tx_rate_stats_t;
  6490. typedef enum {
  6491. HTT_RC_MODE_SU_OL,
  6492. HTT_RC_MODE_SU_BF,
  6493. HTT_RC_MODE_MU1_INTF,
  6494. HTT_RC_MODE_MU2_INTF,
  6495. HTT_Rc_MODE_MU3_INTF,
  6496. HTT_RC_MODE_MU4_INTF,
  6497. HTT_RC_MODE_MU5_INTF,
  6498. HTT_RC_MODE_MU6_INTF,
  6499. HTT_RC_MODE_MU7_INTF,
  6500. HTT_RC_MODE_2D_COUNT,
  6501. } HTT_RC_MODE;
  6502. typedef enum {
  6503. HTT_STATS_RU_TYPE_INVALID = 0,
  6504. HTT_STATS_RU_TYPE_SINGLE_RU_ONLY = 1,
  6505. HTT_STATS_RU_TYPE_SINGLE_AND_MULTI_RU = 2,
  6506. } htt_stats_ru_type;
  6507. typedef struct {
  6508. htt_tlv_hdr_t tlv_hdr;
  6509. /** HTT_STATS_RC_MODE_XX */
  6510. A_UINT32 rc_mode;
  6511. A_UINT32 last_probed_mcs;
  6512. A_UINT32 last_probed_nss;
  6513. A_UINT32 last_probed_bw;
  6514. htt_tx_rate_stats_t per_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  6515. htt_tx_rate_stats_t per_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6516. htt_tx_rate_stats_t per_mcs[HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS];
  6517. /** 320MHz extension for PER */
  6518. htt_tx_rate_stats_t per_bw320;
  6519. A_UINT32 probe_cnt_per_rcmode[HTT_RC_MODE_2D_COUNT];
  6520. htt_stats_ru_type ru_type; /* refer to htt_stats_ru_type */
  6521. htt_tx_rate_stats_t per_ru[HTT_TX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS];
  6522. } htt_tx_rate_stats_per_tlv;
  6523. /* NOTE:
  6524. * This structure is for documentation, and cannot be safely used directly.
  6525. * Instead, use the constituent TLV structures to fill/parse.
  6526. */
  6527. typedef struct {
  6528. htt_tx_pdev_txbf_rate_stats_tlv txbf_rate_stats;
  6529. } htt_pdev_txbf_rate_stats_t;
  6530. typedef struct {
  6531. htt_tx_rate_stats_per_tlv per_stats;
  6532. } htt_tx_pdev_per_stats_t;
  6533. typedef enum {
  6534. HTT_ULTRIG_QBOOST_TRIGGER = 0,
  6535. HTT_ULTRIG_PSPOLL_TRIGGER,
  6536. HTT_ULTRIG_UAPSD_TRIGGER,
  6537. HTT_ULTRIG_11AX_TRIGGER,
  6538. HTT_ULTRIG_11AX_WILDCARD_TRIGGER,
  6539. HTT_ULTRIG_11AX_UNASSOC_WILDCARD_TRIGGER,
  6540. HTT_STA_UL_OFDMA_NUM_TRIG_TYPE,
  6541. } HTT_STA_UL_OFDMA_RX_TRIG_TYPE;
  6542. typedef enum {
  6543. HTT_11AX_TRIGGER_BASIC_E = 0,
  6544. HTT_11AX_TRIGGER_BRPOLL_E = 1,
  6545. HTT_11AX_TRIGGER_MU_BAR_E = 2,
  6546. HTT_11AX_TRIGGER_MU_RTS_E = 3,
  6547. HTT_11AX_TRIGGER_BUFFER_SIZE_E = 4,
  6548. HTT_11AX_TRIGGER_GCR_MU_BAR_E = 5,
  6549. HTT_11AX_TRIGGER_BQRP_E = 6,
  6550. HTT_11AX_TRIGGER_NDP_FB_REPORT_POLL_E = 7,
  6551. HTT_11AX_TRIGGER_RESERVED_8_E = 8,
  6552. HTT_11AX_TRIGGER_RESERVED_9_E = 9,
  6553. HTT_11AX_TRIGGER_RESERVED_10_E = 10,
  6554. HTT_11AX_TRIGGER_RESERVED_11_E = 11,
  6555. HTT_11AX_TRIGGER_RESERVED_12_E = 12,
  6556. HTT_11AX_TRIGGER_RESERVED_13_E = 13,
  6557. HTT_11AX_TRIGGER_RESERVED_14_E = 14,
  6558. HTT_11AX_TRIGGER_RESERVED_15_E = 15,
  6559. HTT_STA_UL_OFDMA_NUM_11AX_TRIG_TYPE,
  6560. } HTT_STA_UL_OFDMA_11AX_TRIG_TYPE;
  6561. /* UL RESP Queues 0 - HIPRI, 1 - LOPRI & 2 - BSR */
  6562. #define HTT_STA_UL_OFDMA_NUM_UL_QUEUES 3
  6563. /* Actual resp type sent by STA for trigger
  6564. * 0 - HE TB PPDU, 1 - NULL Delimiter */
  6565. #define HTT_STA_UL_OFDMA_NUM_RESP_END_TYPE 2
  6566. /* Counter for MCS 0-13 */
  6567. #define HTT_STA_UL_OFDMA_NUM_MCS_COUNTERS 14
  6568. /* Counters BW 20,40,80,160,320 */
  6569. #define HTT_STA_UL_OFDMA_NUM_BW_COUNTERS 5
  6570. #define HTT_STA_UL_OFDMA_NUM_REDUCED_CHAN_TYPES 2 /* 0 - Half, 1 - Quarter */
  6571. /* STATS_TYPE : HTT_DBG_EXT_STA_11AX_UL_STATS
  6572. * TLV_TAGS:
  6573. * - HTT_STATS_STA_UL_OFDMA_STATS_TAG
  6574. */
  6575. typedef struct {
  6576. htt_tlv_hdr_t tlv_hdr;
  6577. A_UINT32 pdev_id;
  6578. /**
  6579. * Trigger Type reported by HWSCH on RX reception
  6580. * Each index populate enum HTT_STA_UL_OFDMA_RX_TRIG_TYPE
  6581. */
  6582. A_UINT32 rx_trigger_type[HTT_STA_UL_OFDMA_NUM_TRIG_TYPE];
  6583. /**
  6584. * 11AX Trigger Type on RX reception
  6585. * Each index populate enum HTT_STA_UL_OFDMA_11AX_TRIG_TYPE
  6586. */
  6587. A_UINT32 ax_trigger_type[HTT_STA_UL_OFDMA_NUM_11AX_TRIG_TYPE];
  6588. /** Num data PPDUs/Delims responded to trigs. per HWQ for UL RESP */
  6589. A_UINT32 num_data_ppdu_responded_per_hwq[HTT_STA_UL_OFDMA_NUM_UL_QUEUES];
  6590. A_UINT32 num_null_delimiters_responded_per_hwq[HTT_STA_UL_OFDMA_NUM_UL_QUEUES];
  6591. /**
  6592. * Overall UL STA RESP Status 0 - HE TB PPDU, 1 - NULL Delimiter
  6593. * Super set of num_data_ppdu_responded_per_hwq,
  6594. * num_null_delimiters_responded_per_hwq
  6595. */
  6596. A_UINT32 num_total_trig_responses[HTT_STA_UL_OFDMA_NUM_RESP_END_TYPE];
  6597. /**
  6598. * Time interval between current time ms and last successful trigger RX
  6599. * 0xFFFFFFFF denotes no trig received / timestamp roll back
  6600. */
  6601. A_UINT32 last_trig_rx_time_delta_ms;
  6602. /**
  6603. * Rate Statistics for UL OFDMA
  6604. * UL TB PPDU TX MCS, NSS, GI, BW from STA HWQ
  6605. */
  6606. A_UINT32 ul_ofdma_tx_mcs[HTT_STA_UL_OFDMA_NUM_MCS_COUNTERS];
  6607. A_UINT32 ul_ofdma_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6608. A_UINT32 ul_ofdma_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_STA_UL_OFDMA_NUM_MCS_COUNTERS];
  6609. A_UINT32 ul_ofdma_tx_ldpc;
  6610. A_UINT32 ul_ofdma_tx_bw[HTT_STA_UL_OFDMA_NUM_BW_COUNTERS];
  6611. /** Trig based PPDU TX/ RBO based PPDU TX Count */
  6612. A_UINT32 trig_based_ppdu_tx;
  6613. A_UINT32 rbo_based_ppdu_tx;
  6614. /** Switch MU EDCA to SU EDCA Count */
  6615. A_UINT32 mu_edca_to_su_edca_switch_count;
  6616. /** Num MU EDCA applied Count */
  6617. A_UINT32 num_mu_edca_param_apply_count;
  6618. /**
  6619. * Current MU EDCA Parameters for WMM ACs
  6620. * Mode - 0 - SU EDCA, 1- MU EDCA
  6621. */
  6622. A_UINT32 current_edca_hwq_mode[HTT_NUM_AC_WMM];
  6623. /** Contention Window minimum. Range: 1 - 10 */
  6624. A_UINT32 current_cw_min[HTT_NUM_AC_WMM];
  6625. /** Contention Window maximum. Range: 1 - 10 */
  6626. A_UINT32 current_cw_max[HTT_NUM_AC_WMM];
  6627. /** AIFS value - 0 -255 */
  6628. A_UINT32 current_aifs[HTT_NUM_AC_WMM];
  6629. A_UINT32 reduced_ul_ofdma_tx_bw[HTT_STA_UL_OFDMA_NUM_REDUCED_CHAN_TYPES][HTT_STA_UL_OFDMA_NUM_BW_COUNTERS];
  6630. } htt_sta_ul_ofdma_stats_tlv;
  6631. /* NOTE:
  6632. * This structure is for documentation, and cannot be safely used directly.
  6633. * Instead, use the constituent TLV structures to fill/parse.
  6634. */
  6635. typedef struct {
  6636. htt_sta_ul_ofdma_stats_tlv ul_ofdma_sta_stats;
  6637. } htt_sta_11ax_ul_stats_t;
  6638. typedef struct {
  6639. htt_tlv_hdr_t tlv_hdr;
  6640. /** No of Fine Timing Measurement frames transmitted successfully */
  6641. A_UINT32 tx_ftm_suc;
  6642. /**
  6643. * No of Fine Timing Measurement frames transmitted successfully
  6644. * after retry
  6645. */
  6646. A_UINT32 tx_ftm_suc_retry;
  6647. /** No of Fine Timing Measurement frames not transmitted successfully */
  6648. A_UINT32 tx_ftm_fail;
  6649. /**
  6650. * No of Fine Timing Measurement Request frames received,
  6651. * including initial, non-initial, and duplicates
  6652. */
  6653. A_UINT32 rx_ftmr_cnt;
  6654. /**
  6655. * No of duplicate Fine Timing Measurement Request frames received,
  6656. * including both initial and non-initial
  6657. */
  6658. A_UINT32 rx_ftmr_dup_cnt;
  6659. /** No of initial Fine Timing Measurement Request frames received */
  6660. A_UINT32 rx_iftmr_cnt;
  6661. /**
  6662. * No of duplicate initial Fine Timing Measurement Request frames received
  6663. */
  6664. A_UINT32 rx_iftmr_dup_cnt;
  6665. /** No of responder sessions rejected when initiator was active */
  6666. A_UINT32 initiator_active_responder_rejected_cnt;
  6667. /** Responder terminate count */
  6668. A_UINT32 responder_terminate_cnt;
  6669. A_UINT32 vdev_id;
  6670. } htt_vdev_rtt_resp_stats_tlv;
  6671. typedef struct {
  6672. htt_vdev_rtt_resp_stats_tlv vdev_rtt_resp_stats;
  6673. } htt_vdev_rtt_resp_stats_t;
  6674. typedef struct {
  6675. htt_tlv_hdr_t tlv_hdr;
  6676. A_UINT32 vdev_id;
  6677. /**
  6678. * No of Fine Timing Measurement request frames transmitted successfully
  6679. */
  6680. A_UINT32 tx_ftmr_cnt;
  6681. /**
  6682. * No of Fine Timing Measurement request frames not transmitted successfully
  6683. */
  6684. A_UINT32 tx_ftmr_fail;
  6685. /**
  6686. * No of Fine Timing Measurement request frames transmitted successfully
  6687. * after retry
  6688. */
  6689. A_UINT32 tx_ftmr_suc_retry;
  6690. /**
  6691. * No of Fine Timing Measurement frames received, including initial,
  6692. * non-initial, and duplicates
  6693. */
  6694. A_UINT32 rx_ftm_cnt;
  6695. /** Initiator Terminate count */
  6696. A_UINT32 initiator_terminate_cnt;
  6697. /** Debug count to check the Measurement request from host */
  6698. A_UINT32 tx_meas_req_count;
  6699. } htt_vdev_rtt_init_stats_tlv;
  6700. typedef struct {
  6701. htt_vdev_rtt_init_stats_tlv vdev_rtt_init_stats;
  6702. } htt_vdev_rtt_init_stats_t;
  6703. /* STATS_TYPE : HTT_DBG_EXT_PKTLOG_AND_HTT_RING_STATS
  6704. * TLV_TAGS:
  6705. * - HTT_STATS_PKTLOG_AND_HTT_RING_STATS_TAG
  6706. */
  6707. /* NOTE:
  6708. * This structure is for documentation, and cannot be safely used directly.
  6709. * Instead, use the constituent TLV structures to fill/parse.
  6710. */
  6711. typedef struct {
  6712. htt_tlv_hdr_t tlv_hdr;
  6713. /** No of pktlog payloads that were dropped in htt_ppdu_stats path */
  6714. A_UINT32 pktlog_lite_drop_cnt;
  6715. /** No of pktlog payloads that were dropped in TQM path */
  6716. A_UINT32 pktlog_tqm_drop_cnt;
  6717. /** No of pktlog ppdu stats payloads that were dropped */
  6718. A_UINT32 pktlog_ppdu_stats_drop_cnt;
  6719. /** No of pktlog ppdu ctrl payloads that were dropped */
  6720. A_UINT32 pktlog_ppdu_ctrl_drop_cnt;
  6721. /** No of pktlog sw events payloads that were dropped */
  6722. A_UINT32 pktlog_sw_events_drop_cnt;
  6723. } htt_pktlog_and_htt_ring_stats_tlv;
  6724. #define HTT_DLPAGER_STATS_MAX_HIST 10
  6725. #define HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_M 0x000000FF
  6726. #define HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_S 0
  6727. #define HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_M 0x0000FF00
  6728. #define HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_S 8
  6729. #define HTT_DLPAGER_TOTAL_LOCKED_PAGES_M 0x0000FFFF
  6730. #define HTT_DLPAGER_TOTAL_LOCKED_PAGES_S 0
  6731. #define HTT_DLPAGER_TOTAL_FREE_PAGES_M 0xFFFF0000
  6732. #define HTT_DLPAGER_TOTAL_FREE_PAGES_S 16
  6733. #define HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_M 0x0000FFFF
  6734. #define HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_S 0
  6735. #define HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_M 0xFFFF0000
  6736. #define HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_S 16
  6737. #define HTT_DLPAGER_ASYNC_LOCK_PAGE_COUNT_GET(_var) \
  6738. (((_var) & HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_M) >> \
  6739. HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_S)
  6740. #define HTT_DLPAGER_ASYNC_LOCK_PAGE_COUNT_SET(_var, _val) \
  6741. do { \
  6742. HTT_CHECK_SET_VAL(HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT, _val); \
  6743. ((_var) &= ~(HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_M));\
  6744. ((_var) |= ((_val) << HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_S)); \
  6745. } while (0)
  6746. #define HTT_DLPAGER_SYNC_LOCK_PAGE_COUNT_GET(_var) \
  6747. (((_var) & HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_M) >> \
  6748. HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_S)
  6749. #define HTT_DLPAGER_SYNC_LOCK_PAGE_COUNT_SET(_var, _val) \
  6750. do { \
  6751. HTT_CHECK_SET_VAL(HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT, _val); \
  6752. ((_var) &= ~(HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_M));\
  6753. ((_var) |= ((_val) << HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_S)); \
  6754. } while (0)
  6755. #define HTT_DLPAGER_TOTAL_LOCKED_PAGES_GET(_var) \
  6756. (((_var) & HTT_DLPAGER_TOTAL_LOCKED_PAGES_M) >> \
  6757. HTT_DLPAGER_TOTAL_LOCKED_PAGES_S)
  6758. #define HTT_DLPAGER_TOTAL_LOCKED_PAGES_SET(_var, _val) \
  6759. do { \
  6760. HTT_CHECK_SET_VAL(HTT_DLPAGER_TOTAL_LOCKED_PAGES, _val); \
  6761. ((_var) &= ~(HTT_DLPAGER_TOTAL_LOCKED_PAGES_M)); \
  6762. ((_var) |= ((_val) << HTT_DLPAGER_TOTAL_LOCKED_PAGES_S)); \
  6763. } while (0)
  6764. #define HTT_DLPAGER_TOTAL_FREE_PAGES_GET(_var) \
  6765. (((_var) & HTT_DLPAGER_TOTAL_FREE_PAGES_M) >> \
  6766. HTT_DLPAGER_TOTAL_FREE_PAGES_S)
  6767. #define HTT_DLPAGER_TOTAL_FREE_PAGES_SET(_var, _val) \
  6768. do { \
  6769. HTT_CHECK_SET_VAL(HTT_DLPAGER_TOTAL_FREE_PAGES, _val); \
  6770. ((_var) &= ~(HTT_DLPAGER_TOTAL_FREE_PAGES_M)); \
  6771. ((_var) |= ((_val) << HTT_DLPAGER_TOTAL_FREE_PAGES_S)); \
  6772. } while (0)
  6773. #define HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_GET(_var) \
  6774. (((_var) & HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_M) >> \
  6775. HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_S)
  6776. #define HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_SET(_var, _val) \
  6777. do { \
  6778. HTT_CHECK_SET_VAL(HTT_DLPAGER_LAST_LOCKED_PAGE_IDX, _val); \
  6779. ((_var) &= ~(HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_M)); \
  6780. ((_var) |= ((_val) << HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_S)); \
  6781. } while (0)
  6782. #define HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_GET(_var) \
  6783. (((_var) & HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_M) >> \
  6784. HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_S)
  6785. #define HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_SET(_var, _val) \
  6786. do { \
  6787. HTT_CHECK_SET_VAL(HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX, _val); \
  6788. ((_var) &= ~(HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_M)); \
  6789. ((_var) |= ((_val) << HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_S)); \
  6790. } while (0)
  6791. enum {
  6792. HTT_STATS_PAGE_LOCKED = 0,
  6793. HTT_STATS_PAGE_UNLOCKED = 1,
  6794. HTT_STATS_NUM_PAGE_LOCK_STATES
  6795. };
  6796. /* dlPagerStats structure
  6797. * Number of lock/unlock pages with last 10 lock/unlock occurrences are recorded */
  6798. typedef struct{
  6799. /** msg_dword_1 bitfields:
  6800. * async_lock : 8,
  6801. * sync_lock : 8,
  6802. * reserved : 16;
  6803. */
  6804. A_UINT32 msg_dword_1;
  6805. /** mst_dword_2 bitfields:
  6806. * total_locked_pages : 16,
  6807. * total_free_pages : 16;
  6808. */
  6809. A_UINT32 msg_dword_2;
  6810. /** msg_dword_3 bitfields:
  6811. * last_locked_page_idx : 16,
  6812. * last_unlocked_page_idx : 16;
  6813. */
  6814. A_UINT32 msg_dword_3;
  6815. struct {
  6816. A_UINT32 page_num;
  6817. A_UINT32 num_of_pages;
  6818. /** timestamp is in microsecond units, from SoC timer clock */
  6819. A_UINT32 timestamp_lsbs;
  6820. A_UINT32 timestamp_msbs;
  6821. } last_pages_info[HTT_STATS_NUM_PAGE_LOCK_STATES][HTT_DLPAGER_STATS_MAX_HIST];
  6822. } htt_dl_pager_stats_tlv;
  6823. /* NOTE:
  6824. * This structure is for documentation, and cannot be safely used directly.
  6825. * Instead, use the constituent TLV structures to fill/parse.
  6826. * STATS_TYPE : HTT_DBG_EXT_STATS_DLPAGER_STATS
  6827. * TLV_TAGS:
  6828. * - HTT_STATS_DLPAGER_STATS_TAG
  6829. */
  6830. typedef struct {
  6831. htt_tlv_hdr_t tlv_hdr;
  6832. htt_dl_pager_stats_tlv dl_pager_stats;
  6833. } htt_dlpager_stats_t;
  6834. /*======= PHY STATS ====================*/
  6835. /*
  6836. * STATS TYPE : HTT_DBG_EXT_PHY_COUNTERS_AND_PHY_STATS
  6837. * TLV_TAGS:
  6838. * - HTT_STATS_PHY_COUNTERS_TAG
  6839. * - HTT_STATS_PHY_STATS_TAG
  6840. */
  6841. #define HTT_MAX_RX_PKT_CNT 8
  6842. #define HTT_MAX_RX_PKT_CRC_PASS_CNT 8
  6843. #define HTT_MAX_PER_BLK_ERR_CNT 20
  6844. #define HTT_MAX_RX_OTA_ERR_CNT 14
  6845. #define HTT_MAX_RX_PKT_CNT_EXT 4
  6846. #define HTT_MAX_RX_PKT_CRC_PASS_CNT_EXT 4
  6847. #define HTT_MAX_RX_PKT_MU_CNT 14
  6848. #define HTT_MAX_TX_PKT_CNT 10
  6849. #define HTT_MAX_PHY_TX_ABORT_CNT 10
  6850. typedef enum {
  6851. HTT_STATS_CHANNEL_HALF_RATE = 0x0001, /* Half rate */
  6852. HTT_STATS_CHANNEL_QUARTER_RATE = 0x0002, /* Quarter rate */
  6853. HTT_STATS_CHANNEL_DFS = 0x0004, /* Enable radar event reporting */
  6854. HTT_STATS_CHANNEL_HOME = 0x0008, /* Home channel */
  6855. HTT_STATS_CHANNEL_PASSIVE_SCAN = 0x0010, /*Passive Scan */
  6856. HTT_STATS_CHANNEL_DFS_SAP_NOT_UP = 0x0020, /* set when VDEV_START_REQUEST, clear when VDEV_UP */
  6857. HTT_STATS_CHANNEL_PASSIVE_SCAN_CAL = 0x0040, /* need to do passive scan calibration to avoid "spikes" */
  6858. HTT_STATS_CHANNEL_DFS_SAP_UP = 0x0080, /* DFS master */
  6859. HTT_STATS_CHANNEL_DFS_CFREQ2 = 0x0100, /* Enable radar event reporting for sec80 in VHT80p80 */
  6860. HTT_STATS_CHANNEL_DTIM_SYNTH = 0x0200, /* Enable DTIM */
  6861. HTT_STATS_CHANNEL_FORCE_GAIN = 0x0400, /* Force gain mmode (only used for FTM) */
  6862. HTT_STATS_CHANNEL_PERFORM_NF_CAL = 0x0800, /* Perform NF cal in channel change (only used for FTM) */
  6863. HTT_STATS_CHANNEL_165_MODE_0 = 0x1000, /* 165 MHz mode 0 */
  6864. HTT_STATS_CHANNEL_165_MODE_1 = 0x2000, /* 165 MHz mode 1 */
  6865. HTT_STATS_CHANNEL_165_MODE_2 = 0x3000, /* 165 MHz mode 2 */
  6866. HTT_STATS_CHANNEL_165_MODE_MASK = 0x3000, /* 165 MHz 2-bit mode mask */
  6867. } HTT_STATS_CHANNEL_FLAGS;
  6868. typedef enum {
  6869. HTT_STATS_RF_MODE_MIN = 0,
  6870. HTT_STATS_RF_MODE_PHYA_ONLY = 0, // only PHYA is active
  6871. HTT_STATS_RF_MODE_DBS = 1, // PHYA/5G and PHYB/2G
  6872. HTT_STATS_RF_MODE_SBS = 2, // PHYA/5G and PHYB/5G in HL/NPR; PHYA0/5G and PHYA1/5G in HK
  6873. HTT_STATS_RF_MODE_PHYB_ONLY = 3, // only PHYB is active
  6874. HTT_STATS_RF_MODE_DBS_SBS = 4, // PHYA0/5G, PHYA1/5G and PHYB/2G in HK (the 2 5G are in different channel)
  6875. HTT_STATS_RF_MODE_DBS_OR_SBS = 5, // PHYA0/5G, PHYA1/5G and PHYB/5G or 2G in HK
  6876. HTT_STATS_RF_MODE_INVALID = 0xff,
  6877. } HTT_STATS_RF_MODE;
  6878. typedef enum {
  6879. HTT_STATS_RESET_CAUSE_FIRST_RESET = 0x00000001, /* First reset by application */
  6880. HTT_STATS_RESET_CAUSE_ERROR = 0x00000002, /* Triggered due to error */
  6881. HTT_STATS_RESET_CAUSE_DEEP_SLEEP = 0x00000004, /* Reset after deep sleep */
  6882. HTT_STATS_RESET_CAUSE_FULL_RESET = 0x00000008, /* Full reset without any optimizations */
  6883. HTT_STATS_RESET_CAUSE_CHANNEL_CHANGE = 0x00000010, /* For normal channel change */
  6884. HTT_STATS_RESET_CAUSE_BAND_CHANGE = 0x00000020, /* Triggered due to band change */
  6885. HTT_STATS_RESET_CAUSE_DO_CAL = 0x00000040, /* Triggered due to calibrations */
  6886. HTT_STATS_RESET_CAUSE_MCI_ERROR = 0x00000080, /* Triggered due to MCI ERROR */
  6887. HTT_STATS_RESET_CAUSE_CHWIDTH_CHANGE = 0x00000100, /* Triggered due to channel width change */
  6888. HTT_STATS_RESET_CAUSE_WARM_RESTORE_CAL = 0x00000200, /* Triggered due to warm reset we want to just restore calibrations */
  6889. HTT_STATS_RESET_CAUSE_COLD_RESTORE_CAL = 0x00000400, /* Triggered due to cold reset we want to just restore calibrations */
  6890. HTT_STATS_RESET_CAUSE_PHY_WARM_RESET = 0x00000800, /* Triggered due to phy warm reset we want to just restore calibrations */
  6891. HTT_STATS_RESET_CAUSE_M3_SSR = 0x00001000, /* Triggered due to SSR Restart */
  6892. HTT_STATS_RESET_CAUSE_FORCE_CAL = 0x00002000, /* Reset to force the calibration */
  6893. /* 0x00004000, 0x00008000 reserved */
  6894. HTT_STATS_NO_RESET_CHANNEL_CHANGE = 0x00010000, /* No reset, normal channel change */
  6895. HTT_STATS_NO_RESET_BAND_CHANGE = 0x00020000, /* No reset, channel change across band */
  6896. HTT_STATS_NO_RESET_CHWIDTH_CHANGE = 0x00040000, /* No reset, channel change across channel width */
  6897. HTT_STATS_NO_RESET_CHAINMASK_CHANGE = 0x00080000, /* No reset, chainmask change */
  6898. HTT_STATS_RESET_CAUSE_PHY_WARM_RESET_UCODE_TRIG = 0x00100000, /* Triggered due to phy warm reset we want to just restore calibrations */
  6899. HTT_STATS_RESET_CAUSE_PHY_OFF_TIMEOUT_RESET = 0x00200000, /* Reset ucode because phy off ack timeout*/
  6900. HTT_STATS_RESET_CAUSE_LMAC_RESET_UMAC_NOC_ERR = 0x00400000, /* LMAC reset triggered due to NOC Address/Slave error originating at LMAC */
  6901. HTT_STATS_NO_RESET_SCAN_BACK_TO_SAME_HOME_CHANNEL_CHANGE = 0x00800000, /* No reset, scan to home channel change */
  6902. } HTT_STATS_RESET_CAUSE;
  6903. typedef enum {
  6904. HTT_CHANNEL_RATE_FULL,
  6905. HTT_CHANNEL_RATE_HALF,
  6906. HTT_CHANNEL_RATE_QUARTER,
  6907. HTT_CHANNEL_RATE_COUNT
  6908. } HTT_CHANNEL_RATE;
  6909. typedef enum {
  6910. HTT_PHY_BW_IDX_20MHz = 0,
  6911. HTT_PHY_BW_IDX_40MHz = 1,
  6912. HTT_PHY_BW_IDX_80MHz = 2,
  6913. HTT_PHY_BW_IDX_80Plus80 = 3,
  6914. HTT_PHY_BW_IDX_160MHz = 4,
  6915. HTT_PHY_BW_IDX_10MHz = 5,
  6916. HTT_PHY_BW_IDX_5MHz = 6,
  6917. HTT_PHY_BW_IDX_165MHz = 7,
  6918. } HTT_PHY_BW_IDX;
  6919. typedef enum {
  6920. HTT_WHAL_CONFIG_NONE = 0x00000000,
  6921. HTT_WHAL_CONFIG_NF_WAR = 0x00000001,
  6922. HTT_WHAL_CONFIG_CAL_WAR = 0x00000002,
  6923. HTT_WHAL_CONFIG_DO_NF_CAL = 0x00000004,
  6924. HTT_WHAL_CONFIG_SET_WAIT_FOR_NF_CAL = 0x00000008,
  6925. HTT_WHAL_CONFIG_FORCED_TX_PWR = 0x00000010,
  6926. HTT_WHAL_CONFIG_FORCED_GAIN_IDX = 0x00000020,
  6927. HTT_WHAL_CONFIG_FORCED_PER_CHAIN = 0x00000040,
  6928. } HTT_WHAL_CONFIG;
  6929. typedef struct {
  6930. htt_tlv_hdr_t tlv_hdr;
  6931. /** number of RXTD OFDMA OTA error counts except power surge and drop */
  6932. A_UINT32 rx_ofdma_timing_err_cnt;
  6933. /** rx_cck_fail_cnt:
  6934. * number of cck error counts due to rx reception failure because of
  6935. * timing error in cck
  6936. */
  6937. A_UINT32 rx_cck_fail_cnt;
  6938. /** number of times tx abort initiated by mac */
  6939. A_UINT32 mactx_abort_cnt;
  6940. /** number of times rx abort initiated by mac */
  6941. A_UINT32 macrx_abort_cnt;
  6942. /** number of times tx abort initiated by phy */
  6943. A_UINT32 phytx_abort_cnt;
  6944. /** number of times rx abort initiated by phy */
  6945. A_UINT32 phyrx_abort_cnt;
  6946. /** number of rx deferred count initiated by phy */
  6947. A_UINT32 phyrx_defer_abort_cnt;
  6948. /** number of sizing events generated at LSTF */
  6949. A_UINT32 rx_gain_adj_lstf_event_cnt; /* a.k.a sizing1 */
  6950. /** number of sizing events generated at non-legacy LTF */
  6951. A_UINT32 rx_gain_adj_non_legacy_cnt; /* a.k.a sizing2 */
  6952. /** rx_pkt_cnt -
  6953. * Received EOP (end-of-packet) count per packet type;
  6954. * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF
  6955. * [6] = EHT; [7]=RSVD; [6] = Applicable only for BE
  6956. */
  6957. A_UINT32 rx_pkt_cnt[HTT_MAX_RX_PKT_CNT];
  6958. /** rx_pkt_crc_pass_cnt -
  6959. * Received EOP (end-of-packet) count per packet type;
  6960. * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF
  6961. * [6] = EHT; [7]=RSVD; [6] = Applicable only for BE
  6962. */
  6963. A_UINT32 rx_pkt_crc_pass_cnt[HTT_MAX_RX_PKT_CRC_PASS_CNT];
  6964. /** per_blk_err_cnt -
  6965. * Error count per error source;
  6966. * [0] = unknown; [1] = LSIG; [2] = HTSIG; [3] = VHTSIG; [4] = HESIG;
  6967. * [5] = RXTD_OTA; [6] = RXTD_FATAL; [7] = DEMF; [8] = ROBE;
  6968. * [9] = PMI; [10] = TXFD; [11] = TXTD; [12] = PHYRF
  6969. * [13-19]=RSVD
  6970. */
  6971. A_UINT32 per_blk_err_cnt[HTT_MAX_PER_BLK_ERR_CNT];
  6972. /** rx_ota_err_cnt -
  6973. * RXTD OTA (over-the-air) error count per error reason;
  6974. * [0] = voting fail; [1] = weak det fail; [2] = strong sig fail;
  6975. * [3] = cck fail; [4] = power surge; [5] = power drop;
  6976. * [6] = btcf timing timeout error; [7] = btcf packet detect error;
  6977. * [8] = coarse timing timeout error
  6978. * [9-13]=RSVD
  6979. */
  6980. A_UINT32 rx_ota_err_cnt[HTT_MAX_RX_OTA_ERR_CNT];
  6981. /** rx_pkt_cnt_ext -
  6982. * Received EOP (end-of-packet) count per packet type for BE;
  6983. * [0] = WUR; [1] = AZ; [2-3]=RVSD
  6984. */
  6985. A_UINT32 rx_pkt_cnt_ext[HTT_MAX_RX_PKT_CNT_EXT];
  6986. /** rx_pkt_crc_pass_cnt_ext -
  6987. * Received EOP (end-of-packet) count per packet type for BE;
  6988. * [0] = WUR; [1] = AZ; [2-3]=RVSD
  6989. */
  6990. A_UINT32 rx_pkt_crc_pass_cnt_ext[HTT_MAX_RX_PKT_CRC_PASS_CNT_EXT];
  6991. /** rx_pkt_mu_cnt -
  6992. * RX MU MIMO+OFDMA packet count per packet type for BE;
  6993. * [0] = 11ax OFDMA; [1] = 11ax OFDMA+MUMIMO; [2] = 11be OFDMA;
  6994. * [3] = 11be OFDMA+MUMIMO; [4] = 11ax MIMO; [5] = 11be MIMO;
  6995. * [6] = 11ax OFDMA; [7] = 11ax OFDMA+MUMIMO; [8] = 11be OFDMA;
  6996. * [9] = 11be OFDMA+MUMIMO; [10] = 11ax MIMO; [11] = 11be MIMO;
  6997. * [12-13]=RSVD
  6998. */
  6999. A_UINT32 rx_pkt_mu_cnt[HTT_MAX_RX_PKT_MU_CNT];
  7000. /** tx_pkt_cnt -
  7001. * num of transfered packet count per packet type;
  7002. * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF;
  7003. * [6]= EHT; [7] = WUR; [8] = AZ; [9]=RSVD; [6-8] = Applicable only for BE
  7004. */
  7005. A_UINT32 tx_pkt_cnt[HTT_MAX_TX_PKT_CNT];
  7006. /** phy_tx_abort_cnt -
  7007. * phy tx abort after each tlv;
  7008. * [0] = PRE-PHY desc tlv; [1] = PHY desc tlv; [2] = LSIGA tlv;
  7009. * [3] = LSIGB tlv; [4] = Per User tlv; [5] = HESIGB tlv;
  7010. * [6] = Service tlv; [7] = Tx Packet End tlv; [8-9]=RSVD;
  7011. */
  7012. A_UINT32 phy_tx_abort_cnt[HTT_MAX_PHY_TX_ABORT_CNT];
  7013. } htt_phy_counters_tlv;
  7014. typedef struct {
  7015. htt_tlv_hdr_t tlv_hdr;
  7016. /** per chain hw noise floor values in dBm */
  7017. A_INT32 nf_chain[HTT_STATS_MAX_CHAINS];
  7018. /** number of false radars detected */
  7019. A_UINT32 false_radar_cnt;
  7020. /** number of channel switches happened due to radar detection */
  7021. A_UINT32 radar_cs_cnt;
  7022. /** ani_level -
  7023. * ANI level (noise interference) corresponds to the channel
  7024. * the desense levels range from -5 to 15 in dB units,
  7025. * higher values indicating more noise interference.
  7026. */
  7027. A_INT32 ani_level;
  7028. /** running time in minutes since FW boot */
  7029. A_UINT32 fw_run_time;
  7030. /** per chain runtime noise floor values in dBm */
  7031. A_INT32 runTime_nf_chain[HTT_STATS_MAX_CHAINS];
  7032. } htt_phy_stats_tlv;
  7033. typedef struct {
  7034. htt_tlv_hdr_t tlv_hdr;
  7035. /** current pdev_id */
  7036. A_UINT32 pdev_id;
  7037. /** current channel information */
  7038. A_UINT32 chan_mhz;
  7039. /** center_freq1, center_freq2 in mhz */
  7040. A_UINT32 chan_band_center_freq1;
  7041. A_UINT32 chan_band_center_freq2;
  7042. /** chan_phy_mode - WLAN_PHY_MODE enum type */
  7043. A_UINT32 chan_phy_mode;
  7044. /** chan_flags follows HTT_STATS_CHANNEL_FLAGS enum */
  7045. A_UINT32 chan_flags;
  7046. /** channel Num updated to virtual phybase */
  7047. A_UINT32 chan_num;
  7048. /** Cause for the phy reset - HTT_STATS_RESET_CAUSE */
  7049. A_UINT32 reset_cause;
  7050. /** Cause for the previous phy reset */
  7051. A_UINT32 prev_reset_cause;
  7052. /** source for the phywarm reset - HTT_STATS_RESET_CAUSE */
  7053. A_UINT32 phy_warm_reset_src;
  7054. /** rxGain Table selection mode - register settings
  7055. * 0 - Auto, 1/2 - Forced with and without BT override respectively
  7056. */
  7057. A_UINT32 rx_gain_tbl_mode;
  7058. /** current xbar value - perchain analog to digital idx mapping */
  7059. A_UINT32 xbar_val;
  7060. /** Flag to indicate forced calibration */
  7061. A_UINT32 force_calibration;
  7062. /** current RF mode (e.g. SBS/DBS) - follows HTT_STATS_RF_MODE enum */
  7063. A_UINT32 phyrf_mode;
  7064. /* PDL phyInput stats */
  7065. /** homechannel flag
  7066. * 1- Homechan, 0 - scan channel
  7067. */
  7068. A_UINT32 phy_homechan;
  7069. /** Tx and Rx chainmask */
  7070. A_UINT32 phy_tx_ch_mask;
  7071. A_UINT32 phy_rx_ch_mask;
  7072. /** INI masks - to decide the INI registers to be loaded on a reset */
  7073. A_UINT32 phybb_ini_mask;
  7074. A_UINT32 phyrf_ini_mask;
  7075. /** DFS,ADFS/Spectral scan enable masks */
  7076. A_UINT32 phy_dfs_en_mask;
  7077. A_UINT32 phy_sscan_en_mask;
  7078. A_UINT32 phy_synth_sel_mask;
  7079. A_UINT32 phy_adfs_freq;
  7080. /** CCK FIR settings
  7081. * register settings - filter coefficients for Iqs conversion
  7082. * [31:24] = FIR_COEFF_3_0
  7083. * [23:16] = FIR_COEFF_2_0
  7084. * [15:8] = FIR_COEFF_1_0
  7085. * [7:0] = FIR_COEFF_0_0
  7086. */
  7087. A_UINT32 cck_fir_settings;
  7088. /** dynamic primary channel index
  7089. * primary 20MHz channel index on the current channel BW
  7090. */
  7091. A_UINT32 phy_dyn_pri_chan;
  7092. /**
  7093. * Current CCA detection threshold
  7094. * dB above noisefloor req for CCA
  7095. * Register settings for all subbands
  7096. */
  7097. A_UINT32 cca_thresh;
  7098. /**
  7099. * status for dynamic CCA adjustment
  7100. * 0-disabled, 1-enabled
  7101. */
  7102. A_UINT32 dyn_cca_status;
  7103. /** RXDEAF Register value
  7104. * rxdesense_thresh_sw - VREG Register
  7105. * rxdesense_thresh_hw - PHY Register
  7106. */
  7107. A_UINT32 rxdesense_thresh_sw;
  7108. A_UINT32 rxdesense_thresh_hw;
  7109. /** Current PHY Bandwidth -
  7110. * values are specified by the HTT_PHY_BW_IDX enum type
  7111. */
  7112. A_UINT32 phy_bw_code;
  7113. /** Current channel operating rate -
  7114. * values are specified by the HTT_CHANNEL_RATE enum type
  7115. */
  7116. A_UINT32 phy_rate_mode;
  7117. /** current channel operating band
  7118. * 0 - 5G; 1 - 2G; 2 -6G
  7119. */
  7120. A_UINT32 phy_band_code;
  7121. /** microcode processor virtual phy base address -
  7122. * provided only for debug
  7123. */
  7124. A_UINT32 phy_vreg_base;
  7125. /** microcode processor virtual phy base ext address -
  7126. * provided only for debug
  7127. */
  7128. A_UINT32 phy_vreg_base_ext;
  7129. /** HW LUT table configuration for home/scan channel -
  7130. * provided only for debug
  7131. */
  7132. A_UINT32 cur_table_index;
  7133. /** SW configuration flag for PHY reset and Calibrations -
  7134. * values are specified by the HTT_WHAL_CONFIG enum type
  7135. */
  7136. A_UINT32 whal_config_flag;
  7137. } htt_phy_reset_stats_tlv;
  7138. typedef struct {
  7139. htt_tlv_hdr_t tlv_hdr;
  7140. /** current pdev_id */
  7141. A_UINT32 pdev_id;
  7142. /** ucode PHYOFF pass/failure count */
  7143. A_UINT32 cf_active_low_fail_cnt;
  7144. A_UINT32 cf_active_low_pass_cnt;
  7145. /** PHYOFF count attempted through ucode VREG */
  7146. A_UINT32 phy_off_through_vreg_cnt;
  7147. /** Force calibration count */
  7148. A_UINT32 force_calibration_cnt;
  7149. /** phyoff count during rfmode switch */
  7150. A_UINT32 rf_mode_switch_phy_off_cnt;
  7151. /** Temperature based recalibration count */
  7152. A_UINT32 temperature_recal_cnt;
  7153. } htt_phy_reset_counters_tlv;
  7154. /* Considering 320 MHz maximum 16 power levels */
  7155. #define HTT_MAX_CH_PWR_INFO_SIZE 16
  7156. typedef struct {
  7157. htt_tlv_hdr_t tlv_hdr;
  7158. /** current pdev_id */
  7159. A_UINT32 pdev_id;
  7160. /** Tranmsit power control scaling related configurations */
  7161. A_UINT32 tx_power_scale;
  7162. A_UINT32 tx_power_scale_db;
  7163. /** Minimum negative tx power supported by the target */
  7164. A_INT32 min_negative_tx_power;
  7165. /** current configured CTL domain */
  7166. A_UINT32 reg_ctl_domain;
  7167. /** Regulatory power information for the current channel */
  7168. A_INT32 max_reg_allowed_power[HTT_STATS_MAX_CHAINS];
  7169. A_INT32 max_reg_allowed_power_6g[HTT_STATS_MAX_CHAINS];
  7170. /** channel max regulatory power in 0.5dB */
  7171. A_UINT32 twice_max_rd_power;
  7172. /** current channel and home channel's maximum possible tx power */
  7173. A_INT32 max_tx_power;
  7174. A_INT32 home_max_tx_power;
  7175. /** channel's Power Spectral Density */
  7176. A_UINT32 psd_power;
  7177. /** channel's EIRP power */
  7178. A_UINT32 eirp_power;
  7179. /** 6G channel power mode
  7180. * 0-LPI, 1-SP, 2-VLPI and 3-SP_CLIENT power mode
  7181. */
  7182. A_UINT32 power_type_6ghz;
  7183. /** sub-band channels and corresponding Tx-power */
  7184. A_UINT32 sub_band_cfreq[HTT_MAX_CH_PWR_INFO_SIZE];
  7185. A_UINT32 sub_band_txpower[HTT_MAX_CH_PWR_INFO_SIZE];
  7186. } htt_phy_tpc_stats_tlv;
  7187. /* NOTE:
  7188. * This structure is for documentation, and cannot be safely used directly.
  7189. * Instead, use the constituent TLV structures to fill/parse.
  7190. */
  7191. typedef struct {
  7192. htt_phy_counters_tlv phy_counters;
  7193. htt_phy_stats_tlv phy_stats;
  7194. htt_phy_reset_counters_tlv phy_reset_counters;
  7195. htt_phy_reset_stats_tlv phy_reset_stats;
  7196. htt_phy_tpc_stats_tlv phy_tpc_stats;
  7197. } htt_phy_counters_and_phy_stats_t;
  7198. /* NOTE:
  7199. * This structure is for documentation, and cannot be safely used directly.
  7200. * Instead, use the constituent TLV structures to fill/parse.
  7201. */
  7202. typedef struct {
  7203. htt_t2h_soc_txrx_stats_common_tlv soc_common_stats;
  7204. htt_t2h_vdev_txrx_stats_hw_stats_tlv vdev_hw_stats[1/*or more*/];
  7205. } htt_vdevs_txrx_stats_t;
  7206. typedef struct {
  7207. A_UINT32
  7208. success: 16,
  7209. fail: 16;
  7210. } htt_stats_strm_gen_mpdus_cntr_t;
  7211. typedef struct {
  7212. /* MSDU queue identification */
  7213. A_UINT32
  7214. peer_id: 16,
  7215. tid: 4, /* only TIDs 0-7 actually expected to be used */
  7216. htt_qtype: 4, /* refer to HTT_MSDUQ_INDEX */
  7217. reserved: 8;
  7218. } htt_stats_strm_msdu_queue_id;
  7219. typedef struct {
  7220. htt_tlv_hdr_t tlv_hdr;
  7221. htt_stats_strm_msdu_queue_id queue_id;
  7222. htt_stats_strm_gen_mpdus_cntr_t svc_interval;
  7223. htt_stats_strm_gen_mpdus_cntr_t burst_size;
  7224. } htt_stats_strm_gen_mpdus_tlv_t;
  7225. typedef struct {
  7226. htt_tlv_hdr_t tlv_hdr;
  7227. htt_stats_strm_msdu_queue_id queue_id;
  7228. struct {
  7229. A_UINT32
  7230. timestamp_prior_ms: 16,
  7231. timestamp_now_ms: 16;
  7232. A_UINT32
  7233. interval_spec_ms: 16,
  7234. margin_ms: 16;
  7235. } svc_interval;
  7236. struct {
  7237. A_UINT32
  7238. /* consumed_bytes_orig:
  7239. * Raw count (actually estimate) of how many bytes were removed
  7240. * from the MSDU queue by the GEN_MPDUS operation.
  7241. */
  7242. consumed_bytes_orig: 16,
  7243. /* consumed_bytes_final:
  7244. * Adjusted count of removed bytes that incorporates normalizing
  7245. * by the actual service interval compared to the expected
  7246. * service interval.
  7247. * This allows the burst size computation to be independent of
  7248. * whether the target is doing GEN_MPDUS at only the service
  7249. * interval, or substantially more often than the service
  7250. * interval.
  7251. * consumed_bytes_final = consumed_bytes_orig /
  7252. * (svc_interval / ref_svc_interval)
  7253. */
  7254. consumed_bytes_final: 16;
  7255. A_UINT32
  7256. remaining_bytes: 16,
  7257. reserved: 16;
  7258. A_UINT32
  7259. burst_size_spec: 16,
  7260. margin_bytes: 16;
  7261. } burst_size;
  7262. } htt_stats_strm_gen_mpdus_details_tlv_t;
  7263. typedef struct {
  7264. htt_tlv_hdr_t tlv_hdr;
  7265. A_UINT32 reset_count;
  7266. /** lower portion (bits 31:0) of reset time, in milliseconds */
  7267. A_UINT32 reset_time_lo_ms;
  7268. /** upper portion (bits 63:32) of reset time, in milliseconds */
  7269. A_UINT32 reset_time_hi_ms;
  7270. /** lower portion (bits 31:0) of disengage time, in milliseconds */
  7271. A_UINT32 disengage_time_lo_ms;
  7272. /** upper portion (bits 63:32) of disengage time, in milliseconds */
  7273. A_UINT32 disengage_time_hi_ms;
  7274. /** lower portion (bits 31:0) of engage time, in milliseconds */
  7275. A_UINT32 engage_time_lo_ms;
  7276. /** upper portion (bits 63:32) of engage time, in milliseconds */
  7277. A_UINT32 engage_time_hi_ms;
  7278. A_UINT32 disengage_count;
  7279. A_UINT32 engage_count;
  7280. A_UINT32 drain_dest_ring_mask;
  7281. } htt_dmac_reset_stats_tlv;
  7282. /* Support up to 640 MHz mode for future expansion */
  7283. #define HTT_PUNCTURE_STATS_MAX_SUBBAND_COUNT 32
  7284. #define HTT_PDEV_PUNCTURE_STATS_MAC_ID_M 0x000000ff
  7285. #define HTT_PDEV_PUNCTURE_STATS_MAC_ID_S 0
  7286. #define HTT_PDEV_PUNCTURE_STATS_MAC_ID_GET(_var) \
  7287. (((_var) & HTT_PDEV_PUNCTURE_STATS_MAC_ID_M) >> \
  7288. HTT_PDEV_PUNCTURE_STATS_MAC_ID_S)
  7289. #define HTT_PDEV_PUNCTURE_STATS_MAC_ID_SET(_var, _val) \
  7290. do { \
  7291. HTT_CHECK_SET_VAL(HTT_PDEV_PUNCTURE_STATS_MAC_ID, _val); \
  7292. ((_var) |= ((_val) << HTT_PDEV_PUNCTURE_STATS_MAC_ID_S)); \
  7293. } while (0)
  7294. /*
  7295. * TLV used to provide puncturing related stats for TX/RX and each PPDU type.
  7296. */
  7297. typedef struct {
  7298. htt_tlv_hdr_t tlv_hdr;
  7299. /**
  7300. * BIT [ 7 : 0] :- mac_id
  7301. * BIT [31 : 8] :- reserved
  7302. */
  7303. union {
  7304. struct {
  7305. A_UINT32 mac_id: 8,
  7306. reserved: 24;
  7307. };
  7308. A_UINT32 mac_id__word;
  7309. };
  7310. /*
  7311. * Stats direction (TX/RX). Enum value from HTT_STATS_DIRECTION.
  7312. */
  7313. A_UINT32 direction;
  7314. /*
  7315. * Preamble type. Enum value from HTT_STATS_PREAM_TYPE.
  7316. *
  7317. * Note that for although OFDM rates don't technically support
  7318. * "puncturing", this TLV can be used to indicate the 20 MHz sub-bands
  7319. * utilized for OFDM legacy duplicate packets, which are also used during
  7320. * puncturing sequences.
  7321. */
  7322. A_UINT32 preamble;
  7323. /*
  7324. * Stats PPDU type. Enum value from HTT_STATS_PPDU_TYPE.
  7325. */
  7326. A_UINT32 ppdu_type;
  7327. /*
  7328. * Indicates the number of valid elements in the
  7329. * "num_subbands_used_cnt" array, and must be <=
  7330. * HTT_PUNCTURE_STATS_MAX_SUBBAND_COUNT.
  7331. *
  7332. * Also indicates how many bits in the last_used_pattern_mask may be
  7333. * non-zero.
  7334. */
  7335. A_UINT32 subband_count;
  7336. /*
  7337. * The last used transmit 20 MHz subband mask. Bit 0 represents the lowest
  7338. * 20 MHz subband mask, bit 1 the second lowest, and so on.
  7339. *
  7340. * All 32 bits are valid and will be used for expansion to higher BW modes.
  7341. */
  7342. A_UINT32 last_used_pattern_mask;
  7343. /*
  7344. * Number of array elements with valid values is equal to "subband_count".
  7345. * If subband_count is < HTT_PUNCTURE_STATS_MAX_SUBBAND_COUNT, the
  7346. * remaining elements will be implicitly set to 0x0.
  7347. *
  7348. * The array index is the number of 20 MHz subbands utilized during TX/RX,
  7349. * and the counter value at that index is the number of times that subband
  7350. * count was used.
  7351. *
  7352. * The count is incremented once for each OTA PPDU transmitted / received.
  7353. */
  7354. A_UINT32 num_subbands_used_cnt[HTT_PUNCTURE_STATS_MAX_SUBBAND_COUNT];
  7355. } htt_pdev_puncture_stats_tlv;
  7356. enum {
  7357. HTT_STATS_CAL_PROF_COLD_BOOT = 0,
  7358. HTT_STATS_CAL_PROF_FULL_CHAN_SWITCH = 1,
  7359. HTT_STATS_CAL_PROF_SCAN_CHAN_SWITCH = 2,
  7360. HTT_STATS_CAL_PROF_DPD_SPLIT_CAL = 3,
  7361. HTT_STATS_MAX_PROF_CAL = 4,
  7362. };
  7363. #define HTT_STATS_MAX_CAL_IDX_CNT 8
  7364. typedef struct {
  7365. htt_tlv_hdr_t tlv_hdr;
  7366. A_UINT8 latency_prof_name[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_PROF_STATS_NAME_LEN];
  7367. /** To verify whether prof cal is enabled or not */
  7368. A_UINT32 enable;
  7369. /** current pdev_id */
  7370. A_UINT32 pdev_id;
  7371. /** The cnt is incremented when each time the calindex takes place */
  7372. A_UINT32 cnt[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7373. /** Minimum time taken to complete the calibration - in us */
  7374. A_UINT32 min[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7375. /** Maximum time taken to complete the calibration -in us */
  7376. A_UINT32 max[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7377. /** Time taken by the cal for its final time execution - in us */
  7378. A_UINT32 last[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7379. /** Total time taken - in us */
  7380. A_UINT32 tot[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7381. /** hist_intvl - by default will be set to 2000 us */
  7382. A_UINT32 hist_intvl[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7383. /**
  7384. * If last is less than hist_intvl, then hist[0]++,
  7385. * If last is less than hist_intvl << 1, then hist[1]++,
  7386. * otherwise hist[2]++.
  7387. */
  7388. A_UINT32 hist[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT][HTT_INTERRUPTS_LATENCY_PROFILE_MAX_HIST];
  7389. /** Pf_last will log the current no of page faults */
  7390. A_UINT32 pf_last[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7391. /** Sum of all page faults happened */
  7392. A_UINT32 pf_tot[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7393. /** If pf_last > pf_max then pf_max = pf_last */
  7394. A_UINT32 pf_max[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7395. /**
  7396. * For each cal profile, only certain no of cal indices were invoked,
  7397. * this member will store what all the indices got invoked per each
  7398. * cal profile
  7399. */
  7400. A_UINT32 enabledCalIdx[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7401. /** No of indices invoked per each cal profile */
  7402. A_UINT32 CalCnt[HTT_STATS_MAX_PROF_CAL];
  7403. } htt_latency_prof_cal_stats_tlv;
  7404. #define HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_M 0x0000003F
  7405. #define HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_S 0
  7406. #define HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_M 0x00000FC0
  7407. #define HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_S 6
  7408. #define HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_M 0x0FFFF000
  7409. #define HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_S 12
  7410. #define HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_GET(_var) \
  7411. (((_var) & HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_M) >> \
  7412. HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_S)
  7413. #define HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_SET(_var, _val) \
  7414. do { \
  7415. HTT_CHECK_SET_VAL(HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD, _val); \
  7416. ((_var) &= ~(HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_M)); \
  7417. ((_var) |= ((_val) << HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_S)); \
  7418. } while (0)
  7419. #define HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_GET(_var) \
  7420. (((_var) & HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_M) >> \
  7421. HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_S)
  7422. #define HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_SET(_var, _val) \
  7423. do { \
  7424. HTT_CHECK_SET_VAL(HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD, _val); \
  7425. ((_var) &= ~(HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_M)); \
  7426. ((_var) |= ((_val) << HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_S)); \
  7427. } while (0)
  7428. #define HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_GET(_var) \
  7429. (((_var) & HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_M) >> \
  7430. HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_S)
  7431. #define HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_SET(_var, _val) \
  7432. do { \
  7433. HTT_CHECK_SET_VAL(HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX, _val); \
  7434. ((_var) &= ~(HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_M)); \
  7435. ((_var) |= ((_val) << HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_S)); \
  7436. } while (0)
  7437. typedef struct {
  7438. htt_tlv_hdr_t tlv_hdr;
  7439. union {
  7440. struct {
  7441. A_UINT32 peer_assoc_ipc_recvd : 6,
  7442. sched_peer_delete_recvd : 6,
  7443. mld_ast_index : 16,
  7444. reserved : 4;
  7445. };
  7446. A_UINT32 msg_dword_1;
  7447. };
  7448. } htt_ml_peer_ext_details_tlv;
  7449. #define HTT_ML_LINK_INFO_VALID_M 0x00000001
  7450. #define HTT_ML_LINK_INFO_VALID_S 0
  7451. #define HTT_ML_LINK_INFO_ACTIVE_M 0x00000002
  7452. #define HTT_ML_LINK_INFO_ACTIVE_S 1
  7453. #define HTT_ML_LINK_INFO_PRIMARY_M 0x00000004
  7454. #define HTT_ML_LINK_INFO_PRIMARY_S 2
  7455. #define HTT_ML_LINK_INFO_ASSOC_LINK_M 0x00000008
  7456. #define HTT_ML_LINK_INFO_ASSOC_LINK_S 3
  7457. #define HTT_ML_LINK_INFO_CHIP_ID_M 0x00000070
  7458. #define HTT_ML_LINK_INFO_CHIP_ID_S 4
  7459. #define HTT_ML_LINK_INFO_IEEE_LINK_ID_M 0x00007F80
  7460. #define HTT_ML_LINK_INFO_IEEE_LINK_ID_S 7
  7461. #define HTT_ML_LINK_INFO_HW_LINK_ID_M 0x00038000
  7462. #define HTT_ML_LINK_INFO_HW_LINK_ID_S 15
  7463. #define HTT_ML_LINK_INFO_LOGICAL_LINK_ID_M 0x000C0000
  7464. #define HTT_ML_LINK_INFO_LOGICAL_LINK_ID_S 18
  7465. #define HTT_ML_LINK_INFO_MASTER_LINK_M 0x00100000
  7466. #define HTT_ML_LINK_INFO_MASTER_LINK_S 20
  7467. #define HTT_ML_LINK_INFO_ANCHOR_LINK_M 0x00200000
  7468. #define HTT_ML_LINK_INFO_ANCHOR_LINK_S 21
  7469. #define HTT_ML_LINK_INFO_INITIALIZED_M 0x00400000
  7470. #define HTT_ML_LINK_INFO_INITIALIZED_S 22
  7471. #define HTT_ML_LINK_INFO_SW_PEER_ID_M 0x0000ffff
  7472. #define HTT_ML_LINK_INFO_SW_PEER_ID_S 0
  7473. #define HTT_ML_LINK_INFO_VDEV_ID_M 0x00ff0000
  7474. #define HTT_ML_LINK_INFO_VDEV_ID_S 16
  7475. #define HTT_ML_LINK_INFO_VALID_GET(_var) \
  7476. (((_var) & HTT_ML_LINK_INFO_VALID_M) >> \
  7477. HTT_ML_LINK_INFO_VALID_S)
  7478. #define HTT_ML_LINK_INFO_VALID_SET(_var, _val) \
  7479. do { \
  7480. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_VALID, _val); \
  7481. ((_var) &= ~(HTT_ML_LINK_INFO_VALID_M)); \
  7482. ((_var) |= ((_val) << HTT_ML_LINK_INFO_VALID_S)); \
  7483. } while (0)
  7484. #define HTT_ML_LINK_INFO_ACTIVE_GET(_var) \
  7485. (((_var) & HTT_ML_LINK_INFO_ACTIVE_M) >> \
  7486. HTT_ML_LINK_INFO_ACTIVE_S)
  7487. #define HTT_ML_LINK_INFO_ACTIVE_SET(_var, _val) \
  7488. do { \
  7489. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_ACTIVE, _val); \
  7490. ((_var) &= ~(HTT_ML_LINK_INFO_ACTIVE_M)); \
  7491. ((_var) |= ((_val) << HTT_ML_LINK_INFO_ACTIVE_S)); \
  7492. } while (0)
  7493. #define HTT_ML_LINK_INFO_PRIMARY_GET(_var) \
  7494. (((_var) & HTT_ML_LINK_INFO_PRIMARY_M) >> \
  7495. HTT_ML_LINK_INFO_PRIMARY_S)
  7496. #define HTT_ML_LINK_INFO_PRIMARY_SET(_var, _val) \
  7497. do { \
  7498. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_PRIMARY, _val); \
  7499. ((_var) &= ~(HTT_ML_LINK_INFO_PRIMARY_M)); \
  7500. ((_var) |= ((_val) << HTT_ML_LINK_INFO_PRIMARY_S)); \
  7501. } while (0)
  7502. #define HTT_ML_LINK_INFO_ASSOC_LINK_GET(_var) \
  7503. (((_var) & HTT_ML_LINK_INFO_ASSOC_LINK_M) >> \
  7504. HTT_ML_LINK_INFO_ASSOC_LINK_S)
  7505. #define HTT_ML_LINK_INFO_ASSOC_LINK_SET(_var, _val) \
  7506. do { \
  7507. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_ASSOC_LINK, _val); \
  7508. ((_var) &= ~(HTT_ML_LINK_INFO_ASSOC_LINK_M)); \
  7509. ((_var) |= ((_val) << HTT_ML_LINK_INFO_ASSOC_LINK_S)); \
  7510. } while (0)
  7511. #define HTT_ML_LINK_INFO_CHIP_ID_GET(_var) \
  7512. (((_var) & HTT_ML_LINK_INFO_CHIP_ID_M) >> \
  7513. HTT_ML_LINK_INFO_CHIP_ID_S)
  7514. #define HTT_ML_LINK_INFO_CHIP_ID_SET(_var, _val) \
  7515. do { \
  7516. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_CHIP_ID, _val); \
  7517. ((_var) &= ~(HTT_ML_LINK_INFO_CHIP_ID_M)); \
  7518. ((_var) |= ((_val) << HTT_ML_LINK_INFO_CHIP_ID_S)); \
  7519. } while (0)
  7520. #define HTT_ML_LINK_INFO_IEEE_LINK_ID_GET(_var) \
  7521. (((_var) & HTT_ML_LINK_INFO_IEEE_LINK_ID_M) >> \
  7522. HTT_ML_LINK_INFO_IEEE_LINK_ID_S)
  7523. #define HTT_ML_LINK_INFO_IEEE_LINK_ID_SET(_var, _val) \
  7524. do { \
  7525. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_IEEE_LINK_ID, _val); \
  7526. ((_var) &= ~(HTT_ML_LINK_INFO_IEEE_LINK_ID_M)); \
  7527. ((_var) |= ((_val) << HTT_ML_LINK_INFO_IEEE_LINK_ID_S)); \
  7528. } while (0)
  7529. #define HTT_ML_LINK_INFO_HW_LINK_ID_GET(_var) \
  7530. (((_var) & HTT_ML_LINK_INFO_HW_LINK_ID_M) >> \
  7531. HTT_ML_LINK_INFO_HW_LINK_ID_S)
  7532. #define HTT_ML_LINK_INFO_HW_LINK_ID_SET(_var, _val) \
  7533. do { \
  7534. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_HW_LINK_ID, _val); \
  7535. ((_var) &= ~(HTT_ML_LINK_INFO_HW_LINK_ID_M)); \
  7536. ((_var) |= ((_val) << HTT_ML_LINK_INFO_HW_LINK_ID_S)); \
  7537. } while (0)
  7538. #define HTT_ML_LINK_INFO_LOGICAL_LINK_ID_GET(_var) \
  7539. (((_var) & HTT_ML_LINK_INFO_LOGICAL_LINK_ID_M) >> \
  7540. HTT_ML_LINK_INFO_LOGICAL_LINK_ID_S)
  7541. #define HTT_ML_LINK_INFO_LOGICAL_LINK_ID_SET(_var, _val) \
  7542. do { \
  7543. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_LOGICAL_LINK_ID, _val); \
  7544. ((_var) &= ~(HTT_ML_LINK_INFO_LOGICAL_LINK_ID_M)); \
  7545. ((_var) |= ((_val) << HTT_ML_LINK_INFO_LOGICAL_LINK_ID_S)); \
  7546. } while (0)
  7547. #define HTT_ML_LINK_INFO_MASTER_LINK_GET(_var) \
  7548. (((_var) & HTT_ML_LINK_INFO_MASTER_LINK_M) >> \
  7549. HTT_ML_LINK_INFO_MASTER_LINK_S)
  7550. #define HTT_ML_LINK_INFO_MASTER_LINK_SET(_var, _val) \
  7551. do { \
  7552. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_MASTER_LINK, _val); \
  7553. ((_var) &= ~(HTT_ML_LINK_INFO_MASTER_LINK_M)); \
  7554. ((_var) |= ((_val) << HTT_ML_LINK_INFO_MASTER_LINK_S)); \
  7555. } while (0)
  7556. #define HTT_ML_LINK_INFO_ANCHOR_LINK_GET(_var) \
  7557. (((_var) & HTT_ML_LINK_INFO_ANCHOR_LINK_M) >> \
  7558. HTT_ML_LINK_INFO_ANCHOR_LINK_S)
  7559. #define HTT_ML_LINK_INFO_ANCHOR_LINK_SET(_var, _val) \
  7560. do { \
  7561. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_ANCHOR_LINK, _val); \
  7562. ((_var) &= ~(HTT_ML_LINK_INFO_ANCHOR_LINK_M)); \
  7563. ((_var) |= ((_val) << HTT_ML_LINK_INFO_ANCHOR_LINK_S)); \
  7564. } while (0)
  7565. #define HTT_ML_LINK_INFO_INITIALIZED_GET(_var) \
  7566. (((_var) & HTT_ML_LINK_INFO_INITIALIZED_M) >> \
  7567. HTT_ML_LINK_INFO_INITIALIZED_S)
  7568. #define HTT_ML_LINK_INFO_INITIALIZED_SET(_var, _val) \
  7569. do { \
  7570. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_INITIALIZED, _val); \
  7571. ((_var) &= ~(HTT_ML_LINK_INFO_INITIALIZED_M)); \
  7572. ((_var) |= ((_val) << HTT_ML_LINK_INFO_INITIALIZED_S)); \
  7573. } while (0)
  7574. #define HTT_ML_LINK_INFO_SW_PEER_ID_GET(_var) \
  7575. (((_var) & HTT_ML_LINK_INFO_SW_PEER_ID_M) >> \
  7576. HTT_ML_LINK_INFO_SW_PEER_ID_S)
  7577. #define HTT_ML_LINK_INFO_SW_PEER_ID_SET(_var, _val) \
  7578. do { \
  7579. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_SW_PEER_ID, _val); \
  7580. ((_var) &= ~(HTT_ML_LINK_INFO_SW_PEER_ID_M)); \
  7581. ((_var) |= ((_val) << HTT_ML_LINK_INFO_SW_PEER_ID_S)); \
  7582. } while (0)
  7583. #define HTT_ML_LINK_INFO_VDEV_ID_GET(_var) \
  7584. (((_var) & HTT_ML_LINK_INFO_VDEV_ID_M) >> \
  7585. HTT_ML_LINK_INFO_VDEV_ID_S)
  7586. #define HTT_ML_LINK_INFO_VDEV_ID_SET(_var, _val) \
  7587. do { \
  7588. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_VDEV_ID, _val); \
  7589. ((_var) &= ~(HTT_ML_LINK_INFO_VDEV_ID_M)); \
  7590. ((_var) |= ((_val) << HTT_ML_LINK_INFO_VDEV_ID_S)); \
  7591. } while (0)
  7592. typedef struct {
  7593. htt_tlv_hdr_t tlv_hdr;
  7594. union {
  7595. struct {
  7596. A_UINT32 valid : 1,
  7597. active : 1,
  7598. primary : 1,
  7599. assoc_link : 1,
  7600. chip_id : 3,
  7601. ieee_link_id : 8,
  7602. hw_link_id : 3,
  7603. logical_link_id : 2,
  7604. master_link : 1,
  7605. anchor_link : 1,
  7606. initialized : 1,
  7607. reserved : 9;
  7608. };
  7609. A_UINT32 msg_dword_1;
  7610. };
  7611. union {
  7612. struct {
  7613. A_UINT32 sw_peer_id : 16,
  7614. vdev_id : 8,
  7615. reserved1 : 8;
  7616. };
  7617. A_UINT32 msg_dword_2;
  7618. };
  7619. A_UINT32 primary_tid_mask;
  7620. } htt_ml_link_info_tlv;
  7621. #define HTT_ML_PEER_DETAILS_NUM_LINKS_M 0x00000003
  7622. #define HTT_ML_PEER_DETAILS_NUM_LINKS_S 0
  7623. #define HTT_ML_PEER_DETAILS_ML_PEER_ID_M 0x00003FFC
  7624. #define HTT_ML_PEER_DETAILS_ML_PEER_ID_S 2
  7625. #define HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_M 0x0001C000
  7626. #define HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_S 14
  7627. #define HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_M 0x00060000
  7628. #define HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_S 17
  7629. #define HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_M 0x00380000
  7630. #define HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_S 19
  7631. #define HTT_ML_PEER_DETAILS_NON_STR_M 0x00400000
  7632. #define HTT_ML_PEER_DETAILS_NON_STR_S 22
  7633. #define HTT_ML_PEER_DETAILS_EMLSR_M 0x00800000
  7634. #define HTT_ML_PEER_DETAILS_EMLSR_S 23
  7635. #define HTT_ML_PEER_DETAILS_IS_STA_KO_M 0x01000000
  7636. #define HTT_ML_PEER_DETAILS_IS_STA_KO_S 24
  7637. #define HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_M 0x06000000
  7638. #define HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_S 25
  7639. #define HTT_ML_PEER_DETAILS_ALLOCATED_M 0x08000000
  7640. #define HTT_ML_PEER_DETAILS_ALLOCATED_S 27
  7641. #define HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_M 0x000000ff
  7642. #define HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_S 0
  7643. #define HTT_ML_PEER_DETAILS_NUM_LINKS_GET(_var) \
  7644. (((_var) & HTT_ML_PEER_DETAILS_NUM_LINKS_M) >> \
  7645. HTT_ML_PEER_DETAILS_NUM_LINKS_S)
  7646. #define HTT_ML_PEER_DETAILS_NUM_LINKS_SET(_var, _val) \
  7647. do { \
  7648. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_NUM_LINKS, _val); \
  7649. ((_var) &= ~(HTT_ML_PEER_DETAILS_NUM_LINKS_M)); \
  7650. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_NUM_LINKS_S)); \
  7651. } while (0)
  7652. #define HTT_ML_PEER_DETAILS_ML_PEER_ID_GET(_var) \
  7653. (((_var) & HTT_ML_PEER_DETAILS_ML_PEER_ID_M) >> \
  7654. HTT_ML_PEER_DETAILS_ML_PEER_ID_S)
  7655. #define HTT_ML_PEER_DETAILS_ML_PEER_ID_SET(_var, _val) \
  7656. do { \
  7657. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_ML_PEER_ID, _val); \
  7658. ((_var) &= ~(HTT_ML_PEER_DETAILS_ML_PEER_ID_M)); \
  7659. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_ML_PEER_ID_S)); \
  7660. } while (0)
  7661. #define HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_GET(_var) \
  7662. (((_var) & HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_M) >> \
  7663. HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_S)
  7664. #define HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_SET(_var, _val) \
  7665. do { \
  7666. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX, _val); \
  7667. ((_var) &= ~(HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_M)); \
  7668. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_S)); \
  7669. } while (0)
  7670. #define HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_GET(_var) \
  7671. (((_var) & HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_M) >> \
  7672. HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_S)
  7673. #define HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_SET(_var, _val) \
  7674. do { \
  7675. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID, _val); \
  7676. ((_var) &= ~(HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_M)); \
  7677. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_S)); \
  7678. } while (0)
  7679. #define HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_GET(_var) \
  7680. (((_var) & HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_M) >> \
  7681. HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_S)
  7682. #define HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_SET(_var, _val) \
  7683. do { \
  7684. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_LINK_INIT_COUNT, _val); \
  7685. ((_var) &= ~(HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_M)); \
  7686. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_S)); \
  7687. } while (0)
  7688. #define HTT_ML_PEER_DETAILS_NON_STR_GET(_var) \
  7689. (((_var) & HTT_ML_PEER_DETAILS_NON_STR_M) >> \
  7690. HTT_ML_PEER_DETAILS_NON_STR_S)
  7691. #define HTT_ML_PEER_DETAILS_NON_STR_SET(_var, _val) \
  7692. do { \
  7693. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_NON_STR, _val); \
  7694. ((_var) &= ~(HTT_ML_PEER_DETAILS_NON_STR_M)); \
  7695. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_NON_STR_S)); \
  7696. } while (0)
  7697. #define HTT_ML_PEER_DETAILS_EMLSR_GET(_var) \
  7698. (((_var) & HTT_ML_PEER_DETAILS_EMLSR_M) >> \
  7699. HTT_ML_PEER_DETAILS_EMLSR_S)
  7700. #define HTT_ML_PEER_DETAILS_EMLSR_SET(_var, _val) \
  7701. do { \
  7702. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_EMLSR, _val); \
  7703. ((_var) &= ~(HTT_ML_PEER_DETAILS_EMLSR_M)); \
  7704. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_EMLSR_S)); \
  7705. } while (0)
  7706. #define HTT_ML_PEER_DETAILS_IS_STA_KO_GET(_var) \
  7707. (((_var) & HTT_ML_PEER_DETAILS_IS_STA_KO_M) >> \
  7708. HTT_ML_PEER_DETAILS_IS_STA_KO_S)
  7709. #define HTT_ML_PEER_DETAILS_IS_STA_KO_SET(_var, _val) \
  7710. do { \
  7711. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_IS_STA_KO, _val); \
  7712. ((_var) &= ~(HTT_ML_PEER_DETAILS_IS_STA_KO_M)); \
  7713. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_IS_STA_KO_S)); \
  7714. } while (0)
  7715. #define HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_GET(_var) \
  7716. (((_var) & HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_M) >> \
  7717. HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_S)
  7718. #define HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_SET(_var, _val) \
  7719. do { \
  7720. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS, _val); \
  7721. ((_var) &= ~(HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_M)); \
  7722. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_S)); \
  7723. } while (0)
  7724. #define HTT_ML_PEER_DETAILS_ALLOCATED_GET(_var) \
  7725. (((_var) & HTT_ML_PEER_DETAILS_ALLOCATED_M) >> \
  7726. HTT_ML_PEER_DETAILS_ALLOCATED_S)
  7727. #define HTT_ML_PEER_DETAILS_ALLOCATED_SET(_var, _val) \
  7728. do { \
  7729. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_ALLOCATED, _val); \
  7730. ((_var) &= ~(HTT_ML_PEER_DETAILS_ALLOCATED_M)); \
  7731. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_ALLOCATED_S)); \
  7732. } while (0)
  7733. #define HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_GET(_var) \
  7734. (((_var) & HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_M) >> \
  7735. HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_S)
  7736. #define HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_SET(_var, _val) \
  7737. do { \
  7738. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP, _val); \
  7739. ((_var) &= ~(HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_M)); \
  7740. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_S)); \
  7741. } while (0)
  7742. typedef struct {
  7743. htt_tlv_hdr_t tlv_hdr;
  7744. htt_mac_addr remote_mld_mac_addr;
  7745. union {
  7746. struct {
  7747. A_UINT32 num_links : 2,
  7748. ml_peer_id : 12,
  7749. primary_link_idx : 3,
  7750. primary_chip_id : 2,
  7751. link_init_count : 3,
  7752. non_str : 1,
  7753. emlsr : 1,
  7754. is_sta_ko : 1,
  7755. num_local_links : 2,
  7756. allocated : 1,
  7757. reserved : 4;
  7758. };
  7759. A_UINT32 msg_dword_1;
  7760. };
  7761. union {
  7762. struct {
  7763. A_UINT32 participating_chips_bitmap : 8,
  7764. reserved1 : 24;
  7765. };
  7766. A_UINT32 msg_dword_2;
  7767. };
  7768. /*
  7769. * ml_peer_flags is an opaque field that cannot be interpreted by
  7770. * the host; it is only for off-line debug.
  7771. */
  7772. A_UINT32 ml_peer_flags;
  7773. } htt_ml_peer_details_tlv;
  7774. /* STATS_TYPE : HTT_DBG_EXT_STATS_ML_PEERS_INFO
  7775. * TLV_TAGS:
  7776. * - HTT_STATS_ML_PEER_DETAILS_TAG
  7777. * - HTT_STATS_ML_LINK_INFO_DETAILS_TAG
  7778. * - HTT_STATS_ML_PEER_EXT_DETAILS_TAG (multiple)
  7779. */
  7780. /* NOTE:
  7781. * This structure is for documentation, and cannot be safely used directly.
  7782. * Instead, use the constituent TLV structures to fill/parse.
  7783. */
  7784. typedef struct _htt_ml_peer_stats {
  7785. htt_ml_peer_details_tlv ml_peer_details;
  7786. htt_ml_peer_ext_details_tlv ml_peer_ext_details;
  7787. htt_ml_link_info_tlv ml_link_info[];
  7788. } htt_ml_peer_stats_t;
  7789. /*
  7790. * ODD Mandatory Stats are grouped together from all the existing different
  7791. * stats, to form a set of stats that will be used by the ODD application to
  7792. * post the stats to the cloud instead of polling for the individual stats.
  7793. * This is done to avoid non-mandatory stats to be polled as the data will not
  7794. * be required in the recipes derivation.
  7795. * Rather than the host simply printing the ODD stats, the ODD application
  7796. * will take the buffer and map it to the odd_mandatory_stats data structure.
  7797. */
  7798. typedef struct {
  7799. htt_tlv_hdr_t tlv_hdr;
  7800. A_UINT32 hw_queued;
  7801. A_UINT32 hw_reaped;
  7802. A_UINT32 hw_paused;
  7803. A_UINT32 hw_filt;
  7804. A_UINT32 seq_posted;
  7805. A_UINT32 seq_completed;
  7806. A_UINT32 underrun;
  7807. A_UINT32 hw_flush;
  7808. A_UINT32 next_seq_posted_dsr;
  7809. A_UINT32 seq_posted_isr;
  7810. A_UINT32 mpdu_cnt_fcs_ok;
  7811. A_UINT32 mpdu_cnt_fcs_err;
  7812. A_UINT32 msdu_count_tqm;
  7813. A_UINT32 mpdu_count_tqm;
  7814. A_UINT32 mpdus_ack_failed;
  7815. A_UINT32 num_data_ppdus_tried_ota;
  7816. A_UINT32 ppdu_ok;
  7817. A_UINT32 num_total_ppdus_tried_ota;
  7818. A_UINT32 thermal_suspend_cnt;
  7819. A_UINT32 dfs_suspend_cnt;
  7820. A_UINT32 tx_abort_suspend_cnt;
  7821. A_UINT32 suspended_txq_mask;
  7822. A_UINT32 last_suspend_reason;
  7823. A_UINT32 seq_failed_queueing;
  7824. A_UINT32 seq_restarted;
  7825. A_UINT32 seq_txop_repost_stop;
  7826. A_UINT32 next_seq_cancel;
  7827. A_UINT32 seq_min_msdu_repost_stop;
  7828. A_UINT32 total_phy_err_cnt;
  7829. A_UINT32 ppdu_recvd;
  7830. A_UINT32 tcp_msdu_cnt;
  7831. A_UINT32 tcp_ack_msdu_cnt;
  7832. A_UINT32 udp_msdu_cnt;
  7833. A_UINT32 fw_tx_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  7834. A_UINT32 fw_rx_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  7835. A_UINT32 fw_ring_mpdu_err[HTT_RX_STATS_RXDMA_MAX_ERR];
  7836. A_UINT32 urrn_stats[HTT_TX_PDEV_MAX_URRN_STATS];
  7837. A_UINT32 sifs_status[HTT_TX_PDEV_MAX_SIFS_BURST_STATS];
  7838. A_UINT32 sifs_hist_status[HTT_TX_PDEV_SIFS_BURST_HIST_STATS];
  7839. A_UINT32 rx_suspend_cnt;
  7840. A_UINT32 rx_suspend_fail_cnt;
  7841. A_UINT32 rx_resume_cnt;
  7842. A_UINT32 rx_resume_fail_cnt;
  7843. A_UINT32 hwq_beacon_cmd_result[HTT_TX_HWQ_MAX_CMD_RESULT_STATS];
  7844. A_UINT32 hwq_voice_cmd_result[HTT_TX_HWQ_MAX_CMD_RESULT_STATS];
  7845. A_UINT32 hwq_video_cmd_result[HTT_TX_HWQ_MAX_CMD_RESULT_STATS];
  7846. A_UINT32 hwq_best_effort_cmd_result[HTT_TX_HWQ_MAX_CMD_RESULT_STATS];
  7847. A_UINT32 hwq_beacon_mpdu_tried_cnt;
  7848. A_UINT32 hwq_voice_mpdu_tried_cnt;
  7849. A_UINT32 hwq_video_mpdu_tried_cnt;
  7850. A_UINT32 hwq_best_effort_mpdu_tried_cnt;
  7851. A_UINT32 hwq_beacon_mpdu_queued_cnt;
  7852. A_UINT32 hwq_voice_mpdu_queued_cnt;
  7853. A_UINT32 hwq_video_mpdu_queued_cnt;
  7854. A_UINT32 hwq_best_effort_mpdu_queued_cnt;
  7855. A_UINT32 hwq_beacon_mpdu_ack_fail_cnt;
  7856. A_UINT32 hwq_voice_mpdu_ack_fail_cnt;
  7857. A_UINT32 hwq_video_mpdu_ack_fail_cnt;
  7858. A_UINT32 hwq_best_effort_mpdu_ack_fail_cnt;
  7859. A_UINT32 pdev_resets;
  7860. A_UINT32 phy_warm_reset;
  7861. A_UINT32 hwsch_reset_count;
  7862. A_UINT32 phy_warm_reset_ucode_trig;
  7863. A_UINT32 mac_cold_reset;
  7864. A_UINT32 mac_warm_reset;
  7865. A_UINT32 mac_warm_reset_restore_cal;
  7866. A_UINT32 phy_warm_reset_m3_ssr;
  7867. A_UINT32 fw_rx_rings_reset;
  7868. A_UINT32 tx_flush;
  7869. A_UINT32 hwsch_dev_reset_war;
  7870. A_UINT32 mac_cold_reset_restore_cal;
  7871. A_UINT32 mac_only_reset;
  7872. A_UINT32 mac_sfm_reset;
  7873. A_UINT32 tx_ldpc; /* Number of tx PPDUs with LDPC coding */
  7874. A_UINT32 rx_ldpc; /* Number of rx PPDUs with LDPC coding */
  7875. A_UINT32 gen_mpdu_end_reason[HTT_TX_TQM_MAX_GEN_MPDU_END_REASON];
  7876. A_UINT32 list_mpdu_end_reason[HTT_TX_TQM_MAX_LIST_MPDU_END_REASON];
  7877. A_UINT32 tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS + HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS + HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  7878. A_UINT32 tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  7879. A_UINT32 tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  7880. A_UINT32 half_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  7881. A_UINT32 quarter_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  7882. A_UINT32 tx_su_punctured_mode[HTT_TX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS];
  7883. A_UINT32 rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS + HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS + HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  7884. A_UINT32 rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  7885. A_UINT32 rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  7886. A_UINT32 rx_stbc[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS + HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS + HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  7887. A_UINT32 rts_cnt;
  7888. A_UINT32 rts_success;
  7889. } htt_odd_mandatory_pdev_stats_tlv;
  7890. typedef struct _htt_odd_mandatory_mumimo_pdev_stats_tlv {
  7891. htt_tlv_hdr_t tlv_hdr;
  7892. A_UINT32 ac_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  7893. A_UINT32 ax_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  7894. A_UINT32 ac_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  7895. A_UINT32 ax_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  7896. A_UINT32 ac_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  7897. A_UINT32 ax_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  7898. A_UINT32 ul_mumimo_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  7899. A_UINT32 ul_mumimo_rx_nss[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  7900. A_UINT32 ul_mumimo_rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  7901. A_UINT32 rx_ulmumimo_mpdu_fail[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  7902. A_UINT32 rx_ulmumimo_mpdu_ok[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  7903. A_UINT32 rx_ulmumimo_data_ppdu[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  7904. } htt_odd_mandatory_mumimo_pdev_stats_tlv;
  7905. typedef struct _htt_odd_mandatory_muofdma_pdev_stats_tlv {
  7906. htt_tlv_hdr_t tlv_hdr;
  7907. A_UINT32 mu_ofdma_seq_posted;
  7908. A_UINT32 ul_mu_ofdma_seq_posted;
  7909. A_UINT32 ofdma_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS + HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS + HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  7910. A_UINT32 ofdma_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  7911. A_UINT32 ofdma_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  7912. A_UINT32 ofdma_tx_ldpc;
  7913. A_UINT32 ul_ofdma_rx_ldpc;
  7914. A_UINT32 ul_ofdma_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS + HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS + HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  7915. A_UINT32 ul_ofdma_rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  7916. A_UINT32 ul_ofdma_rx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  7917. A_UINT32 rx_ulofdma_data_ppdu[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  7918. A_UINT32 rx_ulofdma_mpdu_ok[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  7919. A_UINT32 rx_ulofdma_mpdu_fail[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  7920. A_UINT32 ax_mu_brp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  7921. A_UINT32 be_mu_brp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  7922. A_UINT32 ofdma_tx_ru_size[HTT_TX_PDEV_STATS_NUM_AX_RU_SIZE_COUNTERS];
  7923. } htt_odd_mandatory_muofdma_pdev_stats_tlv;
  7924. #define HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_M 0x000000ff
  7925. #define HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_S 0
  7926. #define HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_GET(_var) \
  7927. (((_var) & HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_M) >> \
  7928. HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_S)
  7929. #define HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_SET(_var, _val) \
  7930. do { \
  7931. HTT_CHECK_SET_VAL(HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID, _val); \
  7932. ((_var) |= ((_val) << HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_S)); \
  7933. } while (0)
  7934. typedef enum {
  7935. HTT_STATS_SCHED_OFDMA_TXBF = 0, /* 0 */
  7936. HTT_STATS_SCHED_OFDMA_TXBF_IS_SANITY_FAILED, /* 1 */
  7937. HTT_STATS_SCHED_OFDMA_TXBF_IS_EBF_ALLOWED_FAILIED, /* 2 */
  7938. HTT_STATS_SCHED_OFDMA_TXBF_RU_ALLOC_BW_DROP_COUNT, /* 3 */
  7939. HTT_STATS_SCHED_OFDMA_TXBF_INVALID_CV_QUERY_COUNT, /* 4 */
  7940. HTT_STATS_SCHED_OFDMA_TXBF_AVG_TXTIME_LESS_THAN_TXBF_SND_THERHOLD, /* 5 */
  7941. HTT_STATS_SCHED_OFDMA_TXBF_IS_CANDIDATE_KICKED_OUT, /* 6 */
  7942. HTT_STATS_SCHED_OFDMA_TXBF_CV_IMAGE_BUF_INVALID, /* 7 */
  7943. HTT_STATS_SCHED_OFDMA_TXBF_INELIGIBILITY_MAX,
  7944. } htt_stats_sched_ofdma_txbf_ineligibility_t;
  7945. typedef struct {
  7946. htt_tlv_hdr_t tlv_hdr;
  7947. /**
  7948. * BIT [ 7 : 0] :- mac_id
  7949. * BIT [31 : 8] :- reserved
  7950. */
  7951. union {
  7952. struct {
  7953. A_UINT32 mac_id: 8,
  7954. reserved: 24;
  7955. };
  7956. A_UINT32 mac_id__word;
  7957. };
  7958. /** Num of instances where rate based DL OFDMA status = ENABLED */
  7959. A_UINT32 rate_based_dlofdma_enabled_count[HTT_NUM_AC_WMM];
  7960. /** Num of instances where rate based DL OFDMA status = DISABLED */
  7961. A_UINT32 rate_based_dlofdma_disabled_count[HTT_NUM_AC_WMM];
  7962. /** Num of instances where rate based DL OFDMA status = PROBING */
  7963. A_UINT32 rate_based_dlofdma_probing_count[HTT_NUM_AC_WMM];
  7964. /** Num of instances where rate based DL OFDMA status = MONITORING */
  7965. A_UINT32 rate_based_dlofdma_monitoring_count[HTT_NUM_AC_WMM];
  7966. /** Num of instances where avg. channel access latency based DL OFDMA status = ENABLED */
  7967. A_UINT32 chan_acc_lat_based_dlofdma_enabled_count[HTT_NUM_AC_WMM];
  7968. /** Num of instances where avg. channel access latency based DL OFDMA status = DISABLED */
  7969. A_UINT32 chan_acc_lat_based_dlofdma_disabled_count[HTT_NUM_AC_WMM];
  7970. /** Num of instances where avg. channel access latency based DL OFDMA status = MONITORING */
  7971. A_UINT32 chan_acc_lat_based_dlofdma_monitoring_count[HTT_NUM_AC_WMM];
  7972. /** Num of instances where dl ofdma is disabled due to ru allocation failure */
  7973. A_UINT32 downgrade_to_dl_su_ru_alloc_fail[HTT_NUM_AC_WMM];
  7974. /** Num of instances where dl ofdma is disabled because we have only one user in candidate list */
  7975. A_UINT32 candidate_list_single_user_disable_ofdma[HTT_NUM_AC_WMM];
  7976. /** Num of instances where ul is chosen over dl based on qos weight not specific to OFDMA */
  7977. A_UINT32 dl_cand_list_dropped_high_ul_qos_weight[HTT_NUM_AC_WMM];
  7978. /** Num of instances where dl ofdma is disabled due to pipelining */
  7979. A_UINT32 ax_dlofdma_disabled_due_to_pipelining[HTT_NUM_AC_WMM];
  7980. /** Num of instances where dl ofdma is disabled as the tid is su only eligible */
  7981. A_UINT32 dlofdma_disabled_su_only_eligible[HTT_NUM_AC_WMM];
  7982. /** Num of instances where dl ofdma is disabled because there are no mpdus tried consecutively */
  7983. A_UINT32 dlofdma_disabled_consec_no_mpdus_tried[HTT_NUM_AC_WMM];
  7984. /** Num of instances where dl ofdma is disabled because there are consecutive mpdu failure */
  7985. A_UINT32 dlofdma_disabled_consec_no_mpdus_success[HTT_NUM_AC_WMM];
  7986. A_UINT32 txbf_ofdma_ineligibility_stat[HTT_STATS_SCHED_OFDMA_TXBF_INELIGIBILITY_MAX];
  7987. } htt_pdev_sched_algo_ofdma_stats_tlv;
  7988. typedef struct {
  7989. htt_tlv_hdr_t tlv_hdr;
  7990. /** mac_id__word:
  7991. * BIT [ 7 : 0] :- mac_id
  7992. * Use the HTT_STATS_CMN_MAC_ID_GET,_SET macros to
  7993. * read/write this bitfield.
  7994. * BIT [31 : 8] :- reserved
  7995. */
  7996. A_UINT32 mac_id__word;
  7997. A_UINT32 basic_trigger_across_bss;
  7998. A_UINT32 basic_trigger_within_bss;
  7999. A_UINT32 bsr_trigger_across_bss;
  8000. A_UINT32 bsr_trigger_within_bss;
  8001. A_UINT32 mu_rts_across_bss;
  8002. A_UINT32 mu_rts_within_bss;
  8003. A_UINT32 ul_mumimo_trigger_across_bss;
  8004. A_UINT32 ul_mumimo_trigger_within_bss;
  8005. } htt_pdev_mbssid_ctrl_frame_stats_tlv;
  8006. typedef struct {
  8007. htt_tlv_hdr_t tlv_hdr;
  8008. /**
  8009. * BIT [ 7 : 0] :- mac_id
  8010. * Use the HTT_STATS_TDMA_MAC_ID_GET macro to extract
  8011. * this bitfield.
  8012. * BIT [31 : 8] :- reserved
  8013. */
  8014. union {
  8015. struct {
  8016. A_UINT32 mac_id: 8,
  8017. reserved: 24;
  8018. };
  8019. A_UINT32 mac_id__word;
  8020. };
  8021. /** Num of Active TDMA schedules */
  8022. A_UINT32 num_tdma_active_schedules;
  8023. /** Num of Reserved TDMA schedules */
  8024. A_UINT32 num_tdma_reserved_schedules;
  8025. /** Num of Restricted TDMA schedules */
  8026. A_UINT32 num_tdma_restricted_schedules;
  8027. /** Num of Unconfigured TDMA schedules */
  8028. A_UINT32 num_tdma_unconfigured_schedules;
  8029. /** Num of TDMA slot switches */
  8030. A_UINT32 num_tdma_slot_switches;
  8031. /** Num of TDMA EDCA switches */
  8032. A_UINT32 num_tdma_edca_switches;
  8033. } htt_pdev_tdma_stats_tlv;
  8034. #define HTT_STATS_TDMA_MAC_ID_M 0x000000ff
  8035. #define HTT_STATS_TDMA_MAC_ID_S 0
  8036. #define HTT_STATS_TDMA_MAC_ID_GET(_var) \
  8037. (((_var) & HTT_STATS_TDMA_MAC_ID_M) >> \
  8038. HTT_STATS_TDMA_MAC_ID_S)
  8039. /*======= Bandwidth Manager stats ====================*/
  8040. #define HTT_BW_MGR_STATS_MAC_ID_M 0x000000ff
  8041. #define HTT_BW_MGR_STATS_MAC_ID_S 0
  8042. #define HTT_BW_MGR_STATS_PRI20_IDX_M 0x0000ff00
  8043. #define HTT_BW_MGR_STATS_PRI20_IDX_S 8
  8044. #define HTT_BW_MGR_STATS_PRI20_FREQ_M 0xffff0000
  8045. #define HTT_BW_MGR_STATS_PRI20_FREQ_S 16
  8046. #define HTT_BW_MGR_STATS_CENTER_FREQ1_M 0x0000ffff
  8047. #define HTT_BW_MGR_STATS_CENTER_FREQ1_S 0
  8048. #define HTT_BW_MGR_STATS_CENTER_FREQ2_M 0xffff0000
  8049. #define HTT_BW_MGR_STATS_CENTER_FREQ2_S 16
  8050. #define HTT_BW_MGR_STATS_CHAN_PHY_MODE_M 0x000000ff
  8051. #define HTT_BW_MGR_STATS_CHAN_PHY_MODE_S 0
  8052. #define HTT_BW_MGR_STATS_STATIC_PATTERN_M 0x00ffff00
  8053. #define HTT_BW_MGR_STATS_STATIC_PATTERN_S 8
  8054. #define HTT_BW_MGR_STATS_MAC_ID_GET(_var) \
  8055. (((_var) & HTT_BW_MGR_STATS_MAC_ID_M) >> \
  8056. HTT_BW_MGR_STATS_MAC_ID_S)
  8057. #define HTT_BW_MGR_STATS_MAC_ID_SET(_var, _val) \
  8058. do { \
  8059. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_MAC_ID, _val); \
  8060. ((_var) |= ((_val) << HTT_BW_MGR_STATS_MAC_ID_S)); \
  8061. } while (0)
  8062. #define HTT_BW_MGR_STATS_PRI20_IDX_GET(_var) \
  8063. (((_var) & HTT_BW_MGR_STATS_PRI20_IDX_M) >> \
  8064. HTT_BW_MGR_STATS_PRI20_IDX_S)
  8065. #define HTT_BW_MGR_STATS_PRI20_IDX_SET(_var, _val) \
  8066. do { \
  8067. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_PRI20_IDX, _val); \
  8068. ((_var) |= ((_val) << HTT_BW_MGR_STATS_PRI20_IDX_S)); \
  8069. } while (0)
  8070. #define HTT_BW_MGR_STATS_PRI20_FREQ_GET(_var) \
  8071. (((_var) & HTT_BW_MGR_STATS_PRI20_FREQ_M) >> \
  8072. HTT_BW_MGR_STATS_PRI20_FREQ_S)
  8073. #define HTT_BW_MGR_STATS_PRI20_FREQ_SET(_var, _val) \
  8074. do { \
  8075. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_PRI20_FREQ, _val); \
  8076. ((_var) |= ((_val) << HTT_BW_MGR_STATS_PRI20_FREQ_S)); \
  8077. } while (0)
  8078. #define HTT_BW_MGR_STATS_CENTER_FREQ1_GET(_var) \
  8079. (((_var) & HTT_BW_MGR_STATS_CENTER_FREQ1_M) >> \
  8080. HTT_BW_MGR_STATS_CENTER_FREQ1_S)
  8081. #define HTT_BW_MGR_STATS_CENTER_FREQ1_SET(_var, _val) \
  8082. do { \
  8083. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_CENTER_FREQ1, _val); \
  8084. ((_var) |= ((_val) << HTT_BW_MGR_STATS_CENTER_FREQ1_S)); \
  8085. } while (0)
  8086. #define HTT_BW_MGR_STATS_CENTER_FREQ2_GET(_var) \
  8087. (((_var) & HTT_BW_MGR_STATS_CENTER_FREQ2_M) >> \
  8088. HTT_BW_MGR_STATS_CENTER_FREQ2_S)
  8089. #define HTT_BW_MGR_STATS_CENTER_FREQ2_SET(_var, _val) \
  8090. do { \
  8091. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_CENTER_FREQ2, _val); \
  8092. ((_var) |= ((_val) << HTT_BW_MGR_STATS_CENTER_FREQ2_S)); \
  8093. } while (0)
  8094. #define HTT_BW_MGR_STATS_CHAN_PHY_MODE_GET(_var) \
  8095. (((_var) & HTT_BW_MGR_STATS_CHAN_PHY_MODE_M) >> \
  8096. HTT_BW_MGR_STATS_CHAN_PHY_MODE_S)
  8097. #define HTT_BW_MGR_STATS_CHAN_PHY_MODE_SET(_var, _val) \
  8098. do { \
  8099. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_CHAN_PHY_MODE, _val); \
  8100. ((_var) |= ((_val) << HTT_BW_MGR_STATS_CHAN_PHY_MODE_S)); \
  8101. } while (0)
  8102. #define HTT_BW_MGR_STATS_STATIC_PATTERN_GET(_var) \
  8103. (((_var) & HTT_BW_MGR_STATS_STATIC_PATTERN_M) >> \
  8104. HTT_BW_MGR_STATS_STATIC_PATTERN_S)
  8105. #define HTT_BW_MGR_STATS_STATIC_PATTERN_SET(_var, _val) \
  8106. do { \
  8107. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_STATIC_PATTERN, _val); \
  8108. ((_var) |= ((_val) << HTT_BW_MGR_STATS_STATIC_PATTERN_S)); \
  8109. } while (0)
  8110. typedef struct {
  8111. htt_tlv_hdr_t tlv_hdr;
  8112. /* BIT [ 7 : 0] :- mac_id
  8113. * BIT [ 15 : 8] :- pri20_index
  8114. * BIT [ 31 : 16] :- pri20_freq in Mhz
  8115. */
  8116. A_UINT32 mac_id__pri20_idx__freq;
  8117. /* BIT [ 15 : 0] :- centre_freq1
  8118. * BIT [ 31 : 16] :- centre_freq2
  8119. */
  8120. A_UINT32 centre_freq1__freq2;
  8121. /* BIT [ 7 : 0] :- channel_phy_mode
  8122. * BIT [ 23 : 8] :- static_pattern
  8123. */
  8124. A_UINT32 phy_mode__static_pattern;
  8125. } htt_pdev_bw_mgr_stats_tlv;
  8126. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_BW_MGR
  8127. * TLV_TAGS:
  8128. * - HTT_STATS_PDEV_BW_MGR_STATS_TAG
  8129. */
  8130. /* NOTE:
  8131. * This structure is for documentation, and cannot be safely used directly.
  8132. * Instead, use the constituent TLV structures to fill/parse.
  8133. */
  8134. typedef struct {
  8135. htt_pdev_bw_mgr_stats_tlv bw_mgr_tlv;
  8136. } htt_pdev_bw_mgr_stats_t;
  8137. /*============= start MLO UMAC SSR stats ============= { */
  8138. typedef enum {
  8139. HTT_MLO_UMAC_SSR_DBG_POINT_INVALID = 0,
  8140. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_DISABLE_RXDMA_PREFETCH,
  8141. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_PMACS_HWMLOS,
  8142. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_GLOBAL_WSI,
  8143. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_PMACS_DMAC,
  8144. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_TCL,
  8145. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_TQM,
  8146. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_WBM,
  8147. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_REO,
  8148. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_HOST,
  8149. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_PREREQUISITES,
  8150. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_PRE_RING_RESET,
  8151. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_APPLY_SOFT_RESET,
  8152. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_POST_RING_RESET,
  8153. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_FW_TQM_CMDQS,
  8154. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_HOST,
  8155. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_UMAC_INTERRUPTS,
  8156. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_WBM,
  8157. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_REO,
  8158. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_TQM,
  8159. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_PMACS_DMAC,
  8160. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_TQM_SYNC_CMD,
  8161. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_GLOBAL_WSI,
  8162. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_PMACS_HWMLOS,
  8163. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_ENABLE_RXDMA_PREFETCH,
  8164. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_TCL,
  8165. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_HOST_ENQ,
  8166. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_VERIFY_UMAC_RECOVERED,
  8167. /* The below debug point values are reserved for future expansion. */
  8168. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED28,
  8169. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED29,
  8170. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED30,
  8171. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED31,
  8172. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED32,
  8173. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED33,
  8174. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED34,
  8175. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED35,
  8176. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED36,
  8177. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED37,
  8178. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED38,
  8179. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED39,
  8180. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED40,
  8181. /*
  8182. * Due to backwards compatibility requirements, no futher DBG_POINT values
  8183. * can be added (but the above reserved values can be repurposed).
  8184. */
  8185. HTT_MLO_UMAC_SSR_DBG_POINT_MAX,
  8186. } HTT_MLO_UMAC_SSR_DBG_POINTS;
  8187. typedef enum {
  8188. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_INVALID = 0,
  8189. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_DO_PRE_RESET,
  8190. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_DO_POST_RESET_START,
  8191. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_DO_POST_RESET_COMPLETE,
  8192. /* The below recovery handshake values are reserved for future expansion. */
  8193. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED4,
  8194. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED5,
  8195. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED6,
  8196. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED7,
  8197. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED8,
  8198. /*
  8199. * Due to backwards compatibility requirements, no futher
  8200. * RECOVERY_HANDSHAKE values can be added (but the above
  8201. * reserved values can be repurposed).
  8202. */
  8203. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_COUNT,
  8204. } HTT_MLO_UMAC_RECOVERY_HANDSHAKES;
  8205. typedef struct {
  8206. htt_tlv_hdr_t tlv_hdr;
  8207. A_UINT32 start_ms;
  8208. A_UINT32 end_ms;
  8209. A_UINT32 delta_ms;
  8210. A_UINT32 reserved;
  8211. A_UINT32 footprint; /* holds a HTT_MLO_UMAC_SSR_DBG_POINTS value */
  8212. A_UINT32 tqm_hw_tstamp;
  8213. } htt_mlo_umac_ssr_dbg_tlv;
  8214. typedef struct {
  8215. A_UINT32 last_mlo_htt_handshake_delta_ms;
  8216. A_UINT32 max_mlo_htt_handshake_delta_ms;
  8217. union {
  8218. A_UINT32 umac_recovery_done_mask;
  8219. struct {
  8220. A_UINT32 pre_reset_disable_rxdma_prefetch : 1,
  8221. pre_reset_pmacs_hwmlos : 1,
  8222. pre_reset_global_wsi : 1,
  8223. pre_reset_pmacs_dmac : 1,
  8224. pre_reset_tcl : 1,
  8225. pre_reset_tqm : 1,
  8226. pre_reset_wbm : 1,
  8227. pre_reset_reo : 1,
  8228. pre_reset_host : 1,
  8229. reset_prerequisites : 1,
  8230. reset_pre_ring_reset : 1,
  8231. reset_apply_soft_reset : 1,
  8232. reset_post_ring_reset : 1,
  8233. reset_fw_tqm_cmdqs : 1,
  8234. post_reset_host : 1,
  8235. post_reset_umac_interrupts : 1,
  8236. post_reset_wbm : 1,
  8237. post_reset_reo : 1,
  8238. post_reset_tqm : 1,
  8239. post_reset_pmacs_dmac : 1,
  8240. post_reset_tqm_sync_cmd : 1,
  8241. post_reset_global_wsi : 1,
  8242. post_reset_pmacs_hwmlos : 1,
  8243. post_reset_enable_rxdma_prefetch : 1,
  8244. post_reset_tcl : 1,
  8245. post_reset_host_enq : 1,
  8246. post_reset_verify_umac_recovered : 1,
  8247. reserved : 5;
  8248. } done_mask;
  8249. };
  8250. } htt_mlo_umac_ssr_mlo_stats_t;
  8251. typedef struct {
  8252. htt_tlv_hdr_t tlv_hdr;
  8253. htt_mlo_umac_ssr_mlo_stats_t mlo;
  8254. } htt_mlo_umac_ssr_mlo_stats_tlv;
  8255. /* dword0 - b'0 - PRE_RESET_DISABLE_RXDMA_PREFETCH */
  8256. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_M 0x1
  8257. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_S 0
  8258. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_GET(word0) \
  8259. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_M) >> \
  8260. HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_S)
  8261. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_SET(word0, _val) \
  8262. do { \
  8263. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH, _val); \
  8264. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_S));\
  8265. } while (0)
  8266. /* dword0 - b'1 - PRE_RESET_PMACS_HWMLOS */
  8267. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_M 0x2
  8268. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_S 1
  8269. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_GET(word0) \
  8270. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_M) >> \
  8271. HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_S)
  8272. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_SET(word0, _val) \
  8273. do { \
  8274. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS, _val); \
  8275. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_S));\
  8276. } while (0)
  8277. /* dword0 - b'2 - PRE_RESET_GLOBAL_WSI */
  8278. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_M 0x4
  8279. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_S 2
  8280. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_GET(word0) \
  8281. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_M) >> \
  8282. HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_S)
  8283. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_SET(word0, _val) \
  8284. do { \
  8285. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI, _val); \
  8286. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_S));\
  8287. } while (0)
  8288. /* dword0 - b'3 - PRE_RESET_PMACS_DMAC */
  8289. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_M 0x8
  8290. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_S 3
  8291. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_GET(word0) \
  8292. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_M) >> \
  8293. HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_S)
  8294. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_SET(word0, _val) \
  8295. do { \
  8296. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC, _val); \
  8297. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_S));\
  8298. } while (0)
  8299. /* dword0 - b'4 - PRE_RESET_TCL */
  8300. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_M 0x10
  8301. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_S 4
  8302. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_GET(word0) \
  8303. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_M) >> \
  8304. HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_S)
  8305. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_SET(word0, _val) \
  8306. do { \
  8307. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL, _val); \
  8308. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_S));\
  8309. } while (0)
  8310. /* dword0 - b'5 - PRE_RESET_TQM */
  8311. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_M 0x20
  8312. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_S 5
  8313. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_GET(word0) \
  8314. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_M) >> \
  8315. HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_S)
  8316. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_SET(word0, _val) \
  8317. do { \
  8318. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM, _val); \
  8319. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_S));\
  8320. } while (0)
  8321. /* dword0 - b'6 - PRE_RESET_WBM */
  8322. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_M 0x40
  8323. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_S 6
  8324. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_GET(word0) \
  8325. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_M) >> \
  8326. HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_S)
  8327. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_SET(word0, _val) \
  8328. do { \
  8329. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM, _val); \
  8330. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_S));\
  8331. } while (0)
  8332. /* dword0 - b'7 - PRE_RESET_REO */
  8333. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_M 0x80
  8334. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_S 7
  8335. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_GET(word0) \
  8336. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_M) >> \
  8337. HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_S)
  8338. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_SET(word0, _val) \
  8339. do { \
  8340. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO, _val); \
  8341. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_S));\
  8342. } while (0)
  8343. /* dword0 - b'8 - PRE_RESET_HOST */
  8344. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_M 0x100
  8345. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_S 8
  8346. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_GET(word0) \
  8347. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_M) >> \
  8348. HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_S)
  8349. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_SET(word0, _val) \
  8350. do { \
  8351. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST, _val); \
  8352. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_S));\
  8353. } while (0)
  8354. /* dword0 - b'9 - RESET_PREREQUISITES */
  8355. #define HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_M 0x200
  8356. #define HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_S 9
  8357. #define HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_GET(word0) \
  8358. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_M) >> \
  8359. HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_S)
  8360. #define HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_SET(word0, _val) \
  8361. do { \
  8362. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES, _val); \
  8363. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_S));\
  8364. } while (0)
  8365. /* dword0 - b'10 - RESET_PRE_RING_RESET */
  8366. #define HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_M 0x400
  8367. #define HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_S 10
  8368. #define HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_GET(word0) \
  8369. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_M) >> \
  8370. HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_S)
  8371. #define HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_SET(word0, _val) \
  8372. do { \
  8373. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET, _val); \
  8374. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_S));\
  8375. } while (0)
  8376. /* dword0 - b'11 - RESET_APPLY_SOFT_RESET */
  8377. #define HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_M 0x800
  8378. #define HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_S 11
  8379. #define HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_GET(word0) \
  8380. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_M) >> \
  8381. HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_S)
  8382. #define HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_SET(word0, _val) \
  8383. do { \
  8384. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET, _val); \
  8385. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_S));\
  8386. } while (0)
  8387. /* dword0 - b'12 - RESET_POST_RING_RESET */
  8388. #define HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_M 0x1000
  8389. #define HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_S 12
  8390. #define HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_GET(word0) \
  8391. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_M) >> \
  8392. HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_S)
  8393. #define HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_SET(word0, _val) \
  8394. do { \
  8395. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET, _val); \
  8396. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_S));\
  8397. } while (0)
  8398. /* dword0 - b'13 - RESET_FW_TQM_CMDQS */
  8399. #define HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_M 0x2000
  8400. #define HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_S 13
  8401. #define HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_GET(word0) \
  8402. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_M) >> \
  8403. HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_S)
  8404. #define HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_SET(word0, _val) \
  8405. do { \
  8406. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS, _val); \
  8407. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_S));\
  8408. } while (0)
  8409. /* dword0 - b'14 - POST_RESET_HOST */
  8410. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_M 0x4000
  8411. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_S 14
  8412. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_GET(word0) \
  8413. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_M) >> \
  8414. HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_S)
  8415. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_SET(word0, _val) \
  8416. do { \
  8417. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST, _val); \
  8418. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_S));\
  8419. } while (0)
  8420. /* dword0 - b'15 - POST_RESET_UMAC_INTERRUPTS */
  8421. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_M 0x8000
  8422. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_S 15
  8423. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_GET(word0) \
  8424. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_M) >> \
  8425. HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_S)
  8426. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_SET(word0, _val) \
  8427. do { \
  8428. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS, _val); \
  8429. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_S));\
  8430. } while (0)
  8431. /* dword0 - b'16 - POST_RESET_WBM */
  8432. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_M 0x10000
  8433. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_S 16
  8434. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_GET(word0) \
  8435. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_M) >> \
  8436. HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_S)
  8437. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_SET(word0, _val) \
  8438. do { \
  8439. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM, _val); \
  8440. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_S));\
  8441. } while (0)
  8442. /* dword0 - b'17 - POST_RESET_REO */
  8443. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_M 0x20000
  8444. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_S 17
  8445. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_GET(word0) \
  8446. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_M) >> \
  8447. HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_S)
  8448. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_SET(word0, _val) \
  8449. do { \
  8450. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_REO, _val); \
  8451. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_S));\
  8452. } while (0)
  8453. /* dword0 - b'18 - POST_RESET_TQM */
  8454. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_M 0x40000
  8455. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_S 18
  8456. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_GET(word0) \
  8457. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_M) >> \
  8458. HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_S)
  8459. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SET(word0, _val) \
  8460. do { \
  8461. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM, _val); \
  8462. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_S));\
  8463. } while (0)
  8464. /* dword0 - b'19 - POST_RESET_PMACS_DMAC */
  8465. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_M 0x80000
  8466. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_S 19
  8467. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_GET(word0) \
  8468. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_M) >> \
  8469. HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_S)
  8470. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_SET(word0, _val) \
  8471. do { \
  8472. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC, _val); \
  8473. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_S));\
  8474. } while (0)
  8475. /* dword0 - b'20 - POST_RESET_TQM_SYNC_CMD */
  8476. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_M 0x100000
  8477. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_S 20
  8478. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_GET(word0) \
  8479. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_M) >> \
  8480. HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_S)
  8481. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_SET(word0, _val) \
  8482. do { \
  8483. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD, _val); \
  8484. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_S));\
  8485. } while (0)
  8486. /* dword0 - b'21 - POST_RESET_GLOBAL_WSI */
  8487. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_M 0x200000
  8488. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_S 21
  8489. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_GET(word0) \
  8490. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_M) >> \
  8491. HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_S)
  8492. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_SET(word0, _val) \
  8493. do { \
  8494. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI, _val); \
  8495. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_S));\
  8496. } while (0)
  8497. /* dword0 - b'22 - POST_RESET_PMACS_HWMLOS */
  8498. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_M 0x400000
  8499. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_S 22
  8500. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_GET(word0) \
  8501. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_M) >> \
  8502. HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_S)
  8503. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_SET(word0, _val) \
  8504. do { \
  8505. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS, _val); \
  8506. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_S));\
  8507. } while (0)
  8508. /* dword0 - b'23 - POST_RESET_ENABLE_RXDMA_PREFETCH */
  8509. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_M 0x800000
  8510. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_S 23
  8511. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_GET(word0) \
  8512. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_M) >> \
  8513. HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_S)
  8514. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_SET(word0, _val) \
  8515. do { \
  8516. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH, _val); \
  8517. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_S));\
  8518. } while (0)
  8519. /* dword0 - b'24 - POST_RESET_TCL */
  8520. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_M 0x1000000
  8521. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_S 24
  8522. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_GET(word0) \
  8523. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_M) >> \
  8524. HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_S)
  8525. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_SET(word0, _val) \
  8526. do { \
  8527. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL, _val); \
  8528. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_S));\
  8529. } while (0)
  8530. /* dword0 - b'25 - POST_RESET_HOST_ENQ */
  8531. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_M 0x2000000
  8532. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_S 25
  8533. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_GET(word0) \
  8534. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_M) >> \
  8535. HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_S)
  8536. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_SET(word0, _val) \
  8537. do { \
  8538. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ, _val); \
  8539. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_S));\
  8540. } while (0)
  8541. /* dword0 - b'26 - POST_RESET_VERIFY_UMAC_RECOVERED */
  8542. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_M 0x4000000
  8543. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_S 26
  8544. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_GET(word0) \
  8545. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_M) >> \
  8546. HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_S)
  8547. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_SET(word0, _val) \
  8548. do { \
  8549. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED, _val); \
  8550. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_S));\
  8551. } while (0)
  8552. typedef struct {
  8553. htt_tlv_hdr_t tlv_hdr;
  8554. A_UINT32 last_trigger_request_ms;
  8555. A_UINT32 last_start_ms;
  8556. A_UINT32 last_start_disengage_umac_ms;
  8557. A_UINT32 last_enter_ssr_platform_thread_ms;
  8558. A_UINT32 last_exit_ssr_platform_thread_ms;
  8559. A_UINT32 last_start_engage_umac_ms;
  8560. A_UINT32 last_done_successful_ms;
  8561. A_UINT32 post_reset_tqm_sync_cmd_completion_ms;
  8562. A_UINT32 htt_sync_mlo_initiate_umac_recovery_ms;
  8563. A_UINT32 htt_sync_do_pre_reset_ms;
  8564. A_UINT32 htt_sync_do_post_reset_start_ms;
  8565. A_UINT32 htt_sync_do_post_reset_complete_ms;
  8566. } htt_mlo_umac_ssr_kpi_tstamp_stats_tlv;
  8567. typedef struct {
  8568. htt_tlv_hdr_t tlv_hdr;
  8569. A_UINT32 htt_sync_start_ms;
  8570. A_UINT32 htt_sync_delta_ms;
  8571. A_UINT32 post_t2h_start_ms;
  8572. A_UINT32 post_t2h_delta_ms;
  8573. A_UINT32 post_t2h_msg_read_shmem_ms;
  8574. A_UINT32 post_t2h_msg_write_shmem_ms;
  8575. A_UINT32 post_t2h_msg_send_msg_to_host_ms;
  8576. } htt_mlo_umac_htt_handshake_stats_tlv;
  8577. typedef struct {
  8578. /*
  8579. * Note that the host cannot use this struct directly, but instead needs
  8580. * to use the TLV header within each element of each of the arrays in
  8581. * this struct to determine where the subsequent item resides.
  8582. */
  8583. htt_mlo_umac_ssr_dbg_tlv dbg_point[HTT_MLO_UMAC_SSR_DBG_POINT_MAX];
  8584. htt_mlo_umac_htt_handshake_stats_tlv htt_handshakes[HTT_MLO_UMAC_RECOVERY_HANDSHAKE_COUNT];
  8585. } htt_mlo_umac_ssr_kpi_delta_stats_t;
  8586. typedef struct {
  8587. /*
  8588. * Since each item within htt_mlo_umac_ssr_kpi_delta_stats_t has its own
  8589. * TLV header, and since no additional fields are added in this struct
  8590. * beyond the htt_mlo_umac_ssr_kpi_delta_stats_t info, no additional
  8591. * TLV header is needed.
  8592. *
  8593. * Note that the host cannot use this struct directly, but instead needs
  8594. * to use the TLV header within each item inside the
  8595. * htt_mlo_umac_ssr_kpi_delta_stats_t to determine where the subsequent
  8596. * item resides.
  8597. */
  8598. htt_mlo_umac_ssr_kpi_delta_stats_t kpi_delta;
  8599. } htt_mlo_umac_ssr_kpi_delta_stats_tlv;
  8600. typedef struct {
  8601. A_UINT32 last_e2e_delta_ms;
  8602. A_UINT32 max_e2e_delta_ms;
  8603. A_UINT32 per_handshake_max_allowed_delta_ms;
  8604. /* Total done count */
  8605. A_UINT32 total_success_runs_cnt;
  8606. A_UINT32 umac_recovery_in_progress;
  8607. /* Count of Disengaged in Pre reset */
  8608. A_UINT32 umac_disengaged_count;
  8609. /* Count of UMAC Soft/Control Reset */
  8610. A_UINT32 umac_soft_reset_count;
  8611. /* Count of Engaged in Post reset */
  8612. A_UINT32 umac_engaged_count;
  8613. } htt_mlo_umac_ssr_common_stats_t;
  8614. typedef struct {
  8615. htt_tlv_hdr_t tlv_hdr;
  8616. htt_mlo_umac_ssr_common_stats_t cmn;
  8617. } htt_mlo_umac_ssr_common_stats_tlv;
  8618. typedef struct {
  8619. A_UINT32 trigger_requests_count;
  8620. A_UINT32 trigger_count_for_umac_hang;
  8621. A_UINT32 trigger_count_for_mlo_target_recovery_mode1;
  8622. A_UINT32 trigger_count_for_unknown_signature;
  8623. A_UINT32 total_trig_dropped;
  8624. A_UINT32 trigger_count_for_unit_test_direct_trigger;
  8625. A_UINT32 trigger_count_for_tx_de_wdg_dummy_frame_tout;
  8626. A_UINT32 trigger_count_for_peer_delete_wdg_dummy_frame_tout;
  8627. A_UINT32 trigger_count_for_reo_hang;
  8628. A_UINT32 trigger_count_for_tqm_hang;
  8629. A_UINT32 trigger_count_for_tcl_hang;
  8630. A_UINT32 trigger_count_for_wbm_hang;
  8631. } htt_mlo_umac_ssr_trigger_stats_t;
  8632. typedef struct {
  8633. htt_tlv_hdr_t tlv_hdr;
  8634. htt_mlo_umac_ssr_trigger_stats_t trigger;
  8635. } htt_mlo_umac_ssr_trigger_stats_tlv;
  8636. typedef struct {
  8637. /*
  8638. * Note that the host cannot use this struct directly, but instead needs
  8639. * to use the TLV header within each element to determine where the
  8640. * subsequent element resides.
  8641. */
  8642. htt_mlo_umac_ssr_kpi_delta_stats_tlv kpi_delta_tlv;
  8643. htt_mlo_umac_ssr_kpi_tstamp_stats_tlv kpi_tstamp_tlv;
  8644. } htt_mlo_umac_ssr_kpi_stats_t;
  8645. typedef struct {
  8646. /*
  8647. * Since the embedded sub-struct within htt_mlo_umac_ssr_kpi_stats_tlv
  8648. * has its own TLV header, and since no additional fields are added in
  8649. * this struct beyond the htt_mlo_umac_ssr_kpi_stats_t info, no additional
  8650. * TLV header is needed.
  8651. *
  8652. * Note that the host cannot use this struct directly, but instead needs
  8653. * to use the TLV header within the htt_mlo_umac_ssr_kpi_stats_t sub-struct
  8654. * to determine how much data is present for this struct.
  8655. */
  8656. htt_mlo_umac_ssr_kpi_stats_t kpi;
  8657. } htt_mlo_umac_ssr_kpi_stats_tlv;
  8658. typedef struct {
  8659. /*
  8660. * Note that the host cannot use this struct directly, but instead needs
  8661. * to use the TLV header within each element to determine where the
  8662. * subsequent element resides.
  8663. */
  8664. htt_mlo_umac_ssr_trigger_stats_tlv trigger_tlv;
  8665. htt_mlo_umac_ssr_kpi_stats_tlv kpi_tlv;
  8666. htt_mlo_umac_ssr_mlo_stats_tlv mlo_tlv;
  8667. htt_mlo_umac_ssr_common_stats_tlv cmn_tlv;
  8668. } htt_mlo_umac_ssr_stats_tlv;
  8669. /*============= end MLO UMAC SSR stats ============= } */
  8670. typedef struct {
  8671. A_UINT32 total_done;
  8672. A_UINT32 trigger_requests_count;
  8673. A_UINT32 total_trig_dropped;
  8674. A_UINT32 umac_disengaged_count;
  8675. A_UINT32 umac_soft_reset_count;
  8676. A_UINT32 umac_engaged_count;
  8677. A_UINT32 last_trigger_request_ms;
  8678. A_UINT32 last_start_ms;
  8679. A_UINT32 last_start_disengage_umac_ms;
  8680. A_UINT32 last_enter_ssr_platform_thread_ms;
  8681. A_UINT32 last_exit_ssr_platform_thread_ms;
  8682. A_UINT32 last_start_engage_umac_ms;
  8683. A_UINT32 last_done_successful_ms;
  8684. A_UINT32 last_e2e_delta_ms;
  8685. A_UINT32 max_e2e_delta_ms;
  8686. A_UINT32 trigger_count_for_umac_hang;
  8687. A_UINT32 trigger_count_for_mlo_quick_ssr;
  8688. A_UINT32 trigger_count_for_unknown_signature;
  8689. A_UINT32 post_reset_tqm_sync_cmd_completion_ms;
  8690. A_UINT32 htt_sync_mlo_initiate_umac_recovery_ms;
  8691. A_UINT32 htt_sync_do_pre_reset_ms;
  8692. A_UINT32 htt_sync_do_post_reset_start_ms;
  8693. A_UINT32 htt_sync_do_post_reset_complete_ms;
  8694. } htt_umac_ssr_stats_t;
  8695. typedef struct {
  8696. htt_tlv_hdr_t tlv_hdr;
  8697. htt_umac_ssr_stats_t stats;
  8698. } htt_umac_ssr_stats_tlv;
  8699. typedef struct {
  8700. htt_tlv_hdr_t tlv_hdr;
  8701. A_UINT32 svc_class_id;
  8702. /* codel_drops:
  8703. * How many times have MSDU queues belonging to this service class
  8704. * dropped their head MSDU due to the queue's latency being above
  8705. * the CoDel latency limit specified for the service class throughout
  8706. * the full CoDel latency statistics collection window.
  8707. */
  8708. A_UINT32 codel_drops;
  8709. /* codel_no_drops:
  8710. * How many times have MSDU queues belonging to this service class
  8711. * completed a CoDel latency statistics collection window and
  8712. * concluded that no head MSDU drop is needed, due to the MSDU queue's
  8713. * latency being under the limit specified for the service class at
  8714. * some point during the window.
  8715. */
  8716. A_UINT32 codel_no_drops;
  8717. } htt_codel_svc_class_stats_tlv;
  8718. #define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_M 0x0000FFFF
  8719. #define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S 0
  8720. #define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_GET(_var) \
  8721. (((_var) & HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_M) >> \
  8722. HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S)
  8723. #define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_SET(_var, _val) \
  8724. do { \
  8725. HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM, _val); \
  8726. ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S)); \
  8727. } while (0)
  8728. #define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_M 0x00FF0000
  8729. #define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S 16
  8730. #define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_GET(_var) \
  8731. (((_var) & HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_M) >> \
  8732. HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S)
  8733. #define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_SET(_var, _val) \
  8734. do { \
  8735. HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID, _val); \
  8736. ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S)); \
  8737. } while (0)
  8738. #define HTT_CODEL_MSDUQ_STATS_DROPS_M 0x0000FFFF
  8739. #define HTT_CODEL_MSDUQ_STATS_DROPS_S 0
  8740. #define HTT_CODEL_MSDUQ_STATS_DROPS_GET(_var) \
  8741. (((_var) & HTT_CODEL_MSDUQ_STATS_DROPS_M) >> \
  8742. HTT_CODEL_MSDUQ_STATS_DROPS_S)
  8743. #define HTT_CODEL_MSDUQ_STATS_DROPS_SET(_var, _val) \
  8744. do { \
  8745. HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_DROPS, _val); \
  8746. ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_DROPS_S)); \
  8747. } while (0)
  8748. #define HTT_CODEL_MSDUQ_STATS_NO_DROPS_M 0xFFFF0000
  8749. #define HTT_CODEL_MSDUQ_STATS_NO_DROPS_S 16
  8750. #define HTT_CODEL_MSDUQ_STATS_NO_DROPS_GET(_var) \
  8751. (((_var) & HTT_CODEL_MSDUQ_STATS_NO_DROPS_M) >> \
  8752. HTT_CODEL_MSDUQ_STATS_NO_DROPS_S)
  8753. #define HTT_CODEL_MSDUQ_STATS_NO_DROPS_SET(_var, _val) \
  8754. do { \
  8755. HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_NO_DROPS, _val); \
  8756. ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_NO_DROPS_S)); \
  8757. } while (0)
  8758. typedef struct {
  8759. htt_tlv_hdr_t tlv_hdr;
  8760. union {
  8761. A_UINT32 id__word;
  8762. struct {
  8763. A_UINT32 tx_flow_num: 16, /* FW's MSDU queue ID */
  8764. svc_class_id: 8,
  8765. reserved: 8;
  8766. };
  8767. };
  8768. union {
  8769. A_UINT32 stats__word;
  8770. struct {
  8771. A_UINT32
  8772. codel_drops: 16,
  8773. codel_no_drops: 16;
  8774. };
  8775. };
  8776. } htt_codel_msduq_stats_tlv;
  8777. /*===================== start MLO stats ====================*/
  8778. typedef struct {
  8779. htt_tlv_hdr_t tlv_hdr;
  8780. A_UINT32 pref_link_num_sec_link_sched;
  8781. A_UINT32 pref_link_num_pref_link_timeout;
  8782. A_UINT32 pref_link_num_pref_link_sch_delay_ipc;
  8783. A_UINT32 pref_link_num_pref_link_timeout_ipc;
  8784. } htt_mlo_sched_stats_tlv;
  8785. /* STATS_TYPE : HTT_DBG_MLO_SCHED_STATS
  8786. * TLV_TAGS:
  8787. * - HTT_STATS_MLO_SCHED_STATS_TAG
  8788. */
  8789. /* NOTE:
  8790. * This structure is for documentation, and cannot be safely used directly.
  8791. * Instead, use the constituent TLV structures to fill/parse.
  8792. */
  8793. typedef struct _htt_mlo_sched_stats {
  8794. htt_mlo_sched_stats_tlv preferred_link_stats;
  8795. } htt_mlo_sched_stats_t;
  8796. #define HTT_STATS_HWMLO_MAX_LINKS 6
  8797. #define HTT_STATS_MLO_MAX_IPC_RINGS 7
  8798. typedef struct {
  8799. htt_tlv_hdr_t tlv_hdr;
  8800. A_UINT32 mlo_ipc_ring_full_cnt[HTT_STATS_HWMLO_MAX_LINKS][HTT_STATS_MLO_MAX_IPC_RINGS];
  8801. } htt_pdev_mlo_ipc_stats_tlv;
  8802. /* STATS_TYPE : HTT_DBG_MLO_IPC_STATS
  8803. * TLV_TAGS:
  8804. * - HTT_STATS_PDEV_MLO_IPC_STATS_TAG
  8805. */
  8806. /* NOTE:
  8807. * This structure is for documentation, and cannot be safely used directly.
  8808. * Instead, use the constituent TLV structures to fill/parse.
  8809. */
  8810. typedef struct _htt_mlo_ipc_stats {
  8811. htt_pdev_mlo_ipc_stats_tlv mlo_ipc_stats;
  8812. } htt_pdev_mlo_ipc_stats_t;
  8813. /*===================== end MLO stats ======================*/
  8814. typedef enum {
  8815. HTT_CTRL_PATH_STATS_CAL_TYPE_ADC = 0x0,
  8816. HTT_CTRL_PATH_STATS_CAL_TYPE_DAC = 0x1,
  8817. HTT_CTRL_PATH_STATS_CAL_TYPE_PROCESS = 0x2,
  8818. HTT_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR = 0x3,
  8819. HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO = 0x4,
  8820. HTT_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ = 0x5,
  8821. HTT_CTRL_PATH_STATS_CAL_TYPE_TXLO = 0x6,
  8822. HTT_CTRL_PATH_STATS_CAL_TYPE_TXIQ = 0x7,
  8823. HTT_CTRL_PATH_STATS_CAL_TYPE_RXIQ = 0x8,
  8824. HTT_CTRL_PATH_STATS_CAL_TYPE_IM2 = 0x9,
  8825. HTT_CTRL_PATH_STATS_CAL_TYPE_LNA = 0xa,
  8826. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO = 0xb,
  8827. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ = 0xc,
  8828. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS = 0xd,
  8829. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY = 0xe,
  8830. HTT_CTRL_PATH_STATS_CAL_TYPE_IBF = 0xf,
  8831. HTT_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL = 0x10,
  8832. HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ = 0x11,
  8833. HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM = 0x12,
  8834. HTT_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL = 0x13,
  8835. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ = 0x14,
  8836. HTT_CTRL_PATH_STATS_CAL_TYPE_BWFILTER = 0x15,
  8837. HTT_CTRL_PATH_STATS_CAL_TYPE_PEF = 0x16,
  8838. HTT_CTRL_PATH_STATS_CAL_TYPE_PADROOP = 0x17,
  8839. HTT_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC = 0x18,
  8840. /* add new cal types above this line */
  8841. HTT_CTRL_PATH_STATS_CAL_TYPE_INVALID = 0xFF
  8842. } htt_ctrl_path_stats_cal_type_ids;
  8843. #define HTT_RETURN_STRING(str) case ((str)): return (A_UINT8 *)(# str);
  8844. #define HTT_GET_BITS(_val, _index, _num_bits) \
  8845. (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
  8846. #define HTT_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_GET(cal_info) \
  8847. HTT_GET_BITS(cal_info, 0, 8)
  8848. /*
  8849. * Used by some hosts to print names of cal type, based on
  8850. * htt_ctrl_path_cal_type_ids values specified in
  8851. * htt_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  8852. */
  8853. #ifdef HTT_CTRL_PATH_STATS_CAL_TYPE_STRINGS
  8854. static INLINE A_UINT8 *htt_ctrl_path_cal_type_id_to_name(A_UINT32 cal_type_id)
  8855. {
  8856. switch (cal_type_id)
  8857. {
  8858. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_ADC);
  8859. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DAC);
  8860. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_PROCESS);
  8861. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR);
  8862. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO);
  8863. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ);
  8864. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_TXLO);
  8865. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_TXIQ);
  8866. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_RXIQ);
  8867. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_IM2);
  8868. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_LNA);
  8869. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO);
  8870. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ);
  8871. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS);
  8872. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY);
  8873. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_IBF);
  8874. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL);
  8875. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ);
  8876. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM);
  8877. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL);
  8878. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ);
  8879. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_BWFILTER);
  8880. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_PEF);
  8881. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_PADROOP);
  8882. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC);
  8883. }
  8884. return (A_UINT8 *) "HTT_CTRL_PATH_STATS_CAL_TYPE_UNKNOWN";
  8885. }
  8886. #endif /* HTT_CTRL_PATH_STATS_CAL_TYPE_STRINGS */
  8887. #endif /* __HTT_STATS_H__ */