htt_stats.h 409 KB

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