htt_stats.h 409 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564
  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. A_UINT32 arp_response;
  4088. A_UINT32 arp_request;
  4089. } htt_stats_tx_de_classify_stats_tlv;
  4090. /* preserve old name alias for new name consistent with the tag name */
  4091. typedef htt_stats_tx_de_classify_stats_tlv htt_tx_de_classify_stats_tlv;
  4092. typedef struct {
  4093. htt_tlv_hdr_t tlv_hdr;
  4094. A_UINT32 eok;
  4095. A_UINT32 classify_done;
  4096. A_UINT32 lookup_failed;
  4097. A_UINT32 send_host_dhcp;
  4098. A_UINT32 send_host_mcast;
  4099. A_UINT32 send_host_unknown_dest;
  4100. A_UINT32 send_host;
  4101. A_UINT32 status_invalid;
  4102. } htt_stats_tx_de_classify_status_tlv;
  4103. /* preserve old name alias for new name consistent with the tag name */
  4104. typedef htt_stats_tx_de_classify_status_tlv htt_tx_de_classify_status_stats_tlv;
  4105. typedef struct {
  4106. htt_tlv_hdr_t tlv_hdr;
  4107. A_UINT32 enqueued_pkts;
  4108. A_UINT32 to_tqm;
  4109. A_UINT32 to_tqm_bypass;
  4110. } htt_stats_tx_de_enqueue_packets_tlv;
  4111. /* preserve old name alias for new name consistent with the tag name */
  4112. typedef htt_stats_tx_de_enqueue_packets_tlv htt_tx_de_enqueue_packets_stats_tlv;
  4113. typedef struct {
  4114. htt_tlv_hdr_t tlv_hdr;
  4115. A_UINT32 discarded_pkts;
  4116. A_UINT32 local_frames;
  4117. A_UINT32 is_ext_msdu;
  4118. } htt_stats_tx_de_enqueue_discard_tlv;
  4119. /* preserve old name alias for new name consistent with the tag name */
  4120. typedef htt_stats_tx_de_enqueue_discard_tlv htt_tx_de_enqueue_discard_stats_tlv;
  4121. typedef struct {
  4122. htt_tlv_hdr_t tlv_hdr;
  4123. A_UINT32 tcl_dummy_frame;
  4124. A_UINT32 tqm_dummy_frame;
  4125. A_UINT32 tqm_notify_frame;
  4126. A_UINT32 fw2wbm_enq;
  4127. A_UINT32 tqm_bypass_frame;
  4128. } htt_stats_tx_de_compl_stats_tlv;
  4129. /* preserve old name alias for new name consistent with the tag name */
  4130. typedef htt_stats_tx_de_compl_stats_tlv htt_tx_de_compl_stats_tlv;
  4131. #define HTT_TX_DE_CMN_STATS_MAC_ID_M 0x000000ff
  4132. #define HTT_TX_DE_CMN_STATS_MAC_ID_S 0
  4133. #define HTT_TX_DE_CMN_STATS_MAC_ID_GET(_var) \
  4134. (((_var) & HTT_TX_DE_CMN_STATS_MAC_ID_M) >> \
  4135. HTT_TX_DE_CMN_STATS_MAC_ID_S)
  4136. #define HTT_TX_DE_CMN_STATS_MAC_ID_SET(_var, _val) \
  4137. do { \
  4138. HTT_CHECK_SET_VAL(HTT_TX_DE_CMN_STATS_MAC_ID, _val); \
  4139. ((_var) |= ((_val) << HTT_TX_DE_CMN_STATS_MAC_ID_S)); \
  4140. } while (0)
  4141. /*
  4142. * The htt_tx_de_fw2wbm_ring_full_hist_tlv is a histogram of time we waited
  4143. * for the fw2wbm ring buffer. we are requesting a buffer in FW2WBM release
  4144. * ring,which may fail, due to non availability of buffer. Hence we sleep for
  4145. * 200us & again request for it. This is a histogram of time we wait, with
  4146. * bin of 200ms & there are 10 bin (2 seconds max)
  4147. * They are defined by the following macros in FW
  4148. * #define ENTRIES_PER_BIN_COUNT 1000 // per bin 1000 * 200us = 200ms
  4149. * #define RING_FULL_BIN_ENTRIES (WAL_TX_DE_FW2WBM_ALLOC_TIMEOUT_COUNT /
  4150. * ENTRIES_PER_BIN_COUNT)
  4151. */
  4152. typedef struct {
  4153. htt_tlv_hdr_t tlv_hdr;
  4154. A_UINT32 fw2wbm_ring_full_hist[1];
  4155. } htt_stats_tx_de_fw2wbm_ring_full_hist_tlv;
  4156. /* preserve old name alias for new name consistent with the tag name */
  4157. typedef htt_stats_tx_de_fw2wbm_ring_full_hist_tlv
  4158. htt_tx_de_fw2wbm_ring_full_hist_tlv;
  4159. typedef struct {
  4160. htt_tlv_hdr_t tlv_hdr;
  4161. /**
  4162. * BIT [ 7 : 0] :- mac_id
  4163. * BIT [31 : 8] :- reserved
  4164. */
  4165. A_UINT32 mac_id__word;
  4166. /* Global Stats */
  4167. A_UINT32 tcl2fw_entry_count;
  4168. A_UINT32 not_to_fw;
  4169. A_UINT32 invalid_pdev_vdev_peer;
  4170. A_UINT32 tcl_res_invalid_addrx;
  4171. A_UINT32 wbm2fw_entry_count;
  4172. A_UINT32 invalid_pdev;
  4173. A_UINT32 tcl_res_addrx_timeout;
  4174. A_UINT32 invalid_vdev;
  4175. A_UINT32 invalid_tcl_exp_frame_desc;
  4176. A_UINT32 vdev_id_mismatch_cnt;
  4177. } htt_stats_tx_de_cmn_tlv;
  4178. /* preserve old name alias for new name consistent with the tag name */
  4179. typedef htt_stats_tx_de_cmn_tlv htt_tx_de_cmn_stats_tlv;
  4180. #define HTT_STATS_RX_FW_RING_SIZE_NUM_ENTRIES(dword) ((dword >> 0) & 0xffff)
  4181. #define HTT_STATS_RX_FW_RING_CURR_NUM_ENTRIES(dword) ((dword >> 16) & 0xffff)
  4182. /* Rx debug info for status rings */
  4183. typedef struct {
  4184. htt_tlv_hdr_t tlv_hdr;
  4185. /**
  4186. * BIT [15 : 0] :- max possible number of entries in respective ring
  4187. * (size of the ring in terms of entries)
  4188. * BIT [16 : 31] :- current number of entries occupied in respective ring
  4189. */
  4190. A_UINT32 entry_status_sw2rxdma;
  4191. A_UINT32 entry_status_rxdma2reo;
  4192. A_UINT32 entry_status_reo2sw1;
  4193. A_UINT32 entry_status_reo2sw4;
  4194. A_UINT32 entry_status_refillringipa;
  4195. A_UINT32 entry_status_refillringhost;
  4196. /** datarate - Moving Average of Number of Entries */
  4197. A_UINT32 datarate_refillringipa;
  4198. A_UINT32 datarate_refillringhost;
  4199. /**
  4200. * refillringhost_backpress_hist and refillringipa_backpress_hist are
  4201. * deprecated, and will be filled with 0x0 by the target.
  4202. */
  4203. A_UINT32 refillringhost_backpress_hist[3];
  4204. A_UINT32 refillringipa_backpress_hist[3];
  4205. /**
  4206. * Number of times reo2sw4(IPA_DEST_RING) ring is back-pressured
  4207. * in recent time periods
  4208. * element 0: in last 0 to 250ms
  4209. * element 1: 250ms to 500ms
  4210. * element 2: above 500ms
  4211. */
  4212. A_UINT32 reo2sw4ringipa_backpress_hist[3];
  4213. } htt_stats_rx_ring_stats_tlv;
  4214. /* preserve old name alias for new name consistent with the tag name */
  4215. typedef htt_stats_rx_ring_stats_tlv htt_rx_fw_ring_stats_tlv_v;
  4216. /* STATS_TYPE : HTT_DBG_EXT_STATS_TX_DE_INFO
  4217. * TLV_TAGS:
  4218. * - HTT_STATS_TX_DE_CMN_TAG
  4219. * - HTT_STATS_TX_DE_FW2WBM_RING_FULL_HIST_TAG
  4220. * - HTT_STATS_TX_DE_EAPOL_PACKETS_TAG
  4221. * - HTT_STATS_TX_DE_CLASSIFY_STATS_TAG
  4222. * - HTT_STATS_TX_DE_CLASSIFY_FAILED_TAG
  4223. * - HTT_STATS_TX_DE_CLASSIFY_STATUS_TAG
  4224. * - HTT_STATS_TX_DE_ENQUEUE_PACKETS_TAG
  4225. * - HTT_STATS_TX_DE_ENQUEUE_DISCARD_TAG
  4226. * - HTT_STATS_TX_DE_COMPL_STATS_TAG
  4227. */
  4228. /* NOTE:
  4229. * This structure is for documentation, and cannot be safely used directly.
  4230. * Instead, use the constituent TLV structures to fill/parse.
  4231. */
  4232. typedef struct {
  4233. htt_stats_tx_de_cmn_tlv cmn_tlv;
  4234. htt_stats_tx_de_fw2wbm_ring_full_hist_tlv fw2wbm_hist_tlv;
  4235. htt_stats_tx_de_eapol_packets_tlv eapol_stats_tlv;
  4236. htt_stats_tx_de_classify_stats_tlv classify_stats_tlv;
  4237. htt_stats_tx_de_classify_failed_tlv classify_failed_tlv;
  4238. htt_stats_tx_de_classify_status_tlv classify_status_rlv;
  4239. htt_stats_tx_de_enqueue_packets_tlv enqueue_packets_tlv;
  4240. htt_stats_tx_de_enqueue_discard_tlv enqueue_discard_tlv;
  4241. htt_stats_tx_de_compl_stats_tlv comp_status_tlv;
  4242. } htt_tx_de_stats_t;
  4243. /* == RING-IF STATS == */
  4244. /* DWORD num_elems__prefetch_tail_idx */
  4245. #define HTT_RING_IF_STATS_NUM_ELEMS_M 0x0000ffff
  4246. #define HTT_RING_IF_STATS_NUM_ELEMS_S 0
  4247. #define HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_M 0xffff0000
  4248. #define HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_S 16
  4249. #define HTT_RING_IF_STATS_NUM_ELEMS_GET(_var) \
  4250. (((_var) & HTT_RING_IF_STATS_NUM_ELEMS_M) >> \
  4251. HTT_RING_IF_STATS_NUM_ELEMS_S)
  4252. #define HTT_RING_IF_STATS_NUM_ELEMS_SET(_var, _val) \
  4253. do { \
  4254. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_NUM_ELEMS, _val); \
  4255. ((_var) |= ((_val) << HTT_RING_IF_STATS_NUM_ELEMS_S)); \
  4256. } while (0)
  4257. #define HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_GET(_var) \
  4258. (((_var) & HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_M) >> \
  4259. HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_S)
  4260. #define HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_SET(_var, _val) \
  4261. do { \
  4262. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_PREFETCH_TAIL_IDX, _val); \
  4263. ((_var) |= ((_val) << HTT_RING_IF_STATS_PREFETCH_TAIL_IDX_S)); \
  4264. } while (0)
  4265. /* DWORD head_idx__tail_idx */
  4266. #define HTT_RING_IF_STATS_HEAD_IDX_M 0x0000ffff
  4267. #define HTT_RING_IF_STATS_HEAD_IDX_S 0
  4268. #define HTT_RING_IF_STATS_TAIL_IDX_M 0xffff0000
  4269. #define HTT_RING_IF_STATS_TAIL_IDX_S 16
  4270. #define HTT_RING_IF_STATS_HEAD_IDX_GET(_var) \
  4271. (((_var) & HTT_RING_IF_STATS_HEAD_IDX_M) >> \
  4272. HTT_RING_IF_STATS_HEAD_IDX_S)
  4273. #define HTT_RING_IF_STATS_HEAD_IDX_SET(_var, _val) \
  4274. do { \
  4275. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_HEAD_IDX, _val); \
  4276. ((_var) |= ((_val) << HTT_RING_IF_STATS_HEAD_IDX_S)); \
  4277. } while (0)
  4278. #define HTT_RING_IF_STATS_TAIL_IDX_GET(_var) \
  4279. (((_var) & HTT_RING_IF_STATS_TAIL_IDX_M) >> \
  4280. HTT_RING_IF_STATS_TAIL_IDX_S)
  4281. #define HTT_RING_IF_STATS_TAIL_IDX_SET(_var, _val) \
  4282. do { \
  4283. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_TAIL_IDX, _val); \
  4284. ((_var) |= ((_val) << HTT_RING_IF_STATS_TAIL_IDX_S)); \
  4285. } while (0)
  4286. /* DWORD shadow_head_idx__shadow_tail_idx */
  4287. #define HTT_RING_IF_STATS_SHADOW_HEAD_IDX_M 0x0000ffff
  4288. #define HTT_RING_IF_STATS_SHADOW_HEAD_IDX_S 0
  4289. #define HTT_RING_IF_STATS_SHADOW_TAIL_IDX_M 0xffff0000
  4290. #define HTT_RING_IF_STATS_SHADOW_TAIL_IDX_S 16
  4291. #define HTT_RING_IF_STATS_SHADOW_HEAD_IDX_GET(_var) \
  4292. (((_var) & HTT_RING_IF_STATS_SHADOW_HEAD_IDX_M) >> \
  4293. HTT_RING_IF_STATS_SHADOW_HEAD_IDX_S)
  4294. #define HTT_RING_IF_STATS_SHADOW_HEAD_IDX_SET(_var, _val) \
  4295. do { \
  4296. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_SHADOW_HEAD_IDX, _val); \
  4297. ((_var) |= ((_val) << HTT_RING_IF_STATS_SHADOW_HEAD_IDX_S)); \
  4298. } while (0)
  4299. #define HTT_RING_IF_STATS_SHADOW_TAIL_IDX_GET(_var) \
  4300. (((_var) & HTT_RING_IF_STATS_SHADOW_TAIL_IDX_M) >> \
  4301. HTT_RING_IF_STATS_SHADOW_TAIL_IDX_S)
  4302. #define HTT_RING_IF_STATS_SHADOW_TAIL_IDX_SET(_var, _val) \
  4303. do { \
  4304. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_SHADOW_TAIL_IDX, _val); \
  4305. ((_var) |= ((_val) << HTT_RING_IF_STATS_SHADOW_TAIL_IDX_S)); \
  4306. } while (0)
  4307. /* DWORD lwm_thresh__hwm_thresh */
  4308. #define HTT_RING_IF_STATS_LWM_THRESHOLD_M 0x0000ffff
  4309. #define HTT_RING_IF_STATS_LWM_THRESHOLD_S 0
  4310. #define HTT_RING_IF_STATS_HWM_THRESHOLD_M 0xffff0000
  4311. #define HTT_RING_IF_STATS_HWM_THRESHOLD_S 16
  4312. #define HTT_RING_IF_STATS_LWM_THRESHOLD_GET(_var) \
  4313. (((_var) & HTT_RING_IF_STATS_LWM_THRESHOLD_M) >> \
  4314. HTT_RING_IF_STATS_LWM_THRESHOLD_S)
  4315. #define HTT_RING_IF_STATS_LWM_THRESHOLD_SET(_var, _val) \
  4316. do { \
  4317. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_LWM_THRESHOLD, _val); \
  4318. ((_var) |= ((_val) << HTT_RING_IF_STATS_LWM_THRESHOLD_S)); \
  4319. } while (0)
  4320. #define HTT_RING_IF_STATS_HWM_THRESHOLD_GET(_var) \
  4321. (((_var) & HTT_RING_IF_STATS_HWM_THRESHOLD_M) >> \
  4322. HTT_RING_IF_STATS_HWM_THRESHOLD_S)
  4323. #define HTT_RING_IF_STATS_HWM_THRESHOLD_SET(_var, _val) \
  4324. do { \
  4325. HTT_CHECK_SET_VAL(HTT_RING_IF_STATS_HWM_THRESHOLD, _val); \
  4326. ((_var) |= ((_val) << HTT_RING_IF_STATS_HWM_THRESHOLD_S)); \
  4327. } while (0)
  4328. #define HTT_STATS_LOW_WM_BINS 5
  4329. #define HTT_STATS_HIGH_WM_BINS 5
  4330. typedef struct {
  4331. /** DWORD aligned base memory address of the ring */
  4332. A_UINT32 base_addr;
  4333. /** size of each ring element */
  4334. A_UINT32 elem_size;
  4335. /**
  4336. * BIT [15 : 0] :- num_elems
  4337. * BIT [31 : 16] :- prefetch_tail_idx
  4338. */
  4339. A_UINT32 num_elems__prefetch_tail_idx;
  4340. /**
  4341. * BIT [15 : 0] :- head_idx
  4342. * BIT [31 : 16] :- tail_idx
  4343. */
  4344. A_UINT32 head_idx__tail_idx;
  4345. /**
  4346. * BIT [15 : 0] :- shadow_head_idx
  4347. * BIT [31 : 16] :- shadow_tail_idx
  4348. */
  4349. A_UINT32 shadow_head_idx__shadow_tail_idx;
  4350. A_UINT32 num_tail_incr;
  4351. /**
  4352. * BIT [15 : 0] :- lwm_thresh
  4353. * BIT [31 : 16] :- hwm_thresh
  4354. */
  4355. A_UINT32 lwm_thresh__hwm_thresh;
  4356. A_UINT32 overrun_hit_count;
  4357. A_UINT32 underrun_hit_count;
  4358. A_UINT32 prod_blockwait_count;
  4359. A_UINT32 cons_blockwait_count;
  4360. A_UINT32 low_wm_hit_count[HTT_STATS_LOW_WM_BINS];
  4361. A_UINT32 high_wm_hit_count[HTT_STATS_HIGH_WM_BINS];
  4362. } htt_stats_ring_if_tlv;
  4363. /* preserve old name alias for new name consistent with the tag name */
  4364. typedef htt_stats_ring_if_tlv htt_ring_if_stats_tlv;
  4365. #define HTT_RING_IF_CMN_MAC_ID_M 0x000000ff
  4366. #define HTT_RING_IF_CMN_MAC_ID_S 0
  4367. #define HTT_RING_IF_CMN_MAC_ID_GET(_var) \
  4368. (((_var) & HTT_RING_IF_CMN_MAC_ID_M) >> \
  4369. HTT_RING_IF_CMN_MAC_ID_S)
  4370. #define HTT_RING_IF_CMN_MAC_ID_SET(_var, _val) \
  4371. do { \
  4372. HTT_CHECK_SET_VAL(HTT_RING_IF_CMN_MAC_ID, _val); \
  4373. ((_var) |= ((_val) << HTT_RING_IF_CMN_MAC_ID_S)); \
  4374. } while (0)
  4375. typedef struct {
  4376. htt_tlv_hdr_t tlv_hdr;
  4377. /**
  4378. * BIT [ 7 : 0] :- mac_id
  4379. * BIT [31 : 8] :- reserved
  4380. */
  4381. A_UINT32 mac_id__word;
  4382. A_UINT32 num_records;
  4383. } htt_stats_ring_if_cmn_tlv;
  4384. /* preserve old name alias for new name consistent with the tag name */
  4385. typedef htt_stats_ring_if_cmn_tlv htt_ring_if_cmn_tlv;
  4386. /* STATS_TYPE : HTT_DBG_EXT_STATS_RING_IF_INFO
  4387. * TLV_TAGS:
  4388. * - HTT_STATS_RING_IF_CMN_TAG
  4389. * - HTT_STATS_STRING_TAG
  4390. * - HTT_STATS_RING_IF_TAG
  4391. */
  4392. /* NOTE:
  4393. * This structure is for documentation, and cannot be safely used directly.
  4394. * Instead, use the constituent TLV structures to fill/parse.
  4395. */
  4396. typedef struct {
  4397. htt_stats_ring_if_cmn_tlv cmn_tlv;
  4398. /** Variable based on the Number of records. */
  4399. struct {
  4400. htt_stats_string_tlv ring_str_tlv;
  4401. htt_stats_ring_if_tlv ring_tlv;
  4402. } r[1];
  4403. } htt_ring_if_stats_t;
  4404. /* == SFM STATS == */
  4405. #define HTT_SFM_CLIENT_USER_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  4406. /* NOTE: Variable length TLV, use length spec to infer array size */
  4407. typedef struct {
  4408. htt_tlv_hdr_t tlv_hdr;
  4409. /** Number of DWORDS used per user and per client */
  4410. A_UINT32 dwords_used_by_user_n[1];
  4411. } htt_stats_sfm_client_user_tlv;
  4412. /* preserve old name alias for new name consistent with the tag name */
  4413. typedef htt_stats_sfm_client_user_tlv htt_sfm_client_user_tlv_v;
  4414. typedef struct {
  4415. htt_tlv_hdr_t tlv_hdr;
  4416. /** Client ID */
  4417. A_UINT32 client_id;
  4418. /** Minimum number of buffers */
  4419. A_UINT32 buf_min;
  4420. /** Maximum number of buffers */
  4421. A_UINT32 buf_max;
  4422. /** Number of Busy buffers */
  4423. A_UINT32 buf_busy;
  4424. /** Number of Allocated buffers */
  4425. A_UINT32 buf_alloc;
  4426. /** Number of Available/Usable buffers */
  4427. A_UINT32 buf_avail;
  4428. /** Number of users */
  4429. A_UINT32 num_users;
  4430. } htt_stats_sfm_client_tlv;
  4431. /* preserve old name alias for new name consistent with the tag name */
  4432. typedef htt_stats_sfm_client_tlv htt_sfm_client_tlv;
  4433. #define HTT_SFM_CMN_MAC_ID_M 0x000000ff
  4434. #define HTT_SFM_CMN_MAC_ID_S 0
  4435. #define HTT_SFM_CMN_MAC_ID_GET(_var) \
  4436. (((_var) & HTT_SFM_CMN_MAC_ID_M) >> \
  4437. HTT_SFM_CMN_MAC_ID_S)
  4438. #define HTT_SFM_CMN_MAC_ID_SET(_var, _val) \
  4439. do { \
  4440. HTT_CHECK_SET_VAL(HTT_SFM_CMN_MAC_ID, _val); \
  4441. ((_var) |= ((_val) << HTT_SFM_CMN_MAC_ID_S)); \
  4442. } while (0)
  4443. typedef struct {
  4444. htt_tlv_hdr_t tlv_hdr;
  4445. /**
  4446. * BIT [ 7 : 0] :- mac_id
  4447. * BIT [31 : 8] :- reserved
  4448. */
  4449. A_UINT32 mac_id__word;
  4450. /**
  4451. * Indicates the total number of 128 byte buffers in the CMEM
  4452. * that are available for buffer sharing
  4453. */
  4454. A_UINT32 buf_total;
  4455. /**
  4456. * Indicates for certain client or all the clients there is no
  4457. * dword saved in SFM, refer to SFM_R1_MEM_EMPTY
  4458. */
  4459. A_UINT32 mem_empty;
  4460. /** DEALLOCATE_BUFFERS, refer to register SFM_R0_DEALLOCATE_BUFFERS */
  4461. A_UINT32 deallocate_bufs;
  4462. /** Number of Records */
  4463. A_UINT32 num_records;
  4464. } htt_stats_sfm_cmn_tlv;
  4465. /* preserve old name alias for new name consistent with the tag name */
  4466. typedef htt_stats_sfm_cmn_tlv htt_sfm_cmn_tlv;
  4467. /* STATS_TYPE : HTT_DBG_EXT_STATS_RING_IF_INFO
  4468. * TLV_TAGS:
  4469. * - HTT_STATS_SFM_CMN_TAG
  4470. * - HTT_STATS_STRING_TAG
  4471. * - HTT_STATS_SFM_CLIENT_TAG
  4472. * - HTT_STATS_SFM_CLIENT_USER_TAG
  4473. */
  4474. /* NOTE:
  4475. * This structure is for documentation, and cannot be safely used directly.
  4476. * Instead, use the constituent TLV structures to fill/parse.
  4477. */
  4478. typedef struct {
  4479. htt_stats_sfm_cmn_tlv cmn_tlv;
  4480. /** Variable based on the Number of records. */
  4481. struct {
  4482. htt_stats_string_tlv client_str_tlv;
  4483. htt_stats_sfm_client_tlv client_tlv;
  4484. htt_stats_sfm_client_user_tlv user_tlv;
  4485. } r[1];
  4486. } htt_sfm_stats_t;
  4487. /* == SRNG STATS == */
  4488. /* DWORD mac_id__ring_id__arena__ep */
  4489. #define HTT_SRING_STATS_MAC_ID_M 0x000000ff
  4490. #define HTT_SRING_STATS_MAC_ID_S 0
  4491. #define HTT_SRING_STATS_RING_ID_M 0x0000ff00
  4492. #define HTT_SRING_STATS_RING_ID_S 8
  4493. #define HTT_SRING_STATS_ARENA_M 0x00ff0000
  4494. #define HTT_SRING_STATS_ARENA_S 16
  4495. #define HTT_SRING_STATS_EP_TYPE_M 0x01000000
  4496. #define HTT_SRING_STATS_EP_TYPE_S 24
  4497. #define HTT_SRING_STATS_MAC_ID_GET(_var) \
  4498. (((_var) & HTT_SRING_STATS_MAC_ID_M) >> \
  4499. HTT_SRING_STATS_MAC_ID_S)
  4500. #define HTT_SRING_STATS_MAC_ID_SET(_var, _val) \
  4501. do { \
  4502. HTT_CHECK_SET_VAL(HTT_SRING_STATS_MAC_ID, _val); \
  4503. ((_var) |= ((_val) << HTT_SRING_STATS_MAC_ID_S)); \
  4504. } while (0)
  4505. #define HTT_SRING_STATS_RING_ID_GET(_var) \
  4506. (((_var) & HTT_SRING_STATS_RING_ID_M) >> \
  4507. HTT_SRING_STATS_RING_ID_S)
  4508. #define HTT_SRING_STATS_RING_ID_SET(_var, _val) \
  4509. do { \
  4510. HTT_CHECK_SET_VAL(HTT_SRING_STATS_RING_ID, _val); \
  4511. ((_var) |= ((_val) << HTT_SRING_STATS_RING_ID_S)); \
  4512. } while (0)
  4513. #define HTT_SRING_STATS_ARENA_GET(_var) \
  4514. (((_var) & HTT_SRING_STATS_ARENA_M) >> \
  4515. HTT_SRING_STATS_ARENA_S)
  4516. #define HTT_SRING_STATS_ARENA_SET(_var, _val) \
  4517. do { \
  4518. HTT_CHECK_SET_VAL(HTT_SRING_STATS_ARENA, _val); \
  4519. ((_var) |= ((_val) << HTT_SRING_STATS_ARENA_S)); \
  4520. } while (0)
  4521. #define HTT_SRING_STATS_EP_TYPE_GET(_var) \
  4522. (((_var) & HTT_SRING_STATS_EP_TYPE_M) >> \
  4523. HTT_SRING_STATS_EP_TYPE_S)
  4524. #define HTT_SRING_STATS_EP_TYPE_SET(_var, _val) \
  4525. do { \
  4526. HTT_CHECK_SET_VAL(HTT_SRING_STATS_EP_TYPE, _val); \
  4527. ((_var) |= ((_val) << HTT_SRING_STATS_EP_TYPE_S)); \
  4528. } while (0)
  4529. /* DWORD num_avail_words__num_valid_words */
  4530. #define HTT_SRING_STATS_NUM_AVAIL_WORDS_M 0x0000ffff
  4531. #define HTT_SRING_STATS_NUM_AVAIL_WORDS_S 0
  4532. #define HTT_SRING_STATS_NUM_VALID_WORDS_M 0xffff0000
  4533. #define HTT_SRING_STATS_NUM_VALID_WORDS_S 16
  4534. #define HTT_SRING_STATS_NUM_AVAIL_WORDS_GET(_var) \
  4535. (((_var) & HTT_SRING_STATS_NUM_AVAIL_WORDS_M) >> \
  4536. HTT_SRING_STATS_NUM_AVAIL_WORDS_S)
  4537. #define HTT_SRING_STATS_NUM_AVAIL_WORDS_SET(_var, _val) \
  4538. do { \
  4539. HTT_CHECK_SET_VAL(HTT_SRING_STATS_NUM_AVAIL_WORDS, _val); \
  4540. ((_var) |= ((_val) << HTT_SRING_STATS_NUM_AVAIL_WORDS_S)); \
  4541. } while (0)
  4542. #define HTT_SRING_STATS_NUM_VALID_WORDS_GET(_var) \
  4543. (((_var) & HTT_SRING_STATS_NUM_VALID_WORDS_M) >> \
  4544. HTT_SRING_STATS_NUM_VALID_WORDS_S)
  4545. #define HTT_SRING_STATS_NUM_VALID_WORDS_SET(_var, _val) \
  4546. do { \
  4547. HTT_CHECK_SET_VAL(HTT_SRING_STATS_NUM_VALID_WORDS, _val); \
  4548. ((_var) |= ((_val) << HTT_SRING_STATS_NUM_VALID_WORDS_S)); \
  4549. } while (0)
  4550. /* DWORD head_ptr__tail_ptr */
  4551. #define HTT_SRING_STATS_HEAD_PTR_M 0x0000ffff
  4552. #define HTT_SRING_STATS_HEAD_PTR_S 0
  4553. #define HTT_SRING_STATS_TAIL_PTR_M 0xffff0000
  4554. #define HTT_SRING_STATS_TAIL_PTR_S 16
  4555. #define HTT_SRING_STATS_HEAD_PTR_GET(_var) \
  4556. (((_var) & HTT_SRING_STATS_HEAD_PTR_M) >> \
  4557. HTT_SRING_STATS_HEAD_PTR_S)
  4558. #define HTT_SRING_STATS_HEAD_PTR_SET(_var, _val) \
  4559. do { \
  4560. HTT_CHECK_SET_VAL(HTT_SRING_STATS_HEAD_PTR, _val); \
  4561. ((_var) |= ((_val) << HTT_SRING_STATS_HEAD_PTR_S)); \
  4562. } while (0)
  4563. #define HTT_SRING_STATS_TAIL_PTR_GET(_var) \
  4564. (((_var) & HTT_SRING_STATS_TAIL_PTR_M) >> \
  4565. HTT_SRING_STATS_TAIL_PTR_S)
  4566. #define HTT_SRING_STATS_TAIL_PTR_SET(_var, _val) \
  4567. do { \
  4568. HTT_CHECK_SET_VAL(HTT_SRING_STATS_TAIL_PTR, _val); \
  4569. ((_var) |= ((_val) << HTT_SRING_STATS_TAIL_PTR_S)); \
  4570. } while (0)
  4571. /* DWORD consumer_empty__producer_full */
  4572. #define HTT_SRING_STATS_CONSUMER_EMPTY_M 0x0000ffff
  4573. #define HTT_SRING_STATS_CONSUMER_EMPTY_S 0
  4574. #define HTT_SRING_STATS_PRODUCER_FULL_M 0xffff0000
  4575. #define HTT_SRING_STATS_PRODUCER_FULL_S 16
  4576. #define HTT_SRING_STATS_CONSUMER_EMPTY_GET(_var) \
  4577. (((_var) & HTT_SRING_STATS_CONSUMER_EMPTY_M) >> \
  4578. HTT_SRING_STATS_CONSUMER_EMPTY_S)
  4579. #define HTT_SRING_STATS_CONSUMER_EMPTY_SET(_var, _val) \
  4580. do { \
  4581. HTT_CHECK_SET_VAL(HTT_SRING_STATS_CONSUMER_EMPTY, _val); \
  4582. ((_var) |= ((_val) << HTT_SRING_STATS_CONSUMER_EMPTY_S)); \
  4583. } while (0)
  4584. #define HTT_SRING_STATS_PRODUCER_FULL_GET(_var) \
  4585. (((_var) & HTT_SRING_STATS_PRODUCER_FULL_M) >> \
  4586. HTT_SRING_STATS_PRODUCER_FULL_S)
  4587. #define HTT_SRING_STATS_PRODUCER_FULL_SET(_var, _val) \
  4588. do { \
  4589. HTT_CHECK_SET_VAL(HTT_SRING_STATS_PRODUCER_FULL, _val); \
  4590. ((_var) |= ((_val) << HTT_SRING_STATS_PRODUCER_FULL_S)); \
  4591. } while (0)
  4592. /* DWORD prefetch_count__internal_tail_ptr */
  4593. #define HTT_SRING_STATS_PREFETCH_COUNT_M 0x0000ffff
  4594. #define HTT_SRING_STATS_PREFETCH_COUNT_S 0
  4595. #define HTT_SRING_STATS_INTERNAL_TP_M 0xffff0000
  4596. #define HTT_SRING_STATS_INTERNAL_TP_S 16
  4597. #define HTT_SRING_STATS_PREFETCH_COUNT_GET(_var) \
  4598. (((_var) & HTT_SRING_STATS_PREFETCH_COUNT_M) >> \
  4599. HTT_SRING_STATS_PREFETCH_COUNT_S)
  4600. #define HTT_SRING_STATS_PREFETCH_COUNT_SET(_var, _val) \
  4601. do { \
  4602. HTT_CHECK_SET_VAL(HTT_SRING_STATS_PREFETCH_COUNT, _val); \
  4603. ((_var) |= ((_val) << HTT_SRING_STATS_PREFETCH_COUNT_S)); \
  4604. } while (0)
  4605. #define HTT_SRING_STATS_INTERNAL_TP_GET(_var) \
  4606. (((_var) & HTT_SRING_STATS_INTERNAL_TP_M) >> \
  4607. HTT_SRING_STATS_INTERNAL_TP_S)
  4608. #define HTT_SRING_STATS_INTERNAL_TP_SET(_var, _val) \
  4609. do { \
  4610. HTT_CHECK_SET_VAL(HTT_SRING_STATS_INTERNAL_TP, _val); \
  4611. ((_var) |= ((_val) << HTT_SRING_STATS_INTERNAL_TP_S)); \
  4612. } while (0)
  4613. typedef struct {
  4614. htt_tlv_hdr_t tlv_hdr;
  4615. /**
  4616. * BIT [ 7 : 0] :- mac_id
  4617. * BIT [15 : 8] :- ring_id
  4618. * BIT [23 : 16] :- arena 0 -SRING_HRAM, 1 - SRING_HCRAM, 2 - SRING_HW2HW.
  4619. * BIT [24 : 24] :- EP 0 -consumer, 1 - producer
  4620. * BIT [31 : 25] :- reserved
  4621. */
  4622. A_UINT32 mac_id__ring_id__arena__ep;
  4623. /** DWORD aligned base memory address of the ring */
  4624. A_UINT32 base_addr_lsb;
  4625. A_UINT32 base_addr_msb;
  4626. /** size of ring */
  4627. A_UINT32 ring_size;
  4628. /** size of each ring element */
  4629. A_UINT32 elem_size;
  4630. /** Ring status
  4631. *
  4632. * BIT [15 : 0] :- num_avail_words
  4633. * BIT [31 : 16] :- num_valid_words
  4634. */
  4635. A_UINT32 num_avail_words__num_valid_words;
  4636. /** Index of head and tail
  4637. * BIT [15 : 0] :- head_ptr
  4638. * BIT [31 : 16] :- tail_ptr
  4639. */
  4640. A_UINT32 head_ptr__tail_ptr;
  4641. /** Empty or full counter of rings
  4642. * BIT [15 : 0] :- consumer_empty
  4643. * BIT [31 : 16] :- producer_full
  4644. */
  4645. A_UINT32 consumer_empty__producer_full;
  4646. /** Prefetch status of consumer ring
  4647. * BIT [15 : 0] :- prefetch_count
  4648. * BIT [31 : 16] :- internal_tail_ptr
  4649. */
  4650. A_UINT32 prefetch_count__internal_tail_ptr;
  4651. } htt_stats_sring_stats_tlv;
  4652. /* preserve old name alias for new name consistent with the tag name */
  4653. typedef htt_stats_sring_stats_tlv htt_sring_stats_tlv;
  4654. typedef struct {
  4655. htt_tlv_hdr_t tlv_hdr;
  4656. A_UINT32 num_records;
  4657. } htt_stats_sring_cmn_tlv;
  4658. /* preserve old name alias for new name consistent with the tag name */
  4659. typedef htt_stats_sring_cmn_tlv htt_sring_cmn_tlv;
  4660. /* STATS_TYPE : HTT_DBG_EXT_STATS_SRNG_INFO
  4661. * TLV_TAGS:
  4662. * - HTT_STATS_SRING_CMN_TAG
  4663. * - HTT_STATS_STRING_TAG
  4664. * - HTT_STATS_SRING_STATS_TAG
  4665. */
  4666. /* NOTE:
  4667. * This structure is for documentation, and cannot be safely used directly.
  4668. * Instead, use the constituent TLV structures to fill/parse.
  4669. */
  4670. typedef struct {
  4671. htt_stats_sring_cmn_tlv cmn_tlv;
  4672. /** Variable based on the Number of records */
  4673. struct {
  4674. htt_stats_string_tlv sring_str_tlv;
  4675. htt_stats_sring_stats_tlv sring_stats_tlv;
  4676. } r[1];
  4677. } htt_sring_stats_t;
  4678. /* == PDEV TX RATE CTRL STATS == */
  4679. #define HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS 12 /* 0-11 */
  4680. #define HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS 2 /* 12, 13 */
  4681. #define HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS 2 /* 14, 15 */
  4682. #define HTT_TX_PDEV_STATS_NUM_GI_COUNTERS 4
  4683. #define HTT_TX_PDEV_STATS_NUM_DCM_COUNTERS 5
  4684. #define HTT_TX_PDEV_STATS_NUM_BW_COUNTERS 4
  4685. #define HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS 8
  4686. #define HTT_TX_PDEV_STATS_NUM_PREAMBLE_TYPES HTT_STATS_PREAM_COUNT
  4687. #define HTT_TX_PDEV_STATS_NUM_LEGACY_CCK_STATS 4
  4688. #define HTT_TX_PDEV_STATS_NUM_LEGACY_OFDM_STATS 8
  4689. #define HTT_TX_PDEV_STATS_NUM_LTF 4
  4690. #define HTT_TX_PDEV_STATS_NUM_11AX_TRIGGER_TYPES 6
  4691. #define HTT_TX_PDEV_STATS_NUM_11BE_TRIGGER_TYPES 6
  4692. #define HTT_TX_NUM_OF_SOUNDING_STATS_WORDS \
  4693. (HTT_TX_PDEV_STATS_NUM_BW_COUNTERS * \
  4694. HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS)
  4695. #define HTT_TX_PDEV_RATE_STATS_MAC_ID_M 0x000000ff
  4696. #define HTT_TX_PDEV_RATE_STATS_MAC_ID_S 0
  4697. #define HTT_TX_PDEV_RATE_STATS_MAC_ID_GET(_var) \
  4698. (((_var) & HTT_TX_PDEV_RATE_STATS_MAC_ID_M) >> \
  4699. HTT_TX_PDEV_RATE_STATS_MAC_ID_S)
  4700. #define HTT_TX_PDEV_RATE_STATS_MAC_ID_SET(_var, _val) \
  4701. do { \
  4702. HTT_CHECK_SET_VAL(HTT_TX_PDEV_RATE_STATS_MAC_ID, _val); \
  4703. ((_var) |= ((_val) << HTT_TX_PDEV_RATE_STATS_MAC_ID_S)); \
  4704. } while (0)
  4705. #define HTT_TX_PDEV_STATS_NUM_MCS_DROP_COUNTERS \
  4706. (HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS + \
  4707. HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS + \
  4708. HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS)
  4709. #define HTT_TX_PDEV_STATS_NUM_PER_COUNTERS 101
  4710. /*
  4711. * Introduce new TX counters to support 320MHz support and punctured modes
  4712. */
  4713. typedef enum {
  4714. HTT_TX_PDEV_STATS_PUNCTURED_NONE = 0,
  4715. HTT_TX_PDEV_STATS_PUNCTURED_20 = 1,
  4716. HTT_TX_PDEV_STATS_PUNCTURED_40 = 2,
  4717. HTT_TX_PDEV_STATS_PUNCTURED_80 = 3,
  4718. HTT_TX_PDEV_STATS_PUNCTURED_120 = 4,
  4719. HTT_TX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS = 5
  4720. } HTT_TX_PDEV_STATS_NUM_PUNCTURED_MODE_TYPE;
  4721. #define HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES 2 /* 0 - Half, 1 - Quarter */
  4722. /* 11be related updates */
  4723. #define HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS 16 /* 0...13,-2,-1 */
  4724. #define HTT_TX_PDEV_STATS_NUM_BE_BW_COUNTERS 5 /* 20,40,80,160,320 MHz */
  4725. #define HTT_TX_PDEV_STATS_NUM_HE_SIG_B_MCS_COUNTERS 6
  4726. #define HTT_TX_PDEV_STATS_NUM_EHT_SIG_MCS_COUNTERS 4
  4727. typedef enum {
  4728. HTT_TX_PDEV_STATS_AX_RU_SIZE_26,
  4729. HTT_TX_PDEV_STATS_AX_RU_SIZE_52,
  4730. HTT_TX_PDEV_STATS_AX_RU_SIZE_106,
  4731. HTT_TX_PDEV_STATS_AX_RU_SIZE_242,
  4732. HTT_TX_PDEV_STATS_AX_RU_SIZE_484,
  4733. HTT_TX_PDEV_STATS_AX_RU_SIZE_996,
  4734. HTT_TX_PDEV_STATS_AX_RU_SIZE_996x2,
  4735. HTT_TX_PDEV_STATS_NUM_AX_RU_SIZE_COUNTERS,
  4736. } HTT_TX_PDEV_STATS_AX_RU_SIZE;
  4737. typedef enum {
  4738. HTT_TX_PDEV_STATS_BE_RU_SIZE_26,
  4739. HTT_TX_PDEV_STATS_BE_RU_SIZE_52,
  4740. HTT_TX_PDEV_STATS_BE_RU_SIZE_52_26,
  4741. HTT_TX_PDEV_STATS_BE_RU_SIZE_106,
  4742. HTT_TX_PDEV_STATS_BE_RU_SIZE_106_26,
  4743. HTT_TX_PDEV_STATS_BE_RU_SIZE_242,
  4744. HTT_TX_PDEV_STATS_BE_RU_SIZE_484,
  4745. HTT_TX_PDEV_STATS_BE_RU_SIZE_484_242,
  4746. HTT_TX_PDEV_STATS_BE_RU_SIZE_996,
  4747. HTT_TX_PDEV_STATS_BE_RU_SIZE_996_484,
  4748. HTT_TX_PDEV_STATS_BE_RU_SIZE_996_484_242,
  4749. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x2,
  4750. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x2_484,
  4751. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x3,
  4752. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x3_484,
  4753. HTT_TX_PDEV_STATS_BE_RU_SIZE_996x4,
  4754. HTT_TX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS,
  4755. } HTT_TX_PDEV_STATS_BE_RU_SIZE;
  4756. typedef struct {
  4757. htt_tlv_hdr_t tlv_hdr;
  4758. /**
  4759. * BIT [ 7 : 0] :- mac_id
  4760. * BIT [31 : 8] :- reserved
  4761. */
  4762. A_UINT32 mac_id__word;
  4763. /** Number of tx ldpc packets */
  4764. A_UINT32 tx_ldpc;
  4765. /** Number of tx rts packets */
  4766. A_UINT32 rts_cnt;
  4767. /** RSSI value of last ack packet (units = dB above noise floor) */
  4768. A_UINT32 ack_rssi;
  4769. A_UINT32 tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4770. /** tx_xx_mcs: currently unused */
  4771. A_UINT32 tx_su_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4772. A_UINT32 tx_mu_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4773. /* element 0,1, ...7 -> NSS 1,2, ...8 */
  4774. A_UINT32 tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4775. /* element 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160 and 80+80 MHz */
  4776. A_UINT32 tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4777. A_UINT32 tx_stbc[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4778. A_UINT32 tx_pream[HTT_TX_PDEV_STATS_NUM_PREAMBLE_TYPES];
  4779. /**
  4780. * Counters to track number of tx packets in each GI
  4781. * (400us, 800us, 1600us & 3200us) in each mcs (0-11)
  4782. */
  4783. A_UINT32 tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4784. /** Counters to track packets in dcm mcs (MCS 0, 1, 3, 4) */
  4785. A_UINT32 tx_dcm[HTT_TX_PDEV_STATS_NUM_DCM_COUNTERS];
  4786. /** Number of CTS-acknowledged RTS packets */
  4787. A_UINT32 rts_success;
  4788. /**
  4789. * Counters for legacy 11a and 11b transmissions.
  4790. *
  4791. * The index corresponds to:
  4792. *
  4793. * CCK: 0: 1 Mbps, 1: 2 Mbps, 2: 5.5 Mbps, 3: 11 Mbps
  4794. *
  4795. * OFDM: 0: 6 Mbps, 1: 9 Mbps, 2: 12 Mbps, 3: 18 Mbps,
  4796. * 4: 24 Mbps, 5: 36 Mbps, 6: 48 Mbps, 7: 54 Mbps
  4797. */
  4798. A_UINT32 tx_legacy_cck_rate[HTT_TX_PDEV_STATS_NUM_LEGACY_CCK_STATS];
  4799. A_UINT32 tx_legacy_ofdm_rate[HTT_TX_PDEV_STATS_NUM_LEGACY_OFDM_STATS];
  4800. /** 11AC VHT DL MU MIMO LDPC count */
  4801. A_UINT32 ac_mu_mimo_tx_ldpc;
  4802. /** 11AX HE DL MU MIMO LDPC count */
  4803. A_UINT32 ax_mu_mimo_tx_ldpc;
  4804. /** 11AX HE DL MU OFDMA LDPC count */
  4805. A_UINT32 ofdma_tx_ldpc;
  4806. /**
  4807. * Counters for 11ax HE LTF selection during TX.
  4808. *
  4809. * The index corresponds to:
  4810. *
  4811. * 0: unused, 1: 1x LTF, 2: 2x LTF, 3: 4x LTF
  4812. */
  4813. A_UINT32 tx_he_ltf[HTT_TX_PDEV_STATS_NUM_LTF];
  4814. /** 11AC VHT DL MU MIMO TX MCS stats */
  4815. A_UINT32 ac_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4816. /** 11AX HE DL MU MIMO TX MCS stats */
  4817. A_UINT32 ax_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4818. /** 11AX HE DL MU OFDMA TX MCS stats */
  4819. A_UINT32 ofdma_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4820. /** 11AC VHT DL MU MIMO TX NSS stats (Indicates NSS for individual users) */
  4821. A_UINT32 ac_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4822. /** 11AX HE DL MU MIMO TX NSS stats (Indicates NSS for individual users) */
  4823. A_UINT32 ax_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4824. /** 11AX HE DL MU OFDMA TX NSS stats (Indicates NSS for individual users) */
  4825. A_UINT32 ofdma_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4826. /** 11AC VHT DL MU MIMO TX BW stats */
  4827. A_UINT32 ac_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4828. /** 11AX HE DL MU MIMO TX BW stats */
  4829. A_UINT32 ax_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4830. /** 11AX HE DL MU OFDMA TX BW stats */
  4831. A_UINT32 ofdma_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4832. /** 11AC VHT DL MU MIMO TX guard interval stats */
  4833. A_UINT32 ac_mu_mimo_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4834. /** 11AX HE DL MU MIMO TX guard interval stats */
  4835. A_UINT32 ax_mu_mimo_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4836. /** 11AX HE DL MU OFDMA TX guard interval stats */
  4837. A_UINT32 ofdma_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  4838. A_UINT32 trigger_type_11ax[HTT_TX_PDEV_STATS_NUM_11AX_TRIGGER_TYPES];
  4839. A_UINT32 tx_11ax_su_ext;
  4840. /* Stats for MCS 12/13 */
  4841. A_UINT32 tx_mcs_ext[HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4842. A_UINT32 tx_stbc_ext[HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4843. A_UINT32 tx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4844. /** 11AX VHT DL MU MIMO extended TX MCS stats for MCS 12/13 */
  4845. A_UINT32 ax_mu_mimo_tx_mcs_ext[HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4846. /** 11AX VHT DL MU OFDMA extended TX MCS stats for MCS 12/13 */
  4847. A_UINT32 ofdma_tx_mcs_ext[HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4848. /** 11AX VHT DL MU MIMO extended TX guard interval stats for MCS 12/13 */
  4849. A_UINT32 ax_mu_mimo_tx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4850. /** 11AX VHT DL MU OFDMA extended TX guard interval stats for MCS 12/13 */
  4851. A_UINT32 ofdma_tx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  4852. /* Stats for MCS 14/15 */
  4853. A_UINT32 tx_mcs_ext_2[HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  4854. A_UINT32 tx_bw_320mhz;
  4855. A_UINT32 tx_gi_ext_2[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  4856. A_UINT32 tx_su_punctured_mode[HTT_TX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS];
  4857. A_UINT32 reduced_tx_bw[HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4858. /** 11AC VHT DL MU MIMO TX BW stats at reduced channel config */
  4859. A_UINT32 reduced_ac_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4860. /** 11AX HE DL MU MIMO TX BW stats at reduced channel config */
  4861. A_UINT32 reduced_ax_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4862. /** 11AX HE DL MU OFDMA TX BW stats at reduced channel config */
  4863. A_UINT32 reduced_ax_mu_ofdma_tx_bw[HTT_TX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  4864. /** 11AX HE DL MU OFDMA TX RU Size stats */
  4865. A_UINT32 ofdma_tx_ru_size[HTT_TX_PDEV_STATS_NUM_AX_RU_SIZE_COUNTERS];
  4866. /** 11AX HE DL MU OFDMA HE-SIG-B MCS stats */
  4867. A_UINT32 ofdma_he_sig_b_mcs[HTT_TX_PDEV_STATS_NUM_HE_SIG_B_MCS_COUNTERS];
  4868. /** 11AX HE SU data + embedded trigger PPDU success stats (stats for HETP ack success PPDU cnt) */
  4869. A_UINT32 ax_su_embedded_trigger_data_ppdu;
  4870. /** 11AX HE SU data + embedded trigger PPDU failure stats (stats for HETP ack failure PPDU cnt) */
  4871. A_UINT32 ax_su_embedded_trigger_data_ppdu_err;
  4872. /** sta side trigger stats */
  4873. A_UINT32 trigger_type_11be[HTT_TX_PDEV_STATS_NUM_11BE_TRIGGER_TYPES];
  4874. /** Stats for Extra EHT LTF */
  4875. A_UINT32 extra_eht_ltf;
  4876. /** Counter for Extra EHT LTFs in OFDMA sequences */
  4877. A_UINT32 extra_eht_ltf_ofdma;
  4878. } htt_stats_tx_pdev_rate_stats_tlv;
  4879. /* preserve old name alias for new name consistent with the tag name */
  4880. typedef htt_stats_tx_pdev_rate_stats_tlv htt_tx_pdev_rate_stats_tlv;
  4881. typedef struct {
  4882. /* 11be mode pdev rate stats; placed in a separate TLV to adhere to size restrictions */
  4883. htt_tlv_hdr_t tlv_hdr;
  4884. /** 11BE EHT DL MU MIMO TX MCS stats */
  4885. A_UINT32 be_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  4886. /** 11BE EHT DL MU MIMO TX NSS stats (Indicates NSS for individual users) */
  4887. A_UINT32 be_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4888. /** 11BE EHT DL MU MIMO TX BW stats */
  4889. A_UINT32 be_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  4890. /** 11BE EHT DL MU MIMO TX guard interval stats */
  4891. A_UINT32 be_mu_mimo_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  4892. /** 11BE DL MU MIMO LDPC count */
  4893. A_UINT32 be_mu_mimo_tx_ldpc;
  4894. } htt_stats_tx_pdev_be_rate_stats_tlv;
  4895. /* preserve old name alias for new name consistent with the tag name */
  4896. typedef htt_stats_tx_pdev_be_rate_stats_tlv htt_tx_pdev_rate_stats_be_tlv;
  4897. typedef struct {
  4898. /*
  4899. * SAWF pdev rate stats;
  4900. * placed in a separate TLV to adhere to size restrictions
  4901. */
  4902. htt_tlv_hdr_t tlv_hdr;
  4903. /**
  4904. * Counter incremented when MCS is dropped due to the successive retries
  4905. * to a peer reaching the configured limit.
  4906. */
  4907. A_UINT32 rate_retry_mcs_drop_cnt;
  4908. /**
  4909. * histogram of MCS rate drop down, indexed by pre-drop MCS
  4910. */
  4911. A_UINT32 mcs_drop_rate[HTT_TX_PDEV_STATS_NUM_MCS_DROP_COUNTERS];
  4912. /**
  4913. * PPDU PER histogram - each PPDU has its PER computed,
  4914. * and the bin corresponding to that PER percentage is incremented.
  4915. */
  4916. A_UINT32 per_histogram_cnt[HTT_TX_PDEV_STATS_NUM_PER_COUNTERS];
  4917. /**
  4918. * When the service class contains delay bound rate parameters which
  4919. * indicate low latency and we enable latency-based RA params then
  4920. * the low_latency_rate_count will be incremented.
  4921. * This counts the number of peer-TIDs that have been categorized as
  4922. * low-latency.
  4923. */
  4924. A_UINT32 low_latency_rate_cnt;
  4925. /** Indicate how many times rate drop happened within SIFS burst */
  4926. A_UINT32 su_burst_rate_drop_cnt;
  4927. /** Indicates how many within SIFS burst failed to deliver any pkt */
  4928. A_UINT32 su_burst_rate_drop_fail_cnt;
  4929. } htt_stats_tx_pdev_sawf_rate_stats_tlv;
  4930. /* preserve old name alias for new name consistent with the tag name */
  4931. typedef htt_stats_tx_pdev_sawf_rate_stats_tlv htt_tx_pdev_rate_stats_sawf_tlv;
  4932. typedef struct {
  4933. htt_tlv_hdr_t tlv_hdr;
  4934. /**
  4935. * BIT [ 7 : 0] :- mac_id
  4936. * BIT [31 : 8] :- reserved
  4937. */
  4938. A_UINT32 mac_id__word;
  4939. /** 11BE EHT DL MU OFDMA LDPC count */
  4940. A_UINT32 be_ofdma_tx_ldpc;
  4941. /** 11BE EHT DL MU OFDMA TX MCS stats */
  4942. A_UINT32 be_ofdma_tx_mcs[HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  4943. /**
  4944. * 11BE EHT DL MU OFDMA TX NSS stats (Indicates NSS for individual users)
  4945. */
  4946. A_UINT32 be_ofdma_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  4947. /** 11BE EHT DL MU OFDMA TX BW stats */
  4948. A_UINT32 be_ofdma_tx_bw[HTT_TX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  4949. /** 11BE EHT DL MU OFDMA TX guard interval stats */
  4950. A_UINT32 be_ofdma_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  4951. /** 11BE EHT DL MU OFDMA TX RU Size stats */
  4952. A_UINT32 be_ofdma_tx_ru_size[HTT_TX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS];
  4953. /** 11BE EHT DL MU OFDMA EHT-SIG MCS stats */
  4954. A_UINT32 be_ofdma_eht_sig_mcs[HTT_TX_PDEV_STATS_NUM_EHT_SIG_MCS_COUNTERS];
  4955. } htt_stats_tx_pdev_rate_stats_be_ofdma_tlv;
  4956. /* preserve old name alias for new name consistent with the tag name */
  4957. typedef htt_stats_tx_pdev_rate_stats_be_ofdma_tlv
  4958. htt_tx_pdev_rate_stats_be_ofdma_tlv;
  4959. typedef struct {
  4960. htt_tlv_hdr_t tlv_hdr;
  4961. /** tx_ppdu_dur_hist:
  4962. * Tx PPDU duration histogram, which holds the tx duration of PPDUs
  4963. * under histogram bins of interval 250us
  4964. */
  4965. A_UINT32 tx_ppdu_dur_hist[HTT_PDEV_STATS_PPDU_DUR_HIST_BINS];
  4966. A_UINT32 tx_success_time_us_low;
  4967. A_UINT32 tx_success_time_us_high;
  4968. A_UINT32 tx_fail_time_us_low;
  4969. A_UINT32 tx_fail_time_us_high;
  4970. A_UINT32 pdev_up_time_us_low;
  4971. A_UINT32 pdev_up_time_us_high;
  4972. /** tx_ofdma_ppdu_dur_hist:
  4973. * Tx OFDMA PPDU duration histogram, which holds the tx duration of
  4974. * OFDMA PPDUs under histogram bins of interval 250us
  4975. */
  4976. A_UINT32 tx_ofdma_ppdu_dur_hist[HTT_PDEV_STATS_PPDU_DUR_HIST_BINS];
  4977. } htt_stats_tx_pdev_ppdu_dur_tlv;
  4978. /* preserve old name alias for new name consistent with the tag name */
  4979. typedef htt_stats_tx_pdev_ppdu_dur_tlv htt_tx_pdev_ppdu_dur_stats_tlv;
  4980. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_TX_RATE
  4981. * TLV_TAGS:
  4982. * - HTT_STATS_TX_PDEV_RATE_STATS_TAG
  4983. */
  4984. /* NOTE:
  4985. * This structure is for documentation, and cannot be safely used directly.
  4986. * Instead, use the constituent TLV structures to fill/parse.
  4987. */
  4988. typedef struct {
  4989. htt_stats_tx_pdev_rate_stats_tlv rate_tlv;
  4990. htt_stats_tx_pdev_be_rate_stats_tlv rate_be_tlv;
  4991. htt_stats_tx_pdev_sawf_rate_stats_tlv rate_sawf_tlv;
  4992. htt_stats_tx_pdev_ppdu_dur_tlv tx_ppdu_dur_tlv;
  4993. } htt_tx_pdev_rate_stats_t;
  4994. /* == PDEV RX RATE CTRL STATS == */
  4995. #define HTT_RX_PDEV_STATS_NUM_LEGACY_CCK_STATS 4
  4996. #define HTT_RX_PDEV_STATS_NUM_LEGACY_OFDM_STATS 8
  4997. #define HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS 12 /* 0-11 */
  4998. #define HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS 2 /* 12, 13 */
  4999. #define HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS 2 /* 14, 15 */
  5000. #define HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT 14 /* 0-13 */
  5001. #define HTT_RX_PDEV_STATS_NUM_GI_COUNTERS 4
  5002. #define HTT_RX_PDEV_STATS_NUM_DCM_COUNTERS 5
  5003. #define HTT_RX_PDEV_STATS_NUM_BW_COUNTERS 4
  5004. #define HTT_RX_PDEV_STATS_TOTAL_BW_COUNTERS \
  5005. (HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS + HTT_RX_PDEV_STATS_NUM_BW_COUNTERS)
  5006. #define HTT_RX_PDEV_STATS_NUM_BW_EXT2_COUNTERS 5 /* 20, 40, 80, 160, 320Mhz */
  5007. #define HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS 8
  5008. #define HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS 8
  5009. #define HTT_RX_PDEV_STATS_NUM_PREAMBLE_TYPES HTT_STATS_PREAM_COUNT
  5010. #define HTT_RX_PDEV_MAX_OFDMA_NUM_USER 8
  5011. #define HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER 8
  5012. #define HTT_RX_PDEV_STATS_RXEVM_MAX_PILOTS_PER_NSS 16
  5013. #define HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS 16 /* 0-13, -2, -1 */
  5014. #define HTT_RX_PDEV_STATS_NUM_BE_BW_COUNTERS 5 /* 20,40,80,160,320 MHz */
  5015. /* HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS:
  5016. * RU size index 0: HTT_UL_OFDMA_V0_RU_SIZE_RU_26
  5017. * RU size index 1: HTT_UL_OFDMA_V0_RU_SIZE_RU_52
  5018. * RU size index 2: HTT_UL_OFDMA_V0_RU_SIZE_RU_106
  5019. * RU size index 3: HTT_UL_OFDMA_V0_RU_SIZE_RU_242
  5020. * RU size index 4: HTT_UL_OFDMA_V0_RU_SIZE_RU_484
  5021. * RU size index 5: HTT_UL_OFDMA_V0_RU_SIZE_RU_996
  5022. */
  5023. #define HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS 6
  5024. /* HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS:
  5025. * RU size index 0: HTT_UL_OFDMA_V0_RU_SIZE_RU_26
  5026. * RU size index 1: HTT_UL_OFDMA_V0_RU_SIZE_RU_52
  5027. * RU size index 2: HTT_UL_OFDMA_V0_RU_SIZE_RU_106
  5028. * RU size index 3: HTT_UL_OFDMA_V0_RU_SIZE_RU_242
  5029. * RU size index 4: HTT_UL_OFDMA_V0_RU_SIZE_RU_484
  5030. * RU size index 5: HTT_UL_OFDMA_V0_RU_SIZE_RU_996
  5031. * RU size index 6: HTT_UL_OFDMA_V0_RU_SIZE_RU_996x2
  5032. */
  5033. #define HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS 7 /* includes 996x2 */
  5034. typedef enum {
  5035. HTT_RX_PDEV_STATS_BE_RU_SIZE_26,
  5036. HTT_RX_PDEV_STATS_BE_RU_SIZE_52,
  5037. HTT_RX_PDEV_STATS_BE_RU_SIZE_52_26,
  5038. HTT_RX_PDEV_STATS_BE_RU_SIZE_106,
  5039. HTT_RX_PDEV_STATS_BE_RU_SIZE_106_26,
  5040. HTT_RX_PDEV_STATS_BE_RU_SIZE_242,
  5041. HTT_RX_PDEV_STATS_BE_RU_SIZE_484,
  5042. HTT_RX_PDEV_STATS_BE_RU_SIZE_484_242,
  5043. HTT_RX_PDEV_STATS_BE_RU_SIZE_996,
  5044. HTT_RX_PDEV_STATS_BE_RU_SIZE_996_484,
  5045. HTT_RX_PDEV_STATS_BE_RU_SIZE_996_484_242,
  5046. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x2,
  5047. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x2_484,
  5048. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x3,
  5049. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x3_484,
  5050. HTT_RX_PDEV_STATS_BE_RU_SIZE_996x4,
  5051. HTT_RX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS,
  5052. } HTT_RX_PDEV_STATS_BE_RU_SIZE;
  5053. #define HTT_RX_PDEV_RATE_STATS_MAC_ID_M 0x000000ff
  5054. #define HTT_RX_PDEV_RATE_STATS_MAC_ID_S 0
  5055. #define HTT_RX_PDEV_RATE_STATS_MAC_ID_GET(_var) \
  5056. (((_var) & HTT_RX_PDEV_RATE_STATS_MAC_ID_M) >> \
  5057. HTT_RX_PDEV_RATE_STATS_MAC_ID_S)
  5058. #define HTT_RX_PDEV_RATE_STATS_MAC_ID_SET(_var, _val) \
  5059. do { \
  5060. HTT_CHECK_SET_VAL(HTT_RX_PDEV_RATE_STATS_MAC_ID, _val); \
  5061. ((_var) |= ((_val) << HTT_RX_PDEV_RATE_STATS_MAC_ID_S)); \
  5062. } while (0)
  5063. /* Introduce new RX counters to support 320MHZ support and punctured modes */
  5064. typedef enum {
  5065. HTT_RX_PDEV_STATS_PUNCTURED_NONE = 0,
  5066. HTT_RX_PDEV_STATS_PUNCTURED_20 = 1,
  5067. HTT_RX_PDEV_STATS_PUNCTURED_40 = 2,
  5068. HTT_RX_PDEV_STATS_PUNCTURED_80 = 3,
  5069. HTT_RX_PDEV_STATS_PUNCTURED_120 = 4,
  5070. HTT_RX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS = 5
  5071. } HTT_RX_PDEV_STATS_NUM_PUNCTURED_MODE_TYPE;
  5072. #define HTT_RX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES 2 /* 0 - Half, 1 - Quarter */
  5073. typedef struct {
  5074. htt_tlv_hdr_t tlv_hdr;
  5075. /**
  5076. * BIT [ 7 : 0] :- mac_id
  5077. * BIT [31 : 8] :- reserved
  5078. */
  5079. A_UINT32 mac_id__word;
  5080. A_UINT32 nsts;
  5081. /** Number of rx ldpc packets */
  5082. A_UINT32 rx_ldpc;
  5083. /** Number of rx rts packets */
  5084. A_UINT32 rts_cnt;
  5085. /** units = dB above noise floor */
  5086. A_UINT32 rssi_mgmt;
  5087. /** units = dB above noise floor */
  5088. A_UINT32 rssi_data;
  5089. /** units = dB above noise floor */
  5090. A_UINT32 rssi_comb;
  5091. A_UINT32 rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5092. /** element 0,1, ...7 -> NSS 1,2, ...8 */
  5093. A_UINT32 rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  5094. A_UINT32 rx_dcm[HTT_RX_PDEV_STATS_NUM_DCM_COUNTERS];
  5095. A_UINT32 rx_stbc[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5096. /** element 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160 and 80+80 MHz */
  5097. A_UINT32 rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5098. A_UINT32 rx_pream[HTT_RX_PDEV_STATS_NUM_PREAMBLE_TYPES];
  5099. /** units = dB above noise floor */
  5100. A_UINT8 rssi_chain[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5101. /** Counters to track number of rx packets in each GI in each mcs (0-11) */
  5102. A_UINT32 rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5103. /** rx Signal Strength value in dBm unit */
  5104. A_INT32 rssi_in_dbm;
  5105. A_UINT32 rx_11ax_su_ext;
  5106. A_UINT32 rx_11ac_mumimo;
  5107. A_UINT32 rx_11ax_mumimo;
  5108. A_UINT32 rx_11ax_ofdma;
  5109. A_UINT32 txbf;
  5110. A_UINT32 rx_legacy_cck_rate[HTT_RX_PDEV_STATS_NUM_LEGACY_CCK_STATS];
  5111. A_UINT32 rx_legacy_ofdm_rate[HTT_RX_PDEV_STATS_NUM_LEGACY_OFDM_STATS];
  5112. A_UINT32 rx_active_dur_us_low;
  5113. A_UINT32 rx_active_dur_us_high;
  5114. /** number of times UL MU MIMO RX packets received */
  5115. A_UINT32 rx_11ax_ul_ofdma;
  5116. /** 11AX HE UL OFDMA RX TB PPDU MCS stats */
  5117. A_UINT32 ul_ofdma_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5118. /** 11AX HE UL OFDMA RX TB PPDU GI stats */
  5119. A_UINT32 ul_ofdma_rx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5120. /**
  5121. * 11AX HE UL OFDMA RX TB PPDU NSS stats
  5122. * (Increments the individual user NSS in the OFDMA PPDU received)
  5123. */
  5124. A_UINT32 ul_ofdma_rx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  5125. /** 11AX HE UL OFDMA RX TB PPDU BW stats */
  5126. A_UINT32 ul_ofdma_rx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  5127. /** Number of times UL OFDMA TB PPDUs received with stbc */
  5128. A_UINT32 ul_ofdma_rx_stbc;
  5129. /** Number of times UL OFDMA TB PPDUs received with ldpc */
  5130. A_UINT32 ul_ofdma_rx_ldpc;
  5131. /**
  5132. * Number of non data PPDUs received for each degree (number of users)
  5133. * in UL OFDMA
  5134. */
  5135. A_UINT32 rx_ulofdma_non_data_ppdu[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  5136. /**
  5137. * Number of data ppdus received for each degree (number of users)
  5138. * in UL OFDMA
  5139. */
  5140. A_UINT32 rx_ulofdma_data_ppdu[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  5141. /**
  5142. * Number of mpdus passed for each degree (number of users)
  5143. * in UL OFDMA TB PPDU
  5144. */
  5145. A_UINT32 rx_ulofdma_mpdu_ok[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  5146. /**
  5147. * Number of mpdus failed for each degree (number of users)
  5148. * in UL OFDMA TB PPDU
  5149. */
  5150. A_UINT32 rx_ulofdma_mpdu_fail[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  5151. A_UINT32 nss_count;
  5152. A_UINT32 pilot_count;
  5153. /** RxEVM stats in dB */
  5154. A_INT32 rx_pilot_evm_dB[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_RXEVM_MAX_PILOTS_PER_NSS];
  5155. /**
  5156. * EVM mean across pilots, computed as
  5157. * mean(10*log10(rx_pilot_evm_linear)) = mean(rx_pilot_evm_dB)
  5158. */
  5159. A_INT32 rx_pilot_evm_dB_mean[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  5160. /** dBm units */
  5161. A_INT8 rx_ul_fd_rssi[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  5162. /** per_chain_rssi_pkt_type:
  5163. * This field shows what type of rx frame the per-chain RSSI was computed
  5164. * on, by recording the frame type and sub-type as bit-fields within this
  5165. * field:
  5166. * BIT [3 : 0] :- IEEE80211_FC0_TYPE
  5167. * BIT [7 : 4] :- IEEE80211_FC0_SUBTYPE
  5168. * BIT [31 : 8] :- Reserved
  5169. */
  5170. A_UINT32 per_chain_rssi_pkt_type;
  5171. A_INT8 rx_per_chain_rssi_in_dbm[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5172. A_UINT32 rx_su_ndpa;
  5173. A_UINT32 rx_11ax_su_txbf_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5174. A_UINT32 rx_mu_ndpa;
  5175. A_UINT32 rx_11ax_mu_txbf_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5176. A_UINT32 rx_br_poll;
  5177. A_UINT32 rx_11ax_dl_ofdma_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5178. A_UINT32 rx_11ax_dl_ofdma_ru[HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS];
  5179. /**
  5180. * Number of non data ppdus received for each degree (number of users)
  5181. * with UL MUMIMO
  5182. */
  5183. A_UINT32 rx_ulmumimo_non_data_ppdu[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
  5184. /**
  5185. * Number of data ppdus received for each degree (number of users)
  5186. * with UL MUMIMO
  5187. */
  5188. A_UINT32 rx_ulmumimo_data_ppdu[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
  5189. /**
  5190. * Number of mpdus passed for each degree (number of users)
  5191. * with UL MUMIMO TB PPDU
  5192. */
  5193. A_UINT32 rx_ulmumimo_mpdu_ok[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
  5194. /**
  5195. * Number of mpdus failed for each degree (number of users)
  5196. * with UL MUMIMO TB PPDU
  5197. */
  5198. A_UINT32 rx_ulmumimo_mpdu_fail[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
  5199. /**
  5200. * Number of non data ppdus received for each degree (number of users)
  5201. * in UL OFDMA
  5202. */
  5203. A_UINT32 rx_ulofdma_non_data_nusers[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  5204. /**
  5205. * Number of data ppdus received for each degree (number of users)
  5206. *in UL OFDMA
  5207. */
  5208. A_UINT32 rx_ulofdma_data_nusers[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  5209. /* Stats for MCS 12/13 */
  5210. A_UINT32 rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  5211. /*
  5212. * NOTE - this TLV is already large enough that it causes the HTT message
  5213. * carrying it to be nearly at the message size limit that applies to
  5214. * many targets/hosts.
  5215. * No further fields should be added to this TLV without very careful
  5216. * review to ensure the size increase is acceptable.
  5217. */
  5218. } htt_stats_rx_pdev_rate_stats_tlv;
  5219. /* preserve old name alias for new name consistent with the tag name */
  5220. typedef htt_stats_rx_pdev_rate_stats_tlv htt_rx_pdev_rate_stats_tlv;
  5221. typedef struct {
  5222. htt_tlv_hdr_t tlv_hdr;
  5223. /** Tx PPDU duration histogram **/
  5224. A_UINT32 rx_ppdu_dur_hist[HTT_PDEV_STATS_PPDU_DUR_HIST_BINS];
  5225. } htt_stats_rx_pdev_ppdu_dur_tlv;
  5226. /* preserve old name alias for new name consistent with the tag name */
  5227. typedef htt_stats_rx_pdev_ppdu_dur_tlv htt_rx_pdev_ppdu_dur_stats_tlv;
  5228. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_RX_RATE
  5229. * TLV_TAGS:
  5230. * - HTT_STATS_RX_PDEV_RATE_STATS_TAG
  5231. */
  5232. /* NOTE:
  5233. * This structure is for documentation, and cannot be safely used directly.
  5234. * Instead, use the constituent TLV structures to fill/parse.
  5235. */
  5236. typedef struct {
  5237. htt_stats_rx_pdev_rate_stats_tlv rate_tlv;
  5238. htt_stats_rx_pdev_ppdu_dur_tlv rx_ppdu_dur_tlv;
  5239. } htt_rx_pdev_rate_stats_t;
  5240. typedef struct {
  5241. htt_tlv_hdr_t tlv_hdr;
  5242. /** units = dB above noise floor */
  5243. A_UINT8 rssi_chain_ext[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS];
  5244. A_INT8 rx_per_chain_rssi_ext_in_dbm[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS];
  5245. /** rx mcast signal strength value in dBm unit */
  5246. A_INT32 rssi_mcast_in_dbm;
  5247. /** rx mgmt packet signal Strength value in dBm unit */
  5248. A_INT32 rssi_mgmt_in_dbm;
  5249. /*
  5250. * Stats for MCS 0-13 since rx_pdev_rate_stats_tlv cannot be updated,
  5251. * due to message size limitations.
  5252. */
  5253. A_UINT32 rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  5254. A_UINT32 rx_stbc_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  5255. A_UINT32 rx_gi_ext[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  5256. A_UINT32 ul_ofdma_rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  5257. A_UINT32 ul_ofdma_rx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  5258. A_UINT32 rx_11ax_su_txbf_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  5259. A_UINT32 rx_11ax_mu_txbf_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  5260. A_UINT32 rx_11ax_dl_ofdma_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
  5261. /* MCS 14,15 */
  5262. A_UINT32 rx_mcs_ext_2[HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  5263. A_UINT32 rx_bw_ext[HTT_RX_PDEV_STATS_NUM_BW_EXT2_COUNTERS];
  5264. A_UINT32 rx_gi_ext_2[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
  5265. A_UINT32 rx_su_punctured_mode[HTT_RX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS];
  5266. A_UINT32 reduced_rx_bw[HTT_RX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5267. 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 */
  5268. 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];
  5269. } htt_stats_rx_pdev_rate_ext_stats_tlv;
  5270. /* preserve old name alias for new name consistent with the tag name */
  5271. typedef htt_stats_rx_pdev_rate_ext_stats_tlv htt_rx_pdev_rate_ext_stats_tlv;
  5272. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_RX_RATE_EXT
  5273. * TLV_TAGS:
  5274. * - HTT_STATS_RX_PDEV_RATE_EXT_STATS_TAG
  5275. */
  5276. /* NOTE:
  5277. * This structure is for documentation, and cannot be safely used directly.
  5278. * Instead, use the constituent TLV structures to fill/parse.
  5279. */
  5280. typedef struct {
  5281. htt_stats_rx_pdev_rate_ext_stats_tlv rate_tlv;
  5282. } htt_rx_pdev_rate_ext_stats_t;
  5283. #define HTT_STATS_CMN_MAC_ID_M 0x000000ff
  5284. #define HTT_STATS_CMN_MAC_ID_S 0
  5285. #define HTT_STATS_CMN_MAC_ID_GET(_var) \
  5286. (((_var) & HTT_STATS_CMN_MAC_ID_M) >> \
  5287. HTT_STATS_CMN_MAC_ID_S)
  5288. #define HTT_STATS_CMN_MAC_ID_SET(_var, _val) \
  5289. do { \
  5290. HTT_CHECK_SET_VAL(HTT_STATS_CMN_MAC_ID, _val); \
  5291. ((_var) |= ((_val) << HTT_STATS_CMN_MAC_ID_S)); \
  5292. } while (0)
  5293. #define HTT_RX_UL_MAX_UPLINK_RSSI_TRACK 5
  5294. typedef struct {
  5295. htt_tlv_hdr_t tlv_hdr;
  5296. /**
  5297. * BIT [ 7 : 0] :- mac_id
  5298. * BIT [31 : 8] :- reserved
  5299. */
  5300. A_UINT32 mac_id__word;
  5301. A_UINT32 rx_11ax_ul_ofdma;
  5302. A_UINT32 ul_ofdma_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5303. A_UINT32 ul_ofdma_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5304. A_UINT32 ul_ofdma_rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  5305. A_UINT32 ul_ofdma_rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5306. A_UINT32 ul_ofdma_rx_stbc;
  5307. A_UINT32 ul_ofdma_rx_ldpc;
  5308. /*
  5309. * These are arrays to hold the number of PPDUs that we received per RU.
  5310. * E.g. PPDUs (data or non data) received in RU26 will be incremented in
  5311. * array offset 0 and similarly RU52 will be incremented in array offset 1
  5312. */
  5313. A_UINT32 rx_ulofdma_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS]; /* ppdu level */
  5314. A_UINT32 rx_ulofdma_non_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS]; /* ppdu level */
  5315. /*
  5316. * These arrays hold Target RSSI (rx power the AP wants),
  5317. * FD RSSI (rx power the AP sees) & Power headroom values of STAs
  5318. * which can be identified by AIDs, during trigger based RX.
  5319. * Array acts a circular buffer and holds values for last 5 STAs
  5320. * in the same order as RX.
  5321. */
  5322. /**
  5323. * STA AID array for identifying which STA the
  5324. * Target-RSSI / FD-RSSI / pwr headroom stats are for
  5325. */
  5326. A_UINT32 uplink_sta_aid[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5327. /**
  5328. * Trig Target RSSI for STA AID in same index - UNIT(dBm)
  5329. */
  5330. A_INT32 uplink_sta_target_rssi[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5331. /**
  5332. * Trig FD RSSI from STA AID in same index - UNIT(dBm)
  5333. */
  5334. A_INT32 uplink_sta_fd_rssi[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5335. /**
  5336. * Trig power headroom for STA AID in same idx - UNIT(dB)
  5337. */
  5338. A_UINT32 uplink_sta_power_headroom[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5339. A_UINT32 reduced_ul_ofdma_rx_bw[HTT_RX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5340. /*
  5341. * Number of HE UL OFDMA per-user responses containing only a QoS null in
  5342. * response to basic trigger. Typically a data response is expected.
  5343. */
  5344. A_UINT32 ul_ofdma_basic_trigger_rx_qos_null_only;
  5345. } htt_stats_rx_pdev_ul_trig_stats_tlv;
  5346. /* preserve old name alias for new name consistent with the tag name */
  5347. typedef htt_stats_rx_pdev_ul_trig_stats_tlv htt_rx_pdev_ul_trigger_stats_tlv;
  5348. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_UL_TRIG_STATS
  5349. * TLV_TAGS:
  5350. * - HTT_STATS_RX_PDEV_UL_TRIG_STATS_TAG
  5351. * NOTE:
  5352. * This structure is for documentation, and cannot be safely used directly.
  5353. * Instead, use the constituent TLV structures to fill/parse.
  5354. */
  5355. typedef struct {
  5356. htt_stats_rx_pdev_ul_trig_stats_tlv ul_trigger_tlv;
  5357. } htt_rx_pdev_ul_trigger_stats_t;
  5358. typedef struct {
  5359. htt_tlv_hdr_t tlv_hdr;
  5360. /**
  5361. * BIT [ 7 : 0] :- mac_id
  5362. * BIT [31 : 8] :- reserved
  5363. */
  5364. A_UINT32 mac_id__word;
  5365. A_UINT32 rx_11be_ul_ofdma;
  5366. A_UINT32 be_ul_ofdma_rx_mcs[HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  5367. A_UINT32 be_ul_ofdma_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  5368. A_UINT32 be_ul_ofdma_rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  5369. A_UINT32 be_ul_ofdma_rx_bw[HTT_RX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  5370. A_UINT32 be_ul_ofdma_rx_stbc;
  5371. A_UINT32 be_ul_ofdma_rx_ldpc;
  5372. /*
  5373. * These are arrays to hold the number of PPDUs that we received per RU.
  5374. * E.g. PPDUs (data or non data) received in RU26 will be incremented in
  5375. * array offset 0 and similarly RU52 will be incremented in array offset 1
  5376. */
  5377. /** PPDU level */
  5378. A_UINT32 be_rx_ulofdma_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS];
  5379. /** PPDU level */
  5380. A_UINT32 be_rx_ulofdma_non_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS];
  5381. /*
  5382. * These arrays hold Target RSSI (rx power the AP wants),
  5383. * FD RSSI (rx power the AP sees) & Power headroom values of STAs
  5384. * which can be identified by AIDs, during trigger based RX.
  5385. * Array acts a circular buffer and holds values for last 5 STAs
  5386. * in the same order as RX.
  5387. */
  5388. /**
  5389. * STA AID array for identifying which STA the
  5390. * Target-RSSI / FD-RSSI / pwr headroom stats are for
  5391. */
  5392. A_UINT32 be_uplink_sta_aid[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5393. /**
  5394. * Trig Target RSSI for STA AID in same index - UNIT(dBm)
  5395. */
  5396. A_INT32 be_uplink_sta_target_rssi[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5397. /**
  5398. * Trig FD RSSI from STA AID in same index - UNIT(dBm)
  5399. */
  5400. A_INT32 be_uplink_sta_fd_rssi[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5401. /**
  5402. * Trig power headroom for STA AID in same idx - UNIT(dB)
  5403. */
  5404. A_UINT32 be_uplink_sta_power_headroom[HTT_RX_UL_MAX_UPLINK_RSSI_TRACK];
  5405. /*
  5406. * Number of EHT UL OFDMA per-user responses containing only a QoS null in
  5407. * response to basic trigger. Typically a data response is expected.
  5408. */
  5409. A_UINT32 be_ul_ofdma_basic_trigger_rx_qos_null_only;
  5410. /* UL MLO Queue Depth Sharing Stats */
  5411. A_UINT32 ul_mlo_send_qdepth_params_count;
  5412. A_UINT32 ul_mlo_proc_qdepth_params_count;
  5413. A_UINT32 ul_mlo_proc_accepted_qdepth_params_count;
  5414. A_UINT32 ul_mlo_proc_discarded_qdepth_params_count;
  5415. } htt_stats_rx_pdev_be_ul_trig_stats_tlv;
  5416. /* preserve old name alias for new name consistent with the tag name */
  5417. typedef htt_stats_rx_pdev_be_ul_trig_stats_tlv
  5418. htt_rx_pdev_be_ul_trigger_stats_tlv;
  5419. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_UL_TRIG_STATS
  5420. * TLV_TAGS:
  5421. * - HTT_STATS_RX_PDEV_BE_UL_TRIG_STATS_TAG
  5422. * NOTE:
  5423. * This structure is for documentation, and cannot be safely used directly.
  5424. * Instead, use the constituent TLV structures to fill/parse.
  5425. */
  5426. typedef struct {
  5427. htt_stats_rx_pdev_be_ul_trig_stats_tlv ul_trigger_tlv;
  5428. } htt_rx_pdev_be_ul_trigger_stats_t;
  5429. typedef struct {
  5430. htt_tlv_hdr_t tlv_hdr;
  5431. A_UINT32 user_index;
  5432. /** PPDU level */
  5433. A_UINT32 rx_ulofdma_non_data_ppdu;
  5434. /** PPDU level */
  5435. A_UINT32 rx_ulofdma_data_ppdu;
  5436. /** MPDU level */
  5437. A_UINT32 rx_ulofdma_mpdu_ok;
  5438. /** MPDU level */
  5439. A_UINT32 rx_ulofdma_mpdu_fail;
  5440. A_UINT32 rx_ulofdma_non_data_nusers;
  5441. A_UINT32 rx_ulofdma_data_nusers;
  5442. } htt_stats_rx_pdev_ul_ofdma_user_stats_tlv;
  5443. /* preserve old name alias for new name consistent with the tag name */
  5444. typedef htt_stats_rx_pdev_ul_ofdma_user_stats_tlv
  5445. htt_rx_pdev_ul_ofdma_user_stats_tlv;
  5446. typedef struct {
  5447. htt_tlv_hdr_t tlv_hdr;
  5448. A_UINT32 user_index;
  5449. /** PPDU level */
  5450. A_UINT32 be_rx_ulofdma_non_data_ppdu;
  5451. /** PPDU level */
  5452. A_UINT32 be_rx_ulofdma_data_ppdu;
  5453. /** MPDU level */
  5454. A_UINT32 be_rx_ulofdma_mpdu_ok;
  5455. /** MPDU level */
  5456. A_UINT32 be_rx_ulofdma_mpdu_fail;
  5457. A_UINT32 be_rx_ulofdma_non_data_nusers;
  5458. A_UINT32 be_rx_ulofdma_data_nusers;
  5459. } htt_stats_rx_pdev_be_ul_ofdma_user_stats_tlv;
  5460. /* preserve old name alias for new name consistent with the tag name */
  5461. typedef htt_stats_rx_pdev_be_ul_ofdma_user_stats_tlv
  5462. htt_rx_pdev_be_ul_ofdma_user_stats_tlv;
  5463. typedef struct {
  5464. htt_tlv_hdr_t tlv_hdr;
  5465. A_UINT32 user_index;
  5466. /** PPDU level */
  5467. A_UINT32 rx_ulmumimo_non_data_ppdu;
  5468. /** PPDU level */
  5469. A_UINT32 rx_ulmumimo_data_ppdu;
  5470. /** MPDU level */
  5471. A_UINT32 rx_ulmumimo_mpdu_ok;
  5472. /** MPDU level */
  5473. A_UINT32 rx_ulmumimo_mpdu_fail;
  5474. } htt_stats_rx_pdev_ul_mimo_user_stats_tlv;
  5475. /* preserve old name alias for new name consistent with the tag name */
  5476. typedef htt_stats_rx_pdev_ul_mimo_user_stats_tlv
  5477. htt_rx_pdev_ul_mimo_user_stats_tlv;
  5478. typedef struct {
  5479. htt_tlv_hdr_t tlv_hdr;
  5480. A_UINT32 user_index;
  5481. /** PPDU level */
  5482. A_UINT32 be_rx_ulmumimo_non_data_ppdu;
  5483. /** PPDU level */
  5484. A_UINT32 be_rx_ulmumimo_data_ppdu;
  5485. /** MPDU level */
  5486. A_UINT32 be_rx_ulmumimo_mpdu_ok;
  5487. /** MPDU level */
  5488. A_UINT32 be_rx_ulmumimo_mpdu_fail;
  5489. } htt_stats_rx_pdev_be_ul_mimo_user_stats_tlv;
  5490. /* preserve old name alias for new name consistent with the tag name */
  5491. typedef htt_stats_rx_pdev_be_ul_mimo_user_stats_tlv
  5492. htt_rx_pdev_be_ul_mimo_user_stats_tlv;
  5493. /* == RX PDEV/SOC STATS == */
  5494. typedef struct {
  5495. htt_tlv_hdr_t tlv_hdr;
  5496. /**
  5497. * BIT [7:0] :- mac_id
  5498. * BIT [31:8] :- reserved
  5499. *
  5500. * Refer to HTT_STATS_CMN_MAC_ID_GET/SET macros.
  5501. */
  5502. A_UINT32 mac_id__word;
  5503. /** Number of times UL MUMIMO RX packets received */
  5504. A_UINT32 rx_11ax_ul_mumimo;
  5505. /** 11AX HE UL MU-MIMO RX TB PPDU MCS stats */
  5506. A_UINT32 ul_mumimo_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5507. /**
  5508. * 11AX HE UL MU-MIMO RX GI & LTF stats.
  5509. * Index 0 indicates 1xLTF + 1.6 msec GI
  5510. * Index 1 indicates 2xLTF + 1.6 msec GI
  5511. * Index 2 indicates 4xLTF + 3.2 msec GI
  5512. */
  5513. A_UINT32 ul_mumimo_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  5514. /**
  5515. * 11AX HE UL MU-MIMO RX TB PPDU NSS stats
  5516. * (Increments the individual user NSS in the UL MU MIMO PPDU received)
  5517. */
  5518. A_UINT32 ul_mumimo_rx_nss[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5519. /** 11AX HE UL MU-MIMO RX TB PPDU BW stats */
  5520. A_UINT32 ul_mumimo_rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5521. /** Number of times UL MUMIMO TB PPDUs received with STBC */
  5522. A_UINT32 ul_mumimo_rx_stbc;
  5523. /** Number of times UL MUMIMO TB PPDUs received with LDPC */
  5524. A_UINT32 ul_mumimo_rx_ldpc;
  5525. /* Stats for MCS 12/13 */
  5526. A_UINT32 ul_mumimo_rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  5527. A_UINT32 ul_mumimo_rx_gi_ext[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  5528. /** RSSI in dBm for Rx TB PPDUs */
  5529. A_INT8 rx_ul_mumimo_chain_rssi_in_dbm[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_STATS_TOTAL_BW_COUNTERS];
  5530. /** Target RSSI programmed in UL MUMIMO triggers (units dBm) */
  5531. A_INT8 rx_ul_mumimo_target_rssi[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5532. /** FD RSSI measured for Rx UL TB PPDUs (units dBm) */
  5533. A_INT8 rx_ul_mumimo_fd_rssi[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS][HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5534. /** Average pilot EVM measued for RX UL TB PPDU */
  5535. 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];
  5536. A_UINT32 reduced_ul_mumimo_rx_bw[HTT_RX_PDEV_STATS_NUM_REDUCED_CHAN_TYPES][HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  5537. /*
  5538. * Number of HE UL MU-MIMO per-user responses containing only a QoS null in
  5539. * response to basic trigger. Typically a data response is expected.
  5540. */
  5541. A_UINT32 ul_mumimo_basic_trigger_rx_qos_null_only;
  5542. } htt_stats_rx_pdev_ul_mumimo_trig_stats_tlv;
  5543. /* preserve old name alias for new name consistent with the tag name */
  5544. typedef htt_stats_rx_pdev_ul_mumimo_trig_stats_tlv
  5545. htt_rx_pdev_ul_mumimo_trig_stats_tlv;
  5546. typedef struct {
  5547. htt_tlv_hdr_t tlv_hdr;
  5548. /**
  5549. * BIT [7:0] :- mac_id
  5550. * BIT [31:8] :- reserved
  5551. *
  5552. * Refer to HTT_STATS_CMN_MAC_ID_GET/SET macros.
  5553. */
  5554. A_UINT32 mac_id__word;
  5555. /** Number of times UL MUMIMO RX packets received */
  5556. A_UINT32 rx_11be_ul_mumimo;
  5557. /** 11BE EHT UL MU-MIMO RX TB PPDU MCS stats */
  5558. A_UINT32 be_ul_mumimo_rx_mcs[HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  5559. /**
  5560. * 11BE EHT UL MU-MIMO RX GI & LTF stats.
  5561. * Index 0 indicates 1xLTF + 1.6 msec GI
  5562. * Index 1 indicates 2xLTF + 1.6 msec GI
  5563. * Index 2 indicates 4xLTF + 3.2 msec GI
  5564. */
  5565. A_UINT32 be_ul_mumimo_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_BE_MCS_COUNTERS];
  5566. /**
  5567. * 11BE EHT UL MU-MIMO RX TB PPDU NSS stats
  5568. * (Increments the individual user NSS in the UL MU MIMO PPDU received)
  5569. */
  5570. A_UINT32 be_ul_mumimo_rx_nss[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5571. /** 11BE EHT UL MU-MIMO RX TB PPDU BW stats */
  5572. A_UINT32 be_ul_mumimo_rx_bw[HTT_RX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  5573. /** Number of times UL MUMIMO TB PPDUs received with STBC */
  5574. A_UINT32 be_ul_mumimo_rx_stbc;
  5575. /** Number of times UL MUMIMO TB PPDUs received with LDPC */
  5576. A_UINT32 be_ul_mumimo_rx_ldpc;
  5577. /** RSSI in dBm for Rx TB PPDUs */
  5578. 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];
  5579. /** Target RSSI programmed in UL MUMIMO triggers (units dBm) */
  5580. A_INT8 be_rx_ul_mumimo_target_rssi[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER][HTT_RX_PDEV_STATS_NUM_BE_BW_COUNTERS];
  5581. /** FD RSSI measured for Rx UL TB PPDUs (units dBm) */
  5582. A_INT8 be_rx_ul_mumimo_fd_rssi[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER][HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5583. /** Average pilot EVM measued for RX UL TB PPDU */
  5584. A_INT8 be_rx_ulmumimo_pilot_evm_dB_mean[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER][HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  5585. /** Number of times UL MUMIMO TB PPDUs received in a punctured mode */
  5586. A_UINT32 rx_ul_mumimo_punctured_mode[HTT_RX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS];
  5587. /*
  5588. * Number of EHT UL MU-MIMO per-user responses containing only a QoS null
  5589. * in response to basic trigger. Typically a data response is expected.
  5590. */
  5591. A_UINT32 be_ul_mumimo_basic_trigger_rx_qos_null_only;
  5592. } htt_stats_rx_pdev_ul_mumimo_trig_be_stats_tlv;
  5593. /* preserve old name alias for new name consistent with the tag name */
  5594. typedef htt_stats_rx_pdev_ul_mumimo_trig_be_stats_tlv
  5595. htt_rx_pdev_ul_mumimo_trig_be_stats_tlv;
  5596. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_UL_MUMIMO_TRIG_STATS
  5597. * TLV_TAGS:
  5598. * - HTT_STATS_RX_PDEV_UL_MUMIMO_TRIG_STATS_TAG
  5599. * - HTT_STATS_RX_PDEV_UL_MUMIMO_TRIG_BE_STATS_TAG
  5600. */
  5601. typedef struct {
  5602. htt_stats_rx_pdev_ul_mumimo_trig_stats_tlv ul_mumimo_trig_tlv;
  5603. htt_stats_rx_pdev_ul_mumimo_trig_be_stats_tlv ul_mumimo_trig_be_tlv;
  5604. } htt_rx_pdev_ul_mumimo_trig_stats_t;
  5605. typedef struct {
  5606. htt_tlv_hdr_t tlv_hdr;
  5607. /** Num Packets received on REO FW ring */
  5608. A_UINT32 fw_reo_ring_data_msdu;
  5609. /** Num bc/mc packets indicated from fw to host */
  5610. A_UINT32 fw_to_host_data_msdu_bcmc;
  5611. /** Num unicast packets indicated from fw to host */
  5612. A_UINT32 fw_to_host_data_msdu_uc;
  5613. /** Num remote buf recycle from offload */
  5614. A_UINT32 ofld_remote_data_buf_recycle_cnt;
  5615. /** Num remote free buf given to offload */
  5616. A_UINT32 ofld_remote_free_buf_indication_cnt;
  5617. /** Num unicast packets from local path indicated to host */
  5618. A_UINT32 ofld_buf_to_host_data_msdu_uc;
  5619. /** Num unicast packets from REO indicated to host */
  5620. A_UINT32 reo_fw_ring_to_host_data_msdu_uc;
  5621. /** Num Packets received from WBM SW1 ring */
  5622. A_UINT32 wbm_sw_ring_reap;
  5623. /** Num packets from WBM forwarded from fw to host via WBM */
  5624. A_UINT32 wbm_forward_to_host_cnt;
  5625. /** Num packets from WBM recycled to target refill ring */
  5626. A_UINT32 wbm_target_recycle_cnt;
  5627. /**
  5628. * Total Num of recycled to refill ring,
  5629. * including packets from WBM and REO
  5630. */
  5631. A_UINT32 target_refill_ring_recycle_cnt;
  5632. } htt_stats_rx_soc_fw_stats_tlv;
  5633. /* preserve old name alias for new name consistent with the tag name */
  5634. typedef htt_stats_rx_soc_fw_stats_tlv htt_rx_soc_fw_stats_tlv;
  5635. #define HTT_RX_SOC_FW_REFILL_RING_EMPTY_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  5636. /* NOTE: Variable length TLV, use length spec to infer array size */
  5637. typedef struct {
  5638. htt_tlv_hdr_t tlv_hdr;
  5639. /** Num ring empty encountered */
  5640. A_UINT32 refill_ring_empty_cnt[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  5641. } htt_stats_rx_soc_fw_refill_ring_empty_tlv;
  5642. /* preserve old name alias for new name consistent with the tag name */
  5643. typedef htt_stats_rx_soc_fw_refill_ring_empty_tlv
  5644. htt_rx_soc_fw_refill_ring_empty_tlv_v;
  5645. #define HTT_RX_SOC_FW_REFILL_RING_EMPTY_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  5646. /* NOTE: Variable length TLV, use length spec to infer array size */
  5647. typedef struct {
  5648. htt_tlv_hdr_t tlv_hdr;
  5649. /** Num total buf refilled from refill ring */
  5650. A_UINT32 refill_ring_num_refill[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  5651. } htt_stats_rx_soc_fw_refill_ring_num_refill_tlv;
  5652. /* preserve old name alias for new name consistent with the tag name */
  5653. typedef htt_stats_rx_soc_fw_refill_ring_num_refill_tlv
  5654. htt_rx_soc_fw_refill_ring_num_refill_tlv_v;
  5655. /* RXDMA error code from WBM released packets */
  5656. typedef enum {
  5657. HTT_RX_RXDMA_OVERFLOW_ERR = 0,
  5658. HTT_RX_RXDMA_MPDU_LENGTH_ERR = 1,
  5659. HTT_RX_RXDMA_FCS_ERR = 2,
  5660. HTT_RX_RXDMA_DECRYPT_ERR = 3,
  5661. HTT_RX_RXDMA_TKIP_MIC_ERR = 4,
  5662. HTT_RX_RXDMA_UNECRYPTED_ERR = 5,
  5663. HTT_RX_RXDMA_MSDU_LEN_ERR = 6,
  5664. HTT_RX_RXDMA_MSDU_LIMIT_ERR = 7,
  5665. HTT_RX_RXDMA_WIFI_PARSE_ERR = 8,
  5666. HTT_RX_RXDMA_AMSDU_PARSE_ERR = 9,
  5667. HTT_RX_RXDMA_SA_TIMEOUT_ERR = 10,
  5668. HTT_RX_RXDMA_DA_TIMEOUT_ERR = 11,
  5669. HTT_RX_RXDMA_FLOW_TIMEOUT_ERR = 12,
  5670. HTT_RX_RXDMA_FLUSH_REQUEST = 13,
  5671. HTT_RX_RXDMA_ERR_CODE_RVSD0 = 14,
  5672. HTT_RX_RXDMA_ERR_CODE_RVSD1 = 15,
  5673. /*
  5674. * This MAX_ERR_CODE should not be used in any host/target messages,
  5675. * so that even though it is defined within a host/target interface
  5676. * definition header file, it isn't actually part of the host/target
  5677. * interface, and thus can be modified.
  5678. */
  5679. HTT_RX_RXDMA_MAX_ERR_CODE
  5680. } htt_rx_rxdma_error_code_enum;
  5681. /* NOTE: Variable length TLV, use length spec to infer array size */
  5682. typedef struct {
  5683. htt_tlv_hdr_t tlv_hdr;
  5684. /** NOTE:
  5685. * The mapping of RXDMA error types to rxdma_err array elements is HW dependent.
  5686. * It is expected but not required that the target will provide a rxdma_err element
  5687. * for each of the htt_rx_rxdma_error_code_enum values, up to but not including
  5688. * MAX_ERR_CODE. The host should ignore any array elements whose
  5689. * indices are >= the MAX_ERR_CODE value the host was compiled with.
  5690. */
  5691. A_UINT32 rxdma_err[1]; /* HTT_RX_RXDMA_MAX_ERR_CODE */
  5692. } htt_stats_rx_refill_rxdma_err_tlv;
  5693. /* preserve old name alias for new name consistent with the tag name */
  5694. typedef htt_stats_rx_refill_rxdma_err_tlv
  5695. htt_rx_soc_fw_refill_ring_num_rxdma_err_tlv_v;
  5696. /* REO error code from WBM released packets */
  5697. typedef enum {
  5698. HTT_RX_REO_QUEUE_DESC_ADDR_ZERO = 0,
  5699. HTT_RX_REO_QUEUE_DESC_NOT_VALID = 1,
  5700. HTT_RX_AMPDU_IN_NON_BA = 2,
  5701. HTT_RX_NON_BA_DUPLICATE = 3,
  5702. HTT_RX_BA_DUPLICATE = 4,
  5703. HTT_RX_REGULAR_FRAME_2K_JUMP = 5,
  5704. HTT_RX_BAR_FRAME_2K_JUMP = 6,
  5705. HTT_RX_REGULAR_FRAME_OOR = 7,
  5706. HTT_RX_BAR_FRAME_OOR = 8,
  5707. HTT_RX_BAR_FRAME_NO_BA_SESSION = 9,
  5708. HTT_RX_BAR_FRAME_SN_EQUALS_SSN = 10,
  5709. HTT_RX_PN_CHECK_FAILED = 11,
  5710. HTT_RX_2K_ERROR_HANDLING_FLAG_SET = 12,
  5711. HTT_RX_PN_ERROR_HANDLING_FLAG_SET = 13,
  5712. HTT_RX_QUEUE_DESCRIPTOR_BLOCKED_SET = 14,
  5713. HTT_RX_REO_ERR_CODE_RVSD = 15,
  5714. /*
  5715. * This MAX_ERR_CODE should not be used in any host/target messages,
  5716. * so that even though it is defined within a host/target interface
  5717. * definition header file, it isn't actually part of the host/target
  5718. * interface, and thus can be modified.
  5719. */
  5720. HTT_RX_REO_MAX_ERR_CODE
  5721. } htt_rx_reo_error_code_enum;
  5722. /* NOTE: Variable length TLV, use length spec to infer array size */
  5723. typedef struct {
  5724. htt_tlv_hdr_t tlv_hdr;
  5725. /** NOTE:
  5726. * The mapping of REO error types to reo_err array elements is HW dependent.
  5727. * It is expected but not required that the target will provide a rxdma_err element
  5728. * for each of the htt_rx_reo_error_code_enum values, up to but not including
  5729. * MAX_ERR_CODE. The host should ignore any array elements whose
  5730. * indices are >= the MAX_ERR_CODE value the host was compiled with.
  5731. */
  5732. A_UINT32 reo_err[1]; /* HTT_RX_REO_MAX_ERR_CODE */
  5733. } htt_stats_rx_refill_reo_err_tlv;
  5734. /* preserve old name alias for new name consistent with the tag name */
  5735. typedef htt_stats_rx_refill_reo_err_tlv
  5736. htt_rx_soc_fw_refill_ring_num_reo_err_tlv_v;
  5737. /* NOTE:
  5738. * This structure is for documentation, and cannot be safely used directly.
  5739. * Instead, use the constituent TLV structures to fill/parse.
  5740. */
  5741. typedef struct {
  5742. htt_stats_rx_soc_fw_stats_tlv fw_tlv;
  5743. htt_stats_rx_soc_fw_refill_ring_empty_tlv fw_refill_ring_empty_tlv;
  5744. htt_stats_rx_soc_fw_refill_ring_num_refill_tlv
  5745. fw_refill_ring_num_refill_tlv;
  5746. htt_stats_rx_refill_rxdma_err_tlv fw_refill_ring_num_rxdma_err_tlv;
  5747. htt_stats_rx_refill_reo_err_tlv fw_refill_ring_num_reo_err_tlv;
  5748. } htt_rx_soc_stats_t;
  5749. /* == RX PDEV STATS == */
  5750. #define HTT_RX_PDEV_FW_STATS_MAC_ID_M 0x000000ff
  5751. #define HTT_RX_PDEV_FW_STATS_MAC_ID_S 0
  5752. #define HTT_RX_PDEV_FW_STATS_MAC_ID_GET(_var) \
  5753. (((_var) & HTT_RX_PDEV_FW_STATS_MAC_ID_M) >> \
  5754. HTT_RX_PDEV_FW_STATS_MAC_ID_S)
  5755. #define HTT_RX_PDEV_FW_STATS_MAC_ID_SET(_var, _val) \
  5756. do { \
  5757. HTT_CHECK_SET_VAL(HTT_RX_PDEV_FW_STATS_MAC_ID, _val); \
  5758. ((_var) |= ((_val) << HTT_RX_PDEV_FW_STATS_MAC_ID_S)); \
  5759. } while (0)
  5760. typedef struct {
  5761. htt_tlv_hdr_t tlv_hdr;
  5762. /**
  5763. * BIT [ 7 : 0] :- mac_id
  5764. * BIT [31 : 8] :- reserved
  5765. */
  5766. A_UINT32 mac_id__word;
  5767. /** Num PPDU status processed from HW */
  5768. A_UINT32 ppdu_recvd;
  5769. /** Num MPDU across PPDUs with FCS ok */
  5770. A_UINT32 mpdu_cnt_fcs_ok;
  5771. /** Num MPDU across PPDUs with FCS err */
  5772. A_UINT32 mpdu_cnt_fcs_err;
  5773. /** Num MSDU across PPDUs */
  5774. A_UINT32 tcp_msdu_cnt;
  5775. /** Num MSDU across PPDUs */
  5776. A_UINT32 tcp_ack_msdu_cnt;
  5777. /** Num MSDU across PPDUs */
  5778. A_UINT32 udp_msdu_cnt;
  5779. /** Num MSDU across PPDUs */
  5780. A_UINT32 other_msdu_cnt;
  5781. /** Num MPDU on FW ring indicated */
  5782. A_UINT32 fw_ring_mpdu_ind;
  5783. /** Num MGMT MPDU given to protocol */
  5784. A_UINT32 fw_ring_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  5785. /** Num ctrl MPDU given to protocol */
  5786. A_UINT32 fw_ring_ctrl_subtype[HTT_STATS_SUBTYPE_MAX];
  5787. /** Num mcast data packet received */
  5788. A_UINT32 fw_ring_mcast_data_msdu;
  5789. /** Num broadcast data packet received */
  5790. A_UINT32 fw_ring_bcast_data_msdu;
  5791. /** Num unicast data packet received */
  5792. A_UINT32 fw_ring_ucast_data_msdu;
  5793. /** Num null data packet received */
  5794. A_UINT32 fw_ring_null_data_msdu;
  5795. /** Num MPDU on FW ring dropped */
  5796. A_UINT32 fw_ring_mpdu_drop;
  5797. /** Num buf indication to offload */
  5798. A_UINT32 ofld_local_data_ind_cnt;
  5799. /** Num buf recycle from offload */
  5800. A_UINT32 ofld_local_data_buf_recycle_cnt;
  5801. /** Num buf indication to data_rx */
  5802. A_UINT32 drx_local_data_ind_cnt;
  5803. /** Num buf recycle from data_rx */
  5804. A_UINT32 drx_local_data_buf_recycle_cnt;
  5805. /** Num buf indication to protocol */
  5806. A_UINT32 local_nondata_ind_cnt;
  5807. /** Num buf recycle from protocol */
  5808. A_UINT32 local_nondata_buf_recycle_cnt;
  5809. /** Num buf fed */
  5810. A_UINT32 fw_status_buf_ring_refill_cnt;
  5811. /** Num ring empty encountered */
  5812. A_UINT32 fw_status_buf_ring_empty_cnt;
  5813. /** Num buf fed */
  5814. A_UINT32 fw_pkt_buf_ring_refill_cnt;
  5815. /** Num ring empty encountered */
  5816. A_UINT32 fw_pkt_buf_ring_empty_cnt;
  5817. /** Num buf fed */
  5818. A_UINT32 fw_link_buf_ring_refill_cnt;
  5819. /** Num ring empty encountered */
  5820. A_UINT32 fw_link_buf_ring_empty_cnt;
  5821. /** Num buf fed */
  5822. A_UINT32 host_pkt_buf_ring_refill_cnt;
  5823. /** Num ring empty encountered */
  5824. A_UINT32 host_pkt_buf_ring_empty_cnt;
  5825. /** Num buf fed */
  5826. A_UINT32 mon_pkt_buf_ring_refill_cnt;
  5827. /** Num ring empty encountered */
  5828. A_UINT32 mon_pkt_buf_ring_empty_cnt;
  5829. /** Num buf fed */
  5830. A_UINT32 mon_status_buf_ring_refill_cnt;
  5831. /** Num ring empty encountered */
  5832. A_UINT32 mon_status_buf_ring_empty_cnt;
  5833. /** Num buf fed */
  5834. A_UINT32 mon_desc_buf_ring_refill_cnt;
  5835. /** Num ring empty encountered */
  5836. A_UINT32 mon_desc_buf_ring_empty_cnt;
  5837. /** Num buf fed */
  5838. A_UINT32 mon_dest_ring_update_cnt;
  5839. /** Num ring full encountered */
  5840. A_UINT32 mon_dest_ring_full_cnt;
  5841. /** Num rx suspend is attempted */
  5842. A_UINT32 rx_suspend_cnt;
  5843. /** Num rx suspend failed */
  5844. A_UINT32 rx_suspend_fail_cnt;
  5845. /** Num rx resume attempted */
  5846. A_UINT32 rx_resume_cnt;
  5847. /** Num rx resume failed */
  5848. A_UINT32 rx_resume_fail_cnt;
  5849. /** Num rx ring switch */
  5850. A_UINT32 rx_ring_switch_cnt;
  5851. /** Num rx ring restore */
  5852. A_UINT32 rx_ring_restore_cnt;
  5853. /** Num rx flush issued */
  5854. A_UINT32 rx_flush_cnt;
  5855. /** Num rx recovery */
  5856. A_UINT32 rx_recovery_reset_cnt;
  5857. } htt_stats_rx_pdev_fw_stats_tlv;
  5858. /* preserve old name alias for new name consistent with the tag name */
  5859. typedef htt_stats_rx_pdev_fw_stats_tlv htt_rx_pdev_fw_stats_tlv;
  5860. typedef struct {
  5861. htt_tlv_hdr_t tlv_hdr;
  5862. /** peer mac address */
  5863. htt_mac_addr peer_mac_addr;
  5864. /** Num of tx mgmt frames with subtype on peer level */
  5865. A_UINT32 peer_tx_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  5866. /** Num of rx mgmt frames with subtype on peer level */
  5867. A_UINT32 peer_rx_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  5868. } htt_stats_peer_ctrl_path_txrx_stats_tlv;
  5869. /* preserve old name alias for new name consistent with the tag name */
  5870. typedef htt_stats_peer_ctrl_path_txrx_stats_tlv
  5871. htt_peer_ctrl_path_txrx_stats_tlv;
  5872. #define HTT_STATS_PHY_ERR_MAX 43
  5873. typedef struct {
  5874. htt_tlv_hdr_t tlv_hdr;
  5875. /**
  5876. * BIT [ 7 : 0] :- mac_id
  5877. * BIT [31 : 8] :- reserved
  5878. */
  5879. A_UINT32 mac_id__word;
  5880. /** Num of phy err */
  5881. A_UINT32 total_phy_err_cnt;
  5882. /** Counts of different types of phy errs
  5883. * The mapping of PHY error types to phy_err array elements is HW dependent.
  5884. * The only currently-supported mapping is shown below:
  5885. *
  5886. * 0 phyrx_err_phy_off Reception aborted due to receiving a PHY_OFF TLV
  5887. * 1 phyrx_err_synth_off
  5888. * 2 phyrx_err_ofdma_timing
  5889. * 3 phyrx_err_ofdma_signal_parity
  5890. * 4 phyrx_err_ofdma_rate_illegal
  5891. * 5 phyrx_err_ofdma_length_illegal
  5892. * 6 phyrx_err_ofdma_restart
  5893. * 7 phyrx_err_ofdma_service
  5894. * 8 phyrx_err_ppdu_ofdma_power_drop
  5895. * 9 phyrx_err_cck_blokker
  5896. * 10 phyrx_err_cck_timing
  5897. * 11 phyrx_err_cck_header_crc
  5898. * 12 phyrx_err_cck_rate_illegal
  5899. * 13 phyrx_err_cck_length_illegal
  5900. * 14 phyrx_err_cck_restart
  5901. * 15 phyrx_err_cck_service
  5902. * 16 phyrx_err_cck_power_drop
  5903. * 17 phyrx_err_ht_crc_err
  5904. * 18 phyrx_err_ht_length_illegal
  5905. * 19 phyrx_err_ht_rate_illegal
  5906. * 20 phyrx_err_ht_zlf
  5907. * 21 phyrx_err_false_radar_ext
  5908. * 22 phyrx_err_green_field
  5909. * 23 phyrx_err_bw_gt_dyn_bw
  5910. * 24 phyrx_err_leg_ht_mismatch
  5911. * 25 phyrx_err_vht_crc_error
  5912. * 26 phyrx_err_vht_siga_unsupported
  5913. * 27 phyrx_err_vht_lsig_len_invalid
  5914. * 28 phyrx_err_vht_ndp_or_zlf
  5915. * 29 phyrx_err_vht_nsym_lt_zero
  5916. * 30 phyrx_err_vht_rx_extra_symbol_mismatch
  5917. * 31 phyrx_err_vht_rx_skip_group_id0
  5918. * 32 phyrx_err_vht_rx_skip_group_id1to62
  5919. * 33 phyrx_err_vht_rx_skip_group_id63
  5920. * 34 phyrx_err_ofdm_ldpc_decoder_disabled
  5921. * 35 phyrx_err_defer_nap
  5922. * 36 phyrx_err_fdomain_timeout
  5923. * 37 phyrx_err_lsig_rel_check
  5924. * 38 phyrx_err_bt_collision
  5925. * 39 phyrx_err_unsupported_mu_feedback
  5926. * 40 phyrx_err_ppdu_tx_interrupt_rx
  5927. * 41 phyrx_err_unsupported_cbf
  5928. * 42 phyrx_err_other
  5929. */
  5930. A_UINT32 phy_err[HTT_STATS_PHY_ERR_MAX];
  5931. } htt_stats_rx_pdev_fw_stats_phy_err_tlv;
  5932. /* preserve old name alias for new name consistent with the tag name */
  5933. typedef htt_stats_rx_pdev_fw_stats_phy_err_tlv htt_rx_pdev_fw_stats_phy_err_tlv;
  5934. #define HTT_RX_PDEV_FW_RING_MPDU_ERR_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  5935. /* NOTE: Variable length TLV, use length spec to infer array size */
  5936. typedef struct {
  5937. htt_tlv_hdr_t tlv_hdr;
  5938. /** Num error MPDU for each RxDMA error type */
  5939. A_UINT32 fw_ring_mpdu_err[1]; /* HTT_RX_STATS_RXDMA_MAX_ERR */
  5940. } htt_stats_rx_pdev_fw_ring_mpdu_err_tlv;
  5941. /* preserve old name alias for new name consistent with the tag name */
  5942. typedef htt_stats_rx_pdev_fw_ring_mpdu_err_tlv
  5943. htt_rx_pdev_fw_ring_mpdu_err_tlv_v;
  5944. #define HTT_RX_PDEV_FW_MPDU_DROP_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
  5945. /* NOTE: Variable length TLV, use length spec to infer array size */
  5946. typedef struct {
  5947. htt_tlv_hdr_t tlv_hdr;
  5948. /** Num MPDU dropped */
  5949. A_UINT32 fw_mpdu_drop[1]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */
  5950. } htt_stats_rx_pdev_fw_mpdu_drop_tlv;
  5951. /* preserve old name alias for new name consistent with the tag name */
  5952. typedef htt_stats_rx_pdev_fw_mpdu_drop_tlv htt_rx_pdev_fw_mpdu_drop_tlv_v;
  5953. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_RX
  5954. * TLV_TAGS:
  5955. * - HTT_STATS_RX_SOC_FW_STATS_TAG (head TLV in soc_stats)
  5956. * - HTT_STATS_RX_SOC_FW_REFILL_RING_EMPTY_TAG (inside soc_stats)
  5957. * - HTT_STATS_RX_SOC_FW_REFILL_RING_NUM_REFILL_TAG (inside soc_stats)
  5958. * - HTT_STATS_RX_PDEV_FW_STATS_TAG
  5959. * - HTT_STATS_RX_PDEV_FW_RING_MPDU_ERR_TAG
  5960. * - HTT_STATS_RX_PDEV_FW_MPDU_DROP_TAG
  5961. */
  5962. /* NOTE:
  5963. * This structure is for documentation, and cannot be safely used directly.
  5964. * Instead, use the constituent TLV structures to fill/parse.
  5965. */
  5966. typedef struct {
  5967. htt_rx_soc_stats_t soc_stats;
  5968. htt_stats_rx_pdev_fw_stats_tlv fw_stats_tlv;
  5969. htt_stats_rx_pdev_fw_ring_mpdu_err_tlv fw_ring_mpdu_err_tlv;
  5970. htt_stats_rx_pdev_fw_mpdu_drop_tlv fw_ring_mpdu_drop;
  5971. htt_stats_rx_pdev_fw_stats_phy_err_tlv fw_stats_phy_err_tlv;
  5972. } htt_rx_pdev_stats_t;
  5973. /* STATS_TYPE : HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS
  5974. * TLV_TAGS:
  5975. * - HTT_STATS_PEER_CTRL_PATH_TXRX_STATS_TAG
  5976. *
  5977. */
  5978. typedef struct {
  5979. htt_stats_peer_ctrl_path_txrx_stats_tlv peer_ctrl_path_txrx_stats_tlv;
  5980. } htt_ctrl_path_txrx_stats_t;
  5981. #define HTT_PDEV_CCA_STATS_TX_FRAME_INFO_PRESENT (0x1)
  5982. #define HTT_PDEV_CCA_STATS_RX_FRAME_INFO_PRESENT (0x2)
  5983. #define HTT_PDEV_CCA_STATS_RX_CLEAR_INFO_PRESENT (0x4)
  5984. #define HTT_PDEV_CCA_STATS_MY_RX_FRAME_INFO_PRESENT (0x8)
  5985. #define HTT_PDEV_CCA_STATS_USEC_CNT_INFO_PRESENT (0x10)
  5986. #define HTT_PDEV_CCA_STATS_MED_RX_IDLE_INFO_PRESENT (0x20)
  5987. #define HTT_PDEV_CCA_STATS_MED_TX_IDLE_GLOBAL_INFO_PRESENT (0x40)
  5988. #define HTT_PDEV_CCA_STATS_CCA_OBBS_USEC_INFO_PRESENT (0x80)
  5989. typedef struct {
  5990. htt_tlv_hdr_t tlv_hdr;
  5991. /* Below values are obtained from the HW Cycles counter registers */
  5992. A_UINT32 tx_frame_usec;
  5993. A_UINT32 rx_frame_usec;
  5994. A_UINT32 rx_clear_usec;
  5995. A_UINT32 my_rx_frame_usec;
  5996. A_UINT32 usec_cnt;
  5997. A_UINT32 med_rx_idle_usec;
  5998. A_UINT32 med_tx_idle_global_usec;
  5999. A_UINT32 cca_obss_usec;
  6000. A_UINT32 pre_rx_frame_usec;
  6001. } htt_stats_pdev_cca_counters_tlv;
  6002. /* preserve old name alias for new name consistent with the tag name */
  6003. typedef htt_stats_pdev_cca_counters_tlv htt_pdev_stats_cca_counters_tlv;
  6004. /* NOTE: THIS htt_pdev_cca_stats_hist_tlv STRUCTURE IS DEPRECATED,
  6005. * due to lack of support in some host stats infrastructures for
  6006. * TLVs nested within TLVs.
  6007. */
  6008. typedef struct {
  6009. htt_tlv_hdr_t tlv_hdr;
  6010. /** The channel number on which these stats were collected */
  6011. A_UINT32 chan_num;
  6012. /** num of CCA records (Num of htt_pdev_stats_cca_counters_tlv)*/
  6013. A_UINT32 num_records;
  6014. /**
  6015. * Bit map of valid CCA counters
  6016. * Bit0 - tx_frame_usec
  6017. * Bit1 - rx_frame_usec
  6018. * Bit2 - rx_clear_usec
  6019. * Bit3 - my_rx_frame_usec
  6020. * bit4 - usec_cnt
  6021. * Bit5 - med_rx_idle_usec
  6022. * Bit6 - med_tx_idle_global_usec
  6023. * Bit7 - cca_obss_usec
  6024. *
  6025. * See HTT_PDEV_CCA_STATS_xxx_INFO_PRESENT defs
  6026. */
  6027. A_UINT32 valid_cca_counters_bitmap;
  6028. /** Indicates the stats collection interval
  6029. * Valid Values:
  6030. * 100 - For the 100ms interval CCA stats histogram
  6031. * 1000 - For 1sec interval CCA histogram
  6032. * 0xFFFFFFFF - For Cumulative CCA Stats
  6033. */
  6034. A_UINT32 collection_interval;
  6035. /**
  6036. * This will be followed by an array which contains the CCA stats
  6037. * collected in the last N intervals,
  6038. * if the indication is for last N intervals CCA stats.
  6039. * Then the pdev_cca_stats[0] element contains the oldest CCA stats
  6040. * and pdev_cca_stats[N-1] will have the most recent CCA stats.
  6041. */
  6042. htt_stats_pdev_cca_counters_tlv cca_hist_tlv[1];
  6043. } htt_pdev_cca_stats_hist_tlv;
  6044. typedef struct {
  6045. htt_tlv_hdr_t tlv_hdr;
  6046. /** The channel number on which these stats were collected */
  6047. A_UINT32 chan_num;
  6048. /** num of CCA records (Num of htt_pdev_stats_cca_counters_tlv)*/
  6049. A_UINT32 num_records;
  6050. /**
  6051. * Bit map of valid CCA counters
  6052. * Bit0 - tx_frame_usec
  6053. * Bit1 - rx_frame_usec
  6054. * Bit2 - rx_clear_usec
  6055. * Bit3 - my_rx_frame_usec
  6056. * bit4 - usec_cnt
  6057. * Bit5 - med_rx_idle_usec
  6058. * Bit6 - med_tx_idle_global_usec
  6059. * Bit7 - cca_obss_usec
  6060. *
  6061. * See HTT_PDEV_CCA_STATS_xxx_INFO_PRESENT defs
  6062. */
  6063. A_UINT32 valid_cca_counters_bitmap;
  6064. /** Indicates the stats collection interval
  6065. * Valid Values:
  6066. * 100 - For the 100ms interval CCA stats histogram
  6067. * 1000 - For 1sec interval CCA histogram
  6068. * 0xFFFFFFFF - For Cumulative CCA Stats
  6069. */
  6070. A_UINT32 collection_interval;
  6071. /**
  6072. * This will be followed by an array which contains the CCA stats
  6073. * collected in the last N intervals,
  6074. * if the indication is for last N intervals CCA stats.
  6075. * Then the pdev_cca_stats[0] element contains the oldest CCA stats
  6076. * and pdev_cca_stats[N-1] will have the most recent CCA stats.
  6077. * htt_pdev_stats_cca_counters_tlv cca_hist_tlv[1];
  6078. */
  6079. } htt_pdev_cca_stats_hist_v1_tlv;
  6080. #define HTT_TWT_SESSION_FLAG_FLOW_ID_M 0x0000000f
  6081. #define HTT_TWT_SESSION_FLAG_FLOW_ID_S 0
  6082. #define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_M 0x0000fff0
  6083. #define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_S 4
  6084. #define HTT_TWT_SESSION_FLAG_BCAST_TWT_M 0x00010000
  6085. #define HTT_TWT_SESSION_FLAG_BCAST_TWT_S 16
  6086. #define HTT_TWT_SESSION_FLAG_TRIGGER_TWT_M 0x00020000
  6087. #define HTT_TWT_SESSION_FLAG_TRIGGER_TWT_S 17
  6088. #define HTT_TWT_SESSION_FLAG_ANNOUN_TWT_M 0x00040000
  6089. #define HTT_TWT_SESSION_FLAG_ANNOUN_TWT_S 18
  6090. #define HTT_TWT_SESSION_FLAG_FLOW_ID_GET(_var) \
  6091. (((_var) & HTT_TWT_SESSION_FLAG_FLOW_ID_M) >> \
  6092. HTT_TWT_SESSION_FLAG_FLOW_ID_S)
  6093. #define HTT_TWT_SESSION_FLAG_FLOW_ID_SET(_var, _val) \
  6094. do { \
  6095. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_FLOW_ID, _val); \
  6096. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_FLOW_ID_S)); \
  6097. } while (0)
  6098. #define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_GET(_var) \
  6099. (((_var) & HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_M) >> \
  6100. HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_S)
  6101. #define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_SET(_var, _val) \
  6102. do { \
  6103. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT, _val); \
  6104. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_S)); \
  6105. } while (0)
  6106. #define HTT_TWT_SESSION_FLAG_BCAST_TWT_GET(_var) \
  6107. (((_var) & HTT_TWT_SESSION_FLAG_BCAST_TWT_M) >> \
  6108. HTT_TWT_SESSION_FLAG_BCAST_TWT_S)
  6109. #define HTT_TWT_SESSION_FLAG_BCAST_TWT_SET(_var, _val) \
  6110. do { \
  6111. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_BCAST_TWT, _val); \
  6112. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_BCAST_TWT_S)); \
  6113. } while (0)
  6114. #define HTT_TWT_SESSION_FLAG_TRIGGER_TWT_GET(_var) \
  6115. (((_var) & HTT_TWT_SESSION_FLAG_TRIGGER_TWT_M) >> \
  6116. HTT_TWT_SESSION_FLAG_TRIGGER_TWT_S)
  6117. #define HTT_TWT_SESSION_FLAG_TRIGGER_TWT_SET(_var, _val) \
  6118. do { \
  6119. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_TRIGGER_TWT, _val); \
  6120. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_TRIGGER_TWT_S)); \
  6121. } while (0)
  6122. #define HTT_TWT_SESSION_FLAG_ANNOUN_TWT_GET(_var) \
  6123. (((_var) & HTT_TWT_SESSION_FLAG_ANNOUN_TWT_M) >> \
  6124. HTT_TWT_SESSION_FLAG_ANNOUN_TWT_S)
  6125. #define HTT_TWT_SESSION_FLAG_ANNOUN_TWT_SET(_var, _val) \
  6126. do { \
  6127. HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_ANNOUN_TWT, _val); \
  6128. ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_ANNOUN_TWT_S)); \
  6129. } while (0)
  6130. #define TWT_DIALOG_ID_UNAVAILABLE 0xFFFFFFFF
  6131. typedef struct {
  6132. htt_tlv_hdr_t tlv_hdr;
  6133. A_UINT32 vdev_id;
  6134. htt_mac_addr peer_mac;
  6135. A_UINT32 flow_id_flags;
  6136. /**
  6137. * TWT_DIALOG_ID_UNAVAILABLE is used when TWT session is
  6138. * not initiated by host
  6139. */
  6140. A_UINT32 dialog_id;
  6141. A_UINT32 wake_dura_us;
  6142. A_UINT32 wake_intvl_us;
  6143. A_UINT32 sp_offset_us;
  6144. } htt_stats_pdev_twt_session_tlv;
  6145. /* preserve old name alias for new name consistent with the tag name */
  6146. typedef htt_stats_pdev_twt_session_tlv htt_pdev_stats_twt_session_tlv;
  6147. typedef struct {
  6148. htt_tlv_hdr_t tlv_hdr;
  6149. A_UINT32 pdev_id;
  6150. A_UINT32 num_sessions;
  6151. htt_stats_pdev_twt_session_tlv twt_session[1];
  6152. } htt_stats_pdev_twt_sessions_tlv;
  6153. /* preserve old name alias for new name consistent with the tag name */
  6154. typedef htt_stats_pdev_twt_sessions_tlv htt_pdev_stats_twt_sessions_tlv;
  6155. /* STATS_TYPE: HTT_DBG_EXT_STATS_TWT_SESSIONS
  6156. * TLV_TAGS:
  6157. * - HTT_STATS_PDEV_TWT_SESSIONS_TAG
  6158. * - HTT_STATS_PDEV_TWT_SESSION_TAG
  6159. */
  6160. /* NOTE:
  6161. * This structure is for documentation, and cannot be safely used directly.
  6162. * Instead, use the constituent TLV structures to fill/parse.
  6163. */
  6164. typedef struct {
  6165. htt_stats_pdev_twt_session_tlv twt_sessions[1];
  6166. } htt_pdev_twt_sessions_stats_t;
  6167. typedef enum {
  6168. /* Global link descriptor queued in REO */
  6169. HTT_RX_REO_RESOURCE_GLOBAL_LINK_DESC_COUNT_0 = 0,
  6170. HTT_RX_REO_RESOURCE_GLOBAL_LINK_DESC_COUNT_1 = 1,
  6171. HTT_RX_REO_RESOURCE_GLOBAL_LINK_DESC_COUNT_2 = 2,
  6172. /*Number of queue descriptors of this aging group */
  6173. HTT_RX_REO_RESOURCE_BUFFERS_USED_AC0 = 3,
  6174. HTT_RX_REO_RESOURCE_BUFFERS_USED_AC1 = 4,
  6175. HTT_RX_REO_RESOURCE_BUFFERS_USED_AC2 = 5,
  6176. HTT_RX_REO_RESOURCE_BUFFERS_USED_AC3 = 6,
  6177. /* Total number of MSDUs buffered in AC */
  6178. HTT_RX_REO_RESOURCE_AGING_NUM_QUEUES_AC0 = 7,
  6179. HTT_RX_REO_RESOURCE_AGING_NUM_QUEUES_AC1 = 8,
  6180. HTT_RX_REO_RESOURCE_AGING_NUM_QUEUES_AC2 = 9,
  6181. HTT_RX_REO_RESOURCE_AGING_NUM_QUEUES_AC3 = 10,
  6182. HTT_RX_REO_RESOURCE_STATS_MAX = 16
  6183. } htt_rx_reo_resource_sample_id_enum;
  6184. typedef struct {
  6185. htt_tlv_hdr_t tlv_hdr;
  6186. /* Variable based on the Number of records. HTT_RX_REO_RESOURCE_STATS_MAX */
  6187. /** htt_rx_reo_debug_sample_id_enum */
  6188. A_UINT32 sample_id;
  6189. /** Max value of all samples */
  6190. A_UINT32 total_max;
  6191. /** Average value of total samples */
  6192. A_UINT32 total_avg;
  6193. /** Num of samples including both zeros and non zeros ones*/
  6194. A_UINT32 total_sample;
  6195. /** Average value of all non zeros samples */
  6196. A_UINT32 non_zeros_avg;
  6197. /** Num of non zeros samples */
  6198. A_UINT32 non_zeros_sample;
  6199. /** Max value of last N non zero samples (N = last_non_zeros_sample) */
  6200. A_UINT32 last_non_zeros_max;
  6201. /** Min value of last N non zero samples (N = last_non_zeros_sample) */
  6202. A_UINT32 last_non_zeros_min;
  6203. /** Average value of last N non zero samples (N = last_non_zeros_sample) */
  6204. A_UINT32 last_non_zeros_avg;
  6205. /** Num of last non zero samples */
  6206. A_UINT32 last_non_zeros_sample;
  6207. } htt_stats_rx_reo_resource_stats_tlv;
  6208. /* preserve old name alias for new name consistent with the tag name */
  6209. typedef htt_stats_rx_reo_resource_stats_tlv htt_rx_reo_resource_stats_tlv_v;
  6210. /* STATS_TYPE: HTT_DBG_EXT_STATS_REO_RESOURCE_STATS
  6211. * TLV_TAGS:
  6212. * - HTT_STATS_RX_REO_RESOURCE_STATS_TAG
  6213. */
  6214. /* NOTE:
  6215. * This structure is for documentation, and cannot be safely used directly.
  6216. * Instead, use the constituent TLV structures to fill/parse.
  6217. */
  6218. typedef struct {
  6219. htt_stats_rx_reo_resource_stats_tlv reo_resource_stats;
  6220. } htt_soc_reo_resource_stats_t;
  6221. /* == TX SOUNDING STATS == */
  6222. /* config_param0 */
  6223. #define HTT_DBG_EXT_STATS_SET_VDEV_MASK(_var) ((_var << 1) | 0x1)
  6224. #define HTT_DBG_EXT_STATS_GET_VDEV_ID_FROM_VDEV_MASK(_var) ((_var >> 1) & 0xFF)
  6225. #define HTT_DBG_EXT_STATS_IS_VDEV_ID_SET(_var) ((_var) & 0x1)
  6226. typedef enum {
  6227. /* Implicit beamforming stats */
  6228. HTT_IMPLICIT_TXBF_STEER_STATS = 0,
  6229. /* Single user short inter frame sequence steer stats */
  6230. HTT_EXPLICIT_TXBF_SU_SIFS_STEER_STATS = 1,
  6231. /* Single user random back off steer stats */
  6232. HTT_EXPLICIT_TXBF_SU_RBO_STEER_STATS = 2,
  6233. /* Multi user short inter frame sequence steer stats */
  6234. HTT_EXPLICIT_TXBF_MU_SIFS_STEER_STATS = 3,
  6235. /* Multi user random back off steer stats */
  6236. HTT_EXPLICIT_TXBF_MU_RBO_STEER_STATS = 4,
  6237. /* For backward compatibility new modes cannot be added */
  6238. HTT_TXBF_MAX_NUM_OF_MODES = 5
  6239. } htt_txbf_sound_steer_modes;
  6240. typedef enum {
  6241. HTT_TX_AC_SOUNDING_MODE = 0,
  6242. HTT_TX_AX_SOUNDING_MODE = 1,
  6243. HTT_TX_BE_SOUNDING_MODE = 2,
  6244. HTT_TX_CMN_SOUNDING_MODE = 3,
  6245. HTT_TX_CV_CORR_MODE = 4,
  6246. } htt_stats_sounding_tx_mode;
  6247. #define HTT_TX_CV_CORR_MAX_NUM_COLUMNS 8
  6248. typedef struct {
  6249. htt_tlv_hdr_t tlv_hdr;
  6250. A_UINT32 tx_sounding_mode; /* HTT_TX_XX_SOUNDING_MODE */
  6251. /* Counts number of soundings for all steering modes in each bw */
  6252. A_UINT32 cbf_20[HTT_TXBF_MAX_NUM_OF_MODES];
  6253. A_UINT32 cbf_40[HTT_TXBF_MAX_NUM_OF_MODES];
  6254. A_UINT32 cbf_80[HTT_TXBF_MAX_NUM_OF_MODES];
  6255. A_UINT32 cbf_160[HTT_TXBF_MAX_NUM_OF_MODES];
  6256. /**
  6257. * The sounding array is a 2-D array stored as an 1-D array of
  6258. * A_UINT32. The stats for a particular user/bw combination is
  6259. * referenced with the following:
  6260. *
  6261. * sounding[(user* max_bw) + bw]
  6262. *
  6263. * ... where max_bw == 4 for 160mhz
  6264. */
  6265. A_UINT32 sounding[HTT_TX_NUM_OF_SOUNDING_STATS_WORDS];
  6266. /* cv upload handler stats */
  6267. /** total times CV nc mismatched */
  6268. A_UINT32 cv_nc_mismatch_err;
  6269. /** total times CV has FCS error */
  6270. A_UINT32 cv_fcs_err;
  6271. /** total times CV has invalid NSS index */
  6272. A_UINT32 cv_frag_idx_mismatch;
  6273. /** total times CV has invalid SW peer ID */
  6274. A_UINT32 cv_invalid_peer_id;
  6275. /** total times CV rejected because TXBF is not setup in peer */
  6276. A_UINT32 cv_no_txbf_setup;
  6277. /** total times CV expired while in updating state */
  6278. A_UINT32 cv_expiry_in_update;
  6279. /** total times Pkt b/w exceeding the cbf_bw */
  6280. A_UINT32 cv_pkt_bw_exceed;
  6281. /** total times CV DMA not completed */
  6282. A_UINT32 cv_dma_not_done_err;
  6283. /** total times CV update to peer failed */
  6284. A_UINT32 cv_update_failed;
  6285. /* cv query stats */
  6286. /** total times CV query happened */
  6287. A_UINT32 cv_total_query;
  6288. /** total pattern based CV query */
  6289. A_UINT32 cv_total_pattern_query;
  6290. /** total BW based CV query */
  6291. A_UINT32 cv_total_bw_query;
  6292. /** incorrect encoding in CV flags */
  6293. A_UINT32 cv_invalid_bw_coding;
  6294. /** forced sounding enabled for the peer */
  6295. A_UINT32 cv_forced_sounding;
  6296. /** standalone sounding sequence on-going */
  6297. A_UINT32 cv_standalone_sounding;
  6298. /** NC of available CV lower than expected */
  6299. A_UINT32 cv_nc_mismatch;
  6300. /** feedback type different from expected */
  6301. A_UINT32 cv_fb_type_mismatch;
  6302. /** CV BW not equal to expected BW for OFDMA */
  6303. A_UINT32 cv_ofdma_bw_mismatch;
  6304. /** CV BW not greater than or equal to expected BW */
  6305. A_UINT32 cv_bw_mismatch;
  6306. /** CV pattern not matching with the expected pattern */
  6307. A_UINT32 cv_pattern_mismatch;
  6308. /** CV available is of different preamble type than expected. */
  6309. A_UINT32 cv_preamble_mismatch;
  6310. /** NR of available CV is lower than expected. */
  6311. A_UINT32 cv_nr_mismatch;
  6312. /** CV in use count has exceeded threshold and cannot be used further. */
  6313. A_UINT32 cv_in_use_cnt_exceeded;
  6314. /** A valid CV has been found. */
  6315. A_UINT32 cv_found;
  6316. /** No valid CV was found. */
  6317. A_UINT32 cv_not_found;
  6318. /** Sounding per user in 320MHz bandwidth */
  6319. A_UINT32 sounding_320[HTT_TX_PDEV_STATS_NUM_BE_MUMIMO_USER_STATS];
  6320. /** Counts number of soundings for all steering modes in 320MHz bandwidth */
  6321. A_UINT32 cbf_320[HTT_TXBF_MAX_NUM_OF_MODES];
  6322. /* This part can be used for new counters added for CV query/upload. */
  6323. /** non-trigger based ranging sequence on-going */
  6324. A_UINT32 cv_ntbr_sounding;
  6325. /** CV found, but upload is in progress. */
  6326. A_UINT32 cv_found_upload_in_progress;
  6327. /** Expired CV found during query. */
  6328. A_UINT32 cv_expired_during_query;
  6329. /** total times CV dma timeout happened */
  6330. A_UINT32 cv_dma_timeout_error;
  6331. /** total times CV bufs uploaded for IBF case */
  6332. A_UINT32 cv_buf_ibf_uploads;
  6333. /** total times CV bufs uploaded for EBF case */
  6334. A_UINT32 cv_buf_ebf_uploads;
  6335. /** total times CV bufs received from IPC ring */
  6336. A_UINT32 cv_buf_received;
  6337. /** total times CV bufs fed back to the IPC ring */
  6338. A_UINT32 cv_buf_fed_back;
  6339. /** Total times CV query happened for IBF case */
  6340. A_UINT32 cv_total_query_ibf;
  6341. /** A valid CV has been found for IBF case */
  6342. A_UINT32 cv_found_ibf;
  6343. /** A valid CV has not been found for IBF case */
  6344. A_UINT32 cv_not_found_ibf;
  6345. /** Expired CV found during query for IBF case */
  6346. A_UINT32 cv_expired_during_query_ibf;
  6347. /** Total number of times adaptive sounding logic has been queried */
  6348. A_UINT32 adaptive_snd_total_query;
  6349. /**
  6350. * Total number of times adaptive sounding mcs drop has been computed
  6351. * and recorded.
  6352. */
  6353. A_UINT32 adaptive_snd_total_mcs_drop[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS + HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
  6354. /** Total number of times adaptive sounding logic kicked in */
  6355. A_UINT32 adaptive_snd_kicked_in;
  6356. /** Total number of times we switched back to normal sounding interval */
  6357. A_UINT32 adaptive_snd_back_to_default;
  6358. /**
  6359. * Below are CV correlation feature related stats.
  6360. * This feature is used for DL MU MIMO, but is not available
  6361. * from certain legacy targets.
  6362. */
  6363. /** number of CV Correlation triggers for online mode */
  6364. A_UINT32 cv_corr_trigger_online_mode;
  6365. /** number of CV Correlation triggers for offline mode */
  6366. A_UINT32 cv_corr_trigger_offline_mode;
  6367. /** number of CV Correlation triggers for hybrid mode */
  6368. A_UINT32 cv_corr_trigger_hybrid_mode;
  6369. /** number of CV Correlation triggers with computation level 0 */
  6370. A_UINT32 cv_corr_trigger_computation_level_0;
  6371. /** number of CV Correlation triggers with computation level 1 */
  6372. A_UINT32 cv_corr_trigger_computation_level_1;
  6373. /** number of CV Correlation triggers with computation level 2 */
  6374. A_UINT32 cv_corr_trigger_computation_level_2;
  6375. /** number of users for which CV Correlation was triggered */
  6376. A_UINT32 cv_corr_trigger_num_users[HTT_TX_CV_CORR_MAX_NUM_COLUMNS];
  6377. /** number of streams for which CV Correlation was triggered */
  6378. A_UINT32 cv_corr_trigger_num_streams[HTT_TX_CV_CORR_MAX_NUM_COLUMNS];
  6379. /** number of CV Correlation buffers received through IPC tickle */
  6380. A_UINT32 cv_corr_upload_total_buf_received;
  6381. /** number of CV Correlation buffers fed back to the IPC ring */
  6382. A_UINT32 cv_corr_upload_total_buf_fed_back;
  6383. /** number of CV Correlation buffers for which processing failed */
  6384. A_UINT32 cv_corr_upload_total_processing_failed;
  6385. /**
  6386. * number of CV Correlation buffers for which processing failed,
  6387. * due to no users being present in parsed buffer
  6388. */
  6389. A_UINT32 cv_corr_upload_failed_total_users_zero;
  6390. /**
  6391. * number of CV Correlation buffers for which processing failed,
  6392. * due to number of users present in parsed buffer exceeded
  6393. * CV_CORR_MAX_NUM_COLUMNS
  6394. */
  6395. A_UINT32 cv_corr_upload_failed_total_users_exceeded;
  6396. /**
  6397. * number of CV Correlation buffers for which processing failed,
  6398. * due to peer pointer for parsed peer not available
  6399. */
  6400. A_UINT32 cv_corr_upload_failed_peer_not_found;
  6401. /**
  6402. * number of CV Correlation buffers for which processing encountered,
  6403. * Nss of peer exceeding SCHED_ALGO_MAX_SUPPORTED_MUMIMO_NSS
  6404. */
  6405. A_UINT32 cv_corr_upload_user_nss_exceeded;
  6406. /**
  6407. * number of CV Correlation buffers for which processing encountered,
  6408. * invalid reverse look up index for fetching CV correlation results
  6409. */
  6410. A_UINT32 cv_corr_upload_invalid_lookup_index;
  6411. /** number of users present in uploaded CV Correlation results buffer */
  6412. A_UINT32 cv_corr_upload_total_num_users[HTT_TX_CV_CORR_MAX_NUM_COLUMNS];
  6413. /** number of streams present in uploaded CV Correlation results buffer */
  6414. A_UINT32 cv_corr_upload_total_num_streams[HTT_TX_CV_CORR_MAX_NUM_COLUMNS];
  6415. } htt_stats_tx_sounding_stats_tlv;
  6416. /* preserve old name alias for new name consistent with the tag name */
  6417. typedef htt_stats_tx_sounding_stats_tlv htt_tx_sounding_stats_tlv;
  6418. /* STATS_TYPE : HTT_DBG_EXT_STATS_TX_SOUNDING_INFO
  6419. * TLV_TAGS:
  6420. * - HTT_STATS_TX_SOUNDING_STATS_TAG
  6421. */
  6422. /* NOTE:
  6423. * This structure is for documentation, and cannot be safely used directly.
  6424. * Instead, use the constituent TLV structures to fill/parse.
  6425. */
  6426. typedef struct {
  6427. htt_stats_tx_sounding_stats_tlv sounding_tlv;
  6428. } htt_tx_sounding_stats_t;
  6429. typedef struct {
  6430. htt_tlv_hdr_t tlv_hdr;
  6431. A_UINT32 num_obss_tx_ppdu_success;
  6432. A_UINT32 num_obss_tx_ppdu_failure;
  6433. /** num_sr_tx_transmissions:
  6434. * Counter of TX done by aborting other BSS RX with spatial reuse
  6435. * (for cases where rx RSSI from other BSS is below the packet-detection
  6436. * threshold for doing spatial reuse)
  6437. */
  6438. union {
  6439. A_UINT32 num_sr_tx_transmissions; /* CORRECTED - use this one */
  6440. A_UINT32 num_sr_tx_tranmissions; /* DEPRECATED - has typo in name */
  6441. };
  6442. union {
  6443. /**
  6444. * Count the number of times the RSSI from an other-BSS signal
  6445. * is below the spatial reuse power threshold, thus providing an
  6446. * opportunity for spatial reuse since OBSS interference will be
  6447. * inconsequential.
  6448. */
  6449. A_UINT32 num_spatial_reuse_opportunities;
  6450. /* DEPRECATED: num_sr_rx_ge_pd_rssi_thr
  6451. * This old name has been deprecated because it does not
  6452. * clearly and accurately reflect the information stored within
  6453. * this field.
  6454. * Use the new name (num_spatial_reuse_opportunities) instead of
  6455. * the deprecated old name (num_sr_rx_ge_pd_rssi_thr).
  6456. */
  6457. A_UINT32 num_sr_rx_ge_pd_rssi_thr;
  6458. };
  6459. /**
  6460. * Count of number of times OBSS frames were aborted and non-SRG
  6461. * opportunities were created. Non-SRG opportunities are created when
  6462. * incoming OBSS RSSI is lesser than the global configured non-SRG RSSI
  6463. * threshold and non-SRG OBSS color / non-SRG OBSS BSSID registers
  6464. * allow non-SRG TX.
  6465. */
  6466. A_UINT32 num_non_srg_opportunities;
  6467. /**
  6468. * Count of number of times TX PPDU were transmitted using non-SRG
  6469. * opportunities created. Incoming OBSS frame RSSI is compared with per
  6470. * PPDU non-SRG RSSI threshold configured in each PPDU. If incoming OBSS
  6471. * RSSI < non-SRG RSSI threshold configured in each PPDU, then non-SRG
  6472. * transmission happens.
  6473. */
  6474. A_UINT32 num_non_srg_ppdu_tried;
  6475. /**
  6476. * Count of number of times non-SRG based TX transmissions were successful
  6477. */
  6478. A_UINT32 num_non_srg_ppdu_success;
  6479. /**
  6480. * Count of number of times OBSS frames were aborted and SRG opportunities
  6481. * were created. Srg opportunities are created when incoming OBSS RSSI
  6482. * is less than the global configured SRG RSSI threshold and SRC OBSS
  6483. * color / SRG OBSS BSSID / SRG partial bssid / SRG BSS color bitmap
  6484. * registers allow SRG TX.
  6485. */
  6486. A_UINT32 num_srg_opportunities;
  6487. /**
  6488. * Count of number of times TX PPDU were transmitted using SRG
  6489. * opportunities created.
  6490. * Incoming OBSS frame RSSI is compared with per PPDU SRG RSSI
  6491. * threshold configured in each PPDU.
  6492. * If incoming OBSS RSSI < SRG RSSI threshold configured in each PPDU,
  6493. * then SRG transmission happens.
  6494. */
  6495. A_UINT32 num_srg_ppdu_tried;
  6496. /**
  6497. * Count of number of times SRG based TX transmissions were successful
  6498. */
  6499. A_UINT32 num_srg_ppdu_success;
  6500. /**
  6501. * Count of number of times PSR opportunities were created by aborting
  6502. * OBSS UL OFDMA HE-TB PPDU frame. HE-TB ppdu frames are aborted if the
  6503. * spatial reuse info in the OBSS trigger common field is set to allow PSR
  6504. * based spatial reuse.
  6505. */
  6506. A_UINT32 num_psr_opportunities;
  6507. /**
  6508. * Count of number of times TX PPDU were transmitted using PSR
  6509. * opportunities created.
  6510. */
  6511. A_UINT32 num_psr_ppdu_tried;
  6512. /**
  6513. * Count of number of times PSR based TX transmissions were successful.
  6514. */
  6515. A_UINT32 num_psr_ppdu_success;
  6516. /**
  6517. * Count of number of times TX PPDU per access category were transmitted
  6518. * using non-SRG opportunities created.
  6519. */
  6520. A_UINT32 num_non_srg_ppdu_tried_per_ac[HTT_NUM_AC_WMM];
  6521. /**
  6522. * Count of number of times non-SRG based TX transmissions per access
  6523. * category were successful
  6524. */
  6525. A_UINT32 num_non_srg_ppdu_success_per_ac[HTT_NUM_AC_WMM];
  6526. /**
  6527. * Count of number of times TX PPDU per access category were transmitted
  6528. * using SRG opportunities created.
  6529. */
  6530. A_UINT32 num_srg_ppdu_tried_per_ac[HTT_NUM_AC_WMM];
  6531. /**
  6532. * Count of number of times SRG based TX transmissions per access
  6533. * category were successful
  6534. */
  6535. A_UINT32 num_srg_ppdu_success_per_ac[HTT_NUM_AC_WMM];
  6536. /**
  6537. * Count of number of times ppdu was flushed due to ongoing OBSS
  6538. * frame duration value lesser than minimum required frame duration.
  6539. */
  6540. A_UINT32 num_obss_min_duration_check_flush_cnt;
  6541. /**
  6542. * Count of number of times ppdu was flushed due to ppdu duration
  6543. * exceeding aborted OBSS frame duration
  6544. */
  6545. A_UINT32 num_sr_ppdu_abort_flush_cnt;
  6546. } htt_stats_pdev_obss_pd_tlv;
  6547. /* preserve old name alias for new name consistent with the tag name */
  6548. typedef htt_stats_pdev_obss_pd_tlv htt_pdev_obss_pd_stats_tlv;
  6549. /* NOTE:
  6550. * This structure is for documentation, and cannot be safely used directly.
  6551. * Instead, use the constituent TLV structures to fill/parse.
  6552. */
  6553. typedef struct {
  6554. htt_stats_pdev_obss_pd_tlv obss_pd_stat;
  6555. } htt_pdev_obss_pd_stats_t;
  6556. typedef struct {
  6557. htt_tlv_hdr_t tlv_hdr;
  6558. A_UINT32 pdev_id;
  6559. A_UINT32 current_head_idx;
  6560. A_UINT32 current_tail_idx;
  6561. A_UINT32 num_htt_msgs_sent;
  6562. /**
  6563. * Time in milliseconds for which the ring has been in
  6564. * its current backpressure condition
  6565. */
  6566. A_UINT32 backpressure_time_ms;
  6567. /** backpressure_hist -
  6568. * histogram showing how many times different degrees of backpressure
  6569. * duration occurred:
  6570. * Index 0 indicates the number of times ring was
  6571. * continuously in backpressure state for 100 - 200ms.
  6572. * Index 1 indicates the number of times ring was
  6573. * continuously in backpressure state for 200 - 300ms.
  6574. * Index 2 indicates the number of times ring was
  6575. * continuously in backpressure state for 300 - 400ms.
  6576. * Index 3 indicates the number of times ring was
  6577. * continuously in backpressure state for 400 - 500ms.
  6578. * Index 4 indicates the number of times ring was
  6579. * continuously in backpressure state beyond 500ms.
  6580. */
  6581. A_UINT32 backpressure_hist[5];
  6582. } htt_stats_ring_backpressure_stats_tlv;
  6583. /* preserve old name alias for new name consistent with the tag name */
  6584. typedef htt_stats_ring_backpressure_stats_tlv htt_ring_backpressure_stats_tlv;
  6585. /* STATS_TYPE : HTT_STATS_RING_BACKPRESSURE_STATS_INFO
  6586. * TLV_TAGS:
  6587. * - HTT_STATS_RING_BACKPRESSURE_STATS_TAG
  6588. */
  6589. /* NOTE:
  6590. * This structure is for documentation, and cannot be safely used directly.
  6591. * Instead, use the constituent TLV structures to fill/parse.
  6592. */
  6593. typedef struct {
  6594. htt_stats_sring_cmn_tlv cmn_tlv;
  6595. struct {
  6596. htt_stats_string_tlv sring_str_tlv;
  6597. htt_stats_ring_backpressure_stats_tlv backpressure_stats_tlv;
  6598. } r[1]; /* variable-length array */
  6599. } htt_ring_backpressure_stats_t;
  6600. #define HTT_LATENCY_PROFILE_MAX_HIST 3
  6601. #define HTT_STATS_MAX_PROF_STATS_NAME_LEN 32
  6602. #define HTT_INTERRUPTS_LATENCY_PROFILE_MAX_HIST 3
  6603. typedef struct {
  6604. htt_tlv_hdr_t tlv_hdr;
  6605. /** print_header:
  6606. * This field suggests whether the host should print a header when
  6607. * displaying the TLV (because this is the first latency_prof_stats
  6608. * TLV within a series), or if only the TLV contents should be displayed
  6609. * without a header (because this is not the first TLV within the series).
  6610. */
  6611. A_UINT32 print_header;
  6612. A_UINT8 latency_prof_name[HTT_STATS_MAX_PROF_STATS_NAME_LEN];
  6613. /** number of data values included in the tot sum */
  6614. A_UINT32 cnt;
  6615. /** time in us */
  6616. A_UINT32 min;
  6617. /** time in us */
  6618. A_UINT32 max;
  6619. A_UINT32 last;
  6620. /** time in us */
  6621. A_UINT32 tot;
  6622. /** time in us */
  6623. A_UINT32 avg;
  6624. /** hist_intvl:
  6625. * Histogram interval, i.e. the latency range covered by each
  6626. * bin of the histogram, in microsecond units.
  6627. * hist[0] counts how many latencies were between 0 to hist_intvl
  6628. * hist[1] counts how many latencies were between hist_intvl to 2*hist_intvl
  6629. * hist[2] counts how many latencies were more than 2*hist_intvl
  6630. */
  6631. A_UINT32 hist_intvl;
  6632. A_UINT32 hist[HTT_LATENCY_PROFILE_MAX_HIST];
  6633. /** max page faults in any 1 sampling window */
  6634. A_UINT32 page_fault_max;
  6635. /** summed over all sampling windows */
  6636. A_UINT32 page_fault_total;
  6637. /** ignored_latency_count:
  6638. * ignore some of profile latency to avoid avg skewing
  6639. */
  6640. A_UINT32 ignored_latency_count;
  6641. /** interrupts_max: max interrupts within any single sampling window */
  6642. A_UINT32 interrupts_max;
  6643. /** interrupts_hist: histogram of interrupt rate
  6644. * bin0 contains the number of sampling windows that had 0 interrupts,
  6645. * bin1 contains the number of sampling windows that had 1-4 interrupts,
  6646. * bin2 contains the number of sampling windows that had > 4 interrupts
  6647. */
  6648. A_UINT32 interrupts_hist[HTT_INTERRUPTS_LATENCY_PROFILE_MAX_HIST];
  6649. } htt_stats_latency_prof_stats_tlv;
  6650. /* preserve old name alias for new name consistent with the tag name */
  6651. typedef htt_stats_latency_prof_stats_tlv htt_latency_prof_stats_tlv;
  6652. typedef struct {
  6653. htt_tlv_hdr_t tlv_hdr;
  6654. /** duration:
  6655. * Time period over which counts were gathered, units = microseconds.
  6656. */
  6657. A_UINT32 duration;
  6658. A_UINT32 tx_msdu_cnt;
  6659. A_UINT32 tx_mpdu_cnt;
  6660. A_UINT32 tx_ppdu_cnt;
  6661. A_UINT32 rx_msdu_cnt;
  6662. A_UINT32 rx_mpdu_cnt;
  6663. } htt_stats_latency_ctx_tlv;
  6664. /* preserve old name alias for new name consistent with the tag name */
  6665. typedef htt_stats_latency_ctx_tlv htt_latency_prof_ctx_tlv;
  6666. typedef struct {
  6667. htt_tlv_hdr_t tlv_hdr;
  6668. /** count of enabled profiles */
  6669. A_UINT32 prof_enable_cnt;
  6670. } htt_stats_latency_cnt_tlv;
  6671. /* preserve old name alias for new name consistent with the tag name */
  6672. typedef htt_stats_latency_cnt_tlv htt_latency_prof_cnt_tlv;
  6673. /* STATS_TYPE : HTT_DBG_EXT_STATS_LATENCY_PROF_STATS
  6674. * TLV_TAGS:
  6675. * HTT_STATS_LATENCY_PROF_STATS_TAG / htt_latency_prof_stats_tlv
  6676. * HTT_STATS_LATENCY_CTX_TAG / htt_latency_prof_ctx_tlv
  6677. * HTT_STATS_LATENCY_CNT_TAG / htt_latency_prof_cnt_tlv
  6678. */
  6679. /* NOTE:
  6680. * This structure is for documentation, and cannot be safely used directly.
  6681. * Instead, use the constituent TLV structures to fill/parse.
  6682. */
  6683. typedef struct {
  6684. htt_stats_latency_prof_stats_tlv latency_prof_stat;
  6685. htt_stats_latency_ctx_tlv latency_ctx_stat;
  6686. htt_stats_latency_cnt_tlv latency_cnt_stat;
  6687. } htt_soc_latency_stats_t;
  6688. #define HTT_RX_MAX_PEAK_OCCUPANCY_INDEX 10
  6689. #define HTT_RX_MAX_CURRENT_OCCUPANCY_INDEX 10
  6690. #define HTT_RX_SQUARE_INDEX 6
  6691. #define HTT_RX_MAX_PEAK_SEARCH_INDEX 4
  6692. #define HTT_RX_MAX_PENDING_SEARCH_INDEX 4
  6693. /* STATS_TYPE : HTT_DBG_EXT_RX_FSE_STATS
  6694. * TLV_TAGS:
  6695. * - HTT_STATS_RX_FSE_STATS_TAG
  6696. */
  6697. typedef struct {
  6698. htt_tlv_hdr_t tlv_hdr;
  6699. /**
  6700. * Number of times host requested for fse enable/disable
  6701. */
  6702. A_UINT32 fse_enable_cnt;
  6703. A_UINT32 fse_disable_cnt;
  6704. /**
  6705. * Number of times host requested for fse cache invalidation
  6706. * individual entries or full cache
  6707. */
  6708. A_UINT32 fse_cache_invalidate_entry_cnt;
  6709. A_UINT32 fse_full_cache_invalidate_cnt;
  6710. /**
  6711. * Cache hits count will increase if there is a matching flow in the cache
  6712. * There is no register for cache miss but the number of cache misses can
  6713. * be calculated as
  6714. * cache miss = (num_searches - cache_hits)
  6715. * Thus, there is no need to have a separate variable for cache misses.
  6716. * Num searches is flow search times done in the cache.
  6717. */
  6718. A_UINT32 fse_num_cache_hits_cnt;
  6719. A_UINT32 fse_num_searches_cnt;
  6720. /**
  6721. * Cache Occupancy holds 2 types of values: Peak and Current.
  6722. * 10 bins are used to keep track of peak occupancy.
  6723. * 8 of these bins represent ranges of values, while the first and last
  6724. * bins represent the extreme cases of the cache being completely empty
  6725. * or completely full.
  6726. * For the non-extreme bins, the number of cache occupancy values per
  6727. * bin is the maximum cache occupancy (128), divided by the number of
  6728. * non-extreme bins (8), so 128/8 = 16 values per bin.
  6729. * The range of values for each histogram bins is specified below:
  6730. * Bin0 = Counter increments when cache occupancy is empty
  6731. * Bin1 = Counter increments when cache occupancy is within [1 to 16]
  6732. * Bin2 = Counter increments when cache occupancy is within [17 to 32]
  6733. * Bin3 = Counter increments when cache occupancy is within [33 to 48]
  6734. * Bin4 = Counter increments when cache occupancy is within [49 to 64]
  6735. * Bin5 = Counter increments when cache occupancy is within [65 to 80]
  6736. * Bin6 = Counter increments when cache occupancy is within [81 to 96]
  6737. * Bin7 = Counter increments when cache occupancy is within [97 to 112]
  6738. * Bin8 = Counter increments when cache occupancy is within [113 to 127]
  6739. * Bin9 = Counter increments when cache occupancy is equal to 128
  6740. * The above histogram bin definitions apply to both the peak-occupancy
  6741. * histogram and the current-occupancy histogram.
  6742. *
  6743. * @fse_cache_occupancy_peak_cnt:
  6744. * Array records periodically PEAK cache occupancy values.
  6745. * Peak Occupancy will increment only if it is greater than current
  6746. * occupancy value.
  6747. *
  6748. * @fse_cache_occupancy_curr_cnt:
  6749. * Array records periodically current cache occupancy value.
  6750. * Current Cache occupancy always holds instant snapshot of
  6751. * current number of cache entries.
  6752. **/
  6753. A_UINT32 fse_cache_occupancy_peak_cnt[HTT_RX_MAX_PEAK_OCCUPANCY_INDEX];
  6754. A_UINT32 fse_cache_occupancy_curr_cnt[HTT_RX_MAX_CURRENT_OCCUPANCY_INDEX];
  6755. /**
  6756. * Square stat is sum of squares of cache occupancy to better understand
  6757. * any variation/deviation within each cache set, over a given time-window.
  6758. *
  6759. * Square stat is calculated this way:
  6760. * Square = SUM(Squares of all Occupancy in a Set) / 8
  6761. * The cache has 16-way set associativity, so the occupancy of a
  6762. * set can vary from 0 to 16. There are 8 sets within the cache.
  6763. * Therefore, the minimum possible square value is 0, and the maximum
  6764. * possible square value is (8*16^2) / 8 = 256.
  6765. *
  6766. * 6 bins are used to keep track of square stats:
  6767. * Bin0 = increments when square of current cache occupancy is zero
  6768. * Bin1 = increments when square of current cache occupancy is within
  6769. * [1 to 50]
  6770. * Bin2 = increments when square of current cache occupancy is within
  6771. * [51 to 100]
  6772. * Bin3 = increments when square of current cache occupancy is within
  6773. * [101 to 200]
  6774. * Bin4 = increments when square of current cache occupancy is within
  6775. * [201 to 255]
  6776. * Bin5 = increments when square of current cache occupancy is 256
  6777. */
  6778. A_UINT32 fse_search_stat_square_cnt[HTT_RX_SQUARE_INDEX];
  6779. /**
  6780. * Search stats has 2 types of values: Peak Pending and Number of
  6781. * Search Pending.
  6782. * GSE command ring for FSE can hold maximum of 5 Pending searches
  6783. * at any given time.
  6784. *
  6785. * 4 bins are used to keep track of search stats:
  6786. * Bin0 = Counter increments when there are NO pending searches
  6787. * (For peak, it will be number of pending searches greater
  6788. * than GSE command ring FIFO outstanding requests.
  6789. * For Search Pending, it will be number of pending search
  6790. * inside GSE command ring FIFO.)
  6791. * Bin1 = Counter increments when number of pending searches are within
  6792. * [1 to 2]
  6793. * Bin2 = Counter increments when number of pending searches are within
  6794. * [3 to 4]
  6795. * Bin3 = Counter increments when number of pending searches are
  6796. * greater/equal to [ >= 5]
  6797. */
  6798. A_UINT32 fse_search_stat_peak_cnt[HTT_RX_MAX_PEAK_SEARCH_INDEX];
  6799. A_UINT32 fse_search_stat_search_pending_cnt[HTT_RX_MAX_PENDING_SEARCH_INDEX];
  6800. } htt_stats_rx_fse_stats_tlv;
  6801. /* preserve old name alias for new name consistent with the tag name */
  6802. typedef htt_stats_rx_fse_stats_tlv htt_rx_fse_stats_tlv;
  6803. /* NOTE:
  6804. * This structure is for documentation, and cannot be safely used directly.
  6805. * Instead, use the constituent TLV structures to fill/parse.
  6806. */
  6807. typedef struct {
  6808. htt_stats_rx_fse_stats_tlv rx_fse_stats;
  6809. } htt_rx_fse_stats_t;
  6810. #define HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS 14
  6811. #define HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS 5 /* 20, 40, 80, 160, 320 */
  6812. #define HTT_TX_TXBF_RATE_STATS_NUM_REDUCED_CHAN_TYPES 2/* 0: Half, 1: Quarter */
  6813. typedef struct {
  6814. htt_tlv_hdr_t tlv_hdr;
  6815. /** SU TxBF TX MCS stats */
  6816. A_UINT32 tx_su_txbf_mcs[HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS];
  6817. /** Implicit BF TX MCS stats */
  6818. A_UINT32 tx_su_ibf_mcs[HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS];
  6819. /** Open loop TX MCS stats */
  6820. A_UINT32 tx_su_ol_mcs[HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS];
  6821. /** SU TxBF TX NSS stats */
  6822. A_UINT32 tx_su_txbf_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6823. /** Implicit BF TX NSS stats */
  6824. A_UINT32 tx_su_ibf_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6825. /** Open loop TX NSS stats */
  6826. A_UINT32 tx_su_ol_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6827. /** SU TxBF TX BW stats */
  6828. A_UINT32 tx_su_txbf_bw[HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6829. /** Implicit BF TX BW stats */
  6830. A_UINT32 tx_su_ibf_bw[HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6831. /** Open loop TX BW stats */
  6832. A_UINT32 tx_su_ol_bw[HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6833. /** Legacy and OFDM TX rate stats */
  6834. A_UINT32 tx_legacy_ofdm_rate[HTT_TX_PDEV_STATS_NUM_LEGACY_OFDM_STATS];
  6835. /** SU TxBF TX BW stats */
  6836. A_UINT32 reduced_tx_su_txbf_bw[HTT_TX_TXBF_RATE_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6837. /** Implicit BF TX BW stats */
  6838. A_UINT32 reduced_tx_su_ibf_bw[HTT_TX_TXBF_RATE_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6839. /** Open loop TX BW stats */
  6840. A_UINT32 reduced_tx_su_ol_bw[HTT_TX_TXBF_RATE_STATS_NUM_REDUCED_CHAN_TYPES][HTT_TX_TXBF_RATE_STATS_NUM_BW_COUNTERS];
  6841. /** Txbf flag reason stats */
  6842. A_UINT32 txbf_flag_set_mu_mode;
  6843. A_UINT32 txbf_flag_set_final_status;
  6844. A_UINT32 txbf_flag_not_set_verified_txbf_mode;
  6845. A_UINT32 txbf_flag_not_set_disable_p2p_access;
  6846. A_UINT32 txbf_flag_not_set_max_nss_reached_in_he160;
  6847. A_UINT32 txbf_flag_not_set_disable_ul_dl_ofdma;
  6848. A_UINT32 txbf_flag_not_set_mcs_threshold_value;
  6849. A_UINT32 txbf_flag_not_set_final_status;
  6850. } htt_stats_pdev_tx_rate_txbf_stats_tlv;
  6851. /* preserve old name alias for new name consistent with the tag name */
  6852. typedef htt_stats_pdev_tx_rate_txbf_stats_tlv htt_tx_pdev_txbf_rate_stats_tlv;
  6853. typedef enum {
  6854. HTT_STATS_RC_MODE_DLSU = 0,
  6855. HTT_STATS_RC_MODE_DLMUMIMO = 1,
  6856. HTT_STATS_RC_MODE_DLOFDMA = 2,
  6857. HTT_STATS_RC_MODE_ULMUMIMO = 3,
  6858. HTT_STATS_RC_MODE_ULOFDMA = 4,
  6859. } htt_stats_rc_mode;
  6860. typedef struct {
  6861. A_UINT32 ppdus_tried;
  6862. A_UINT32 ppdus_ack_failed;
  6863. A_UINT32 mpdus_tried;
  6864. A_UINT32 mpdus_failed;
  6865. } htt_tx_rate_stats_t;
  6866. typedef enum {
  6867. HTT_RC_MODE_SU_OL,
  6868. HTT_RC_MODE_SU_BF,
  6869. HTT_RC_MODE_MU1_INTF,
  6870. HTT_RC_MODE_MU2_INTF,
  6871. HTT_Rc_MODE_MU3_INTF,
  6872. HTT_RC_MODE_MU4_INTF,
  6873. HTT_RC_MODE_MU5_INTF,
  6874. HTT_RC_MODE_MU6_INTF,
  6875. HTT_RC_MODE_MU7_INTF,
  6876. HTT_RC_MODE_2D_COUNT,
  6877. } HTT_RC_MODE;
  6878. typedef enum {
  6879. HTT_STATS_RU_TYPE_INVALID = 0,
  6880. HTT_STATS_RU_TYPE_SINGLE_RU_ONLY = 1,
  6881. HTT_STATS_RU_TYPE_SINGLE_AND_MULTI_RU = 2,
  6882. } htt_stats_ru_type;
  6883. typedef struct {
  6884. htt_tlv_hdr_t tlv_hdr;
  6885. /** HTT_STATS_RC_MODE_XX */
  6886. A_UINT32 rc_mode;
  6887. A_UINT32 last_probed_mcs;
  6888. A_UINT32 last_probed_nss;
  6889. A_UINT32 last_probed_bw;
  6890. htt_tx_rate_stats_t per_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  6891. htt_tx_rate_stats_t per_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6892. htt_tx_rate_stats_t per_mcs[HTT_TX_TXBF_RATE_STATS_NUM_MCS_COUNTERS];
  6893. /** 320MHz extension for PER */
  6894. htt_tx_rate_stats_t per_bw320;
  6895. A_UINT32 probe_cnt_per_rcmode[HTT_RC_MODE_2D_COUNT];
  6896. A_UINT32 ru_type; /* refer to htt_stats_ru_type enum */
  6897. htt_tx_rate_stats_t per_ru[HTT_TX_PDEV_STATS_NUM_BE_RU_SIZE_COUNTERS];
  6898. } htt_stats_per_rate_stats_tlv;
  6899. /* preserve old name alias for new name consistent with the tag name */
  6900. typedef htt_stats_per_rate_stats_tlv htt_tx_rate_stats_per_tlv;
  6901. /* NOTE:
  6902. * This structure is for documentation, and cannot be safely used directly.
  6903. * Instead, use the constituent TLV structures to fill/parse.
  6904. */
  6905. typedef struct {
  6906. htt_stats_pdev_tx_rate_txbf_stats_tlv txbf_rate_stats;
  6907. } htt_pdev_txbf_rate_stats_t;
  6908. typedef struct {
  6909. htt_stats_per_rate_stats_tlv per_stats;
  6910. } htt_tx_pdev_per_stats_t;
  6911. typedef enum {
  6912. HTT_ULTRIG_QBOOST_TRIGGER = 0,
  6913. HTT_ULTRIG_PSPOLL_TRIGGER,
  6914. HTT_ULTRIG_UAPSD_TRIGGER,
  6915. HTT_ULTRIG_11AX_TRIGGER,
  6916. HTT_ULTRIG_11AX_WILDCARD_TRIGGER,
  6917. HTT_ULTRIG_11AX_UNASSOC_WILDCARD_TRIGGER,
  6918. HTT_STA_UL_OFDMA_NUM_TRIG_TYPE,
  6919. } HTT_STA_UL_OFDMA_RX_TRIG_TYPE;
  6920. typedef enum {
  6921. HTT_11AX_TRIGGER_BASIC_E = 0,
  6922. HTT_11AX_TRIGGER_BRPOLL_E = 1,
  6923. HTT_11AX_TRIGGER_MU_BAR_E = 2,
  6924. HTT_11AX_TRIGGER_MU_RTS_E = 3,
  6925. HTT_11AX_TRIGGER_BUFFER_SIZE_E = 4,
  6926. HTT_11AX_TRIGGER_GCR_MU_BAR_E = 5,
  6927. HTT_11AX_TRIGGER_BQRP_E = 6,
  6928. HTT_11AX_TRIGGER_NDP_FB_REPORT_POLL_E = 7,
  6929. HTT_11AX_TRIGGER_RESERVED_8_E = 8,
  6930. HTT_11AX_TRIGGER_RESERVED_9_E = 9,
  6931. HTT_11AX_TRIGGER_RESERVED_10_E = 10,
  6932. HTT_11AX_TRIGGER_RESERVED_11_E = 11,
  6933. HTT_11AX_TRIGGER_RESERVED_12_E = 12,
  6934. HTT_11AX_TRIGGER_RESERVED_13_E = 13,
  6935. HTT_11AX_TRIGGER_RESERVED_14_E = 14,
  6936. HTT_11AX_TRIGGER_RESERVED_15_E = 15,
  6937. HTT_STA_UL_OFDMA_NUM_11AX_TRIG_TYPE,
  6938. } HTT_STA_UL_OFDMA_11AX_TRIG_TYPE;
  6939. /* UL RESP Queues 0 - HIPRI, 1 - LOPRI & 2 - BSR */
  6940. #define HTT_STA_UL_OFDMA_NUM_UL_QUEUES 3
  6941. /* Actual resp type sent by STA for trigger
  6942. * 0 - HE TB PPDU, 1 - NULL Delimiter */
  6943. #define HTT_STA_UL_OFDMA_NUM_RESP_END_TYPE 2
  6944. /* Counter for MCS 0-13 */
  6945. #define HTT_STA_UL_OFDMA_NUM_MCS_COUNTERS 14
  6946. /* Counters BW 20,40,80,160,320 */
  6947. #define HTT_STA_UL_OFDMA_NUM_BW_COUNTERS 5
  6948. #define HTT_STA_UL_OFDMA_NUM_REDUCED_CHAN_TYPES 2 /* 0 - Half, 1 - Quarter */
  6949. /* STATS_TYPE : HTT_DBG_EXT_STA_11AX_UL_STATS
  6950. * TLV_TAGS:
  6951. * - HTT_STATS_STA_UL_OFDMA_STATS_TAG
  6952. */
  6953. typedef struct {
  6954. htt_tlv_hdr_t tlv_hdr;
  6955. A_UINT32 pdev_id;
  6956. /**
  6957. * Trigger Type reported by HWSCH on RX reception
  6958. * Each index populate enum HTT_STA_UL_OFDMA_RX_TRIG_TYPE
  6959. */
  6960. A_UINT32 rx_trigger_type[HTT_STA_UL_OFDMA_NUM_TRIG_TYPE];
  6961. /**
  6962. * 11AX Trigger Type on RX reception
  6963. * Each index populate enum HTT_STA_UL_OFDMA_11AX_TRIG_TYPE
  6964. */
  6965. A_UINT32 ax_trigger_type[HTT_STA_UL_OFDMA_NUM_11AX_TRIG_TYPE];
  6966. /** Num data PPDUs/Delims responded to trigs. per HWQ for UL RESP */
  6967. A_UINT32 num_data_ppdu_responded_per_hwq[HTT_STA_UL_OFDMA_NUM_UL_QUEUES];
  6968. A_UINT32 num_null_delimiters_responded_per_hwq[HTT_STA_UL_OFDMA_NUM_UL_QUEUES];
  6969. /**
  6970. * Overall UL STA RESP Status 0 - HE TB PPDU, 1 - NULL Delimiter
  6971. * Super set of num_data_ppdu_responded_per_hwq,
  6972. * num_null_delimiters_responded_per_hwq
  6973. */
  6974. A_UINT32 num_total_trig_responses[HTT_STA_UL_OFDMA_NUM_RESP_END_TYPE];
  6975. /**
  6976. * Time interval between current time ms and last successful trigger RX
  6977. * 0xFFFFFFFF denotes no trig received / timestamp roll back
  6978. */
  6979. A_UINT32 last_trig_rx_time_delta_ms;
  6980. /**
  6981. * Rate Statistics for UL OFDMA
  6982. * UL TB PPDU TX MCS, NSS, GI, BW from STA HWQ
  6983. */
  6984. A_UINT32 ul_ofdma_tx_mcs[HTT_STA_UL_OFDMA_NUM_MCS_COUNTERS];
  6985. A_UINT32 ul_ofdma_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  6986. A_UINT32 ul_ofdma_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_STA_UL_OFDMA_NUM_MCS_COUNTERS];
  6987. A_UINT32 ul_ofdma_tx_ldpc;
  6988. A_UINT32 ul_ofdma_tx_bw[HTT_STA_UL_OFDMA_NUM_BW_COUNTERS];
  6989. /** Trig based PPDU TX/ RBO based PPDU TX Count */
  6990. A_UINT32 trig_based_ppdu_tx;
  6991. A_UINT32 rbo_based_ppdu_tx;
  6992. /** Switch MU EDCA to SU EDCA Count */
  6993. A_UINT32 mu_edca_to_su_edca_switch_count;
  6994. /** Num MU EDCA applied Count */
  6995. A_UINT32 num_mu_edca_param_apply_count;
  6996. /**
  6997. * Current MU EDCA Parameters for WMM ACs
  6998. * Mode - 0 - SU EDCA, 1- MU EDCA
  6999. */
  7000. A_UINT32 current_edca_hwq_mode[HTT_NUM_AC_WMM];
  7001. /** Contention Window minimum. Range: 1 - 10 */
  7002. A_UINT32 current_cw_min[HTT_NUM_AC_WMM];
  7003. /** Contention Window maximum. Range: 1 - 10 */
  7004. A_UINT32 current_cw_max[HTT_NUM_AC_WMM];
  7005. /** AIFS value - 0 -255 */
  7006. A_UINT32 current_aifs[HTT_NUM_AC_WMM];
  7007. A_UINT32 reduced_ul_ofdma_tx_bw[HTT_STA_UL_OFDMA_NUM_REDUCED_CHAN_TYPES][HTT_STA_UL_OFDMA_NUM_BW_COUNTERS];
  7008. } htt_stats_sta_ul_ofdma_stats_tlv;
  7009. /* preserve old name alias for new name consistent with the tag name */
  7010. typedef htt_stats_sta_ul_ofdma_stats_tlv htt_sta_ul_ofdma_stats_tlv;
  7011. /* NOTE:
  7012. * This structure is for documentation, and cannot be safely used directly.
  7013. * Instead, use the constituent TLV structures to fill/parse.
  7014. */
  7015. typedef struct {
  7016. htt_stats_sta_ul_ofdma_stats_tlv ul_ofdma_sta_stats;
  7017. } htt_sta_11ax_ul_stats_t;
  7018. typedef struct {
  7019. htt_tlv_hdr_t tlv_hdr;
  7020. /** No of Fine Timing Measurement frames transmitted successfully */
  7021. A_UINT32 tx_ftm_suc;
  7022. /**
  7023. * No of Fine Timing Measurement frames transmitted successfully
  7024. * after retry
  7025. */
  7026. A_UINT32 tx_ftm_suc_retry;
  7027. /** No of Fine Timing Measurement frames not transmitted successfully */
  7028. A_UINT32 tx_ftm_fail;
  7029. /**
  7030. * No of Fine Timing Measurement Request frames received,
  7031. * including initial, non-initial, and duplicates
  7032. */
  7033. A_UINT32 rx_ftmr_cnt;
  7034. /**
  7035. * No of duplicate Fine Timing Measurement Request frames received,
  7036. * including both initial and non-initial
  7037. */
  7038. A_UINT32 rx_ftmr_dup_cnt;
  7039. /** No of initial Fine Timing Measurement Request frames received */
  7040. A_UINT32 rx_iftmr_cnt;
  7041. /**
  7042. * No of duplicate initial Fine Timing Measurement Request frames received
  7043. */
  7044. A_UINT32 rx_iftmr_dup_cnt;
  7045. /** No of responder sessions rejected when initiator was active */
  7046. A_UINT32 initiator_active_responder_rejected_cnt;
  7047. /** Responder terminate count */
  7048. A_UINT32 responder_terminate_cnt;
  7049. A_UINT32 vdev_id;
  7050. } htt_stats_vdev_rtt_resp_stats_tlv;
  7051. /* preserve old name alias for new name consistent with the tag name */
  7052. typedef htt_stats_vdev_rtt_resp_stats_tlv htt_vdev_rtt_resp_stats_tlv;
  7053. typedef struct {
  7054. htt_stats_vdev_rtt_resp_stats_tlv vdev_rtt_resp_stats;
  7055. } htt_vdev_rtt_resp_stats_t;
  7056. typedef struct {
  7057. htt_tlv_hdr_t tlv_hdr;
  7058. A_UINT32 vdev_id;
  7059. /**
  7060. * No of Fine Timing Measurement request frames transmitted successfully
  7061. */
  7062. A_UINT32 tx_ftmr_cnt;
  7063. /**
  7064. * No of Fine Timing Measurement request frames not transmitted successfully
  7065. */
  7066. A_UINT32 tx_ftmr_fail;
  7067. /**
  7068. * No of Fine Timing Measurement request frames transmitted successfully
  7069. * after retry
  7070. */
  7071. A_UINT32 tx_ftmr_suc_retry;
  7072. /**
  7073. * No of Fine Timing Measurement frames received, including initial,
  7074. * non-initial, and duplicates
  7075. */
  7076. A_UINT32 rx_ftm_cnt;
  7077. /** Initiator Terminate count */
  7078. A_UINT32 initiator_terminate_cnt;
  7079. /** Debug count to check the Measurement request from host */
  7080. A_UINT32 tx_meas_req_count;
  7081. } htt_stats_vdev_rtt_init_stats_tlv;
  7082. /* preserve old name alias for new name consistent with the tag name */
  7083. typedef htt_stats_vdev_rtt_init_stats_tlv htt_vdev_rtt_init_stats_tlv;
  7084. typedef struct {
  7085. htt_stats_vdev_rtt_init_stats_tlv vdev_rtt_init_stats;
  7086. } htt_vdev_rtt_init_stats_t;
  7087. /* STATS_TYPE : HTT_DBG_EXT_PKTLOG_AND_HTT_RING_STATS
  7088. * TLV_TAGS:
  7089. * - HTT_STATS_PKTLOG_AND_HTT_RING_STATS_TAG
  7090. */
  7091. /* NOTE:
  7092. * This structure is for documentation, and cannot be safely used directly.
  7093. * Instead, use the constituent TLV structures to fill/parse.
  7094. */
  7095. typedef struct {
  7096. htt_tlv_hdr_t tlv_hdr;
  7097. /** No of pktlog payloads that were dropped in htt_ppdu_stats path */
  7098. A_UINT32 pktlog_lite_drop_cnt;
  7099. /** No of pktlog payloads that were dropped in TQM path */
  7100. A_UINT32 pktlog_tqm_drop_cnt;
  7101. /** No of pktlog ppdu stats payloads that were dropped */
  7102. A_UINT32 pktlog_ppdu_stats_drop_cnt;
  7103. /** No of pktlog ppdu ctrl payloads that were dropped */
  7104. A_UINT32 pktlog_ppdu_ctrl_drop_cnt;
  7105. /** No of pktlog sw events payloads that were dropped */
  7106. A_UINT32 pktlog_sw_events_drop_cnt;
  7107. } htt_stats_pktlog_and_htt_ring_stats_tlv;
  7108. /* preserve old name alias for new name consistent with the tag name */
  7109. typedef htt_stats_pktlog_and_htt_ring_stats_tlv
  7110. htt_pktlog_and_htt_ring_stats_tlv;
  7111. #define HTT_DLPAGER_STATS_MAX_HIST 10
  7112. #define HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_M 0x000000FF
  7113. #define HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_S 0
  7114. #define HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_M 0x0000FF00
  7115. #define HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_S 8
  7116. #define HTT_DLPAGER_TOTAL_LOCKED_PAGES_M 0x0000FFFF
  7117. #define HTT_DLPAGER_TOTAL_LOCKED_PAGES_S 0
  7118. #define HTT_DLPAGER_TOTAL_FREE_PAGES_M 0xFFFF0000
  7119. #define HTT_DLPAGER_TOTAL_FREE_PAGES_S 16
  7120. #define HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_M 0x0000FFFF
  7121. #define HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_S 0
  7122. #define HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_M 0xFFFF0000
  7123. #define HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_S 16
  7124. #define HTT_DLPAGER_ASYNC_LOCK_PAGE_COUNT_GET(_var) \
  7125. (((_var) & HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_M) >> \
  7126. HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_S)
  7127. #define HTT_DLPAGER_ASYNC_LOCK_PAGE_COUNT_SET(_var, _val) \
  7128. do { \
  7129. HTT_CHECK_SET_VAL(HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT, _val); \
  7130. ((_var) &= ~(HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_M));\
  7131. ((_var) |= ((_val) << HTT_DLPAGER_ASYNC_LOCKED_PAGE_COUNT_S)); \
  7132. } while (0)
  7133. #define HTT_DLPAGER_SYNC_LOCK_PAGE_COUNT_GET(_var) \
  7134. (((_var) & HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_M) >> \
  7135. HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_S)
  7136. #define HTT_DLPAGER_SYNC_LOCK_PAGE_COUNT_SET(_var, _val) \
  7137. do { \
  7138. HTT_CHECK_SET_VAL(HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT, _val); \
  7139. ((_var) &= ~(HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_M));\
  7140. ((_var) |= ((_val) << HTT_DLPAGER_SYNC_LOCKED_PAGE_COUNT_S)); \
  7141. } while (0)
  7142. #define HTT_DLPAGER_TOTAL_LOCKED_PAGES_GET(_var) \
  7143. (((_var) & HTT_DLPAGER_TOTAL_LOCKED_PAGES_M) >> \
  7144. HTT_DLPAGER_TOTAL_LOCKED_PAGES_S)
  7145. #define HTT_DLPAGER_TOTAL_LOCKED_PAGES_SET(_var, _val) \
  7146. do { \
  7147. HTT_CHECK_SET_VAL(HTT_DLPAGER_TOTAL_LOCKED_PAGES, _val); \
  7148. ((_var) &= ~(HTT_DLPAGER_TOTAL_LOCKED_PAGES_M)); \
  7149. ((_var) |= ((_val) << HTT_DLPAGER_TOTAL_LOCKED_PAGES_S)); \
  7150. } while (0)
  7151. #define HTT_DLPAGER_TOTAL_FREE_PAGES_GET(_var) \
  7152. (((_var) & HTT_DLPAGER_TOTAL_FREE_PAGES_M) >> \
  7153. HTT_DLPAGER_TOTAL_FREE_PAGES_S)
  7154. #define HTT_DLPAGER_TOTAL_FREE_PAGES_SET(_var, _val) \
  7155. do { \
  7156. HTT_CHECK_SET_VAL(HTT_DLPAGER_TOTAL_FREE_PAGES, _val); \
  7157. ((_var) &= ~(HTT_DLPAGER_TOTAL_FREE_PAGES_M)); \
  7158. ((_var) |= ((_val) << HTT_DLPAGER_TOTAL_FREE_PAGES_S)); \
  7159. } while (0)
  7160. #define HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_GET(_var) \
  7161. (((_var) & HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_M) >> \
  7162. HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_S)
  7163. #define HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_SET(_var, _val) \
  7164. do { \
  7165. HTT_CHECK_SET_VAL(HTT_DLPAGER_LAST_LOCKED_PAGE_IDX, _val); \
  7166. ((_var) &= ~(HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_M)); \
  7167. ((_var) |= ((_val) << HTT_DLPAGER_LAST_LOCKED_PAGE_IDX_S)); \
  7168. } while (0)
  7169. #define HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_GET(_var) \
  7170. (((_var) & HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_M) >> \
  7171. HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_S)
  7172. #define HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_SET(_var, _val) \
  7173. do { \
  7174. HTT_CHECK_SET_VAL(HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX, _val); \
  7175. ((_var) &= ~(HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_M)); \
  7176. ((_var) |= ((_val) << HTT_DLPAGER_LAST_UNLOCKED_PAGE_IDX_S)); \
  7177. } while (0)
  7178. enum {
  7179. HTT_STATS_PAGE_LOCKED = 0,
  7180. HTT_STATS_PAGE_UNLOCKED = 1,
  7181. HTT_STATS_NUM_PAGE_LOCK_STATES
  7182. };
  7183. /* dlPagerStats structure
  7184. * Number of lock/unlock pages with last 10 lock/unlock occurrences are recorded */
  7185. typedef struct{
  7186. /** msg_dword_1 bitfields:
  7187. * async_lock : 8,
  7188. * sync_lock : 8,
  7189. * reserved : 16;
  7190. */
  7191. A_UINT32 msg_dword_1;
  7192. /** mst_dword_2 bitfields:
  7193. * total_locked_pages : 16,
  7194. * total_free_pages : 16;
  7195. */
  7196. A_UINT32 msg_dword_2;
  7197. /** msg_dword_3 bitfields:
  7198. * last_locked_page_idx : 16,
  7199. * last_unlocked_page_idx : 16;
  7200. */
  7201. A_UINT32 msg_dword_3;
  7202. struct {
  7203. A_UINT32 page_num;
  7204. A_UINT32 num_of_pages;
  7205. /** timestamp is in microsecond units, from SoC timer clock */
  7206. A_UINT32 timestamp_lsbs;
  7207. A_UINT32 timestamp_msbs;
  7208. } last_pages_info[HTT_STATS_NUM_PAGE_LOCK_STATES][HTT_DLPAGER_STATS_MAX_HIST];
  7209. } htt_dl_pager_stats_tlv;
  7210. /* NOTE:
  7211. * This structure is for documentation, and cannot be safely used directly.
  7212. * Instead, use the constituent TLV structures to fill/parse.
  7213. * STATS_TYPE : HTT_DBG_EXT_STATS_DLPAGER_STATS
  7214. * TLV_TAGS:
  7215. * - HTT_STATS_DLPAGER_STATS_TAG
  7216. */
  7217. typedef struct {
  7218. htt_tlv_hdr_t tlv_hdr;
  7219. htt_dl_pager_stats_tlv dl_pager_stats;
  7220. } htt_stats_dlpager_stats_tlv;
  7221. /* preserve old name alias for new name consistent with the tag name */
  7222. typedef htt_stats_dlpager_stats_tlv htt_dlpager_stats_t;
  7223. /*======= PHY STATS ====================*/
  7224. /*
  7225. * STATS TYPE : HTT_DBG_EXT_PHY_COUNTERS_AND_PHY_STATS
  7226. * TLV_TAGS:
  7227. * - HTT_STATS_PHY_COUNTERS_TAG
  7228. * - HTT_STATS_PHY_STATS_TAG
  7229. */
  7230. #define HTT_MAX_RX_PKT_CNT 8
  7231. #define HTT_MAX_RX_PKT_CRC_PASS_CNT 8
  7232. #define HTT_MAX_PER_BLK_ERR_CNT 20
  7233. #define HTT_MAX_RX_OTA_ERR_CNT 14
  7234. #define HTT_MAX_RX_PKT_CNT_EXT 4
  7235. #define HTT_MAX_RX_PKT_CRC_PASS_CNT_EXT 4
  7236. #define HTT_MAX_RX_PKT_MU_CNT 14
  7237. #define HTT_MAX_TX_PKT_CNT 10
  7238. #define HTT_MAX_PHY_TX_ABORT_CNT 10
  7239. typedef enum {
  7240. HTT_STATS_CHANNEL_HALF_RATE = 0x0001, /* Half rate */
  7241. HTT_STATS_CHANNEL_QUARTER_RATE = 0x0002, /* Quarter rate */
  7242. HTT_STATS_CHANNEL_DFS = 0x0004, /* Enable radar event reporting */
  7243. HTT_STATS_CHANNEL_HOME = 0x0008, /* Home channel */
  7244. HTT_STATS_CHANNEL_PASSIVE_SCAN = 0x0010, /*Passive Scan */
  7245. HTT_STATS_CHANNEL_DFS_SAP_NOT_UP = 0x0020, /* set when VDEV_START_REQUEST, clear when VDEV_UP */
  7246. HTT_STATS_CHANNEL_PASSIVE_SCAN_CAL = 0x0040, /* need to do passive scan calibration to avoid "spikes" */
  7247. HTT_STATS_CHANNEL_DFS_SAP_UP = 0x0080, /* DFS master */
  7248. HTT_STATS_CHANNEL_DFS_CFREQ2 = 0x0100, /* Enable radar event reporting for sec80 in VHT80p80 */
  7249. HTT_STATS_CHANNEL_DTIM_SYNTH = 0x0200, /* Enable DTIM */
  7250. HTT_STATS_CHANNEL_FORCE_GAIN = 0x0400, /* Force gain mmode (only used for FTM) */
  7251. HTT_STATS_CHANNEL_PERFORM_NF_CAL = 0x0800, /* Perform NF cal in channel change (only used for FTM) */
  7252. HTT_STATS_CHANNEL_165_MODE_0 = 0x1000, /* 165 MHz mode 0 */
  7253. HTT_STATS_CHANNEL_165_MODE_1 = 0x2000, /* 165 MHz mode 1 */
  7254. HTT_STATS_CHANNEL_165_MODE_2 = 0x3000, /* 165 MHz mode 2 */
  7255. HTT_STATS_CHANNEL_165_MODE_MASK = 0x3000, /* 165 MHz 2-bit mode mask */
  7256. } HTT_STATS_CHANNEL_FLAGS;
  7257. typedef enum {
  7258. HTT_STATS_RF_MODE_MIN = 0,
  7259. HTT_STATS_RF_MODE_PHYA_ONLY = 0, // only PHYA is active
  7260. HTT_STATS_RF_MODE_DBS = 1, // PHYA/5G and PHYB/2G
  7261. HTT_STATS_RF_MODE_SBS = 2, // PHYA/5G and PHYB/5G in HL/NPR; PHYA0/5G and PHYA1/5G in HK
  7262. HTT_STATS_RF_MODE_PHYB_ONLY = 3, // only PHYB is active
  7263. HTT_STATS_RF_MODE_DBS_SBS = 4, // PHYA0/5G, PHYA1/5G and PHYB/2G in HK (the 2 5G are in different channel)
  7264. HTT_STATS_RF_MODE_DBS_OR_SBS = 5, // PHYA0/5G, PHYA1/5G and PHYB/5G or 2G in HK
  7265. HTT_STATS_RF_MODE_INVALID = 0xff,
  7266. } HTT_STATS_RF_MODE;
  7267. typedef enum {
  7268. HTT_STATS_RESET_CAUSE_FIRST_RESET = 0x00000001, /* First reset by application */
  7269. HTT_STATS_RESET_CAUSE_ERROR = 0x00000002, /* Triggered due to error */
  7270. HTT_STATS_RESET_CAUSE_DEEP_SLEEP = 0x00000004, /* Reset after deep sleep */
  7271. HTT_STATS_RESET_CAUSE_FULL_RESET = 0x00000008, /* Full reset without any optimizations */
  7272. HTT_STATS_RESET_CAUSE_CHANNEL_CHANGE = 0x00000010, /* For normal channel change */
  7273. HTT_STATS_RESET_CAUSE_BAND_CHANGE = 0x00000020, /* Triggered due to band change */
  7274. HTT_STATS_RESET_CAUSE_DO_CAL = 0x00000040, /* Triggered due to calibrations */
  7275. HTT_STATS_RESET_CAUSE_MCI_ERROR = 0x00000080, /* Triggered due to MCI ERROR */
  7276. HTT_STATS_RESET_CAUSE_CHWIDTH_CHANGE = 0x00000100, /* Triggered due to channel width change */
  7277. HTT_STATS_RESET_CAUSE_WARM_RESTORE_CAL = 0x00000200, /* Triggered due to warm reset we want to just restore calibrations */
  7278. HTT_STATS_RESET_CAUSE_COLD_RESTORE_CAL = 0x00000400, /* Triggered due to cold reset we want to just restore calibrations */
  7279. HTT_STATS_RESET_CAUSE_PHY_WARM_RESET = 0x00000800, /* Triggered due to phy warm reset we want to just restore calibrations */
  7280. HTT_STATS_RESET_CAUSE_M3_SSR = 0x00001000, /* Triggered due to SSR Restart */
  7281. HTT_STATS_RESET_CAUSE_FORCE_CAL = 0x00002000, /* Reset to force the calibration */
  7282. /* 0x00004000, 0x00008000 reserved */
  7283. HTT_STATS_NO_RESET_CHANNEL_CHANGE = 0x00010000, /* No reset, normal channel change */
  7284. HTT_STATS_NO_RESET_BAND_CHANGE = 0x00020000, /* No reset, channel change across band */
  7285. HTT_STATS_NO_RESET_CHWIDTH_CHANGE = 0x00040000, /* No reset, channel change across channel width */
  7286. HTT_STATS_NO_RESET_CHAINMASK_CHANGE = 0x00080000, /* No reset, chainmask change */
  7287. HTT_STATS_RESET_CAUSE_PHY_WARM_RESET_UCODE_TRIG = 0x00100000, /* Triggered due to phy warm reset we want to just restore calibrations */
  7288. HTT_STATS_RESET_CAUSE_PHY_OFF_TIMEOUT_RESET = 0x00200000, /* Reset ucode because phy off ack timeout*/
  7289. HTT_STATS_RESET_CAUSE_LMAC_RESET_UMAC_NOC_ERR = 0x00400000, /* LMAC reset triggered due to NOC Address/Slave error originating at LMAC */
  7290. HTT_STATS_NO_RESET_SCAN_BACK_TO_SAME_HOME_CHANNEL_CHANGE = 0x00800000, /* No reset, scan to home channel change */
  7291. } HTT_STATS_RESET_CAUSE;
  7292. typedef enum {
  7293. HTT_CHANNEL_RATE_FULL,
  7294. HTT_CHANNEL_RATE_HALF,
  7295. HTT_CHANNEL_RATE_QUARTER,
  7296. HTT_CHANNEL_RATE_COUNT
  7297. } HTT_CHANNEL_RATE;
  7298. typedef enum {
  7299. HTT_PHY_BW_IDX_20MHz = 0,
  7300. HTT_PHY_BW_IDX_40MHz = 1,
  7301. HTT_PHY_BW_IDX_80MHz = 2,
  7302. HTT_PHY_BW_IDX_80Plus80 = 3,
  7303. HTT_PHY_BW_IDX_160MHz = 4,
  7304. HTT_PHY_BW_IDX_10MHz = 5,
  7305. HTT_PHY_BW_IDX_5MHz = 6,
  7306. HTT_PHY_BW_IDX_165MHz = 7,
  7307. } HTT_PHY_BW_IDX;
  7308. typedef enum {
  7309. HTT_WHAL_CONFIG_NONE = 0x00000000,
  7310. HTT_WHAL_CONFIG_NF_WAR = 0x00000001,
  7311. HTT_WHAL_CONFIG_CAL_WAR = 0x00000002,
  7312. HTT_WHAL_CONFIG_DO_NF_CAL = 0x00000004,
  7313. HTT_WHAL_CONFIG_SET_WAIT_FOR_NF_CAL = 0x00000008,
  7314. HTT_WHAL_CONFIG_FORCED_TX_PWR = 0x00000010,
  7315. HTT_WHAL_CONFIG_FORCED_GAIN_IDX = 0x00000020,
  7316. HTT_WHAL_CONFIG_FORCED_PER_CHAIN = 0x00000040,
  7317. } HTT_WHAL_CONFIG;
  7318. typedef struct {
  7319. htt_tlv_hdr_t tlv_hdr;
  7320. /** number of RXTD OFDMA OTA error counts except power surge and drop */
  7321. A_UINT32 rx_ofdma_timing_err_cnt;
  7322. /** rx_cck_fail_cnt:
  7323. * number of cck error counts due to rx reception failure because of
  7324. * timing error in cck
  7325. */
  7326. A_UINT32 rx_cck_fail_cnt;
  7327. /** number of times tx abort initiated by mac */
  7328. A_UINT32 mactx_abort_cnt;
  7329. /** number of times rx abort initiated by mac */
  7330. A_UINT32 macrx_abort_cnt;
  7331. /** number of times tx abort initiated by phy */
  7332. A_UINT32 phytx_abort_cnt;
  7333. /** number of times rx abort initiated by phy */
  7334. A_UINT32 phyrx_abort_cnt;
  7335. /** number of rx deferred count initiated by phy */
  7336. A_UINT32 phyrx_defer_abort_cnt;
  7337. /** number of sizing events generated at LSTF */
  7338. A_UINT32 rx_gain_adj_lstf_event_cnt; /* a.k.a sizing1 */
  7339. /** number of sizing events generated at non-legacy LTF */
  7340. A_UINT32 rx_gain_adj_non_legacy_cnt; /* a.k.a sizing2 */
  7341. /** rx_pkt_cnt -
  7342. * Received EOP (end-of-packet) count per packet type;
  7343. * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF
  7344. * [6] = EHT; [7]=RSVD; [6] = Applicable only for BE
  7345. */
  7346. A_UINT32 rx_pkt_cnt[HTT_MAX_RX_PKT_CNT];
  7347. /** rx_pkt_crc_pass_cnt -
  7348. * Received EOP (end-of-packet) count per packet type;
  7349. * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF
  7350. * [6] = EHT; [7]=RSVD; [6] = Applicable only for BE
  7351. */
  7352. A_UINT32 rx_pkt_crc_pass_cnt[HTT_MAX_RX_PKT_CRC_PASS_CNT];
  7353. /** per_blk_err_cnt -
  7354. * Error count per error source;
  7355. * [0] = unknown; [1] = LSIG; [2] = HTSIG; [3] = VHTSIG; [4] = HESIG;
  7356. * [5] = RXTD_OTA; [6] = RXTD_FATAL; [7] = DEMF; [8] = ROBE;
  7357. * [9] = PMI; [10] = TXFD; [11] = TXTD; [12] = PHYRF
  7358. * [13-19]=RSVD
  7359. */
  7360. A_UINT32 per_blk_err_cnt[HTT_MAX_PER_BLK_ERR_CNT];
  7361. /** rx_ota_err_cnt -
  7362. * RXTD OTA (over-the-air) error count per error reason;
  7363. * [0] = voting fail; [1] = weak det fail; [2] = strong sig fail;
  7364. * [3] = cck fail; [4] = power surge; [5] = power drop;
  7365. * [6] = btcf timing timeout error; [7] = btcf packet detect error;
  7366. * [8] = coarse timing timeout error
  7367. * [9-13]=RSVD
  7368. */
  7369. A_UINT32 rx_ota_err_cnt[HTT_MAX_RX_OTA_ERR_CNT];
  7370. /** rx_pkt_cnt_ext -
  7371. * Received EOP (end-of-packet) count per packet type for BE;
  7372. * [0] = WUR; [1] = AZ; [2-3]=RVSD
  7373. */
  7374. A_UINT32 rx_pkt_cnt_ext[HTT_MAX_RX_PKT_CNT_EXT];
  7375. /** rx_pkt_crc_pass_cnt_ext -
  7376. * Received EOP (end-of-packet) count per packet type for BE;
  7377. * [0] = WUR; [1] = AZ; [2-3]=RVSD
  7378. */
  7379. A_UINT32 rx_pkt_crc_pass_cnt_ext[HTT_MAX_RX_PKT_CRC_PASS_CNT_EXT];
  7380. /** rx_pkt_mu_cnt -
  7381. * RX MU MIMO+OFDMA packet count per packet type for BE;
  7382. * [0] = 11ax OFDMA; [1] = 11ax OFDMA+MUMIMO; [2] = 11be OFDMA;
  7383. * [3] = 11be OFDMA+MUMIMO; [4] = 11ax MIMO; [5] = 11be MIMO;
  7384. * [6] = 11ax OFDMA; [7] = 11ax OFDMA+MUMIMO; [8] = 11be OFDMA;
  7385. * [9] = 11be OFDMA+MUMIMO; [10] = 11ax MIMO; [11] = 11be MIMO;
  7386. * [12-13]=RSVD
  7387. */
  7388. A_UINT32 rx_pkt_mu_cnt[HTT_MAX_RX_PKT_MU_CNT];
  7389. /** tx_pkt_cnt -
  7390. * num of transfered packet count per packet type;
  7391. * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF;
  7392. * [6]= EHT; [7] = WUR; [8] = AZ; [9]=RSVD; [6-8] = Applicable only for BE
  7393. */
  7394. A_UINT32 tx_pkt_cnt[HTT_MAX_TX_PKT_CNT];
  7395. /** phy_tx_abort_cnt -
  7396. * phy tx abort after each tlv;
  7397. * [0] = PRE-PHY desc tlv; [1] = PHY desc tlv; [2] = LSIGA tlv;
  7398. * [3] = LSIGB tlv; [4] = Per User tlv; [5] = HESIGB tlv;
  7399. * [6] = Service tlv; [7] = Tx Packet End tlv; [8-9]=RSVD;
  7400. */
  7401. A_UINT32 phy_tx_abort_cnt[HTT_MAX_PHY_TX_ABORT_CNT];
  7402. } htt_stats_phy_counters_tlv;
  7403. /* preserve old name alias for new name consistent with the tag name */
  7404. typedef htt_stats_phy_counters_tlv htt_phy_counters_tlv;
  7405. typedef struct {
  7406. htt_tlv_hdr_t tlv_hdr;
  7407. /** per chain hw noise floor values in dBm */
  7408. A_INT32 nf_chain[HTT_STATS_MAX_CHAINS];
  7409. /** number of false radars detected */
  7410. A_UINT32 false_radar_cnt;
  7411. /** number of channel switches happened due to radar detection */
  7412. A_UINT32 radar_cs_cnt;
  7413. /** ani_level -
  7414. * ANI level (noise interference) corresponds to the channel
  7415. * the desense levels range from -5 to 15 in dB units,
  7416. * higher values indicating more noise interference.
  7417. */
  7418. A_INT32 ani_level;
  7419. /** running time in minutes since FW boot */
  7420. A_UINT32 fw_run_time;
  7421. /** per chain runtime noise floor values in dBm */
  7422. A_INT32 runTime_nf_chain[HTT_STATS_MAX_CHAINS];
  7423. /** DFS SW based progressive stats - start **/
  7424. /* current AP operating bandwidth (refer to WLAN_PHY_MODE) */
  7425. A_UINT32 current_OBW;
  7426. /* current AP device bandwidth (refer to WLAN_PHY_MODE) */
  7427. A_UINT32 current_DBW;
  7428. /* last_radar_type: last detected radar type
  7429. * This last_radar_type field contains a value whose meaning is not
  7430. * exposed to the host; this field is only provided for debug purposes.
  7431. */
  7432. A_UINT32 last_radar_type;
  7433. /* dfs_reg_domain: curent DFS regulatory domain
  7434. * This dfs_reg_domain field contains a value whose meaning is not
  7435. * exposed to the host; this field is only provided for debug purposes.
  7436. */
  7437. A_UINT32 dfs_reg_domain;
  7438. /* radar_mask_bit: Radar mask setting programmed in HW registers.
  7439. * Each bit represents a 20 MHz portion of the channel.
  7440. * Bit 0 represents the highest 20 MHz portion within the channel.
  7441. * For example...
  7442. * For a 80 MHz channel, bit0 = highest 20 MHz, bit3 = lowest 20 MHz
  7443. * For a 320 MHz channel, bit0 = highest 20 MHz, bit15 = lowest 20 MHz
  7444. */
  7445. A_UINT32 radar_mask_bit;
  7446. /* DFS radar rssi threshold (units = dBm) */
  7447. A_INT32 radar_rssi;
  7448. /* DFS global flags (refer to IEEE80211_CHAN_* defines) */
  7449. A_UINT32 radar_dfs_flags;
  7450. /* band center frequency of operating bandwidth (units = MHz) */
  7451. A_UINT32 band_center_frequency_OBW;
  7452. /* band center frequency of device bandwidth (units = MHz) */
  7453. A_UINT32 band_center_frequency_DBW;
  7454. /** DFS SW based progressive stats - end **/
  7455. } htt_stats_phy_stats_tlv;
  7456. /* preserve old name alias for new name consistent with the tag name */
  7457. typedef htt_stats_phy_stats_tlv htt_phy_stats_tlv;
  7458. typedef struct {
  7459. htt_tlv_hdr_t tlv_hdr;
  7460. /** current pdev_id */
  7461. A_UINT32 pdev_id;
  7462. /** current channel information */
  7463. A_UINT32 chan_mhz;
  7464. /** center_freq1, center_freq2 in mhz */
  7465. A_UINT32 chan_band_center_freq1;
  7466. A_UINT32 chan_band_center_freq2;
  7467. /** chan_phy_mode - WLAN_PHY_MODE enum type */
  7468. A_UINT32 chan_phy_mode;
  7469. /** chan_flags follows HTT_STATS_CHANNEL_FLAGS enum */
  7470. A_UINT32 chan_flags;
  7471. /** channel Num updated to virtual phybase */
  7472. A_UINT32 chan_num;
  7473. /** Cause for the phy reset - HTT_STATS_RESET_CAUSE */
  7474. A_UINT32 reset_cause;
  7475. /** Cause for the previous phy reset */
  7476. A_UINT32 prev_reset_cause;
  7477. /** source for the phywarm reset - HTT_STATS_RESET_CAUSE */
  7478. A_UINT32 phy_warm_reset_src;
  7479. /** rxGain Table selection mode - register settings
  7480. * 0 - Auto, 1/2 - Forced with and without BT override respectively
  7481. */
  7482. A_UINT32 rx_gain_tbl_mode;
  7483. /** current xbar value - perchain analog to digital idx mapping */
  7484. A_UINT32 xbar_val;
  7485. /** Flag to indicate forced calibration */
  7486. A_UINT32 force_calibration;
  7487. /** current RF mode (e.g. SBS/DBS) - follows HTT_STATS_RF_MODE enum */
  7488. A_UINT32 phyrf_mode;
  7489. /* PDL phyInput stats */
  7490. /** homechannel flag
  7491. * 1- Homechan, 0 - scan channel
  7492. */
  7493. A_UINT32 phy_homechan;
  7494. /** Tx and Rx chainmask */
  7495. A_UINT32 phy_tx_ch_mask;
  7496. A_UINT32 phy_rx_ch_mask;
  7497. /** INI masks - to decide the INI registers to be loaded on a reset */
  7498. A_UINT32 phybb_ini_mask;
  7499. A_UINT32 phyrf_ini_mask;
  7500. /** DFS,ADFS/Spectral scan enable masks */
  7501. A_UINT32 phy_dfs_en_mask;
  7502. A_UINT32 phy_sscan_en_mask;
  7503. A_UINT32 phy_synth_sel_mask;
  7504. A_UINT32 phy_adfs_freq;
  7505. /** CCK FIR settings
  7506. * register settings - filter coefficients for Iqs conversion
  7507. * [31:24] = FIR_COEFF_3_0
  7508. * [23:16] = FIR_COEFF_2_0
  7509. * [15:8] = FIR_COEFF_1_0
  7510. * [7:0] = FIR_COEFF_0_0
  7511. */
  7512. A_UINT32 cck_fir_settings;
  7513. /** dynamic primary channel index
  7514. * primary 20MHz channel index on the current channel BW
  7515. */
  7516. A_UINT32 phy_dyn_pri_chan;
  7517. /**
  7518. * Current CCA detection threshold
  7519. * dB above noisefloor req for CCA
  7520. * Register settings for all subbands
  7521. */
  7522. A_UINT32 cca_thresh;
  7523. /**
  7524. * status for dynamic CCA adjustment
  7525. * 0-disabled, 1-enabled
  7526. */
  7527. A_UINT32 dyn_cca_status;
  7528. /** RXDEAF Register value
  7529. * rxdesense_thresh_sw - VREG Register
  7530. * rxdesense_thresh_hw - PHY Register
  7531. */
  7532. A_UINT32 rxdesense_thresh_sw;
  7533. A_UINT32 rxdesense_thresh_hw;
  7534. /** Current PHY Bandwidth -
  7535. * values are specified by the HTT_PHY_BW_IDX enum type
  7536. */
  7537. A_UINT32 phy_bw_code;
  7538. /** Current channel operating rate -
  7539. * values are specified by the HTT_CHANNEL_RATE enum type
  7540. */
  7541. A_UINT32 phy_rate_mode;
  7542. /** current channel operating band
  7543. * 0 - 5G; 1 - 2G; 2 -6G
  7544. */
  7545. A_UINT32 phy_band_code;
  7546. /** microcode processor virtual phy base address -
  7547. * provided only for debug
  7548. */
  7549. A_UINT32 phy_vreg_base;
  7550. /** microcode processor virtual phy base ext address -
  7551. * provided only for debug
  7552. */
  7553. A_UINT32 phy_vreg_base_ext;
  7554. /** HW LUT table configuration for home/scan channel -
  7555. * provided only for debug
  7556. */
  7557. A_UINT32 cur_table_index;
  7558. /** SW configuration flag for PHY reset and Calibrations -
  7559. * values are specified by the HTT_WHAL_CONFIG enum type
  7560. */
  7561. A_UINT32 whal_config_flag;
  7562. /** nfcal_iteration_counts:
  7563. * iteration count for Home/Scan/Periodic Noise Floor calibrations
  7564. * nfcal_iteration_counts[0] - home NF iteration counter
  7565. * nfcal_iteration_counts[1] - scan NF iteration counter
  7566. * nfcal_iteration_counts[2] - periodic NF iteration counter
  7567. * These counters are not reset automatically; they are only reset
  7568. * when explicitly requested by the host.
  7569. */
  7570. A_UINT32 nfcal_iteration_counts[3];
  7571. } htt_stats_phy_reset_stats_tlv;
  7572. /* preserve old name alias for new name consistent with the tag name */
  7573. typedef htt_stats_phy_reset_stats_tlv htt_phy_reset_stats_tlv;
  7574. typedef struct {
  7575. htt_tlv_hdr_t tlv_hdr;
  7576. /** current pdev_id */
  7577. A_UINT32 pdev_id;
  7578. /** ucode PHYOFF pass/failure count */
  7579. A_UINT32 cf_active_low_fail_cnt;
  7580. A_UINT32 cf_active_low_pass_cnt;
  7581. /** PHYOFF count attempted through ucode VREG */
  7582. A_UINT32 phy_off_through_vreg_cnt;
  7583. /** Force calibration count */
  7584. A_UINT32 force_calibration_cnt;
  7585. /** phyoff count during rfmode switch */
  7586. A_UINT32 rf_mode_switch_phy_off_cnt;
  7587. /** Temperature based recalibration count */
  7588. A_UINT32 temperature_recal_cnt;
  7589. } htt_stats_phy_reset_counters_tlv;
  7590. /* preserve old name alias for new name consistent with the tag name */
  7591. typedef htt_stats_phy_reset_counters_tlv htt_phy_reset_counters_tlv;
  7592. /* Considering 320 MHz maximum 16 power levels */
  7593. #define HTT_MAX_CH_PWR_INFO_SIZE 16
  7594. #define HTT_PHY_TPC_STATS_CTL_REGION_GRP_M 0x000000ff
  7595. #define HTT_PHY_TPC_STATS_CTL_REGION_GRP_S 0
  7596. #define HTT_PHY_TPC_STATS_CTL_REGION_GRP_GET(_var) \
  7597. (((_var) & HTT_PHY_TPC_STATS_CTL_REGION_GRP_M) >> \
  7598. HTT_PHY_TPC_STATS_CTL_REGION_GRP_S)
  7599. #define HTT_PHY_TPC_STATS_CTL_REGION_GRP_SET(_var, _val) \
  7600. do { \
  7601. HTT_CHECK_SET_VAL(HTT_PHY_TPC_STATS_CTL_REGION_GRP, _val); \
  7602. ((_var) &= ~(HTT_PHY_TPC_STATS_CTL_REGION_GRP_M)); \
  7603. ((_var) |= ((_val) << HTT_PHY_TPC_STATS_CTL_REGION_GRP_S)); \
  7604. } while (0)
  7605. #define HTT_PHY_TPC_STATS_SUB_BAND_INDEX_M 0x0000ff00
  7606. #define HTT_PHY_TPC_STATS_SUB_BAND_INDEX_S 8
  7607. #define HTT_PHY_TPC_STATS_SUB_BAND_INDEX_GET(_var) \
  7608. (((_var) & HTT_PHY_TPC_STATS_SUB_BAND_INDEX_M) >> \
  7609. HTT_PHY_TPC_STATS_SUB_BAND_INDEX_S)
  7610. #define HTT_PHY_TPC_STATS_SUB_BAND_INDEX_SET(_var, _val) \
  7611. do { \
  7612. HTT_CHECK_SET_VAL(HTT_PHY_TPC_STATS_SUB_BAND_INDEX, _val); \
  7613. ((_var) &= ~(HTT_PHY_TPC_STATS_SUB_BAND_INDEX_M)); \
  7614. ((_var) |= ((_val) << HTT_PHY_TPC_STATS_SUB_BAND_INDEX_S)); \
  7615. } while (0)
  7616. #define HTT_PHY_TPC_STATS_AG_CAP_EXT2_ENABLED_M 0x00ff0000
  7617. #define HTT_PHY_TPC_STATS_AG_CAP_EXT2_ENABLED_S 16
  7618. #define HTT_PHY_TPC_STATS_AG_CAP_EXT2_ENABLED_GET(_var) \
  7619. (((_var) & HTT_PHY_TPC_STATS_AG_CAP_EXT2_ENABLED_M) >> \
  7620. HTT_PHY_TPC_STATS_AG_CAP_EXT2_ENABLED_S)
  7621. #define HTT_PHY_TPC_STATS_AG_CAP_EXT2_ENABLED_SET(_var, _val) \
  7622. do { \
  7623. HTT_CHECK_SET_VAL(HTT_PHY_TPC_STATS_AG_CAP_EXT2_ENABLED, _val); \
  7624. ((_var) &= ~(HTT_PHY_TPC_STATS_AG_CAP_EXT2_ENABLED_M)); \
  7625. ((_var) |= ((_val) << HTT_PHY_TPC_STATS_AG_CAP_EXT2_ENABLED_S)); \
  7626. } while (0)
  7627. #define HTT_PHY_TPC_STATS_CTL_FLAG_M 0xff000000
  7628. #define HTT_PHY_TPC_STATS_CTL_FLAG_S 24
  7629. #define HTT_PHY_TPC_STATS_CTL_FLAG_GET(_var) \
  7630. (((_var) & HTT_PHY_TPC_STATS_CTL_FLAG_M) >> \
  7631. HTT_PHY_TPC_STATS_CTL_FLAG_S)
  7632. #define HTT_PHY_TPC_STATS_CTL_FLAG_SET(_var, _val) \
  7633. do { \
  7634. HTT_CHECK_SET_VAL(HTT_PHY_TPC_STATS_CTL_FLAG, _val); \
  7635. ((_var) &= ~(HTT_PHY_TPC_STATS_CTL_FLAG_M)); \
  7636. ((_var) |= ((_val) << HTT_PHY_TPC_STATS_CTL_FLAG_S)); \
  7637. } while (0)
  7638. typedef struct {
  7639. htt_tlv_hdr_t tlv_hdr;
  7640. /** current pdev_id */
  7641. A_UINT32 pdev_id;
  7642. /** Tranmsit power control scaling related configurations */
  7643. A_UINT32 tx_power_scale;
  7644. A_UINT32 tx_power_scale_db;
  7645. /** Minimum negative tx power supported by the target */
  7646. A_INT32 min_negative_tx_power;
  7647. /** current configured CTL domain */
  7648. A_UINT32 reg_ctl_domain;
  7649. /** Regulatory power information for the current channel */
  7650. A_INT32 max_reg_allowed_power[HTT_STATS_MAX_CHAINS];
  7651. A_INT32 max_reg_allowed_power_6g[HTT_STATS_MAX_CHAINS];
  7652. /** channel max regulatory power in 0.5dB */
  7653. A_UINT32 twice_max_rd_power;
  7654. /** current channel and home channel's maximum possible tx power */
  7655. A_INT32 max_tx_power;
  7656. A_INT32 home_max_tx_power;
  7657. /** channel's Power Spectral Density */
  7658. A_UINT32 psd_power;
  7659. /** channel's EIRP power */
  7660. A_UINT32 eirp_power;
  7661. /** 6G channel power mode
  7662. * 0-LPI, 1-SP, 2-VLPI and 3-SP_CLIENT power mode
  7663. */
  7664. A_UINT32 power_type_6ghz;
  7665. /** sub-band channels and corresponding Tx-power */
  7666. A_UINT32 sub_band_cfreq[HTT_MAX_CH_PWR_INFO_SIZE];
  7667. A_UINT32 sub_band_txpower[HTT_MAX_CH_PWR_INFO_SIZE];
  7668. /** array_gain_cap:
  7669. * CTL Array Gain cap, units are dB
  7670. * The lower-triangular portion of this square matrix is stored, i.e.
  7671. * array element 0 stores matrix element (0,0)
  7672. * array element 1 stores matrix element (1,0)
  7673. * array element 2 stores matrix element (1,1)
  7674. * array element 3 stores matrix element (2,0)
  7675. * ...
  7676. * array element 35 stores matrix element (7,7)
  7677. */
  7678. A_INT32 array_gain_cap[HTT_STATS_MAX_CHAINS * ((HTT_STATS_MAX_CHAINS/2)+1)];
  7679. union {
  7680. struct {
  7681. A_UINT32
  7682. ctl_region_grp:8, /** Group to which the ctl region belongs */
  7683. sub_band_index:8, /** Frequency subband index */
  7684. /** Array Gain Cap Ext2 feature enablement status */
  7685. array_gain_cap_ext2_enabled:8,
  7686. /** ctl_flag:
  7687. * 1st bit ULOFDMA supported
  7688. * 2nd bit DLOFDMA shared Exception supported
  7689. */
  7690. ctl_flag:8;
  7691. };
  7692. A_UINT32 ctl_args;
  7693. };
  7694. } htt_stats_phy_tpc_stats_tlv;
  7695. /* preserve old name alias for new name consistent with the tag name */
  7696. typedef htt_stats_phy_tpc_stats_tlv htt_phy_tpc_stats_tlv;
  7697. /* NOTE:
  7698. * This structure is for documentation, and cannot be safely used directly.
  7699. * Instead, use the constituent TLV structures to fill/parse.
  7700. */
  7701. typedef struct {
  7702. htt_stats_phy_counters_tlv phy_counters;
  7703. htt_stats_phy_stats_tlv phy_stats;
  7704. htt_stats_phy_reset_counters_tlv phy_reset_counters;
  7705. htt_stats_phy_reset_stats_tlv phy_reset_stats;
  7706. htt_stats_phy_tpc_stats_tlv phy_tpc_stats;
  7707. } htt_phy_counters_and_phy_stats_t;
  7708. /* NOTE:
  7709. * This structure is for documentation, and cannot be safely used directly.
  7710. * Instead, use the constituent TLV structures to fill/parse.
  7711. */
  7712. typedef struct {
  7713. htt_stats_soc_txrx_stats_common_tlv soc_common_stats;
  7714. htt_stats_vdev_txrx_stats_hw_stats_tlv vdev_hw_stats[1/*or more*/];
  7715. } htt_vdevs_txrx_stats_t;
  7716. typedef struct {
  7717. A_UINT32
  7718. success: 16,
  7719. fail: 16;
  7720. } htt_stats_strm_gen_mpdus_cntr_t;
  7721. typedef struct {
  7722. /* MSDU queue identification */
  7723. A_UINT32
  7724. peer_id: 16,
  7725. tid: 4, /* only TIDs 0-7 actually expected to be used */
  7726. htt_qtype: 4, /* refer to HTT_MSDUQ_INDEX */
  7727. reserved: 8;
  7728. } htt_stats_strm_msdu_queue_id;
  7729. typedef struct {
  7730. htt_tlv_hdr_t tlv_hdr;
  7731. htt_stats_strm_msdu_queue_id queue_id;
  7732. htt_stats_strm_gen_mpdus_cntr_t svc_interval;
  7733. htt_stats_strm_gen_mpdus_cntr_t burst_size;
  7734. } htt_stats_strm_gen_mpdus_tlv;
  7735. /* preserve old name alias for new name consistent with the tag name */
  7736. typedef htt_stats_strm_gen_mpdus_tlv htt_stats_strm_gen_mpdus_tlv_t;
  7737. typedef struct {
  7738. htt_tlv_hdr_t tlv_hdr;
  7739. htt_stats_strm_msdu_queue_id queue_id;
  7740. struct {
  7741. A_UINT32
  7742. timestamp_prior_ms: 16,
  7743. timestamp_now_ms: 16;
  7744. A_UINT32
  7745. interval_spec_ms: 16,
  7746. margin_ms: 16;
  7747. } svc_interval;
  7748. struct {
  7749. A_UINT32
  7750. /* consumed_bytes_orig:
  7751. * Raw count (actually estimate) of how many bytes were removed
  7752. * from the MSDU queue by the GEN_MPDUS operation.
  7753. */
  7754. consumed_bytes_orig: 16,
  7755. /* consumed_bytes_final:
  7756. * Adjusted count of removed bytes that incorporates normalizing
  7757. * by the actual service interval compared to the expected
  7758. * service interval.
  7759. * This allows the burst size computation to be independent of
  7760. * whether the target is doing GEN_MPDUS at only the service
  7761. * interval, or substantially more often than the service
  7762. * interval.
  7763. * consumed_bytes_final = consumed_bytes_orig /
  7764. * (svc_interval / ref_svc_interval)
  7765. */
  7766. consumed_bytes_final: 16;
  7767. A_UINT32
  7768. remaining_bytes: 16,
  7769. reserved: 16;
  7770. A_UINT32
  7771. burst_size_spec: 16,
  7772. margin_bytes: 16;
  7773. } burst_size;
  7774. } htt_stats_strm_gen_mpdus_details_tlv;
  7775. /* preserve old name alias for new name consistent with the tag name */
  7776. typedef htt_stats_strm_gen_mpdus_details_tlv
  7777. htt_stats_strm_gen_mpdus_details_tlv_t;
  7778. typedef struct {
  7779. htt_tlv_hdr_t tlv_hdr;
  7780. A_UINT32 reset_count;
  7781. /** lower portion (bits 31:0) of reset time, in milliseconds */
  7782. A_UINT32 reset_time_lo_ms;
  7783. /** upper portion (bits 63:32) of reset time, in milliseconds */
  7784. A_UINT32 reset_time_hi_ms;
  7785. /** lower portion (bits 31:0) of disengage time, in milliseconds */
  7786. A_UINT32 disengage_time_lo_ms;
  7787. /** upper portion (bits 63:32) of disengage time, in milliseconds */
  7788. A_UINT32 disengage_time_hi_ms;
  7789. /** lower portion (bits 31:0) of engage time, in milliseconds */
  7790. A_UINT32 engage_time_lo_ms;
  7791. /** upper portion (bits 63:32) of engage time, in milliseconds */
  7792. A_UINT32 engage_time_hi_ms;
  7793. A_UINT32 disengage_count;
  7794. A_UINT32 engage_count;
  7795. A_UINT32 drain_dest_ring_mask;
  7796. } htt_stats_dmac_reset_stats_tlv;
  7797. /* preserve old name alias for new name consistent with the tag name */
  7798. typedef htt_stats_dmac_reset_stats_tlv htt_dmac_reset_stats_tlv;
  7799. /* Support up to 640 MHz mode for future expansion */
  7800. #define HTT_PUNCTURE_STATS_MAX_SUBBAND_COUNT 32
  7801. #define HTT_PDEV_PUNCTURE_STATS_MAC_ID_M 0x000000ff
  7802. #define HTT_PDEV_PUNCTURE_STATS_MAC_ID_S 0
  7803. #define HTT_PDEV_PUNCTURE_STATS_MAC_ID_GET(_var) \
  7804. (((_var) & HTT_PDEV_PUNCTURE_STATS_MAC_ID_M) >> \
  7805. HTT_PDEV_PUNCTURE_STATS_MAC_ID_S)
  7806. #define HTT_PDEV_PUNCTURE_STATS_MAC_ID_SET(_var, _val) \
  7807. do { \
  7808. HTT_CHECK_SET_VAL(HTT_PDEV_PUNCTURE_STATS_MAC_ID, _val); \
  7809. ((_var) |= ((_val) << HTT_PDEV_PUNCTURE_STATS_MAC_ID_S)); \
  7810. } while (0)
  7811. /*
  7812. * TLV used to provide puncturing related stats for TX/RX and each PPDU type.
  7813. */
  7814. typedef struct {
  7815. htt_tlv_hdr_t tlv_hdr;
  7816. /**
  7817. * BIT [ 7 : 0] :- mac_id
  7818. * BIT [31 : 8] :- reserved
  7819. */
  7820. union {
  7821. struct {
  7822. A_UINT32 mac_id: 8,
  7823. reserved: 24;
  7824. };
  7825. A_UINT32 mac_id__word;
  7826. };
  7827. /*
  7828. * Stats direction (TX/RX). Enum value from HTT_STATS_DIRECTION.
  7829. */
  7830. A_UINT32 direction;
  7831. /*
  7832. * Preamble type. Enum value from HTT_STATS_PREAM_TYPE.
  7833. *
  7834. * Note that for although OFDM rates don't technically support
  7835. * "puncturing", this TLV can be used to indicate the 20 MHz sub-bands
  7836. * utilized for OFDM legacy duplicate packets, which are also used during
  7837. * puncturing sequences.
  7838. */
  7839. A_UINT32 preamble;
  7840. /*
  7841. * Stats PPDU type. Enum value from HTT_STATS_PPDU_TYPE.
  7842. */
  7843. A_UINT32 ppdu_type;
  7844. /*
  7845. * Indicates the number of valid elements in the
  7846. * "num_subbands_used_cnt" array, and must be <=
  7847. * HTT_PUNCTURE_STATS_MAX_SUBBAND_COUNT.
  7848. *
  7849. * Also indicates how many bits in the last_used_pattern_mask may be
  7850. * non-zero.
  7851. */
  7852. A_UINT32 subband_count;
  7853. /*
  7854. * The last used transmit 20 MHz subband mask. Bit 0 represents the lowest
  7855. * 20 MHz subband mask, bit 1 the second lowest, and so on.
  7856. *
  7857. * All 32 bits are valid and will be used for expansion to higher BW modes.
  7858. */
  7859. A_UINT32 last_used_pattern_mask;
  7860. /*
  7861. * Number of array elements with valid values is equal to "subband_count".
  7862. * If subband_count is < HTT_PUNCTURE_STATS_MAX_SUBBAND_COUNT, the
  7863. * remaining elements will be implicitly set to 0x0.
  7864. *
  7865. * The array index is the number of 20 MHz subbands utilized during TX/RX,
  7866. * and the counter value at that index is the number of times that subband
  7867. * count was used.
  7868. *
  7869. * The count is incremented once for each OTA PPDU transmitted / received.
  7870. */
  7871. A_UINT32 num_subbands_used_cnt[HTT_PUNCTURE_STATS_MAX_SUBBAND_COUNT];
  7872. } htt_stats_pdev_puncture_stats_tlv;
  7873. /* preserve old name alias for new name consistent with the tag name */
  7874. typedef htt_stats_pdev_puncture_stats_tlv htt_pdev_puncture_stats_tlv;
  7875. enum {
  7876. HTT_STATS_CAL_PROF_COLD_BOOT = 0,
  7877. HTT_STATS_CAL_PROF_FULL_CHAN_SWITCH = 1,
  7878. HTT_STATS_CAL_PROF_SCAN_CHAN_SWITCH = 2,
  7879. HTT_STATS_CAL_PROF_DPD_SPLIT_CAL = 3,
  7880. HTT_STATS_MAX_PROF_CAL = 4,
  7881. };
  7882. #define HTT_STATS_MAX_CAL_IDX_CNT 8
  7883. typedef struct {
  7884. htt_tlv_hdr_t tlv_hdr;
  7885. A_UINT8 latency_prof_name[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_PROF_STATS_NAME_LEN];
  7886. /** To verify whether prof cal is enabled or not */
  7887. A_UINT32 enable;
  7888. /** current pdev_id */
  7889. A_UINT32 pdev_id;
  7890. /** The cnt is incremented when each time the calindex takes place */
  7891. A_UINT32 cnt[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7892. /** Minimum time taken to complete the calibration - in us */
  7893. A_UINT32 min[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7894. /** Maximum time taken to complete the calibration -in us */
  7895. A_UINT32 max[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7896. /** Time taken by the cal for its final time execution - in us */
  7897. A_UINT32 last[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7898. /** Total time taken - in us */
  7899. A_UINT32 tot[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7900. /** hist_intvl - by default will be set to 2000 us */
  7901. A_UINT32 hist_intvl[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7902. /**
  7903. * If last is less than hist_intvl, then hist[0]++,
  7904. * If last is less than hist_intvl << 1, then hist[1]++,
  7905. * otherwise hist[2]++.
  7906. */
  7907. A_UINT32 hist[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT][HTT_INTERRUPTS_LATENCY_PROFILE_MAX_HIST];
  7908. /** Pf_last will log the current no of page faults */
  7909. A_UINT32 pf_last[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7910. /** Sum of all page faults happened */
  7911. A_UINT32 pf_tot[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7912. /** If pf_last > pf_max then pf_max = pf_last */
  7913. A_UINT32 pf_max[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7914. /**
  7915. * For each cal profile, only certain no of cal indices were invoked,
  7916. * this member will store what all the indices got invoked per each
  7917. * cal profile
  7918. */
  7919. A_UINT32 enabledCalIdx[HTT_STATS_MAX_PROF_CAL][HTT_STATS_MAX_CAL_IDX_CNT];
  7920. /** No of indices invoked per each cal profile */
  7921. A_UINT32 CalCnt[HTT_STATS_MAX_PROF_CAL];
  7922. } htt_stats_latency_prof_cal_stats_tlv;
  7923. /* preserve old name alias for new name consistent with the tag name */
  7924. typedef htt_stats_latency_prof_cal_stats_tlv htt_latency_prof_cal_stats_tlv;
  7925. #define HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_M 0x0000003F
  7926. #define HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_S 0
  7927. #define HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_M 0x00000FC0
  7928. #define HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_S 6
  7929. #define HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_M 0x0FFFF000
  7930. #define HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_S 12
  7931. #define HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_GET(_var) \
  7932. (((_var) & HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_M) >> \
  7933. HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_S)
  7934. #define HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_SET(_var, _val) \
  7935. do { \
  7936. HTT_CHECK_SET_VAL(HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD, _val); \
  7937. ((_var) &= ~(HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_M)); \
  7938. ((_var) |= ((_val) << HTT_ML_PEER_EXT_DETAILS_PEER_ASSOC_IPC_RECVD_S)); \
  7939. } while (0)
  7940. #define HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_GET(_var) \
  7941. (((_var) & HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_M) >> \
  7942. HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_S)
  7943. #define HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_SET(_var, _val) \
  7944. do { \
  7945. HTT_CHECK_SET_VAL(HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD, _val); \
  7946. ((_var) &= ~(HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_M)); \
  7947. ((_var) |= ((_val) << HTT_ML_PEER_EXT_DETAILS_SCHED_PEER_DELETE_RECVD_S)); \
  7948. } while (0)
  7949. #define HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_GET(_var) \
  7950. (((_var) & HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_M) >> \
  7951. HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_S)
  7952. #define HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_SET(_var, _val) \
  7953. do { \
  7954. HTT_CHECK_SET_VAL(HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX, _val); \
  7955. ((_var) &= ~(HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_M)); \
  7956. ((_var) |= ((_val) << HTT_ML_PEER_EXT_DETAILS_MLD_AST_INDEX_S)); \
  7957. } while (0)
  7958. typedef struct {
  7959. htt_tlv_hdr_t tlv_hdr;
  7960. union {
  7961. struct {
  7962. A_UINT32 peer_assoc_ipc_recvd : 6,
  7963. sched_peer_delete_recvd : 6,
  7964. mld_ast_index : 16,
  7965. reserved : 4;
  7966. };
  7967. A_UINT32 msg_dword_1;
  7968. };
  7969. } htt_stats_ml_peer_ext_details_tlv;
  7970. /* preserve old name alias for new name consistent with the tag name */
  7971. typedef htt_stats_ml_peer_ext_details_tlv htt_ml_peer_ext_details_tlv;
  7972. #define HTT_ML_LINK_INFO_VALID_M 0x00000001
  7973. #define HTT_ML_LINK_INFO_VALID_S 0
  7974. #define HTT_ML_LINK_INFO_ACTIVE_M 0x00000002
  7975. #define HTT_ML_LINK_INFO_ACTIVE_S 1
  7976. #define HTT_ML_LINK_INFO_PRIMARY_M 0x00000004
  7977. #define HTT_ML_LINK_INFO_PRIMARY_S 2
  7978. #define HTT_ML_LINK_INFO_ASSOC_LINK_M 0x00000008
  7979. #define HTT_ML_LINK_INFO_ASSOC_LINK_S 3
  7980. #define HTT_ML_LINK_INFO_CHIP_ID_M 0x00000070
  7981. #define HTT_ML_LINK_INFO_CHIP_ID_S 4
  7982. #define HTT_ML_LINK_INFO_IEEE_LINK_ID_M 0x00007F80
  7983. #define HTT_ML_LINK_INFO_IEEE_LINK_ID_S 7
  7984. #define HTT_ML_LINK_INFO_HW_LINK_ID_M 0x00038000
  7985. #define HTT_ML_LINK_INFO_HW_LINK_ID_S 15
  7986. #define HTT_ML_LINK_INFO_LOGICAL_LINK_ID_M 0x000C0000
  7987. #define HTT_ML_LINK_INFO_LOGICAL_LINK_ID_S 18
  7988. #define HTT_ML_LINK_INFO_MASTER_LINK_M 0x00100000
  7989. #define HTT_ML_LINK_INFO_MASTER_LINK_S 20
  7990. #define HTT_ML_LINK_INFO_ANCHOR_LINK_M 0x00200000
  7991. #define HTT_ML_LINK_INFO_ANCHOR_LINK_S 21
  7992. #define HTT_ML_LINK_INFO_INITIALIZED_M 0x00400000
  7993. #define HTT_ML_LINK_INFO_INITIALIZED_S 22
  7994. #define HTT_ML_LINK_INFO_SW_PEER_ID_M 0x0000ffff
  7995. #define HTT_ML_LINK_INFO_SW_PEER_ID_S 0
  7996. #define HTT_ML_LINK_INFO_VDEV_ID_M 0x00ff0000
  7997. #define HTT_ML_LINK_INFO_VDEV_ID_S 16
  7998. #define HTT_ML_LINK_INFO_VALID_GET(_var) \
  7999. (((_var) & HTT_ML_LINK_INFO_VALID_M) >> \
  8000. HTT_ML_LINK_INFO_VALID_S)
  8001. #define HTT_ML_LINK_INFO_VALID_SET(_var, _val) \
  8002. do { \
  8003. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_VALID, _val); \
  8004. ((_var) &= ~(HTT_ML_LINK_INFO_VALID_M)); \
  8005. ((_var) |= ((_val) << HTT_ML_LINK_INFO_VALID_S)); \
  8006. } while (0)
  8007. #define HTT_ML_LINK_INFO_ACTIVE_GET(_var) \
  8008. (((_var) & HTT_ML_LINK_INFO_ACTIVE_M) >> \
  8009. HTT_ML_LINK_INFO_ACTIVE_S)
  8010. #define HTT_ML_LINK_INFO_ACTIVE_SET(_var, _val) \
  8011. do { \
  8012. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_ACTIVE, _val); \
  8013. ((_var) &= ~(HTT_ML_LINK_INFO_ACTIVE_M)); \
  8014. ((_var) |= ((_val) << HTT_ML_LINK_INFO_ACTIVE_S)); \
  8015. } while (0)
  8016. #define HTT_ML_LINK_INFO_PRIMARY_GET(_var) \
  8017. (((_var) & HTT_ML_LINK_INFO_PRIMARY_M) >> \
  8018. HTT_ML_LINK_INFO_PRIMARY_S)
  8019. #define HTT_ML_LINK_INFO_PRIMARY_SET(_var, _val) \
  8020. do { \
  8021. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_PRIMARY, _val); \
  8022. ((_var) &= ~(HTT_ML_LINK_INFO_PRIMARY_M)); \
  8023. ((_var) |= ((_val) << HTT_ML_LINK_INFO_PRIMARY_S)); \
  8024. } while (0)
  8025. #define HTT_ML_LINK_INFO_ASSOC_LINK_GET(_var) \
  8026. (((_var) & HTT_ML_LINK_INFO_ASSOC_LINK_M) >> \
  8027. HTT_ML_LINK_INFO_ASSOC_LINK_S)
  8028. #define HTT_ML_LINK_INFO_ASSOC_LINK_SET(_var, _val) \
  8029. do { \
  8030. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_ASSOC_LINK, _val); \
  8031. ((_var) &= ~(HTT_ML_LINK_INFO_ASSOC_LINK_M)); \
  8032. ((_var) |= ((_val) << HTT_ML_LINK_INFO_ASSOC_LINK_S)); \
  8033. } while (0)
  8034. #define HTT_ML_LINK_INFO_CHIP_ID_GET(_var) \
  8035. (((_var) & HTT_ML_LINK_INFO_CHIP_ID_M) >> \
  8036. HTT_ML_LINK_INFO_CHIP_ID_S)
  8037. #define HTT_ML_LINK_INFO_CHIP_ID_SET(_var, _val) \
  8038. do { \
  8039. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_CHIP_ID, _val); \
  8040. ((_var) &= ~(HTT_ML_LINK_INFO_CHIP_ID_M)); \
  8041. ((_var) |= ((_val) << HTT_ML_LINK_INFO_CHIP_ID_S)); \
  8042. } while (0)
  8043. #define HTT_ML_LINK_INFO_IEEE_LINK_ID_GET(_var) \
  8044. (((_var) & HTT_ML_LINK_INFO_IEEE_LINK_ID_M) >> \
  8045. HTT_ML_LINK_INFO_IEEE_LINK_ID_S)
  8046. #define HTT_ML_LINK_INFO_IEEE_LINK_ID_SET(_var, _val) \
  8047. do { \
  8048. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_IEEE_LINK_ID, _val); \
  8049. ((_var) &= ~(HTT_ML_LINK_INFO_IEEE_LINK_ID_M)); \
  8050. ((_var) |= ((_val) << HTT_ML_LINK_INFO_IEEE_LINK_ID_S)); \
  8051. } while (0)
  8052. #define HTT_ML_LINK_INFO_HW_LINK_ID_GET(_var) \
  8053. (((_var) & HTT_ML_LINK_INFO_HW_LINK_ID_M) >> \
  8054. HTT_ML_LINK_INFO_HW_LINK_ID_S)
  8055. #define HTT_ML_LINK_INFO_HW_LINK_ID_SET(_var, _val) \
  8056. do { \
  8057. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_HW_LINK_ID, _val); \
  8058. ((_var) &= ~(HTT_ML_LINK_INFO_HW_LINK_ID_M)); \
  8059. ((_var) |= ((_val) << HTT_ML_LINK_INFO_HW_LINK_ID_S)); \
  8060. } while (0)
  8061. #define HTT_ML_LINK_INFO_LOGICAL_LINK_ID_GET(_var) \
  8062. (((_var) & HTT_ML_LINK_INFO_LOGICAL_LINK_ID_M) >> \
  8063. HTT_ML_LINK_INFO_LOGICAL_LINK_ID_S)
  8064. #define HTT_ML_LINK_INFO_LOGICAL_LINK_ID_SET(_var, _val) \
  8065. do { \
  8066. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_LOGICAL_LINK_ID, _val); \
  8067. ((_var) &= ~(HTT_ML_LINK_INFO_LOGICAL_LINK_ID_M)); \
  8068. ((_var) |= ((_val) << HTT_ML_LINK_INFO_LOGICAL_LINK_ID_S)); \
  8069. } while (0)
  8070. #define HTT_ML_LINK_INFO_MASTER_LINK_GET(_var) \
  8071. (((_var) & HTT_ML_LINK_INFO_MASTER_LINK_M) >> \
  8072. HTT_ML_LINK_INFO_MASTER_LINK_S)
  8073. #define HTT_ML_LINK_INFO_MASTER_LINK_SET(_var, _val) \
  8074. do { \
  8075. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_MASTER_LINK, _val); \
  8076. ((_var) &= ~(HTT_ML_LINK_INFO_MASTER_LINK_M)); \
  8077. ((_var) |= ((_val) << HTT_ML_LINK_INFO_MASTER_LINK_S)); \
  8078. } while (0)
  8079. #define HTT_ML_LINK_INFO_ANCHOR_LINK_GET(_var) \
  8080. (((_var) & HTT_ML_LINK_INFO_ANCHOR_LINK_M) >> \
  8081. HTT_ML_LINK_INFO_ANCHOR_LINK_S)
  8082. #define HTT_ML_LINK_INFO_ANCHOR_LINK_SET(_var, _val) \
  8083. do { \
  8084. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_ANCHOR_LINK, _val); \
  8085. ((_var) &= ~(HTT_ML_LINK_INFO_ANCHOR_LINK_M)); \
  8086. ((_var) |= ((_val) << HTT_ML_LINK_INFO_ANCHOR_LINK_S)); \
  8087. } while (0)
  8088. #define HTT_ML_LINK_INFO_INITIALIZED_GET(_var) \
  8089. (((_var) & HTT_ML_LINK_INFO_INITIALIZED_M) >> \
  8090. HTT_ML_LINK_INFO_INITIALIZED_S)
  8091. #define HTT_ML_LINK_INFO_INITIALIZED_SET(_var, _val) \
  8092. do { \
  8093. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_INITIALIZED, _val); \
  8094. ((_var) &= ~(HTT_ML_LINK_INFO_INITIALIZED_M)); \
  8095. ((_var) |= ((_val) << HTT_ML_LINK_INFO_INITIALIZED_S)); \
  8096. } while (0)
  8097. #define HTT_ML_LINK_INFO_SW_PEER_ID_GET(_var) \
  8098. (((_var) & HTT_ML_LINK_INFO_SW_PEER_ID_M) >> \
  8099. HTT_ML_LINK_INFO_SW_PEER_ID_S)
  8100. #define HTT_ML_LINK_INFO_SW_PEER_ID_SET(_var, _val) \
  8101. do { \
  8102. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_SW_PEER_ID, _val); \
  8103. ((_var) &= ~(HTT_ML_LINK_INFO_SW_PEER_ID_M)); \
  8104. ((_var) |= ((_val) << HTT_ML_LINK_INFO_SW_PEER_ID_S)); \
  8105. } while (0)
  8106. #define HTT_ML_LINK_INFO_VDEV_ID_GET(_var) \
  8107. (((_var) & HTT_ML_LINK_INFO_VDEV_ID_M) >> \
  8108. HTT_ML_LINK_INFO_VDEV_ID_S)
  8109. #define HTT_ML_LINK_INFO_VDEV_ID_SET(_var, _val) \
  8110. do { \
  8111. HTT_CHECK_SET_VAL(HTT_ML_LINK_INFO_VDEV_ID, _val); \
  8112. ((_var) &= ~(HTT_ML_LINK_INFO_VDEV_ID_M)); \
  8113. ((_var) |= ((_val) << HTT_ML_LINK_INFO_VDEV_ID_S)); \
  8114. } while (0)
  8115. typedef struct {
  8116. htt_tlv_hdr_t tlv_hdr;
  8117. union {
  8118. struct {
  8119. A_UINT32 valid : 1,
  8120. active : 1,
  8121. primary : 1,
  8122. assoc_link : 1,
  8123. chip_id : 3,
  8124. ieee_link_id : 8,
  8125. hw_link_id : 3,
  8126. logical_link_id : 2,
  8127. master_link : 1,
  8128. anchor_link : 1,
  8129. initialized : 1,
  8130. reserved : 9;
  8131. };
  8132. A_UINT32 msg_dword_1;
  8133. };
  8134. union {
  8135. struct {
  8136. A_UINT32 sw_peer_id : 16,
  8137. vdev_id : 8,
  8138. reserved1 : 8;
  8139. };
  8140. A_UINT32 msg_dword_2;
  8141. };
  8142. A_UINT32 primary_tid_mask;
  8143. } htt_stats_ml_link_info_details_tlv;
  8144. /* preserve old name alias for new name consistent with the tag name */
  8145. typedef htt_stats_ml_link_info_details_tlv htt_ml_link_info_tlv;
  8146. #define HTT_ML_PEER_DETAILS_NUM_LINKS_M 0x00000003
  8147. #define HTT_ML_PEER_DETAILS_NUM_LINKS_S 0
  8148. #define HTT_ML_PEER_DETAILS_ML_PEER_ID_M 0x00003FFC
  8149. #define HTT_ML_PEER_DETAILS_ML_PEER_ID_S 2
  8150. #define HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_M 0x0001C000
  8151. #define HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_S 14
  8152. #define HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_M 0x00060000
  8153. #define HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_S 17
  8154. #define HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_M 0x00380000
  8155. #define HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_S 19
  8156. #define HTT_ML_PEER_DETAILS_NON_STR_M 0x00400000
  8157. #define HTT_ML_PEER_DETAILS_NON_STR_S 22
  8158. #define HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_M 0x00800000
  8159. #define HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_S 23
  8160. /* for backwards compatibility, retain the old EMLSR name of the bitfield */
  8161. #define HTT_ML_PEER_DETAILS_EMLSR_M HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_M
  8162. #define HTT_ML_PEER_DETAILS_EMLSR_S HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_S
  8163. #define HTT_ML_PEER_DETAILS_IS_STA_KO_M 0x01000000
  8164. #define HTT_ML_PEER_DETAILS_IS_STA_KO_S 24
  8165. #define HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_M 0x06000000
  8166. #define HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_S 25
  8167. #define HTT_ML_PEER_DETAILS_ALLOCATED_M 0x08000000
  8168. #define HTT_ML_PEER_DETAILS_ALLOCATED_S 27
  8169. #define HTT_ML_PEER_DETAILS_EMLSR_SUPPORT_M 0x10000000
  8170. #define HTT_ML_PEER_DETAILS_EMLSR_SUPPORT_S 28
  8171. #define HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_M 0x000000ff
  8172. #define HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_S 0
  8173. #define HTT_ML_PEER_DETAILS_NUM_LINKS_GET(_var) \
  8174. (((_var) & HTT_ML_PEER_DETAILS_NUM_LINKS_M) >> \
  8175. HTT_ML_PEER_DETAILS_NUM_LINKS_S)
  8176. #define HTT_ML_PEER_DETAILS_NUM_LINKS_SET(_var, _val) \
  8177. do { \
  8178. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_NUM_LINKS, _val); \
  8179. ((_var) &= ~(HTT_ML_PEER_DETAILS_NUM_LINKS_M)); \
  8180. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_NUM_LINKS_S)); \
  8181. } while (0)
  8182. #define HTT_ML_PEER_DETAILS_ML_PEER_ID_GET(_var) \
  8183. (((_var) & HTT_ML_PEER_DETAILS_ML_PEER_ID_M) >> \
  8184. HTT_ML_PEER_DETAILS_ML_PEER_ID_S)
  8185. #define HTT_ML_PEER_DETAILS_ML_PEER_ID_SET(_var, _val) \
  8186. do { \
  8187. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_ML_PEER_ID, _val); \
  8188. ((_var) &= ~(HTT_ML_PEER_DETAILS_ML_PEER_ID_M)); \
  8189. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_ML_PEER_ID_S)); \
  8190. } while (0)
  8191. #define HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_GET(_var) \
  8192. (((_var) & HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_M) >> \
  8193. HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_S)
  8194. #define HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_SET(_var, _val) \
  8195. do { \
  8196. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX, _val); \
  8197. ((_var) &= ~(HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_M)); \
  8198. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_PRIMARY_LINK_IDX_S)); \
  8199. } while (0)
  8200. #define HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_GET(_var) \
  8201. (((_var) & HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_M) >> \
  8202. HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_S)
  8203. #define HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_SET(_var, _val) \
  8204. do { \
  8205. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID, _val); \
  8206. ((_var) &= ~(HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_M)); \
  8207. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_PRIMARY_CHIP_ID_S)); \
  8208. } while (0)
  8209. #define HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_GET(_var) \
  8210. (((_var) & HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_M) >> \
  8211. HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_S)
  8212. #define HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_SET(_var, _val) \
  8213. do { \
  8214. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_LINK_INIT_COUNT, _val); \
  8215. ((_var) &= ~(HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_M)); \
  8216. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_LINK_INIT_COUNT_S)); \
  8217. } while (0)
  8218. #define HTT_ML_PEER_DETAILS_NON_STR_GET(_var) \
  8219. (((_var) & HTT_ML_PEER_DETAILS_NON_STR_M) >> \
  8220. HTT_ML_PEER_DETAILS_NON_STR_S)
  8221. #define HTT_ML_PEER_DETAILS_NON_STR_SET(_var, _val) \
  8222. do { \
  8223. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_NON_STR, _val); \
  8224. ((_var) &= ~(HTT_ML_PEER_DETAILS_NON_STR_M)); \
  8225. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_NON_STR_S)); \
  8226. } while (0)
  8227. #define HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_GET(_var) \
  8228. (((_var) & HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_M) >> \
  8229. HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_S)
  8230. #define HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_SET(_var, _val) \
  8231. do { \
  8232. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE, _val); \
  8233. ((_var) &= ~(HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_M)); \
  8234. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_IS_EMLSR_ACTIVE_S)); \
  8235. } while (0)
  8236. /* start deprecated:
  8237. * For backwards compatibility, retain a macro definition that uses
  8238. * the old EMLSR name of the bitfield
  8239. */
  8240. #define HTT_ML_PEER_DETAILS_EMLSR_GET(_var) \
  8241. (((_var) & HTT_ML_PEER_DETAILS_EMLSR_M) >> \
  8242. HTT_ML_PEER_DETAILS_EMLSR_S)
  8243. #define HTT_ML_PEER_DETAILS_EMLSR_SET(_var, _val) \
  8244. do { \
  8245. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_EMLSR, _val); \
  8246. ((_var) &= ~(HTT_ML_PEER_DETAILS_EMLSR_M)); \
  8247. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_EMLSR_S)); \
  8248. } while (0)
  8249. /* end deprecated */
  8250. #define HTT_ML_PEER_DETAILS_IS_STA_KO_GET(_var) \
  8251. (((_var) & HTT_ML_PEER_DETAILS_IS_STA_KO_M) >> \
  8252. HTT_ML_PEER_DETAILS_IS_STA_KO_S)
  8253. #define HTT_ML_PEER_DETAILS_IS_STA_KO_SET(_var, _val) \
  8254. do { \
  8255. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_IS_STA_KO, _val); \
  8256. ((_var) &= ~(HTT_ML_PEER_DETAILS_IS_STA_KO_M)); \
  8257. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_IS_STA_KO_S)); \
  8258. } while (0)
  8259. #define HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_GET(_var) \
  8260. (((_var) & HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_M) >> \
  8261. HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_S)
  8262. #define HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_SET(_var, _val) \
  8263. do { \
  8264. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS, _val); \
  8265. ((_var) &= ~(HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_M)); \
  8266. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_NUM_LOCAL_LINKS_S)); \
  8267. } while (0)
  8268. #define HTT_ML_PEER_DETAILS_ALLOCATED_GET(_var) \
  8269. (((_var) & HTT_ML_PEER_DETAILS_ALLOCATED_M) >> \
  8270. HTT_ML_PEER_DETAILS_ALLOCATED_S)
  8271. #define HTT_ML_PEER_DETAILS_ALLOCATED_SET(_var, _val) \
  8272. do { \
  8273. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_ALLOCATED, _val); \
  8274. ((_var) &= ~(HTT_ML_PEER_DETAILS_ALLOCATED_M)); \
  8275. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_ALLOCATED_S)); \
  8276. } while (0)
  8277. #define HTT_ML_PEER_DETAILS_EMLSR_SUPPORT_GET(_var) \
  8278. (((_var) & HTT_ML_PEER_DETAILS_EMLSR_SUPPORT_M) >> \
  8279. HTT_ML_PEER_DETAILS_EMLSR_SUPPORT_S)
  8280. #define HTT_ML_PEER_DETAILS_EMLSR_SUPPORT_SET(_var, _val) \
  8281. do { \
  8282. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_EMLSR_SUPPORT, _val); \
  8283. ((_var) &= ~(HTT_ML_PEER_DETAILS_EMLSR_SUPPORT_M)); \
  8284. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_EMLSR_SUPPORT_S)); \
  8285. } while (0)
  8286. #define HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_GET(_var) \
  8287. (((_var) & HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_M) >> \
  8288. HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_S)
  8289. #define HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_SET(_var, _val) \
  8290. do { \
  8291. HTT_CHECK_SET_VAL(HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP, _val); \
  8292. ((_var) &= ~(HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_M)); \
  8293. ((_var) |= ((_val) << HTT_ML_PEER_DETAILS_PARTICIPATING_CHIPS_BITMAP_S)); \
  8294. } while (0)
  8295. typedef struct {
  8296. htt_tlv_hdr_t tlv_hdr;
  8297. htt_mac_addr remote_mld_mac_addr;
  8298. union {
  8299. struct {
  8300. A_UINT32 num_links : 2,
  8301. ml_peer_id : 12,
  8302. primary_link_idx : 3,
  8303. primary_chip_id : 2,
  8304. link_init_count : 3,
  8305. non_str : 1,
  8306. is_emlsr_active : 1,
  8307. is_sta_ko : 1,
  8308. num_local_links : 2,
  8309. allocated : 1,
  8310. emlsr_support : 1,
  8311. reserved : 3;
  8312. };
  8313. struct {
  8314. /*
  8315. * For backwards compatibility, use a dummy union element to
  8316. * retain the old "emlsr" name for the "is_emlsr_active" bitfield.
  8317. */
  8318. A_UINT32 dummy1 : 23,
  8319. emlsr : 1,
  8320. dummy2 : 8;
  8321. };
  8322. A_UINT32 msg_dword_1;
  8323. };
  8324. union {
  8325. struct {
  8326. A_UINT32 participating_chips_bitmap : 8,
  8327. reserved1 : 24;
  8328. };
  8329. A_UINT32 msg_dword_2;
  8330. };
  8331. /*
  8332. * ml_peer_flags is an opaque field that cannot be interpreted by
  8333. * the host; it is only for off-line debug.
  8334. */
  8335. A_UINT32 ml_peer_flags;
  8336. } htt_stats_ml_peer_details_tlv;
  8337. /* preserve old name alias for new name consistent with the tag name */
  8338. typedef htt_stats_ml_peer_details_tlv htt_ml_peer_details_tlv;
  8339. /* STATS_TYPE : HTT_DBG_EXT_STATS_ML_PEERS_INFO
  8340. * TLV_TAGS:
  8341. * - HTT_STATS_ML_PEER_DETAILS_TAG
  8342. * - HTT_STATS_ML_LINK_INFO_DETAILS_TAG
  8343. * - HTT_STATS_ML_PEER_EXT_DETAILS_TAG (multiple)
  8344. */
  8345. /* NOTE:
  8346. * This structure is for documentation, and cannot be safely used directly.
  8347. * Instead, use the constituent TLV structures to fill/parse.
  8348. */
  8349. typedef struct _htt_ml_peer_stats {
  8350. htt_stats_ml_peer_details_tlv ml_peer_details;
  8351. htt_stats_ml_peer_ext_details_tlv ml_peer_ext_details;
  8352. htt_stats_ml_link_info_details_tlv ml_link_info[1];
  8353. } htt_ml_peer_stats_t;
  8354. /*
  8355. * ODD Mandatory Stats are grouped together from all the existing different
  8356. * stats, to form a set of stats that will be used by the ODD application to
  8357. * post the stats to the cloud instead of polling for the individual stats.
  8358. * This is done to avoid non-mandatory stats to be polled as the data will not
  8359. * be required in the recipes derivation.
  8360. * Rather than the host simply printing the ODD stats, the ODD application
  8361. * will take the buffer and map it to the odd_mandatory_stats data structure.
  8362. */
  8363. typedef struct {
  8364. htt_tlv_hdr_t tlv_hdr;
  8365. A_UINT32 hw_queued;
  8366. A_UINT32 hw_reaped;
  8367. A_UINT32 hw_paused;
  8368. A_UINT32 hw_filt;
  8369. A_UINT32 seq_posted;
  8370. A_UINT32 seq_completed;
  8371. A_UINT32 underrun;
  8372. A_UINT32 hw_flush;
  8373. A_UINT32 next_seq_posted_dsr;
  8374. A_UINT32 seq_posted_isr;
  8375. A_UINT32 mpdu_cnt_fcs_ok;
  8376. A_UINT32 mpdu_cnt_fcs_err;
  8377. A_UINT32 msdu_count_tqm;
  8378. A_UINT32 mpdu_count_tqm;
  8379. A_UINT32 mpdus_ack_failed;
  8380. A_UINT32 num_data_ppdus_tried_ota;
  8381. A_UINT32 ppdu_ok;
  8382. A_UINT32 num_total_ppdus_tried_ota;
  8383. A_UINT32 thermal_suspend_cnt;
  8384. A_UINT32 dfs_suspend_cnt;
  8385. A_UINT32 tx_abort_suspend_cnt;
  8386. A_UINT32 suspended_txq_mask;
  8387. A_UINT32 last_suspend_reason;
  8388. A_UINT32 seq_failed_queueing;
  8389. A_UINT32 seq_restarted;
  8390. A_UINT32 seq_txop_repost_stop;
  8391. A_UINT32 next_seq_cancel;
  8392. A_UINT32 seq_min_msdu_repost_stop;
  8393. A_UINT32 total_phy_err_cnt;
  8394. A_UINT32 ppdu_recvd;
  8395. A_UINT32 tcp_msdu_cnt;
  8396. A_UINT32 tcp_ack_msdu_cnt;
  8397. A_UINT32 udp_msdu_cnt;
  8398. A_UINT32 fw_tx_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  8399. A_UINT32 fw_rx_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  8400. A_UINT32 fw_ring_mpdu_err[HTT_RX_STATS_RXDMA_MAX_ERR];
  8401. A_UINT32 urrn_stats[HTT_TX_PDEV_MAX_URRN_STATS];
  8402. A_UINT32 sifs_status[HTT_TX_PDEV_MAX_SIFS_BURST_STATS];
  8403. A_UINT32 sifs_hist_status[HTT_TX_PDEV_SIFS_BURST_HIST_STATS];
  8404. A_UINT32 rx_suspend_cnt;
  8405. A_UINT32 rx_suspend_fail_cnt;
  8406. A_UINT32 rx_resume_cnt;
  8407. A_UINT32 rx_resume_fail_cnt;
  8408. A_UINT32 hwq_beacon_cmd_result[HTT_TX_HWQ_MAX_CMD_RESULT_STATS];
  8409. A_UINT32 hwq_voice_cmd_result[HTT_TX_HWQ_MAX_CMD_RESULT_STATS];
  8410. A_UINT32 hwq_video_cmd_result[HTT_TX_HWQ_MAX_CMD_RESULT_STATS];
  8411. A_UINT32 hwq_best_effort_cmd_result[HTT_TX_HWQ_MAX_CMD_RESULT_STATS];
  8412. A_UINT32 hwq_beacon_mpdu_tried_cnt;
  8413. A_UINT32 hwq_voice_mpdu_tried_cnt;
  8414. A_UINT32 hwq_video_mpdu_tried_cnt;
  8415. A_UINT32 hwq_best_effort_mpdu_tried_cnt;
  8416. A_UINT32 hwq_beacon_mpdu_queued_cnt;
  8417. A_UINT32 hwq_voice_mpdu_queued_cnt;
  8418. A_UINT32 hwq_video_mpdu_queued_cnt;
  8419. A_UINT32 hwq_best_effort_mpdu_queued_cnt;
  8420. A_UINT32 hwq_beacon_mpdu_ack_fail_cnt;
  8421. A_UINT32 hwq_voice_mpdu_ack_fail_cnt;
  8422. A_UINT32 hwq_video_mpdu_ack_fail_cnt;
  8423. A_UINT32 hwq_best_effort_mpdu_ack_fail_cnt;
  8424. A_UINT32 pdev_resets;
  8425. A_UINT32 phy_warm_reset;
  8426. A_UINT32 hwsch_reset_count;
  8427. A_UINT32 phy_warm_reset_ucode_trig;
  8428. A_UINT32 mac_cold_reset;
  8429. A_UINT32 mac_warm_reset;
  8430. A_UINT32 mac_warm_reset_restore_cal;
  8431. A_UINT32 phy_warm_reset_m3_ssr;
  8432. A_UINT32 fw_rx_rings_reset;
  8433. A_UINT32 tx_flush;
  8434. A_UINT32 hwsch_dev_reset_war;
  8435. A_UINT32 mac_cold_reset_restore_cal;
  8436. A_UINT32 mac_only_reset;
  8437. A_UINT32 mac_sfm_reset;
  8438. A_UINT32 tx_ldpc; /* Number of tx PPDUs with LDPC coding */
  8439. A_UINT32 rx_ldpc; /* Number of rx PPDUs with LDPC coding */
  8440. A_UINT32 gen_mpdu_end_reason[HTT_TX_TQM_MAX_GEN_MPDU_END_REASON];
  8441. A_UINT32 list_mpdu_end_reason[HTT_TX_TQM_MAX_LIST_MPDU_END_REASON];
  8442. 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];
  8443. A_UINT32 tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  8444. A_UINT32 tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  8445. A_UINT32 half_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  8446. A_UINT32 quarter_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  8447. A_UINT32 tx_su_punctured_mode[HTT_TX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS];
  8448. 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];
  8449. A_UINT32 rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  8450. A_UINT32 rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  8451. 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];
  8452. A_UINT32 rts_cnt;
  8453. A_UINT32 rts_success;
  8454. } htt_stats_odd_pdev_mandatory_tlv;
  8455. /* preserve old name alias for new name consistent with the tag name */
  8456. typedef htt_stats_odd_pdev_mandatory_tlv htt_odd_mandatory_pdev_stats_tlv;
  8457. typedef struct _htt_odd_mandatory_mumimo_pdev_stats_tlv {
  8458. htt_tlv_hdr_t tlv_hdr;
  8459. A_UINT32 ac_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  8460. A_UINT32 ax_mu_mimo_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  8461. A_UINT32 ac_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  8462. A_UINT32 ax_mu_mimo_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  8463. A_UINT32 ac_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  8464. A_UINT32 ax_mu_mimo_tx_mcs[HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS];
  8465. A_UINT32 ul_mumimo_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
  8466. A_UINT32 ul_mumimo_rx_nss[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS];
  8467. A_UINT32 ul_mumimo_rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
  8468. A_UINT32 rx_ulmumimo_mpdu_fail[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  8469. A_UINT32 rx_ulmumimo_mpdu_ok[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  8470. A_UINT32 rx_ulmumimo_data_ppdu[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  8471. } htt_dbg_odd_mandatory_mumimo_tlv;
  8472. /* preserve old name alias for new name consistent with the tag name */
  8473. typedef htt_dbg_odd_mandatory_mumimo_tlv
  8474. htt_odd_mandatory_mumimo_pdev_stats_tlv;
  8475. typedef struct _htt_odd_mandatory_muofdma_pdev_stats_tlv {
  8476. htt_tlv_hdr_t tlv_hdr;
  8477. A_UINT32 mu_ofdma_seq_posted;
  8478. A_UINT32 ul_mu_ofdma_seq_posted;
  8479. 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];
  8480. A_UINT32 ofdma_tx_nss[HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  8481. A_UINT32 ofdma_tx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  8482. A_UINT32 ofdma_tx_ldpc;
  8483. A_UINT32 ul_ofdma_rx_ldpc;
  8484. 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];
  8485. A_UINT32 ul_ofdma_rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS];
  8486. A_UINT32 ul_ofdma_rx_bw[HTT_TX_PDEV_STATS_NUM_BW_COUNTERS];
  8487. A_UINT32 rx_ulofdma_data_ppdu[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  8488. A_UINT32 rx_ulofdma_mpdu_ok[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  8489. A_UINT32 rx_ulofdma_mpdu_fail[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
  8490. A_UINT32 ax_mu_brp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  8491. A_UINT32 be_mu_brp_sch_status[HTT_TX_PDEV_STATS_NUM_TX_ERR_STATUS];
  8492. A_UINT32 ofdma_tx_ru_size[HTT_TX_PDEV_STATS_NUM_AX_RU_SIZE_COUNTERS];
  8493. } htt_dbg_odd_mandatory_muofdma_tlv;
  8494. /* preserve old name alias for new name consistent with the tag name */
  8495. typedef htt_dbg_odd_mandatory_muofdma_tlv
  8496. htt_odd_mandatory_muofdma_pdev_stats_tlv;
  8497. #define HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_M 0x000000ff
  8498. #define HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_S 0
  8499. #define HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_GET(_var) \
  8500. (((_var) & HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_M) >> \
  8501. HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_S)
  8502. #define HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_SET(_var, _val) \
  8503. do { \
  8504. HTT_CHECK_SET_VAL(HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID, _val); \
  8505. ((_var) |= ((_val) << HTT_PDEV_SCHED_ALGO_OFDMA_STATS_MAC_ID_S)); \
  8506. } while (0)
  8507. typedef enum {
  8508. HTT_STATS_SCHED_OFDMA_TXBF = 0, /* 0 */
  8509. HTT_STATS_SCHED_OFDMA_TXBF_IS_SANITY_FAILED, /* 1 */
  8510. HTT_STATS_SCHED_OFDMA_TXBF_IS_EBF_ALLOWED_FAILIED, /* 2 */
  8511. HTT_STATS_SCHED_OFDMA_TXBF_RU_ALLOC_BW_DROP_COUNT, /* 3 */
  8512. HTT_STATS_SCHED_OFDMA_TXBF_INVALID_CV_QUERY_COUNT, /* 4 */
  8513. HTT_STATS_SCHED_OFDMA_TXBF_AVG_TXTIME_LESS_THAN_TXBF_SND_THERHOLD, /* 5 */
  8514. HTT_STATS_SCHED_OFDMA_TXBF_IS_CANDIDATE_KICKED_OUT, /* 6 */
  8515. HTT_STATS_SCHED_OFDMA_TXBF_CV_IMAGE_BUF_INVALID, /* 7 */
  8516. HTT_STATS_SCHED_OFDMA_TXBF_INELIGIBILITY_MAX,
  8517. } htt_stats_sched_ofdma_txbf_ineligibility_t;
  8518. #define HTT_MAX_NUM_CHAN_ACC_LAT_INTR 9
  8519. typedef struct {
  8520. htt_tlv_hdr_t tlv_hdr;
  8521. /**
  8522. * BIT [ 7 : 0] :- mac_id
  8523. * BIT [31 : 8] :- reserved
  8524. */
  8525. union {
  8526. struct {
  8527. A_UINT32 mac_id: 8,
  8528. reserved: 24;
  8529. };
  8530. A_UINT32 mac_id__word;
  8531. };
  8532. /** Num of instances where rate based DL OFDMA status = ENABLED */
  8533. A_UINT32 rate_based_dlofdma_enabled_count[HTT_NUM_AC_WMM];
  8534. /** Num of instances where rate based DL OFDMA status = DISABLED */
  8535. A_UINT32 rate_based_dlofdma_disabled_count[HTT_NUM_AC_WMM];
  8536. /** Num of instances where rate based DL OFDMA status = PROBING */
  8537. A_UINT32 rate_based_dlofdma_probing_count[HTT_NUM_AC_WMM];
  8538. /** Num of instances where rate based DL OFDMA status = MONITORING */
  8539. A_UINT32 rate_based_dlofdma_monitoring_count[HTT_NUM_AC_WMM];
  8540. /** Num of instances where avg. channel access latency based DL OFDMA status = ENABLED */
  8541. A_UINT32 chan_acc_lat_based_dlofdma_enabled_count[HTT_NUM_AC_WMM];
  8542. /** Num of instances where avg. channel access latency based DL OFDMA status = DISABLED */
  8543. A_UINT32 chan_acc_lat_based_dlofdma_disabled_count[HTT_NUM_AC_WMM];
  8544. /** Num of instances where avg. channel access latency based DL OFDMA status = MONITORING */
  8545. A_UINT32 chan_acc_lat_based_dlofdma_monitoring_count[HTT_NUM_AC_WMM];
  8546. /** Num of instances where dl ofdma is disabled due to ru allocation failure */
  8547. A_UINT32 downgrade_to_dl_su_ru_alloc_fail[HTT_NUM_AC_WMM];
  8548. /** Num of instances where dl ofdma is disabled because we have only one user in candidate list */
  8549. A_UINT32 candidate_list_single_user_disable_ofdma[HTT_NUM_AC_WMM];
  8550. /** Num of instances where ul is chosen over dl based on qos weight not specific to OFDMA */
  8551. A_UINT32 dl_cand_list_dropped_high_ul_qos_weight[HTT_NUM_AC_WMM];
  8552. /** Num of instances where dl ofdma is disabled due to pipelining */
  8553. A_UINT32 ax_dlofdma_disabled_due_to_pipelining[HTT_NUM_AC_WMM];
  8554. /** Num of instances where dl ofdma is disabled as the tid is su only eligible */
  8555. A_UINT32 dlofdma_disabled_su_only_eligible[HTT_NUM_AC_WMM];
  8556. /** Num of instances where dl ofdma is disabled because there are no mpdus tried consecutively */
  8557. A_UINT32 dlofdma_disabled_consec_no_mpdus_tried[HTT_NUM_AC_WMM];
  8558. /** Num of instances where dl ofdma is disabled because there are consecutive mpdu failure */
  8559. A_UINT32 dlofdma_disabled_consec_no_mpdus_success[HTT_NUM_AC_WMM];
  8560. A_UINT32 txbf_ofdma_ineligibility_stat[HTT_STATS_SCHED_OFDMA_TXBF_INELIGIBILITY_MAX];
  8561. /** Average channel access latency histogram stats
  8562. *
  8563. * avg_chan_acc_lat_hist[0]: channel access latency is < 100 us
  8564. * avg_chan_acc_lat_hist[1]: 100 us <= channel access latency < 200 us
  8565. * avg_chan_acc_lat_hist[2]: 200 us <= channel access latency < 300 us
  8566. * avg_chan_acc_lat_hist[3]: 300 us <= channel access latency < 400 us
  8567. * avg_chan_acc_lat_hist[4]: 400 us <= channel access latency < 500 us
  8568. * avg_chan_acc_lat_hist[5]: 500 us <= channel access latency < 1000 us
  8569. * avg_chan_acc_lat_hist[6]: 1000 us <= channel access latency < 1500 us
  8570. * avg_chan_acc_lat_hist[7]: 1500 us <= channel access latency < 2000 us
  8571. * avg_chan_acc_lat_hist[8]: channel access latency is >= 2000 us
  8572. */
  8573. A_UINT32 avg_chan_acc_lat_hist[HTT_MAX_NUM_CHAN_ACC_LAT_INTR];
  8574. } htt_stats_pdev_sched_algo_ofdma_stats_tlv;
  8575. /* preserve old name alias for new name consistent with the tag name */
  8576. typedef htt_stats_pdev_sched_algo_ofdma_stats_tlv
  8577. htt_pdev_sched_algo_ofdma_stats_tlv;
  8578. typedef struct {
  8579. htt_tlv_hdr_t tlv_hdr;
  8580. /** mac_id__word:
  8581. * BIT [ 7 : 0] :- mac_id
  8582. * Use the HTT_STATS_CMN_MAC_ID_GET,_SET macros to
  8583. * read/write this bitfield.
  8584. * BIT [31 : 8] :- reserved
  8585. */
  8586. A_UINT32 mac_id__word;
  8587. A_UINT32 basic_trigger_across_bss;
  8588. A_UINT32 basic_trigger_within_bss;
  8589. A_UINT32 bsr_trigger_across_bss;
  8590. A_UINT32 bsr_trigger_within_bss;
  8591. A_UINT32 mu_rts_across_bss;
  8592. A_UINT32 mu_rts_within_bss;
  8593. A_UINT32 ul_mumimo_trigger_across_bss;
  8594. A_UINT32 ul_mumimo_trigger_within_bss;
  8595. } htt_stats_pdev_mbssid_ctrl_frame_stats_tlv;
  8596. /* preserve old name alias for new name consistent with the tag name */
  8597. typedef htt_stats_pdev_mbssid_ctrl_frame_stats_tlv
  8598. htt_pdev_mbssid_ctrl_frame_stats_tlv;
  8599. typedef struct {
  8600. htt_tlv_hdr_t tlv_hdr;
  8601. /**
  8602. * BIT [ 7 : 0] :- mac_id
  8603. * Use the HTT_STATS_TDMA_MAC_ID_GET macro to extract
  8604. * this bitfield.
  8605. * BIT [31 : 8] :- reserved
  8606. */
  8607. union {
  8608. struct {
  8609. A_UINT32 mac_id: 8,
  8610. reserved: 24;
  8611. };
  8612. A_UINT32 mac_id__word;
  8613. };
  8614. /** Num of Active TDMA schedules */
  8615. A_UINT32 num_tdma_active_schedules;
  8616. /** Num of Reserved TDMA schedules */
  8617. A_UINT32 num_tdma_reserved_schedules;
  8618. /** Num of Restricted TDMA schedules */
  8619. A_UINT32 num_tdma_restricted_schedules;
  8620. /** Num of Unconfigured TDMA schedules */
  8621. A_UINT32 num_tdma_unconfigured_schedules;
  8622. /** Num of TDMA slot switches */
  8623. A_UINT32 num_tdma_slot_switches;
  8624. /** Num of TDMA EDCA switches */
  8625. A_UINT32 num_tdma_edca_switches;
  8626. } htt_stats_pdev_tdma_tlv;
  8627. /* preserve old name alias for new name consistent with the tag name */
  8628. typedef htt_stats_pdev_tdma_tlv htt_pdev_tdma_stats_tlv;
  8629. #define HTT_STATS_TDMA_MAC_ID_M 0x000000ff
  8630. #define HTT_STATS_TDMA_MAC_ID_S 0
  8631. #define HTT_STATS_TDMA_MAC_ID_GET(_var) \
  8632. (((_var) & HTT_STATS_TDMA_MAC_ID_M) >> \
  8633. HTT_STATS_TDMA_MAC_ID_S)
  8634. /*======= Bandwidth Manager stats ====================*/
  8635. #define HTT_BW_MGR_STATS_MAC_ID_M 0x000000ff
  8636. #define HTT_BW_MGR_STATS_MAC_ID_S 0
  8637. #define HTT_BW_MGR_STATS_PRI20_IDX_M 0x0000ff00
  8638. #define HTT_BW_MGR_STATS_PRI20_IDX_S 8
  8639. #define HTT_BW_MGR_STATS_PRI20_FREQ_M 0xffff0000
  8640. #define HTT_BW_MGR_STATS_PRI20_FREQ_S 16
  8641. #define HTT_BW_MGR_STATS_CENTER_FREQ1_M 0x0000ffff
  8642. #define HTT_BW_MGR_STATS_CENTER_FREQ1_S 0
  8643. #define HTT_BW_MGR_STATS_CENTER_FREQ2_M 0xffff0000
  8644. #define HTT_BW_MGR_STATS_CENTER_FREQ2_S 16
  8645. #define HTT_BW_MGR_STATS_CHAN_PHY_MODE_M 0x000000ff
  8646. #define HTT_BW_MGR_STATS_CHAN_PHY_MODE_S 0
  8647. #define HTT_BW_MGR_STATS_STATIC_PATTERN_M 0x00ffff00
  8648. #define HTT_BW_MGR_STATS_STATIC_PATTERN_S 8
  8649. #define HTT_BW_MGR_STATS_MAC_ID_GET(_var) \
  8650. (((_var) & HTT_BW_MGR_STATS_MAC_ID_M) >> \
  8651. HTT_BW_MGR_STATS_MAC_ID_S)
  8652. #define HTT_BW_MGR_STATS_MAC_ID_SET(_var, _val) \
  8653. do { \
  8654. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_MAC_ID, _val); \
  8655. ((_var) |= ((_val) << HTT_BW_MGR_STATS_MAC_ID_S)); \
  8656. } while (0)
  8657. #define HTT_BW_MGR_STATS_PRI20_IDX_GET(_var) \
  8658. (((_var) & HTT_BW_MGR_STATS_PRI20_IDX_M) >> \
  8659. HTT_BW_MGR_STATS_PRI20_IDX_S)
  8660. #define HTT_BW_MGR_STATS_PRI20_IDX_SET(_var, _val) \
  8661. do { \
  8662. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_PRI20_IDX, _val); \
  8663. ((_var) |= ((_val) << HTT_BW_MGR_STATS_PRI20_IDX_S)); \
  8664. } while (0)
  8665. #define HTT_BW_MGR_STATS_PRI20_FREQ_GET(_var) \
  8666. (((_var) & HTT_BW_MGR_STATS_PRI20_FREQ_M) >> \
  8667. HTT_BW_MGR_STATS_PRI20_FREQ_S)
  8668. #define HTT_BW_MGR_STATS_PRI20_FREQ_SET(_var, _val) \
  8669. do { \
  8670. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_PRI20_FREQ, _val); \
  8671. ((_var) |= ((_val) << HTT_BW_MGR_STATS_PRI20_FREQ_S)); \
  8672. } while (0)
  8673. #define HTT_BW_MGR_STATS_CENTER_FREQ1_GET(_var) \
  8674. (((_var) & HTT_BW_MGR_STATS_CENTER_FREQ1_M) >> \
  8675. HTT_BW_MGR_STATS_CENTER_FREQ1_S)
  8676. #define HTT_BW_MGR_STATS_CENTER_FREQ1_SET(_var, _val) \
  8677. do { \
  8678. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_CENTER_FREQ1, _val); \
  8679. ((_var) |= ((_val) << HTT_BW_MGR_STATS_CENTER_FREQ1_S)); \
  8680. } while (0)
  8681. #define HTT_BW_MGR_STATS_CENTER_FREQ2_GET(_var) \
  8682. (((_var) & HTT_BW_MGR_STATS_CENTER_FREQ2_M) >> \
  8683. HTT_BW_MGR_STATS_CENTER_FREQ2_S)
  8684. #define HTT_BW_MGR_STATS_CENTER_FREQ2_SET(_var, _val) \
  8685. do { \
  8686. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_CENTER_FREQ2, _val); \
  8687. ((_var) |= ((_val) << HTT_BW_MGR_STATS_CENTER_FREQ2_S)); \
  8688. } while (0)
  8689. #define HTT_BW_MGR_STATS_CHAN_PHY_MODE_GET(_var) \
  8690. (((_var) & HTT_BW_MGR_STATS_CHAN_PHY_MODE_M) >> \
  8691. HTT_BW_MGR_STATS_CHAN_PHY_MODE_S)
  8692. #define HTT_BW_MGR_STATS_CHAN_PHY_MODE_SET(_var, _val) \
  8693. do { \
  8694. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_CHAN_PHY_MODE, _val); \
  8695. ((_var) |= ((_val) << HTT_BW_MGR_STATS_CHAN_PHY_MODE_S)); \
  8696. } while (0)
  8697. #define HTT_BW_MGR_STATS_STATIC_PATTERN_GET(_var) \
  8698. (((_var) & HTT_BW_MGR_STATS_STATIC_PATTERN_M) >> \
  8699. HTT_BW_MGR_STATS_STATIC_PATTERN_S)
  8700. #define HTT_BW_MGR_STATS_STATIC_PATTERN_SET(_var, _val) \
  8701. do { \
  8702. HTT_CHECK_SET_VAL(HTT_BW_MGR_STATS_STATIC_PATTERN, _val); \
  8703. ((_var) |= ((_val) << HTT_BW_MGR_STATS_STATIC_PATTERN_S)); \
  8704. } while (0)
  8705. typedef struct {
  8706. htt_tlv_hdr_t tlv_hdr;
  8707. /* BIT [ 7 : 0] :- mac_id
  8708. * BIT [ 15 : 8] :- pri20_index
  8709. * BIT [ 31 : 16] :- pri20_freq in Mhz
  8710. */
  8711. A_UINT32 mac_id__pri20_idx__freq;
  8712. /* BIT [ 15 : 0] :- centre_freq1
  8713. * BIT [ 31 : 16] :- centre_freq2
  8714. */
  8715. A_UINT32 centre_freq1__freq2;
  8716. /* BIT [ 7 : 0] :- channel_phy_mode
  8717. * BIT [ 23 : 8] :- static_pattern
  8718. */
  8719. A_UINT32 phy_mode__static_pattern;
  8720. } htt_stats_pdev_bw_mgr_stats_tlv;
  8721. /* preserve old name alias for new name consistent with the tag name */
  8722. typedef htt_stats_pdev_bw_mgr_stats_tlv htt_pdev_bw_mgr_stats_tlv;
  8723. /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_BW_MGR
  8724. * TLV_TAGS:
  8725. * - HTT_STATS_PDEV_BW_MGR_STATS_TAG
  8726. */
  8727. /* NOTE:
  8728. * This structure is for documentation, and cannot be safely used directly.
  8729. * Instead, use the constituent TLV structures to fill/parse.
  8730. */
  8731. typedef struct {
  8732. htt_stats_pdev_bw_mgr_stats_tlv bw_mgr_tlv;
  8733. } htt_pdev_bw_mgr_stats_t;
  8734. /*============= start MLO UMAC SSR stats ============= { */
  8735. typedef enum {
  8736. HTT_MLO_UMAC_SSR_DBG_POINT_INVALID = 0,
  8737. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_DISABLE_RXDMA_PREFETCH,
  8738. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_PMACS_HWMLOS,
  8739. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_GLOBAL_WSI,
  8740. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_PMACS_DMAC,
  8741. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_TCL,
  8742. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_TQM,
  8743. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_WBM,
  8744. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_REO,
  8745. HTT_MLO_UMAC_SSR_DBG_POINT_PRE_RESET_HOST,
  8746. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_PREREQUISITES,
  8747. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_PRE_RING_RESET,
  8748. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_APPLY_SOFT_RESET,
  8749. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_POST_RING_RESET,
  8750. HTT_MLO_UMAC_SSR_DBG_POINT_RESET_FW_TQM_CMDQS,
  8751. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_HOST,
  8752. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_UMAC_INTERRUPTS,
  8753. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_WBM,
  8754. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_REO,
  8755. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_TQM,
  8756. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_PMACS_DMAC,
  8757. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_TQM_SYNC_CMD,
  8758. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_GLOBAL_WSI,
  8759. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_PMACS_HWMLOS,
  8760. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_ENABLE_RXDMA_PREFETCH,
  8761. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_TCL,
  8762. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_HOST_ENQ,
  8763. HTT_MLO_UMAC_SSR_DBG_POINT_POST_RESET_VERIFY_UMAC_RECOVERED,
  8764. /* The below debug point values are reserved for future expansion. */
  8765. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED28,
  8766. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED29,
  8767. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED30,
  8768. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED31,
  8769. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED32,
  8770. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED33,
  8771. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED34,
  8772. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED35,
  8773. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED36,
  8774. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED37,
  8775. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED38,
  8776. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED39,
  8777. HTT_MLO_UMAC_SSR_DBG_POINT_RESERVED40,
  8778. /*
  8779. * Due to backwards compatibility requirements, no futher DBG_POINT values
  8780. * can be added (but the above reserved values can be repurposed).
  8781. */
  8782. HTT_MLO_UMAC_SSR_DBG_POINT_MAX,
  8783. } HTT_MLO_UMAC_SSR_DBG_POINTS;
  8784. typedef enum {
  8785. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_INVALID = 0,
  8786. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_DO_PRE_RESET,
  8787. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_DO_POST_RESET_START,
  8788. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_DO_POST_RESET_COMPLETE,
  8789. /* The below recovery handshake values are reserved for future expansion. */
  8790. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED4,
  8791. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED5,
  8792. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED6,
  8793. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED7,
  8794. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_RESERVED8,
  8795. /*
  8796. * Due to backwards compatibility requirements, no futher
  8797. * RECOVERY_HANDSHAKE values can be added (but the above
  8798. * reserved values can be repurposed).
  8799. */
  8800. HTT_MLO_UMAC_RECOVERY_HANDSHAKE_COUNT,
  8801. } HTT_MLO_UMAC_RECOVERY_HANDSHAKES;
  8802. typedef struct {
  8803. htt_tlv_hdr_t tlv_hdr;
  8804. A_UINT32 start_ms;
  8805. A_UINT32 end_ms;
  8806. A_UINT32 delta_ms;
  8807. A_UINT32 reserved;
  8808. A_UINT32 footprint; /* holds a HTT_MLO_UMAC_SSR_DBG_POINTS value */
  8809. A_UINT32 tqm_hw_tstamp;
  8810. } htt_stats_mlo_umac_ssr_dbg_tlv;
  8811. /* preserve old name alias for new name consistent with the tag name */
  8812. typedef htt_stats_mlo_umac_ssr_dbg_tlv htt_mlo_umac_ssr_dbg_tlv;
  8813. typedef struct {
  8814. A_UINT32 last_mlo_htt_handshake_delta_ms;
  8815. A_UINT32 max_mlo_htt_handshake_delta_ms;
  8816. union {
  8817. A_UINT32 umac_recovery_done_mask;
  8818. struct {
  8819. A_UINT32 pre_reset_disable_rxdma_prefetch : 1,
  8820. pre_reset_pmacs_hwmlos : 1,
  8821. pre_reset_global_wsi : 1,
  8822. pre_reset_pmacs_dmac : 1,
  8823. pre_reset_tcl : 1,
  8824. pre_reset_tqm : 1,
  8825. pre_reset_wbm : 1,
  8826. pre_reset_reo : 1,
  8827. pre_reset_host : 1,
  8828. reset_prerequisites : 1,
  8829. reset_pre_ring_reset : 1,
  8830. reset_apply_soft_reset : 1,
  8831. reset_post_ring_reset : 1,
  8832. reset_fw_tqm_cmdqs : 1,
  8833. post_reset_host : 1,
  8834. post_reset_umac_interrupts : 1,
  8835. post_reset_wbm : 1,
  8836. post_reset_reo : 1,
  8837. post_reset_tqm : 1,
  8838. post_reset_pmacs_dmac : 1,
  8839. post_reset_tqm_sync_cmd : 1,
  8840. post_reset_global_wsi : 1,
  8841. post_reset_pmacs_hwmlos : 1,
  8842. post_reset_enable_rxdma_prefetch : 1,
  8843. post_reset_tcl : 1,
  8844. post_reset_host_enq : 1,
  8845. post_reset_verify_umac_recovered : 1,
  8846. reserved : 5;
  8847. } done_mask;
  8848. };
  8849. } htt_mlo_umac_ssr_mlo_stats_t;
  8850. typedef struct {
  8851. htt_tlv_hdr_t tlv_hdr;
  8852. htt_mlo_umac_ssr_mlo_stats_t mlo;
  8853. } htt_stats_mlo_umac_ssr_mlo_tlv;
  8854. /* preserve old name alias for new name consistent with the tag name */
  8855. typedef htt_stats_mlo_umac_ssr_mlo_tlv htt_mlo_umac_ssr_mlo_stats_tlv;
  8856. /* dword0 - b'0 - PRE_RESET_DISABLE_RXDMA_PREFETCH */
  8857. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_M 0x1
  8858. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_S 0
  8859. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_GET(word0) \
  8860. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_M) >> \
  8861. HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_S)
  8862. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_SET(word0, _val) \
  8863. do { \
  8864. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH, _val); \
  8865. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_DISABLE_RXDMA_PREFETCH_S));\
  8866. } while (0)
  8867. /* dword0 - b'1 - PRE_RESET_PMACS_HWMLOS */
  8868. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_M 0x2
  8869. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_S 1
  8870. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_GET(word0) \
  8871. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_M) >> \
  8872. HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_S)
  8873. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_SET(word0, _val) \
  8874. do { \
  8875. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS, _val); \
  8876. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_HWMLOS_S));\
  8877. } while (0)
  8878. /* dword0 - b'2 - PRE_RESET_GLOBAL_WSI */
  8879. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_M 0x4
  8880. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_S 2
  8881. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_GET(word0) \
  8882. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_M) >> \
  8883. HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_S)
  8884. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_SET(word0, _val) \
  8885. do { \
  8886. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI, _val); \
  8887. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_GLOBAL_WSI_S));\
  8888. } while (0)
  8889. /* dword0 - b'3 - PRE_RESET_PMACS_DMAC */
  8890. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_M 0x8
  8891. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_S 3
  8892. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_GET(word0) \
  8893. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_M) >> \
  8894. HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_S)
  8895. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_SET(word0, _val) \
  8896. do { \
  8897. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC, _val); \
  8898. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_PMACS_DMAC_S));\
  8899. } while (0)
  8900. /* dword0 - b'4 - PRE_RESET_TCL */
  8901. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_M 0x10
  8902. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_S 4
  8903. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_GET(word0) \
  8904. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_M) >> \
  8905. HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_S)
  8906. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_SET(word0, _val) \
  8907. do { \
  8908. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL, _val); \
  8909. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_TCL_S));\
  8910. } while (0)
  8911. /* dword0 - b'5 - PRE_RESET_TQM */
  8912. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_M 0x20
  8913. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_S 5
  8914. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_GET(word0) \
  8915. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_M) >> \
  8916. HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_S)
  8917. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_SET(word0, _val) \
  8918. do { \
  8919. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM, _val); \
  8920. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_TQM_S));\
  8921. } while (0)
  8922. /* dword0 - b'6 - PRE_RESET_WBM */
  8923. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_M 0x40
  8924. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_S 6
  8925. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_GET(word0) \
  8926. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_M) >> \
  8927. HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_S)
  8928. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_SET(word0, _val) \
  8929. do { \
  8930. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM, _val); \
  8931. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_WBM_S));\
  8932. } while (0)
  8933. /* dword0 - b'7 - PRE_RESET_REO */
  8934. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_M 0x80
  8935. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_S 7
  8936. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_GET(word0) \
  8937. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_M) >> \
  8938. HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_S)
  8939. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_SET(word0, _val) \
  8940. do { \
  8941. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO, _val); \
  8942. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_REO_S));\
  8943. } while (0)
  8944. /* dword0 - b'8 - PRE_RESET_HOST */
  8945. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_M 0x100
  8946. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_S 8
  8947. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_GET(word0) \
  8948. (((word0) & HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_M) >> \
  8949. HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_S)
  8950. #define HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_SET(word0, _val) \
  8951. do { \
  8952. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST, _val); \
  8953. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_PRE_RESET_HOST_S));\
  8954. } while (0)
  8955. /* dword0 - b'9 - RESET_PREREQUISITES */
  8956. #define HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_M 0x200
  8957. #define HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_S 9
  8958. #define HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_GET(word0) \
  8959. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_M) >> \
  8960. HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_S)
  8961. #define HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_SET(word0, _val) \
  8962. do { \
  8963. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES, _val); \
  8964. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_PREREQUISITES_S));\
  8965. } while (0)
  8966. /* dword0 - b'10 - RESET_PRE_RING_RESET */
  8967. #define HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_M 0x400
  8968. #define HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_S 10
  8969. #define HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_GET(word0) \
  8970. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_M) >> \
  8971. HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_S)
  8972. #define HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_SET(word0, _val) \
  8973. do { \
  8974. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET, _val); \
  8975. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_PRE_RING_RESET_S));\
  8976. } while (0)
  8977. /* dword0 - b'11 - RESET_APPLY_SOFT_RESET */
  8978. #define HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_M 0x800
  8979. #define HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_S 11
  8980. #define HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_GET(word0) \
  8981. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_M) >> \
  8982. HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_S)
  8983. #define HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_SET(word0, _val) \
  8984. do { \
  8985. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET, _val); \
  8986. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_APPLY_SOFT_RESET_S));\
  8987. } while (0)
  8988. /* dword0 - b'12 - RESET_POST_RING_RESET */
  8989. #define HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_M 0x1000
  8990. #define HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_S 12
  8991. #define HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_GET(word0) \
  8992. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_M) >> \
  8993. HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_S)
  8994. #define HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_SET(word0, _val) \
  8995. do { \
  8996. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET, _val); \
  8997. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_POST_RING_RESET_S));\
  8998. } while (0)
  8999. /* dword0 - b'13 - RESET_FW_TQM_CMDQS */
  9000. #define HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_M 0x2000
  9001. #define HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_S 13
  9002. #define HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_GET(word0) \
  9003. (((word0) & HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_M) >> \
  9004. HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_S)
  9005. #define HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_SET(word0, _val) \
  9006. do { \
  9007. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS, _val); \
  9008. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_RESET_FW_TQM_CMDQS_S));\
  9009. } while (0)
  9010. /* dword0 - b'14 - POST_RESET_HOST */
  9011. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_M 0x4000
  9012. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_S 14
  9013. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_GET(word0) \
  9014. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_M) >> \
  9015. HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_S)
  9016. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_SET(word0, _val) \
  9017. do { \
  9018. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST, _val); \
  9019. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_S));\
  9020. } while (0)
  9021. /* dword0 - b'15 - POST_RESET_UMAC_INTERRUPTS */
  9022. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_M 0x8000
  9023. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_S 15
  9024. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_GET(word0) \
  9025. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_M) >> \
  9026. HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_S)
  9027. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_SET(word0, _val) \
  9028. do { \
  9029. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS, _val); \
  9030. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_UMAC_INTERRUPTS_S));\
  9031. } while (0)
  9032. /* dword0 - b'16 - POST_RESET_WBM */
  9033. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_M 0x10000
  9034. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_S 16
  9035. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_GET(word0) \
  9036. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_M) >> \
  9037. HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_S)
  9038. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_SET(word0, _val) \
  9039. do { \
  9040. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM, _val); \
  9041. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_WBM_S));\
  9042. } while (0)
  9043. /* dword0 - b'17 - POST_RESET_REO */
  9044. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_M 0x20000
  9045. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_S 17
  9046. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_GET(word0) \
  9047. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_M) >> \
  9048. HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_S)
  9049. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_SET(word0, _val) \
  9050. do { \
  9051. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_REO, _val); \
  9052. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_REO_S));\
  9053. } while (0)
  9054. /* dword0 - b'18 - POST_RESET_TQM */
  9055. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_M 0x40000
  9056. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_S 18
  9057. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_GET(word0) \
  9058. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_M) >> \
  9059. HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_S)
  9060. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SET(word0, _val) \
  9061. do { \
  9062. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM, _val); \
  9063. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_S));\
  9064. } while (0)
  9065. /* dword0 - b'19 - POST_RESET_PMACS_DMAC */
  9066. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_M 0x80000
  9067. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_S 19
  9068. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_GET(word0) \
  9069. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_M) >> \
  9070. HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_S)
  9071. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_SET(word0, _val) \
  9072. do { \
  9073. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC, _val); \
  9074. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_DMAC_S));\
  9075. } while (0)
  9076. /* dword0 - b'20 - POST_RESET_TQM_SYNC_CMD */
  9077. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_M 0x100000
  9078. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_S 20
  9079. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_GET(word0) \
  9080. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_M) >> \
  9081. HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_S)
  9082. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_SET(word0, _val) \
  9083. do { \
  9084. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD, _val); \
  9085. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_TQM_SYNC_CMD_S));\
  9086. } while (0)
  9087. /* dword0 - b'21 - POST_RESET_GLOBAL_WSI */
  9088. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_M 0x200000
  9089. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_S 21
  9090. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_GET(word0) \
  9091. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_M) >> \
  9092. HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_S)
  9093. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_SET(word0, _val) \
  9094. do { \
  9095. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI, _val); \
  9096. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_GLOBAL_WSI_S));\
  9097. } while (0)
  9098. /* dword0 - b'22 - POST_RESET_PMACS_HWMLOS */
  9099. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_M 0x400000
  9100. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_S 22
  9101. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_GET(word0) \
  9102. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_M) >> \
  9103. HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_S)
  9104. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_SET(word0, _val) \
  9105. do { \
  9106. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS, _val); \
  9107. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_PMACS_HWMLOS_S));\
  9108. } while (0)
  9109. /* dword0 - b'23 - POST_RESET_ENABLE_RXDMA_PREFETCH */
  9110. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_M 0x800000
  9111. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_S 23
  9112. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_GET(word0) \
  9113. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_M) >> \
  9114. HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_S)
  9115. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_SET(word0, _val) \
  9116. do { \
  9117. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH, _val); \
  9118. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_ENABLE_RXDMA_PREFETCH_S));\
  9119. } while (0)
  9120. /* dword0 - b'24 - POST_RESET_TCL */
  9121. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_M 0x1000000
  9122. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_S 24
  9123. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_GET(word0) \
  9124. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_M) >> \
  9125. HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_S)
  9126. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_SET(word0, _val) \
  9127. do { \
  9128. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL, _val); \
  9129. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_TCL_S));\
  9130. } while (0)
  9131. /* dword0 - b'25 - POST_RESET_HOST_ENQ */
  9132. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_M 0x2000000
  9133. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_S 25
  9134. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_GET(word0) \
  9135. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_M) >> \
  9136. HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_S)
  9137. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_SET(word0, _val) \
  9138. do { \
  9139. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ, _val); \
  9140. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_HOST_ENQ_S));\
  9141. } while (0)
  9142. /* dword0 - b'26 - POST_RESET_VERIFY_UMAC_RECOVERED */
  9143. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_M 0x4000000
  9144. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_S 26
  9145. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_GET(word0) \
  9146. (((word0) & HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_M) >> \
  9147. HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_S)
  9148. #define HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_SET(word0, _val) \
  9149. do { \
  9150. HTT_CHECK_SET_VAL(HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED, _val); \
  9151. ((word0) |= ((_val) << HTT_UMAC_RECOVERY_DONE_POST_RESET_VERIFY_UMAC_RECOVERED_S));\
  9152. } while (0)
  9153. typedef struct {
  9154. htt_tlv_hdr_t tlv_hdr;
  9155. A_UINT32 last_trigger_request_ms;
  9156. A_UINT32 last_start_ms;
  9157. A_UINT32 last_start_disengage_umac_ms;
  9158. A_UINT32 last_enter_ssr_platform_thread_ms;
  9159. A_UINT32 last_exit_ssr_platform_thread_ms;
  9160. A_UINT32 last_start_engage_umac_ms;
  9161. A_UINT32 last_done_successful_ms;
  9162. A_UINT32 post_reset_tqm_sync_cmd_completion_ms;
  9163. A_UINT32 htt_sync_mlo_initiate_umac_recovery_ms;
  9164. A_UINT32 htt_sync_do_pre_reset_ms;
  9165. A_UINT32 htt_sync_do_post_reset_start_ms;
  9166. A_UINT32 htt_sync_do_post_reset_complete_ms;
  9167. } htt_stats_mlo_umac_ssr_kpi_tstmp_tlv;
  9168. /* preserve old name alias for new name consistent with the tag name */
  9169. typedef htt_stats_mlo_umac_ssr_kpi_tstmp_tlv
  9170. htt_mlo_umac_ssr_kpi_tstamp_stats_tlv;
  9171. typedef struct {
  9172. htt_tlv_hdr_t tlv_hdr;
  9173. A_UINT32 htt_sync_start_ms;
  9174. A_UINT32 htt_sync_delta_ms;
  9175. A_UINT32 post_t2h_start_ms;
  9176. A_UINT32 post_t2h_delta_ms;
  9177. A_UINT32 post_t2h_msg_read_shmem_ms;
  9178. A_UINT32 post_t2h_msg_write_shmem_ms;
  9179. A_UINT32 post_t2h_msg_send_msg_to_host_ms;
  9180. } htt_stats_mlo_umac_ssr_handshake_tlv;
  9181. /* preserve old name alias for new name consistent with the tag name */
  9182. typedef htt_stats_mlo_umac_ssr_handshake_tlv
  9183. htt_mlo_umac_htt_handshake_stats_tlv;
  9184. typedef struct {
  9185. /*
  9186. * Note that the host cannot use this struct directly, but instead needs
  9187. * to use the TLV header within each element of each of the arrays in
  9188. * this struct to determine where the subsequent item resides.
  9189. */
  9190. htt_stats_mlo_umac_ssr_dbg_tlv dbg_point[HTT_MLO_UMAC_SSR_DBG_POINT_MAX];
  9191. htt_stats_mlo_umac_ssr_handshake_tlv htt_handshakes[HTT_MLO_UMAC_RECOVERY_HANDSHAKE_COUNT];
  9192. } htt_mlo_umac_ssr_kpi_delta_stats_t;
  9193. typedef struct {
  9194. /*
  9195. * Since each item within htt_mlo_umac_ssr_kpi_delta_stats_t has its own
  9196. * TLV header, and since no additional fields are added in this struct
  9197. * beyond the htt_mlo_umac_ssr_kpi_delta_stats_t info, no additional
  9198. * TLV header is needed.
  9199. *
  9200. * Note that the host cannot use this struct directly, but instead needs
  9201. * to use the TLV header within each item inside the
  9202. * htt_mlo_umac_ssr_kpi_delta_stats_t to determine where the subsequent
  9203. * item resides.
  9204. */
  9205. htt_mlo_umac_ssr_kpi_delta_stats_t kpi_delta;
  9206. } htt_mlo_umac_ssr_kpi_delta_stats_tlv;
  9207. typedef struct {
  9208. A_UINT32 last_e2e_delta_ms;
  9209. A_UINT32 max_e2e_delta_ms;
  9210. A_UINT32 per_handshake_max_allowed_delta_ms;
  9211. /* Total done count */
  9212. A_UINT32 total_success_runs_cnt;
  9213. A_UINT32 umac_recovery_in_progress;
  9214. /* Count of Disengaged in Pre reset */
  9215. A_UINT32 umac_disengaged_count;
  9216. /* Count of UMAC Soft/Control Reset */
  9217. A_UINT32 umac_soft_reset_count;
  9218. /* Count of Engaged in Post reset */
  9219. A_UINT32 umac_engaged_count;
  9220. } htt_mlo_umac_ssr_common_stats_t;
  9221. typedef struct {
  9222. htt_tlv_hdr_t tlv_hdr;
  9223. htt_mlo_umac_ssr_common_stats_t cmn;
  9224. } htt_stats_mlo_umac_ssr_cmn_tlv;
  9225. /* preserve old name alias for new name consistent with the tag name */
  9226. typedef htt_stats_mlo_umac_ssr_cmn_tlv htt_mlo_umac_ssr_common_stats_tlv;
  9227. typedef struct {
  9228. A_UINT32 trigger_requests_count;
  9229. A_UINT32 trigger_count_for_umac_hang;
  9230. A_UINT32 trigger_count_for_mlo_target_recovery_mode1;
  9231. A_UINT32 trigger_count_for_unknown_signature;
  9232. A_UINT32 total_trig_dropped;
  9233. A_UINT32 trigger_count_for_unit_test_direct_trigger;
  9234. A_UINT32 trigger_count_for_tx_de_wdg_dummy_frame_tout;
  9235. A_UINT32 trigger_count_for_peer_delete_wdg_dummy_frame_tout;
  9236. A_UINT32 trigger_count_for_reo_hang;
  9237. A_UINT32 trigger_count_for_tqm_hang;
  9238. A_UINT32 trigger_count_for_tcl_hang;
  9239. A_UINT32 trigger_count_for_wbm_hang;
  9240. } htt_mlo_umac_ssr_trigger_stats_t;
  9241. typedef struct {
  9242. htt_tlv_hdr_t tlv_hdr;
  9243. htt_mlo_umac_ssr_trigger_stats_t trigger;
  9244. } htt_stats_mlo_umac_ssr_trigger_tlv;
  9245. /* preserve old name alias for new name consistent with the tag name */
  9246. typedef htt_stats_mlo_umac_ssr_trigger_tlv htt_mlo_umac_ssr_trigger_stats_tlv;
  9247. typedef struct {
  9248. /*
  9249. * Note that the host cannot use this struct directly, but instead needs
  9250. * to use the TLV header within each element to determine where the
  9251. * subsequent element resides.
  9252. */
  9253. htt_mlo_umac_ssr_kpi_delta_stats_tlv kpi_delta_tlv;
  9254. htt_stats_mlo_umac_ssr_kpi_tstmp_tlv kpi_tstamp_tlv;
  9255. } htt_mlo_umac_ssr_kpi_stats_t;
  9256. typedef struct {
  9257. /*
  9258. * Since the embedded sub-struct within htt_mlo_umac_ssr_kpi_stats_tlv
  9259. * has its own TLV header, and since no additional fields are added in
  9260. * this struct beyond the htt_mlo_umac_ssr_kpi_stats_t info, no additional
  9261. * TLV header is needed.
  9262. *
  9263. * Note that the host cannot use this struct directly, but instead needs
  9264. * to use the TLV header within the htt_mlo_umac_ssr_kpi_stats_t sub-struct
  9265. * to determine how much data is present for this struct.
  9266. */
  9267. htt_mlo_umac_ssr_kpi_stats_t kpi;
  9268. } htt_mlo_umac_ssr_kpi_stats_tlv;
  9269. typedef struct {
  9270. /*
  9271. * Note that the host cannot use this struct directly, but instead needs
  9272. * to use the TLV header within each element to determine where the
  9273. * subsequent element resides.
  9274. */
  9275. htt_stats_mlo_umac_ssr_trigger_tlv trigger_tlv;
  9276. htt_mlo_umac_ssr_kpi_stats_tlv kpi_tlv;
  9277. htt_stats_mlo_umac_ssr_mlo_tlv mlo_tlv;
  9278. htt_stats_mlo_umac_ssr_cmn_tlv cmn_tlv;
  9279. } htt_mlo_umac_ssr_stats_tlv;
  9280. /*============= end MLO UMAC SSR stats ============= } */
  9281. typedef struct {
  9282. A_UINT32 total_done;
  9283. A_UINT32 trigger_requests_count;
  9284. A_UINT32 total_trig_dropped;
  9285. A_UINT32 umac_disengaged_count;
  9286. A_UINT32 umac_soft_reset_count;
  9287. A_UINT32 umac_engaged_count;
  9288. A_UINT32 last_trigger_request_ms;
  9289. A_UINT32 last_start_ms;
  9290. A_UINT32 last_start_disengage_umac_ms;
  9291. A_UINT32 last_enter_ssr_platform_thread_ms;
  9292. A_UINT32 last_exit_ssr_platform_thread_ms;
  9293. A_UINT32 last_start_engage_umac_ms;
  9294. A_UINT32 last_done_successful_ms;
  9295. A_UINT32 last_e2e_delta_ms;
  9296. A_UINT32 max_e2e_delta_ms;
  9297. A_UINT32 trigger_count_for_umac_hang;
  9298. A_UINT32 trigger_count_for_mlo_quick_ssr;
  9299. A_UINT32 trigger_count_for_unknown_signature;
  9300. A_UINT32 post_reset_tqm_sync_cmd_completion_ms;
  9301. A_UINT32 htt_sync_mlo_initiate_umac_recovery_ms;
  9302. A_UINT32 htt_sync_do_pre_reset_ms;
  9303. A_UINT32 htt_sync_do_post_reset_start_ms;
  9304. A_UINT32 htt_sync_do_post_reset_complete_ms;
  9305. } htt_umac_ssr_stats_t;
  9306. typedef struct {
  9307. htt_tlv_hdr_t tlv_hdr;
  9308. htt_umac_ssr_stats_t stats;
  9309. } htt_stats_umac_ssr_tlv;
  9310. /* preserve old name alias for new name consistent with the tag name */
  9311. typedef htt_stats_umac_ssr_tlv htt_umac_ssr_stats_tlv;
  9312. typedef struct {
  9313. htt_tlv_hdr_t tlv_hdr;
  9314. A_UINT32 svc_class_id;
  9315. /* codel_drops:
  9316. * How many times have MSDU queues belonging to this service class
  9317. * dropped their head MSDU due to the queue's latency being above
  9318. * the CoDel latency limit specified for the service class throughout
  9319. * the full CoDel latency statistics collection window.
  9320. */
  9321. A_UINT32 codel_drops;
  9322. /* codel_no_drops:
  9323. * How many times have MSDU queues belonging to this service class
  9324. * completed a CoDel latency statistics collection window and
  9325. * concluded that no head MSDU drop is needed, due to the MSDU queue's
  9326. * latency being under the limit specified for the service class at
  9327. * some point during the window.
  9328. */
  9329. A_UINT32 codel_no_drops;
  9330. } htt_stats_codel_svc_class_tlv;
  9331. /* preserve old name alias for new name consistent with the tag name */
  9332. typedef htt_stats_codel_svc_class_tlv htt_codel_svc_class_stats_tlv;
  9333. #define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_M 0x0000FFFF
  9334. #define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S 0
  9335. #define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_GET(_var) \
  9336. (((_var) & HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_M) >> \
  9337. HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S)
  9338. #define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_SET(_var, _val) \
  9339. do { \
  9340. HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM, _val); \
  9341. ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S)); \
  9342. } while (0)
  9343. #define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_M 0x00FF0000
  9344. #define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S 16
  9345. #define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_GET(_var) \
  9346. (((_var) & HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_M) >> \
  9347. HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S)
  9348. #define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_SET(_var, _val) \
  9349. do { \
  9350. HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID, _val); \
  9351. ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S)); \
  9352. } while (0)
  9353. #define HTT_CODEL_MSDUQ_STATS_DROPS_M 0x0000FFFF
  9354. #define HTT_CODEL_MSDUQ_STATS_DROPS_S 0
  9355. #define HTT_CODEL_MSDUQ_STATS_DROPS_GET(_var) \
  9356. (((_var) & HTT_CODEL_MSDUQ_STATS_DROPS_M) >> \
  9357. HTT_CODEL_MSDUQ_STATS_DROPS_S)
  9358. #define HTT_CODEL_MSDUQ_STATS_DROPS_SET(_var, _val) \
  9359. do { \
  9360. HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_DROPS, _val); \
  9361. ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_DROPS_S)); \
  9362. } while (0)
  9363. #define HTT_CODEL_MSDUQ_STATS_NO_DROPS_M 0xFFFF0000
  9364. #define HTT_CODEL_MSDUQ_STATS_NO_DROPS_S 16
  9365. #define HTT_CODEL_MSDUQ_STATS_NO_DROPS_GET(_var) \
  9366. (((_var) & HTT_CODEL_MSDUQ_STATS_NO_DROPS_M) >> \
  9367. HTT_CODEL_MSDUQ_STATS_NO_DROPS_S)
  9368. #define HTT_CODEL_MSDUQ_STATS_NO_DROPS_SET(_var, _val) \
  9369. do { \
  9370. HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_NO_DROPS, _val); \
  9371. ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_NO_DROPS_S)); \
  9372. } while (0)
  9373. typedef struct {
  9374. htt_tlv_hdr_t tlv_hdr;
  9375. union {
  9376. A_UINT32 id__word;
  9377. struct {
  9378. A_UINT32 tx_flow_num: 16, /* FW's MSDU queue ID */
  9379. svc_class_id: 8,
  9380. reserved: 8;
  9381. };
  9382. };
  9383. union {
  9384. A_UINT32 stats__word;
  9385. struct {
  9386. A_UINT32
  9387. codel_drops: 16,
  9388. codel_no_drops: 16;
  9389. };
  9390. };
  9391. } htt_stats_codel_msduq_tlv;
  9392. /* preserve old name alias for new name consistent with the tag name */
  9393. typedef htt_stats_codel_msduq_tlv htt_codel_msduq_stats_tlv;
  9394. /*===================== start MLO stats ====================*/
  9395. typedef struct {
  9396. htt_tlv_hdr_t tlv_hdr;
  9397. A_UINT32 pref_link_num_sec_link_sched;
  9398. A_UINT32 pref_link_num_pref_link_timeout;
  9399. A_UINT32 pref_link_num_pref_link_sch_delay_ipc;
  9400. A_UINT32 pref_link_num_pref_link_timeout_ipc;
  9401. } htt_stats_mlo_sched_stats_tlv;
  9402. /* preserve old name alias for new name consistent with the tag name */
  9403. typedef htt_stats_mlo_sched_stats_tlv htt_mlo_sched_stats_tlv;
  9404. /* STATS_TYPE : HTT_DBG_MLO_SCHED_STATS
  9405. * TLV_TAGS:
  9406. * - HTT_STATS_MLO_SCHED_STATS_TAG
  9407. */
  9408. /* NOTE:
  9409. * This structure is for documentation, and cannot be safely used directly.
  9410. * Instead, use the constituent TLV structures to fill/parse.
  9411. */
  9412. typedef struct _htt_mlo_sched_stats {
  9413. htt_stats_mlo_sched_stats_tlv preferred_link_stats;
  9414. } htt_mlo_sched_stats_t;
  9415. #define HTT_STATS_HWMLO_MAX_LINKS 6
  9416. #define HTT_STATS_MLO_MAX_IPC_RINGS 7
  9417. typedef struct {
  9418. htt_tlv_hdr_t tlv_hdr;
  9419. A_UINT32 mlo_ipc_ring_full_cnt[HTT_STATS_HWMLO_MAX_LINKS][HTT_STATS_MLO_MAX_IPC_RINGS];
  9420. } htt_stats_pdev_mlo_ipc_stats_tlv;
  9421. /* preserve old name alias for new name consistent with the tag name */
  9422. typedef htt_stats_pdev_mlo_ipc_stats_tlv htt_pdev_mlo_ipc_stats_tlv;
  9423. /* STATS_TYPE : HTT_DBG_MLO_IPC_STATS
  9424. * TLV_TAGS:
  9425. * - HTT_STATS_PDEV_MLO_IPC_STATS_TAG
  9426. */
  9427. /* NOTE:
  9428. * This structure is for documentation, and cannot be safely used directly.
  9429. * Instead, use the constituent TLV structures to fill/parse.
  9430. */
  9431. typedef struct _htt_mlo_ipc_stats {
  9432. htt_stats_pdev_mlo_ipc_stats_tlv mlo_ipc_stats;
  9433. } htt_pdev_mlo_ipc_stats_t;
  9434. /*===================== end MLO stats ======================*/
  9435. typedef enum {
  9436. HTT_CTRL_PATH_STATS_CAL_TYPE_ADC = 0x0,
  9437. HTT_CTRL_PATH_STATS_CAL_TYPE_DAC = 0x1,
  9438. HTT_CTRL_PATH_STATS_CAL_TYPE_PROCESS = 0x2,
  9439. HTT_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR = 0x3,
  9440. HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO = 0x4,
  9441. HTT_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ = 0x5,
  9442. HTT_CTRL_PATH_STATS_CAL_TYPE_TXLO = 0x6,
  9443. HTT_CTRL_PATH_STATS_CAL_TYPE_TXIQ = 0x7,
  9444. HTT_CTRL_PATH_STATS_CAL_TYPE_RXIQ = 0x8,
  9445. HTT_CTRL_PATH_STATS_CAL_TYPE_IM2 = 0x9,
  9446. HTT_CTRL_PATH_STATS_CAL_TYPE_LNA = 0xa,
  9447. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO = 0xb,
  9448. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ = 0xc,
  9449. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS = 0xd,
  9450. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY = 0xe,
  9451. HTT_CTRL_PATH_STATS_CAL_TYPE_IBF = 0xf,
  9452. HTT_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL = 0x10,
  9453. HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ = 0x11,
  9454. HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM = 0x12,
  9455. HTT_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL = 0x13,
  9456. HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ = 0x14,
  9457. HTT_CTRL_PATH_STATS_CAL_TYPE_BWFILTER = 0x15,
  9458. HTT_CTRL_PATH_STATS_CAL_TYPE_PEF = 0x16,
  9459. HTT_CTRL_PATH_STATS_CAL_TYPE_PADROOP = 0x17,
  9460. HTT_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC = 0x18,
  9461. /* add new cal types above this line */
  9462. HTT_CTRL_PATH_STATS_CAL_TYPE_INVALID = 0xFF
  9463. } htt_ctrl_path_stats_cal_type_ids;
  9464. #define HTT_RETURN_STRING(str) case ((str)): return (A_UINT8 *)(# str);
  9465. #define HTT_GET_BITS(_val, _index, _num_bits) \
  9466. (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
  9467. #define HTT_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_GET(cal_info) \
  9468. HTT_GET_BITS(cal_info, 0, 8)
  9469. /*
  9470. * Used by some hosts to print names of cal type, based on
  9471. * htt_ctrl_path_cal_type_ids values specified in
  9472. * htt_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  9473. */
  9474. #ifdef HTT_CTRL_PATH_STATS_CAL_TYPE_STRINGS
  9475. static INLINE A_UINT8 *htt_ctrl_path_cal_type_id_to_name(A_UINT32 cal_type_id)
  9476. {
  9477. switch (cal_type_id)
  9478. {
  9479. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_ADC);
  9480. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DAC);
  9481. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_PROCESS);
  9482. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR);
  9483. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO);
  9484. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ);
  9485. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_TXLO);
  9486. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_TXIQ);
  9487. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_RXIQ);
  9488. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_IM2);
  9489. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_LNA);
  9490. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO);
  9491. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ);
  9492. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS);
  9493. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY);
  9494. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_IBF);
  9495. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL);
  9496. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ);
  9497. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM);
  9498. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL);
  9499. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ);
  9500. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_BWFILTER);
  9501. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_PEF);
  9502. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_PADROOP);
  9503. HTT_RETURN_STRING(HTT_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC);
  9504. }
  9505. return (A_UINT8 *) "HTT_CTRL_PATH_STATS_CAL_TYPE_UNKNOWN";
  9506. }
  9507. #endif /* HTT_CTRL_PATH_STATS_CAL_TYPE_STRINGS */
  9508. #endif /* __HTT_STATS_H__ */