htt_stats.h 409 KB

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