wmi_unified_param.h 224 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615
  1. /*
  2. * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /*
  19. * This file contains the API definitions for the Unified Wireless Module
  20. * Interface (WMI).
  21. */
  22. #ifndef _WMI_UNIFIED_PARAM_H_
  23. #define _WMI_UNIFIED_PARAM_H_
  24. #include <wlan_scan_public_structs.h>
  25. #ifdef CONVERGED_TDLS_ENABLE
  26. #include <wlan_tdls_public_structs.h>
  27. #endif
  28. #define MAC_MAX_KEY_LENGTH 32
  29. #define MAC_PN_LENGTH 8
  30. #define MAX_MAC_HEADER_LEN 32
  31. #define MIN_MAC_HEADER_LEN 24
  32. #define QOS_CONTROL_LEN 2
  33. #define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
  34. #define WMI_MAC_MAX_SSID_LENGTH 32
  35. #define WMI_SCAN_MAX_NUM_SSID 0x0A
  36. #ifndef CONFIG_HL_SUPPORT
  37. #define mgmt_tx_dl_frm_len 64
  38. #else
  39. #define mgmt_tx_dl_frm_len 1532
  40. #endif
  41. #define WMI_SMPS_MASK_LOWER_16BITS 0xFF
  42. #define WMI_SMPS_MASK_UPPER_3BITS 0x7
  43. #define WMI_SMPS_PARAM_VALUE_S 29
  44. #define WMI_UNIT_TEST_MAX_NUM_ARGS 100
  45. /* The size of the utc time in bytes. */
  46. #define WMI_SIZE_UTC_TIME (10)
  47. /* The size of the utc time error in bytes. */
  48. #define WMI_SIZE_UTC_TIME_ERROR (5)
  49. #define WMI_MCC_MIN_CHANNEL_QUOTA 20
  50. #define WMI_MCC_MAX_CHANNEL_QUOTA 80
  51. #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30
  52. #define WMI_BEACON_TX_BUFFER_SIZE (512)
  53. #define WMI_WIFI_SCANNING_MAC_OUI_LENGTH 3
  54. #define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
  55. #define WMI_RSSI_THOLD_DEFAULT -300
  56. #define WMI_NLO_FREQ_THRESH 1000
  57. #define WMI_SEC_TO_MSEC(sec) (sec * 1000)
  58. #define WMI_MSEC_TO_USEC(msec) (msec * 1000)
  59. #define WMI_ETH_LEN 64
  60. #define WMI_QOS_NUM_TSPEC_MAX 2
  61. #define WMI_IPV4_ADDR_LEN 4
  62. #define WMI_KEEP_ALIVE_NULL_PKT 1
  63. #define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
  64. #define WMI_MAC_MAX_KEY_LENGTH 32
  65. #define WMI_KRK_KEY_LEN 16
  66. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  67. #define WMI_BTK_KEY_LEN 32
  68. #define WMI_ROAM_R0KH_ID_MAX_LEN 48
  69. #define WMI_ROAM_SCAN_PSK_SIZE 32
  70. #endif
  71. #define WMI_NOISE_FLOOR_DBM_DEFAULT (-96)
  72. #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
  73. #define WMI_ROAM_MAX_CHANNELS 80
  74. #ifdef FEATURE_WLAN_EXTSCAN
  75. #define WMI_MAX_EXTSCAN_MSG_SIZE 1536
  76. #define WMI_EXTSCAN_REST_TIME 100
  77. #define WMI_EXTSCAN_MAX_SCAN_TIME 50000
  78. #define WMI_EXTSCAN_BURST_DURATION 150
  79. #endif
  80. #define WMI_SCAN_NPROBES_DEFAULT (2)
  81. #define WMI_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */
  82. #define WMI_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */
  83. #define WMI_NLO_FREQ_THRESH 1000 /* in MHz */
  84. #define WMI_SVC_MSG_MAX_SIZE 1536
  85. #define MAX_UTF_EVENT_LENGTH 2048
  86. #define MAX_WMI_UTF_LEN 252
  87. #define MAX_WMI_QVIT_LEN 252
  88. #define THERMAL_LEVELS 4
  89. #define WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES 256
  90. #define WMI_HOST_BCN_FLT_MAX_ELEMS_IE_LIST \
  91. (WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32)
  92. #define LTEU_MAX_BINS 10
  93. #define ATF_ACTIVED_MAX_CLIENTS 50
  94. #define ATF_ACTIVED_MAX_ATFGROUPS 16
  95. #define CTL_5G_SIZE 1536
  96. #define CTL_2G_SIZE 684
  97. #define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE)
  98. #define IEEE80211_MICBUF_SIZE (8+8)
  99. #define IEEE80211_TID_SIZE 17
  100. #define WME_NUM_AC 4
  101. #define SMART_ANT_MODE_SERIAL 0
  102. #define SMART_ANT_MODE_PARALLEL 1
  103. #define IEEE80211_WEP_NKID 4 /* number of key ids */
  104. #define WPI_IV_LEN 16
  105. #define WMI_SCAN_MAX_NUM_BSSID 10
  106. #define MAX_CHANS 1023
  107. #define TARGET_OEM_CONFIGURE_LCI 0x0A
  108. #define RTT_LCI_ALTITUDE_MASK 0x3FFFFFFF
  109. #define TARGET_OEM_CONFIGURE_LCR 0x09
  110. #define RTT_TIMEOUT_MS 180
  111. #define MAX_SUPPORTED_RATES 128
  112. #define WMI_HOST_MAX_BUFFER_SIZE 1712
  113. #define WMI_HAL_MAX_SANTENNA 4
  114. #define WMI_HOST_PDEV_VI_PRIORITY_BIT (1<<2)
  115. #define WMI_HOST_PDEV_BEACON_PRIORITY_BIT (1<<4)
  116. #define WMI_HOST_PDEV_MGMT_PRIORITY_BIT (1<<5)
  117. #define WMI_MAX_CMDS 1024
  118. #define FIPS_ALIGN 4
  119. #define FIPS_ALIGNTO(__addr, __to) \
  120. ((((unsigned long int)(__addr)) + (__to) - 1) & ~((__to) - 1))
  121. #define FIPS_IS_ALIGNED(__addr, __to) \
  122. (!(((unsigned long int)(__addr)) & ((__to)-1)))
  123. #define WMI_HOST_MAX_SERIAL_ANTENNA 2
  124. #define WMI_SMART_ANT_MAX_RATE_SERIES 2
  125. #define WMI_HOST_F_MS(_v, _f) \
  126. (((_v) & (_f)) >> (_f##_S))
  127. #define WMI_HOST_F_RMW(_var, _v, _f) \
  128. do { \
  129. (_var) &= ~(_f); \
  130. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  131. } while (0)
  132. /* vdev capabilities bit mask */
  133. #define WMI_HOST_VDEV_BEACON_SUPPORT 0x1
  134. #define WMI_HOST_VDEV_WDS_LRN_ENABLED 0x2
  135. #define WMI_HOST_VDEV_VOW_ENABLED 0x4
  136. #define WMI_HOST_VDEV_IS_BEACON_SUPPORTED(param) \
  137. ((param) & WMI_HOST_VDEV_BEACON_SUPPORT)
  138. #define WMI_HOST_VDEV_IS_WDS_LRN_ENABLED(param) \
  139. ((param) & WMI_HOST_VDEV_WDS_LRN_ENABLED)
  140. #define WMI_HOST_VDEV_IS_VOW_ENABLED(param) \
  141. ((param) & WMI_HOST_VDEV_VOW_ENABLED)
  142. /* TXBF capabilities masks */
  143. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_S 0
  144. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_M 0x1
  145. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE \
  146. (WMI_HOST_TXBF_CONF_SU_TX_BFEE_M << WMI_HOST_TXBF_CONF_SU_TX_BFEE_S)
  147. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_GET(x) \
  148. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
  149. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_SET(x, z) \
  150. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
  151. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_S 1
  152. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_M 0x1
  153. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE \
  154. (WMI_HOST_TXBF_CONF_MU_TX_BFEE_M << WMI_HOST_TXBF_CONF_MU_TX_BFEE_S)
  155. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_GET(x) \
  156. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
  157. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_SET(x, z) \
  158. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
  159. #define WMI_HOST_TXBF_CONF_SU_TX_BFER_S 2
  160. #define WMI_HOST_TXBF_CONF_SU_TX_BFER_M 0x1
  161. #define WMI_HOST_TXBF_CONF_SU_TX_BFER \
  162. (WMI_HOST_TXBF_CONF_SU_TX_BFER_M << WMI_HOST_TXBF_CONF_SU_TX_BFER_S)
  163. #define WMI_HOST_TXBF_CONF_SU_TX_BFER_GET(x) \
  164. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFER)
  165. #define WMI_HOST_TXBF_CONF_SU_TX_BFER_SET(x, z) \
  166. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFER)
  167. #define WMI_HOST_TXBF_CONF_MU_TX_BFER_S 3
  168. #define WMI_HOST_TXBF_CONF_MU_TX_BFER_M 0x1
  169. #define WMI_HOST_TXBF_CONF_MU_TX_BFER \
  170. (WMI_HOST_TXBF_CONF_MU_TX_BFER_M << WMI_HOST_TXBF_CONF_MU_TX_BFER_S)
  171. #define WMI_HOST_TXBF_CONF_MU_TX_BFER_GET(x) \
  172. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFER)
  173. #define WMI_HOST_TXBF_CONF_MU_TX_BFER_SET(x, z) \
  174. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFER)
  175. #define WMI_HOST_TXBF_CONF_STS_CAP_S 4
  176. #define WMI_HOST_TXBF_CONF_STS_CAP_M 0x7
  177. #define WMI_HOST_TXBF_CONF_STS_CAP \
  178. (WMI_HOST_TXBF_CONF_STS_CAP_M << WMI_HOST_TXBF_CONF_STS_CAP_S)
  179. #define WMI_HOST_TXBF_CONF_STS_CAP_GET(x) \
  180. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_STS_CAP);
  181. #define WMI_HOST_TXBF_CONF_STS_CAP_SET(x, z) \
  182. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_STS_CAP)
  183. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_S 7
  184. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_M 0x1
  185. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF \
  186. (WMI_HOST_TXBF_CONF_IMPLICIT_BF_M << WMI_HOST_TXBF_CONF_IMPLICIT_BF_S)
  187. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_GET(x) \
  188. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
  189. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_SET(x, z) \
  190. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
  191. #define WMI_HOST_TXBF_CONF_BF_SND_DIM_S 8
  192. #define WMI_HOST_TXBF_CONF_BF_SND_DIM_M 0x7
  193. #define WMI_HOST_TXBF_CONF_BF_SND_DIM \
  194. (WMI_HOST_TXBF_CONF_BF_SND_DIM_M << WMI_HOST_TXBF_CONF_BF_SND_DIM_S)
  195. #define WMI_HOST_TXBF_CONF_BF_SND_DIM_GET(x) \
  196. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_BF_SND_DIM)
  197. #define WMI_HOST_TXBF_CONF_BF_SND_DIM_SET(x, z) \
  198. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_BF_SND_DIM)
  199. /* The following WMI_HOST_HEOPS_BSSCOLOR_XXX macros correspond to the
  200. * WMI_HEOPS_COLOR_XXX macros in the FW wmi_unified.h */
  201. #define WMI_HOST_HEOPS_BSSCOLOR_S 0
  202. #define WMI_HOST_HEOPS_BSSCOLOR_M 0x3f
  203. #define WMI_HOST_HEOPS_BSSCOLOR \
  204. (WMI_HOST_HEOPS_BSSCOLOR_M << WMI_HOST_HEOPS_BSSCOLOR_S)
  205. #define WMI_HOST_HEOPS_BSSCOLOR_GET(x) \
  206. WMI_HOST_F_MS(x, WMI_HOST_HEOPS_BSSCOLOR)
  207. #define WMI_HOST_HEOPS_BSSCOLOR_SET(x, z) \
  208. WMI_HOST_F_RMW(x, z, WMI_HOST_HEOPS_BSSCOLOR)
  209. /* The following WMI_HOST_HEOPS_BSSCOLOR_DISABLE_XXX macros correspond to the
  210. * WMI_HEOPS_BSSCOLORDISABLE_XXX macros in the FW wmi_unified.h */
  211. #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S 30
  212. #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_M 0x1
  213. #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE \
  214. (WMI_HOST_HEOPS_BSSCOLOR_DISABLE_M << WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S)
  215. #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_GET(x) \
  216. WMI_HOST_F_MS(x, WMI_HOST_HEOPS_BSSCOLOR_DISABLE)
  217. #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_SET(x, z) \
  218. WMI_HOST_F_RMW(x, z, WMI_HOST_HEOPS_BSSCOLOR_DISABLE)
  219. /* HE BF capabilities mask */
  220. #define WMI_HOST_HE_BF_CONF_SU_BFEE_S 0
  221. #define WMI_HOST_HE_BF_CONF_SU_BFEE_M 0x1
  222. #define WMI_HOST_HE_BF_CONF_SU_BFEE \
  223. (WMI_HOST_HE_BF_CONF_SU_BFEE_M << WMI_HOST_HE_BF_CONF_SU_BFEE_S)
  224. #define WMI_HOST_HE_BF_CONF_SU_BFEE_GET(x) \
  225. WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFEE)
  226. #define WMI_HOST_HE_BF_CONF_SU_BFEE_SET(x, z) \
  227. WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFEE)
  228. #define WMI_HOST_HE_BF_CONF_SU_BFER_S 1
  229. #define WMI_HOST_HE_BF_CONF_SU_BFER_M 0x1
  230. #define WMI_HOST_HE_BF_CONF_SU_BFER \
  231. (WMI_HOST_HE_BF_CONF_SU_BFER_M << WMI_HOST_HE_BF_CONF_SU_BFER_S)
  232. #define WMI_HOST_HE_BF_CONF_SU_BFER_GET(x) \
  233. WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFER)
  234. #define WMI_HOST_HE_BF_CONF_SU_BFER_SET(x, z) \
  235. WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFER)
  236. #define WMI_HOST_HE_BF_CONF_MU_BFEE_S 2
  237. #define WMI_HOST_HE_BF_CONF_MU_BFEE_M 0x1
  238. #define WMI_HOST_HE_BF_CONF_MU_BFEE \
  239. (WMI_HOST_HE_BF_CONF_MU_BFEE_M << WMI_HOST_HE_BF_CONF_MU_BFEE_S)
  240. #define WMI_HOST_HE_BF_CONF_MU_BFEE_GET(x) \
  241. WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFEE)
  242. #define WMI_HOST_HE_BF_CONF_MU_BFEE_SET(x, z) \
  243. WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFEE)
  244. #define WMI_HOST_HE_BF_CONF_MU_BFER_S 3
  245. #define WMI_HOST_HE_BF_CONF_MU_BFER_M 0x1
  246. #define WMI_HOST_HE_BF_CONF_MU_BFER \
  247. (WMI_HOST_HE_BF_CONF_MU_BFER_M << WMI_HOST_HE_BF_CONF_MU_BFER_S)
  248. #define WMI_HOST_HE_BF_CONF_MU_BFER_GET(x) \
  249. WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFER)
  250. #define WMI_HOST_HE_BF_CONF_MU_BFER_SET(x, z) \
  251. WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFER)
  252. #define WMI_HOST_HE_BF_CONF_DL_OFDMA_S 4
  253. #define WMI_HOST_HE_BF_CONF_DL_OFDMA_M 0x1
  254. #define WMI_HOST_HE_BF_CONF_DL_OFDMA \
  255. (WMI_HOST_HE_BF_CONF_DL_OFDMA_M << WMI_HOST_HE_BF_CONF_DL_OFDMA_S)
  256. #define WMI_HOST_HE_BF_CONF_DL_OFDMA_GET(x) \
  257. WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_DL_OFDMA)
  258. #define WMI_HOST_HE_BF_CONF_DL_OFDMA_SET(x, z) \
  259. WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_DL_OFDMA)
  260. #define WMI_HOST_HE_BF_CONF_UL_OFDMA_S 5
  261. #define WMI_HOST_HE_BF_CONF_UL_OFDMA_M 0x1
  262. #define WMI_HOST_HE_BF_CONF_UL_OFDMA \
  263. (WMI_HOST_HE_BF_CONF_UL_OFDMA_M << WMI_HOST_HE_BF_CONF_UL_OFDMA_S)
  264. #define WMI_HOST_HE_BF_CONF_UL_OFDMA_GET(x) \
  265. WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_OFDMA)
  266. #define WMI_HOST_HE_BF_CONF_UL_OFDMA_SET(x, z) \
  267. WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_OFDMA)
  268. #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_S 6
  269. #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_M 0x1
  270. #define WMI_HOST_HE_BF_CONF_UL_MUMIMO \
  271. (WMI_HOST_HE_BF_CONF_UL_MUMIMO_M << WMI_HOST_HE_BF_CONF_UL_MUMIMO_S)
  272. #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_GET(x) \
  273. WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_MUMIMO)
  274. #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_SET(x, z) \
  275. WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_MUMIMO)
  276. /* HE or VHT Sounding */
  277. #define WMI_HOST_HE_VHT_SOUNDING_MODE_S 0
  278. #define WMI_HOST_HE_VHT_SOUNDING_MODE_M 0x1
  279. #define WMI_HOST_HE_VHT_SOUNDING_MODE \
  280. (WMI_HOST_HE_VHT_SOUNDING_MODE_M << WMI_HOST_HE_VHT_SOUNDING_MODE_S)
  281. #define WMI_HOST_HE_VHT_SOUNDING_MODE_GET(x) \
  282. WMI_HOST_F_MS(x, WMI_HOST_HE_VHT_SOUNDING_MODE)
  283. #define WMI_HOST_HE_VHT_SOUNDING_MODE_SET(x, z) \
  284. WMI_HOST_F_RMW(x, z, WMI_HOST_HE_VHT_SOUNDING_MODE)
  285. /* SU or MU Sounding */
  286. #define WMI_HOST_SU_MU_SOUNDING_MODE_S 2
  287. #define WMI_HOST_SU_MU_SOUNDING_MODE_M 0x1
  288. #define WMI_HOST_SU_MU_SOUNDING_MODE \
  289. (WMI_HOST_SU_MU_SOUNDING_MODE_M << \
  290. WMI_HOST_SU_MU_SOUNDING_MODE_S)
  291. #define WMI_HOST_SU_MU_SOUNDING_MODE_GET(x) \
  292. WMI_HOST_F_MS(x, WMI_HOST_SU_MU_SOUNDING_MODE)
  293. #define WMI_HOST_SU_MU_SOUNDING_MODE_SET(x, z) \
  294. WMI_HOST_F_RMW(x, z, WMI_HOST_SU_MU_SOUNDING_MODE)
  295. /* Trig or Non-Trig Sounding */
  296. #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_S 3
  297. #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_M 0x1
  298. #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE \
  299. (WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_M << \
  300. WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_S)
  301. #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_GET(x) \
  302. WMI_HOST_F_MS(x, WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE)
  303. #define WMI_HOST_HE_VHT_SU_MU_SOUNDING_MODE_SET(x, z) \
  304. WMI_HOST_F_RMW(x, z, WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE)
  305. #define WMI_HOST_TPC_RATE_MAX 160
  306. #define WMI_HOST_TPC_TX_NUM_CHAIN 4
  307. #define WMI_HOST_RXG_CAL_CHAN_MAX 8
  308. #define WMI_HOST_MAX_NUM_CHAINS 8
  309. #define WMI_MAX_NUM_OF_RATE_THRESH 4
  310. #define WMI_HOST_PDEV_MAX_VDEVS 17
  311. /* for QC98XX only */
  312. /*6 modes (A, HT20, HT40, VHT20, VHT40, VHT80) * 3 reg dommains
  313. */
  314. #define WMI_HOST_NUM_CTLS_5G 18
  315. /*6 modes (B, G, HT20, HT40, VHT20, VHT40) * 3 reg domains */
  316. #define WMI_HOST_NUM_CTLS_2G 18
  317. #define WMI_HOST_NUM_BAND_EDGES_5G 8
  318. #define WMI_HOST_NUM_BAND_EDGES_2G 4
  319. /*Beelinier 5G*/
  320. #define WMI_HOST_NUM_CTLS_5G_11A 9
  321. #define WMI_HOST_NUM_BAND_EDGES_5G_11A 25
  322. #define WMI_HOST_NUM_CTLS_5G_HT20 24
  323. #define WMI_HOST_NUM_BAND_EDGES_5G_HT20 25
  324. #define WMI_HOST_NUM_CTLS_5G_HT40 18
  325. #define WMI_HOST_NUM_BAND_EDGES_5G_HT40 12
  326. #define WMI_HOST_NUM_CTLS_5G_HT80 18
  327. #define WMI_HOST_NUM_BAND_EDGES_5G_HT80 6
  328. #define WMI_HOST_NUM_CTLS_5G_HT160 9
  329. #define WMI_HOST_NUM_BAND_EDGES_5G_HT160 2
  330. /* Beeliner 2G */
  331. #define WMI_HOST_NUM_CTLS_2G_11B 6
  332. #define WMI_HOST_NUM_BAND_EDGES_2G_11B 9
  333. #define WMI_HOST_NUM_CTLS_2G_20MHZ 30
  334. #define WMI_HOST_NUM_BAND_EDGES_2G_20MHZ 11
  335. #define WMI_HOST_NUM_CTLS_2G_40MHZ 18
  336. #define WMI_HOST_NUM_BAND_EDGES_2G_40MHZ 6
  337. /* for QC98XX only */
  338. #define WMI_HOST_TX_NUM_CHAIN 0x3
  339. #define WMI_HOST_TPC_REGINDEX_MAX 4
  340. #define WMI_HOST_ARRAY_GAIN_NUM_STREAMS 2
  341. #include "qdf_atomic.h"
  342. #ifdef BIG_ENDIAN_HOST
  343. /* This API is used in copying in elements to WMI message,
  344. since WMI message uses multilpes of 4 bytes, This API
  345. converts length into multiples of 4 bytes, and performs copy
  346. */
  347. #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) do { \
  348. int j; \
  349. u_int32_t *src, *dest; \
  350. src = (u_int32_t *)srcp; \
  351. dest = (u_int32_t *)destp; \
  352. for (j = 0; j < roundup(len, sizeof(u_int32_t))/4; j++) { \
  353. *(dest+j) = qdf_le32_to_cpu(*(src+j)); \
  354. } \
  355. } while (0)
  356. #else
  357. #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) OS_MEMCPY(destp,\
  358. srcp, len)
  359. #endif
  360. /** macro to convert MAC address from WMI word format to char array */
  361. #define WMI_HOST_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
  362. (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \
  363. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  364. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  365. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  366. (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \
  367. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  368. } while (0)
  369. #define TARGET_INIT_STATUS_SUCCESS 0x0
  370. #define TARGET_INIT_STATUS_GEN_FAILED 0x1
  371. #define TARGET_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  372. #define TARGET_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  373. #define MAX_ASSOC_IE_LENGTH 1024
  374. typedef uint32_t TARGET_INIT_STATUS;
  375. /**
  376. * @brief Opaque handle of wmi structure
  377. */
  378. struct wmi_unified;
  379. typedef struct wmi_unified *wmi_unified_t;
  380. typedef void *ol_scn_t;
  381. /**
  382. * @wmi_event_handler function prototype
  383. */
  384. typedef int (*wmi_unified_event_handler)(ol_scn_t scn_handle,
  385. uint8_t *event_buf, uint32_t len);
  386. /**
  387. * @WMI_HOST_WLAN_PHY_MODE: Host based enum ID for corresponding in
  388. * WLAN_PHY_MODE. This should be consistent with WLAN_PHY_MODE always to avoid
  389. * breaking the WMI
  390. */
  391. typedef enum {
  392. WMI_HOST_MODE_11A = 0, /* 11a Mode */
  393. WMI_HOST_MODE_11G = 1, /* 11b/g Mode */
  394. WMI_HOST_MODE_11B = 2, /* 11b Mode */
  395. WMI_HOST_MODE_11GONLY = 3, /* 11g only Mode */
  396. WMI_HOST_MODE_11NA_HT20 = 4, /* 11a HT20 mode */
  397. WMI_HOST_MODE_11NG_HT20 = 5, /* 11g HT20 mode */
  398. WMI_HOST_MODE_11NA_HT40 = 6, /* 11a HT40 mode */
  399. WMI_HOST_MODE_11NG_HT40 = 7, /* 11g HT40 mode */
  400. WMI_HOST_MODE_11AC_VHT20 = 8,
  401. WMI_HOST_MODE_11AC_VHT40 = 9,
  402. WMI_HOST_MODE_11AC_VHT80 = 10,
  403. WMI_HOST_MODE_11AC_VHT20_2G = 11,
  404. WMI_HOST_MODE_11AC_VHT40_2G = 12,
  405. WMI_HOST_MODE_11AC_VHT80_2G = 13,
  406. WMI_HOST_MODE_11AC_VHT80_80 = 14,
  407. WMI_HOST_MODE_11AC_VHT160 = 15,
  408. WMI_HOST_MODE_11AX_HE20 = 16,
  409. WMI_HOST_MODE_11AX_HE40 = 17,
  410. WMI_HOST_MODE_11AX_HE80 = 18,
  411. WMI_HOST_MODE_11AX_HE80_80 = 19,
  412. WMI_HOST_MODE_11AX_HE160 = 20,
  413. WMI_HOST_MODE_11AX_HE20_2G = 21,
  414. WMI_HOST_MODE_11AX_HE40_2G = 22,
  415. WMI_HOST_MODE_11AX_HE80_2G = 23,
  416. WMI_HOST_MODE_UNKNOWN = 24,
  417. WMI_HOST_MODE_MAX = 24
  418. } WMI_HOST_WLAN_PHY_MODE;
  419. typedef enum {
  420. WMI_HOST_VDEV_START_OK = 0,
  421. WMI_HOST_VDEV_START_CHAN_INVALID,
  422. WMI_HOST_VDEV_START_CHAN_BLOCKED,
  423. WMI_HOST_VDEV_START_CHAN_DFS_VIOLATION,
  424. } WMI_HOST_VDEV_START_STATUS;
  425. /*
  426. * Needs to be removed and use channel_param based
  427. * on how it is processed
  428. */
  429. typedef struct {
  430. /** primary 20 MHz channel frequency in mhz */
  431. uint32_t mhz;
  432. /** Center frequency 1 in MHz*/
  433. uint32_t band_center_freq1;
  434. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  435. uint32_t band_center_freq2;
  436. /** channel info described below */
  437. uint32_t info;
  438. /** contains min power, max power, reg power and reg class id. */
  439. uint32_t reg_info_1;
  440. /** contains antennamax */
  441. uint32_t reg_info_2;
  442. } wmi_host_channel;
  443. /**
  444. * enum WMI_HOST_REGDMN_MODE:
  445. * @WMI_HOST_REGDMN_MODE_11A: 11a channels
  446. * @WMI_HOST_REGDMN_MODE_TURBO: 11a turbo-only channels
  447. * @WMI_HOST_REGDMN_MODE_11B: 11b channels
  448. * @WMI_HOST_REGDMN_MODE_PUREG: 11g channels (OFDM only)
  449. * @WMI_HOST_REGDMN_MODE_11G: historical
  450. * @WMI_HOST_REGDMN_MODE_108G: 11g+Turbo channels
  451. * @WMI_HOST_REGDMN_MODE_108A: 11a+Turbo channels
  452. * @WMI_HOST_REGDMN_MODE_XR: XR channels
  453. * @WMI_HOST_REGDMN_MODE_11A_HALF_RATE: 11a half rate channels
  454. * @WMI_HOST_REGDMN_MODE_11A_QUARTER_RATE: 11a quarter rate channels
  455. * @WMI_HOST_REGDMN_MODE_11NG_HT20: 11ng HT20 channels
  456. * @WMI_HOST_REGDMN_MODE_11NA_HT20: 11na HT20 channels
  457. * @WMI_HOST_REGDMN_MODE_11NG_HT40PLUS: 11ng HT40+ channels
  458. * @WMI_HOST_REGDMN_MODE_11NG_HT40MINUS: 11ng HT40- channels
  459. * @WMI_HOST_REGDMN_MODE_11NA_HT40PLUS: 11na HT40+ channels
  460. * @WMI_HOST_REGDMN_MODE_11NA_HT40MINUS: 11na HT40- channels
  461. * @WMI_HOST_REGDMN_MODE_11AC_VHT20: 5GHz, VHT20
  462. * @WMI_HOST_REGDMN_MODE_11AC_VHT40PLUS: 5GHz, VHT40+ channels
  463. * @WMI_HOST_REGDMN_MODE_11AC_VHT40MINUS: 5GHz, VHT40- channels
  464. * @WMI_HOST_REGDMN_MODE_11AC_VHT80: 5GHz, VHT80 channels
  465. * @WMI_HOST_REGDMN_MODE_11AC_VHT160: 5GHz, VHT160 channels
  466. * @WMI_HOST_REGDMN_MODE_11AC_VHT80_80: 5GHz, VHT80+80 channels
  467. * @WMI_HOST_REGDMN_MODE_11AXG_HE20: 11ax 2.4GHz, HE20 channels
  468. * @WMI_HOST_REGDMN_MODE_11AXA_HE20: 11ax 5GHz, HE20 channels
  469. * @WMI_HOST_REGDMN_MODE_11AXG_HE40PLUS: 11ax 2.4GHz, HE40+ channels
  470. * @WMI_HOST_REGDMN_MODE_11AXG_HE40MINUS: 11ax 2.4GHz, HE40- channels
  471. * @WMI_HOST_REGDMN_MODE_11AXA_HE40PLUS: 11ax 5GHz, HE40+ channels
  472. * @WMI_HOST_REGDMN_MODE_11AXA_HE40MINUS: 11ax 5GHz, HE40- channels
  473. * @WMI_HOST_REGDMN_MODE_11AXA_HE80: 11ax 5GHz, HE80 channels
  474. * @WMI_HOST_REGDMN_MODE_11AXA_HE160: 11ax 5GHz, HE160 channels
  475. * @WMI_HOST_REGDMN_MODE_11AXA_HE80_80: 11ax 5GHz, HE80+80 channels
  476. */
  477. typedef enum {
  478. WMI_HOST_REGDMN_MODE_11A = 0x00000001,
  479. WMI_HOST_REGDMN_MODE_TURBO = 0x00000002,
  480. WMI_HOST_REGDMN_MODE_11B = 0x00000004,
  481. WMI_HOST_REGDMN_MODE_PUREG = 0x00000008,
  482. WMI_HOST_REGDMN_MODE_11G = 0x00000008,
  483. WMI_HOST_REGDMN_MODE_108G = 0x00000020,
  484. WMI_HOST_REGDMN_MODE_108A = 0x00000040,
  485. WMI_HOST_REGDMN_MODE_XR = 0x00000100,
  486. WMI_HOST_REGDMN_MODE_11A_HALF_RATE = 0x00000200,
  487. WMI_HOST_REGDMN_MODE_11A_QUARTER_RATE = 0x00000400,
  488. WMI_HOST_REGDMN_MODE_11NG_HT20 = 0x00000800,
  489. WMI_HOST_REGDMN_MODE_11NA_HT20 = 0x00001000,
  490. WMI_HOST_REGDMN_MODE_11NG_HT40PLUS = 0x00002000,
  491. WMI_HOST_REGDMN_MODE_11NG_HT40MINUS = 0x00004000,
  492. WMI_HOST_REGDMN_MODE_11NA_HT40PLUS = 0x00008000,
  493. WMI_HOST_REGDMN_MODE_11NA_HT40MINUS = 0x00010000,
  494. WMI_HOST_REGDMN_MODE_11AC_VHT20 = 0x00020000,
  495. WMI_HOST_REGDMN_MODE_11AC_VHT40PLUS = 0x00040000,
  496. WMI_HOST_REGDMN_MODE_11AC_VHT40MINUS = 0x00080000,
  497. WMI_HOST_REGDMN_MODE_11AC_VHT80 = 0x00100000,
  498. WMI_HOST_REGDMN_MODE_11AC_VHT160 = 0x00200000,
  499. WMI_HOST_REGDMN_MODE_11AC_VHT80_80 = 0x00400000,
  500. WMI_HOST_REGDMN_MODE_11AXG_HE20 = 0x00800000,
  501. WMI_HOST_REGDMN_MODE_11AXA_HE20 = 0x01000000,
  502. WMI_HOST_REGDMN_MODE_11AXG_HE40PLUS = 0x02000000,
  503. WMI_HOST_REGDMN_MODE_11AXG_HE40MINUS = 0x04000000,
  504. WMI_HOST_REGDMN_MODE_11AXA_HE40PLUS = 0x08000000,
  505. WMI_HOST_REGDMN_MODE_11AXA_HE40MINUS = 0x10000000,
  506. WMI_HOST_REGDMN_MODE_11AXA_HE80 = 0x20000000,
  507. WMI_HOST_REGDMN_MODE_11AXA_HE160 = 0x40000000,
  508. WMI_HOST_REGDMN_MODE_11AXA_HE80_80 = 0x80000000,
  509. WMI_HOST_REGDMN_MODE_ALL = 0xffffffff
  510. } WMI_HOST_REGDMN_MODE;
  511. /**
  512. * enum WMI_HOST_WLAN_BAND_CAPABILITY: Band capability (2.4 GHz, 5 GHz). Maps to
  513. * WLAN_BAND_CAPABILITY used in firmware header file(s).
  514. * @WMI_HOST_WLAN_2G_CAPABILITY: 2.4 GHz capable
  515. * @WMI_HOST_WLAN_5G_CAPABILITY: 5 GHz capable
  516. */
  517. typedef enum {
  518. WMI_HOST_WLAN_2G_CAPABILITY = 0x1,
  519. WMI_HOST_WLAN_5G_CAPABILITY = 0x2,
  520. } WMI_HOST_WLAN_BAND_CAPABILITY;
  521. /**
  522. * enum wmi_host_channel_width: Channel operating width. Maps to
  523. * wmi_channel_width used in firmware header file(s).
  524. * @WMI_HOST_CHAN_WIDTH_20: 20 MHz channel operating width
  525. * @WMI_HOST_CHAN_WIDTH_40: 40 MHz channel operating width
  526. * @WMI_HOST_CHAN_WIDTH_80: 80 MHz channel operating width
  527. * @WMI_HOST_CHAN_WIDTH_160: 160 MHz channel operating width
  528. * @WMI_HOST_CHAN_WIDTH_80P80: 80+80 MHz channel operating width
  529. * @WMI_HOST_CHAN_WIDTH_5: 5 MHz channel operating width
  530. * @WMI_HOST_CHAN_WIDTH_10: 10 MHz channel operating width
  531. */
  532. typedef enum {
  533. WMI_HOST_CHAN_WIDTH_20 = 0,
  534. WMI_HOST_CHAN_WIDTH_40 = 1,
  535. WMI_HOST_CHAN_WIDTH_80 = 2,
  536. WMI_HOST_CHAN_WIDTH_160 = 3,
  537. WMI_HOST_CHAN_WIDTH_80P80 = 4,
  538. WMI_HOST_CHAN_WIDTH_5 = 5,
  539. WMI_HOST_CHAN_WIDTH_10 = 6,
  540. } wmi_host_channel_width;
  541. #define ATH_EXPONENT_TO_VALUE(v) ((1<<v)-1)
  542. #define ATH_TXOP_TO_US(v) (v<<5)
  543. /* WME stream classes */
  544. #define WMI_HOST_AC_BE 0 /* best effort */
  545. #define WMI_HOST_AC_BK 1 /* background */
  546. #define WMI_HOST_AC_VI 2 /* video */
  547. #define WMI_HOST_AC_VO 3 /* voice */
  548. #define WMI_TID_TO_AC(_tid) (\
  549. (((_tid) == 0) || ((_tid) == 3)) ? WMI_HOST_AC_BE : \
  550. (((_tid) == 1) || ((_tid) == 2)) ? WMI_HOST_AC_BK : \
  551. (((_tid) == 4) || ((_tid) == 5)) ? WMI_HOST_AC_VI : \
  552. WMI_HOST_AC_VO)
  553. /**
  554. * struct vdev_create_params - vdev create cmd parameter
  555. * @if_id: interface id
  556. * @type: interface type
  557. * @subtype: interface subtype
  558. * @nss_2g: NSS for 2G
  559. * @nss_5g: NSS for 5G
  560. * @pdev_id: pdev id on pdev for this vdev
  561. * @mbssid-flags: MBSS IE flags indicating vdev type
  562. * @vdevid_trans: id of transmitting vdev for MBSS IE
  563. */
  564. struct vdev_create_params {
  565. uint8_t if_id;
  566. uint32_t type;
  567. uint32_t subtype;
  568. uint8_t nss_2g;
  569. uint8_t nss_5g;
  570. uint32_t pdev_id;
  571. uint32_t mbssid_flags;
  572. uint8_t vdevid_trans;
  573. };
  574. /**
  575. * struct vdev_delete_params - vdev delete cmd parameter
  576. * @if_id: interface id
  577. */
  578. struct vdev_delete_params {
  579. uint8_t if_id;
  580. };
  581. /**
  582. * struct channel_param - Channel parameters with all
  583. * info required by target.
  584. * @chan_id: channel id
  585. * @pwr: channel power
  586. * @mhz: channel frequency
  587. * @half_rate: is half rate
  588. * @quarter_rate: is quarter rate
  589. * @dfs_set: is dfs channel
  590. * @dfs_set_cfreq2: is secondary freq dfs channel
  591. * @is_chan_passive: is this passive channel
  592. * @allow_ht: HT allowed in chan
  593. * @allow_vht: VHT allowed on chan
  594. * @set_agile: is agile mode
  595. * @phy_mode: phymode (vht80 or ht40 or ...)
  596. * @cfreq1: centre frequency on primary
  597. * @cfreq2: centre frequency on secondary
  598. * @maxpower: max power for channel
  599. * @minpower: min power for channel
  600. * @maxreqpower: Max regulatory power
  601. * @antennamac: Max antenna
  602. * @reg_class_id: Regulatory class id.
  603. */
  604. struct channel_param {
  605. uint8_t chan_id;
  606. uint8_t pwr;
  607. uint32_t mhz;
  608. uint32_t half_rate:1,
  609. quarter_rate:1,
  610. dfs_set:1,
  611. dfs_set_cfreq2:1,
  612. is_chan_passive:1,
  613. allow_ht:1,
  614. allow_vht:1,
  615. set_agile:1;
  616. uint32_t phy_mode;
  617. uint32_t cfreq1;
  618. uint32_t cfreq2;
  619. int8_t maxpower;
  620. int8_t minpower;
  621. int8_t maxregpower;
  622. uint8_t antennamax;
  623. uint8_t reg_class_id;
  624. };
  625. /**
  626. * struct vdev_stop_params - vdev stop cmd parameter
  627. * @vdev_id: vdev id
  628. */
  629. struct vdev_stop_params {
  630. uint8_t vdev_id;
  631. };
  632. /**
  633. * struct vdev_up_params - vdev up cmd parameter
  634. * @vdev_id: vdev id
  635. * @assoc_id: association id
  636. * @profile_idx: profile index of the connected non-trans ap (mbssid case).
  637. * 0 means invalid.
  638. * @profile_num: the total profile numbers of non-trans aps (mbssid case).
  639. * 0 means non-MBSS AP.
  640. * @trans_bssid: bssid of transmitted AP (MBSS IE case)
  641. */
  642. struct vdev_up_params {
  643. uint8_t vdev_id;
  644. uint16_t assoc_id;
  645. uint32_t profile_idx;
  646. uint32_t profile_num;
  647. uint8_t trans_bssid[IEEE80211_ADDR_LEN];
  648. };
  649. /**
  650. * struct vdev_down_params - vdev down cmd parameter
  651. * @vdev_id: vdev id
  652. */
  653. struct vdev_down_params {
  654. uint8_t vdev_id;
  655. };
  656. /**
  657. * struct mac_ssid - mac ssid structure
  658. * @length:
  659. * @mac_ssid[WMI_MAC_MAX_SSID_LENGTH]:
  660. */
  661. struct mac_ssid {
  662. uint8_t length;
  663. uint8_t mac_ssid[WMI_MAC_MAX_SSID_LENGTH];
  664. } qdf_packed;
  665. /**
  666. * enum wmi_bcn_tx_rate_code - beacon tx rate code
  667. */
  668. enum wmi_bcn_tx_rate_code {
  669. WMI_BCN_TX_RATE_CODE_1_M = 0x43,
  670. WMI_BCN_TX_RATE_CODE_2_M = 0x42,
  671. WMI_BCN_TX_RATE_CODE_5_5_M = 0x41,
  672. WMI_BCN_TX_RATE_CODE_6_M = 0x03,
  673. WMI_BCN_TX_RATE_CODE_9_M = 0x07,
  674. WMI_BCN_TX_RATE_CODE_11M = 0x40,
  675. WMI_BCN_TX_RATE_CODE_12_M = 0x02,
  676. WMI_BCN_TX_RATE_CODE_18_M = 0x06,
  677. WMI_BCN_TX_RATE_CODE_24_M = 0x01,
  678. WMI_BCN_TX_RATE_CODE_36_M = 0x05,
  679. WMI_BCN_TX_RATE_CODE_48_M = 0x00,
  680. WMI_BCN_TX_RATE_CODE_54_M = 0x04,
  681. };
  682. /**
  683. * struct vdev_start_params - vdev start cmd parameter
  684. * @vdev_id: vdev id
  685. * @chan_freq: channel frequency
  686. * @chan_mode: channel mode
  687. * @band_center_freq1: center freq 1
  688. * @band_center_freq2: center freq 2
  689. * @flags: flags to set like pmf_enabled etc.
  690. * @is_dfs: flag to check if dfs enabled
  691. * @beacon_intval: beacon interval
  692. * @dtim_period: dtim period
  693. * @max_txpow: max tx power
  694. * @is_restart: flag to check if it is vdev
  695. * @ssid: ssid and ssid length info
  696. * @preferred_tx_streams: preferred tx streams
  697. * @preferred_rx_streams: preferred rx streams
  698. * @intr_update: flag to check if need to update
  699. * required wma interface params
  700. * @intr_ssid: pointer to wma interface ssid
  701. * @intr_flags: pointer to wma interface flags
  702. * @requestor_id: to update requestor id
  703. * @disable_hw_ack: to update disable hw ack flag
  704. * @info: to update channel info
  705. * @reg_info_1: to update min power, max power,
  706. * reg power and reg class id
  707. * @reg_info_2: to update antennamax
  708. * @cac_duration_ms: cac duration in milliseconds
  709. * @regdomain: Regulatory domain
  710. * @oper_mode: Operating mode
  711. * @dfs_pri_multiplier: DFS primary multiplier
  712. * allow pulse if they are within multiple of PRI for the radar type
  713. * @dot11_mode: Phy mode (VHT20/VHT80...)
  714. * @disable_hw_ack: Disable hw ack if chan is dfs channel for cac
  715. * @channel_param: Channel params required by target.
  716. * @bcn_tx_rate_code: Beacon tx rate code.
  717. * @ldpc_rx_enabled: Enable/Disable LDPC RX for this vdev
  718. */
  719. struct vdev_start_params {
  720. uint8_t vdev_id;
  721. uint32_t chan_freq;
  722. uint32_t chan_mode;
  723. uint32_t band_center_freq1;
  724. uint32_t band_center_freq2;
  725. uint32_t flags;
  726. bool is_dfs;
  727. uint32_t beacon_intval;
  728. uint32_t dtim_period;
  729. int32_t max_txpow;
  730. bool is_restart;
  731. bool is_half_rate;
  732. bool is_quarter_rate;
  733. uint32_t dis_hw_ack;
  734. uint32_t flag_dfs;
  735. uint8_t hidden_ssid;
  736. uint8_t pmf_enabled;
  737. struct mac_ssid ssid;
  738. uint32_t num_noa_descriptors;
  739. uint32_t preferred_rx_streams;
  740. uint32_t preferred_tx_streams;
  741. uint32_t cac_duration_ms;
  742. uint32_t regdomain;
  743. uint32_t he_ops;
  744. #ifndef CONFIG_MCL
  745. uint8_t oper_mode;
  746. int32_t dfs_pri_multiplier;
  747. uint8_t dot11_mode;
  748. uint8_t disable_hw_ack;
  749. struct channel_param channel;
  750. #endif
  751. enum wmi_bcn_tx_rate_code bcn_tx_rate_code;
  752. bool ldpc_rx_enabled;
  753. };
  754. /**
  755. * struct vdev_scan_nac_rssi_params - NAC_RSSI cmd parameter
  756. * @vdev_id: vdev id
  757. * @bssid_addr: BSSID address
  758. * @client_addr: client address
  759. * @chan_num: channel number
  760. * @action:NAC_RSSI action,
  761. */
  762. struct vdev_scan_nac_rssi_params {
  763. uint32_t vdev_id;
  764. uint8_t bssid_addr[IEEE80211_ADDR_LEN];
  765. uint8_t client_addr[IEEE80211_ADDR_LEN];
  766. uint32_t chan_num;
  767. uint32_t action; /* WMI_FILTER_NAC_RSSI_ACTION */
  768. };
  769. /**
  770. * enum nss_chains_band_info - Band info for dynamic nss, chains change feature
  771. * @NSS_CHAINS_BAND_2GHZ: 2.4Ghz band
  772. * @NSS_CHAINS_BAND_5GHZ: 5Ghz band
  773. * @NSS_CHAINS_BAND_MAX: Max bands supported
  774. */
  775. enum nss_chains_band_info {
  776. NSS_CHAINS_BAND_2GHZ = 0,
  777. NSS_CHAINS_BAND_5GHZ,
  778. NSS_CHAINS_BAND_MAX,
  779. };
  780. /**
  781. * struct vdev_nss_chains - vdev config of nss, and chains
  782. * @num_tx_chains: tx chains of vdev config
  783. * @num_rx_chains: rx chains of vdev config
  784. * @tx_nss: tx nss of vdev config
  785. * @rx_nss: rx nss of vdev config
  786. * @num_tx_chains_11b: number of tx chains in 11b mode
  787. * @num_tx_chains_11g: number of tx chains in 11g mode
  788. * @num_tx_chains_11a: number of tx chains in 11a mode
  789. * @disable_rx_mrc: disable 2 rx chains, in rx nss 1 mode
  790. * @disable_tx_mrc: disable 2 tx chains, in tx nss 1 mode
  791. */
  792. struct vdev_nss_chains {
  793. uint32_t num_tx_chains[NSS_CHAINS_BAND_MAX];
  794. uint32_t num_rx_chains[NSS_CHAINS_BAND_MAX];
  795. uint32_t tx_nss[NSS_CHAINS_BAND_MAX];
  796. uint32_t rx_nss[NSS_CHAINS_BAND_MAX];
  797. uint32_t num_tx_chains_11b;
  798. uint32_t num_tx_chains_11g;
  799. uint32_t num_tx_chains_11a;
  800. bool disable_rx_mrc[NSS_CHAINS_BAND_MAX];
  801. bool disable_tx_mrc[NSS_CHAINS_BAND_MAX];
  802. };
  803. /**
  804. * struct hidden_ssid_vdev_restart_params -
  805. * vdev restart cmd parameter
  806. * @session_id: session id
  807. * @ssid_len: ssid length
  808. * @ssid: ssid
  809. * @flags: flags
  810. * @requestor_id: requestor id
  811. * @disable_hw_ack: flag to disable hw ack feature
  812. * @mhz: channel frequency
  813. * @band_center_freq1: center freq 1
  814. * @band_center_freq2: center freq 2
  815. * @info: channel info
  816. * @reg_info_1: contains min power, max power,
  817. * reg power and reg class id
  818. * @reg_info_2: contains antennamax
  819. * @hidden_ssid_restart_in_progress:
  820. * flag to check if restart is in progress
  821. */
  822. struct hidden_ssid_vdev_restart_params {
  823. uint8_t session_id;
  824. uint32_t ssid_len;
  825. uint32_t ssid[8];
  826. uint32_t flags;
  827. uint32_t requestor_id;
  828. uint32_t disable_hw_ack;
  829. uint32_t mhz;
  830. uint32_t band_center_freq1;
  831. uint32_t band_center_freq2;
  832. uint32_t info;
  833. uint32_t reg_info_1;
  834. uint32_t reg_info_2;
  835. #ifndef CONFIG_VDEV_SM
  836. qdf_atomic_t hidden_ssid_restart_in_progress;
  837. #endif
  838. };
  839. /**
  840. * struct vdev_set_params - vdev set cmd parameter
  841. * @if_id: vdev id
  842. * @param_id: parameter id
  843. * @param_value: parameter value
  844. */
  845. struct vdev_set_params {
  846. uint32_t if_id;
  847. uint32_t param_id;
  848. uint32_t param_value;
  849. };
  850. /**
  851. * struct sifs_trigger_param - sifs_trigger cmd parameter
  852. * @if_id: vdev id
  853. * @param_value: parameter value
  854. */
  855. struct sifs_trigger_param {
  856. uint32_t if_id;
  857. uint32_t param_value;
  858. };
  859. /**
  860. * struct peer_delete_params - peer delete cmd parameter
  861. * @vdev_id: vdev id
  862. */
  863. struct peer_delete_params {
  864. uint8_t vdev_id;
  865. };
  866. /**
  867. * struct peer_flush_params - peer flush cmd parameter
  868. * @peer_tid_bitmap: peer tid bitmap
  869. * @vdev_id: vdev id
  870. */
  871. struct peer_flush_params {
  872. uint32_t peer_tid_bitmap;
  873. uint8_t vdev_id;
  874. };
  875. /**
  876. * struct peer_set_params - peer set cmd parameter
  877. * @param_id: parameter id
  878. * @param_value: parameter value
  879. * @vdev_id: vdev id
  880. */
  881. struct peer_set_params {
  882. uint32_t param_id;
  883. uint32_t param_value;
  884. uint32_t vdev_id;
  885. };
  886. /**
  887. * struct peer_create_params - peer create cmd parameter
  888. * @peer_addr: peer mac addr
  889. * @peer_type: peer type
  890. * @vdev_id: vdev id
  891. */
  892. struct peer_create_params {
  893. const uint8_t *peer_addr;
  894. uint32_t peer_type;
  895. uint32_t vdev_id;
  896. };
  897. /**
  898. * struct peer_remove_params - peer remove cmd parameter
  899. * @bssid: bss id
  900. * @vdev_id: vdev id
  901. * @roam_synch_in_progress: flag to indicate if roaming is in progress
  902. */
  903. struct peer_remove_params {
  904. uint8_t *bssid;
  905. uint8_t vdev_id;
  906. bool roam_synch_in_progress;
  907. };
  908. /**
  909. * Stats ID enums defined in host
  910. */
  911. typedef enum {
  912. WMI_HOST_REQUEST_PEER_STAT = 0x01,
  913. WMI_HOST_REQUEST_AP_STAT = 0x02,
  914. WMI_HOST_REQUEST_PDEV_STAT = 0x04,
  915. WMI_HOST_REQUEST_VDEV_STAT = 0x08,
  916. WMI_HOST_REQUEST_BCNFLT_STAT = 0x10,
  917. WMI_HOST_REQUEST_VDEV_RATE_STAT = 0x20,
  918. WMI_HOST_REQUEST_INST_STAT = 0x40,
  919. WMI_HOST_REQUEST_PEER_EXTD_STAT = 0x80,
  920. WMI_HOST_REQUEST_VDEV_EXTD_STAT = 0x100,
  921. WMI_HOST_REQUEST_NAC_RSSI = 0x200,
  922. WMI_HOST_REQUEST_BCN_STAT = 0x800,
  923. WMI_HOST_REQUEST_BCN_STAT_RESET = 0x1000,
  924. WMI_HOST_REQUEST_PEER_RETRY_STAT = 0x2000,
  925. } wmi_host_stats_id;
  926. typedef struct {
  927. uint16_t cfg_retry_count;
  928. uint16_t retry_count;
  929. } wmi_host_inst_rssi_args;
  930. /**
  931. * struct stats_request_params - stats_request cmd parameter
  932. * @stats_id: Bit mask of all the STATS request are specified with values from wmi_host_stats_id
  933. * @vdev_id: vdev id
  934. * @pdev_id: pdev_id
  935. * @wmi_host_inst_rssi_args: Instantaneous rssi stats args
  936. */
  937. struct stats_request_params {
  938. uint32_t stats_id;
  939. uint8_t vdev_id;
  940. uint8_t pdev_id;
  941. wmi_host_inst_rssi_args rssi_args;
  942. };
  943. /**
  944. * struct bss_chan_info_request_params - BSS chan info params
  945. * @param: parameter value
  946. */
  947. struct bss_chan_info_request_params {
  948. uint32_t param;
  949. };
  950. /**
  951. * struct wow_cmd_params - wow cmd parameter
  952. * @enable: wow enable or disable flag
  953. * @can_suspend_link: flag to indicate if link can be suspended
  954. * @pause_iface_config: interface config
  955. */
  956. struct wow_cmd_params {
  957. bool enable;
  958. bool can_suspend_link;
  959. uint8_t pause_iface_config;
  960. uint32_t flags;
  961. };
  962. /**
  963. * struct wow_add_wakeup_params - wow wakeup parameter
  964. * @type: param type
  965. */
  966. struct wow_add_wakeup_params {
  967. uint32_t type;
  968. };
  969. /**
  970. * struct wow_add_wakeup_pattern_params - Add WoW pattern params
  971. * @pattern_bytes: pointer to pattern bytes
  972. * @mask_bytes: pointer to mask bytes
  973. * @pattern_len: pattern length
  974. * @pattern_id: pattern id
  975. */
  976. struct wow_add_wakeup_pattern_params {
  977. uint8_t *pattern_bytes;
  978. uint8_t *mask_bytes;
  979. uint32_t pattern_len;
  980. uint32_t pattern_id;
  981. };
  982. /**
  983. * struct wow_remove_wakeup_pattern params - WoW remove pattern param
  984. * @pattern_bytes: pointer to pattern bytes
  985. * @mask_bytes: Mask bytes
  986. * @pattern_id: pattern identifier
  987. */
  988. struct wow_remove_wakeup_pattern_params {
  989. uint32_t *pattern_bytes;
  990. uint32_t *mask_bytes;
  991. uint32_t pattern_id;
  992. };
  993. /**
  994. * struct packet_enable_params - packet enable cmd parameter
  995. * @vdev_id: vdev id
  996. * @enable: flag to indicate if parameter can be enabled or disabled
  997. */
  998. struct packet_enable_params {
  999. uint8_t vdev_id;
  1000. bool enable;
  1001. };
  1002. /**
  1003. * struct suspend_params - suspend cmd parameter
  1004. * @disable_target_intr: disable target interrupt
  1005. */
  1006. struct suspend_params {
  1007. uint8_t disable_target_intr;
  1008. };
  1009. /**
  1010. * struct pdev_params - pdev set cmd parameter
  1011. * @param_id: parameter id
  1012. * @param_value: parameter value
  1013. */
  1014. struct pdev_params {
  1015. uint32_t param_id;
  1016. uint32_t param_value;
  1017. };
  1018. /**
  1019. * struct beacon_tmpl_params - beacon template cmd parameter
  1020. * @vdev_id: vdev id
  1021. * @tim_ie_offset: tim ie offset
  1022. * @mbssid_ie_offset: mbssid ie offset
  1023. * @tmpl_len: beacon template length
  1024. * @tmpl_len_aligned: beacon template alignment
  1025. * @csa_switch_count_offset: CSA swith count offset in beacon frame
  1026. * @ext_csa_switch_count_offset: ECSA switch count offset in beacon frame
  1027. * @esp_ie_offset: ESP IE offset in beacon frame
  1028. * @frm: beacon template parameter
  1029. */
  1030. struct beacon_tmpl_params {
  1031. uint8_t vdev_id;
  1032. uint32_t tim_ie_offset;
  1033. uint32_t mbssid_ie_offset;
  1034. uint32_t tmpl_len;
  1035. uint32_t tmpl_len_aligned;
  1036. uint32_t csa_switch_count_offset;
  1037. uint32_t ext_csa_switch_count_offset;
  1038. uint32_t esp_ie_offset;
  1039. uint8_t *frm;
  1040. };
  1041. /**
  1042. * struct beacon_params - beacon cmd parameter
  1043. * @vdev_id: vdev id
  1044. * @beaconInterval: Beacon interval
  1045. * @wbuf: beacon buffer
  1046. * @frame_ctrl: frame control field
  1047. * @bcn_txant: beacon antenna
  1048. * @is_dtim_count_zero: is it dtim beacon
  1049. * @is_bitctl_reqd: is Bit control required
  1050. * @is_high_latency: Is this high latency target
  1051. */
  1052. struct beacon_params {
  1053. uint8_t vdev_id;
  1054. uint16_t beaconInterval;
  1055. qdf_nbuf_t wbuf;
  1056. uint16_t frame_ctrl;
  1057. uint32_t bcn_txant;
  1058. bool is_dtim_count_zero;
  1059. bool is_bitctl_reqd;
  1060. bool is_high_latency;
  1061. };
  1062. /**
  1063. * struct fd_params - FD cmd parameter
  1064. * @vdev_id: vdev id
  1065. * @wbuf: FD buffer
  1066. * @frame_ctrl: frame control field
  1067. */
  1068. struct fd_params {
  1069. uint8_t vdev_id;
  1070. qdf_nbuf_t wbuf;
  1071. uint16_t frame_ctrl;
  1072. };
  1073. /**
  1074. * struct bcn_prb_template_params - beacon probe template parameter
  1075. * @vdev_id: vdev id
  1076. * @buf_len: Template length
  1077. * @caps: capabilities field
  1078. * @erp: ERP field
  1079. */
  1080. struct bcn_prb_template_params {
  1081. uint8_t vdev_id;
  1082. int buf_len;
  1083. uint16_t caps;
  1084. uint8_t erp;
  1085. };
  1086. #define WMI_MAX_SUPPORTED_RATES 128
  1087. /**
  1088. * struct target_rate_set - Rate set bitmap
  1089. * @num_rate: number of rates in rates bitmap
  1090. * @rates: rates (each 8bit value) packed into a 32 bit word.
  1091. * the rates are filled from least significant byte to most
  1092. * significant byte.
  1093. */
  1094. typedef struct {
  1095. uint32_t num_rates;
  1096. uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1];
  1097. } target_rate_set;
  1098. #define WMI_HOST_MAX_NUM_SS 8
  1099. #define WMI_HOST_MAX_HECAP_PHY_SIZE 3
  1100. #define WMI_HOST_MAX_HECAP_MAC_SIZE 2
  1101. #define WMI_HOST_HECAP_MAC_WORD1 0
  1102. #define WMI_HOST_HECAP_MAC_WORD2 1
  1103. #define WMI_HOST_MAX_HE_RATE_SET 3
  1104. /**
  1105. * struct wmi_host_ppe_threshold -PPE threshold
  1106. * @numss_m1: NSS - 1
  1107. * @ru_bit_mask: RU bit mask indicating the supported RU's
  1108. * @ppet16_ppet8_ru3_ru0: ppet8 and ppet16 for max num ss
  1109. */
  1110. struct wmi_host_ppe_threshold {
  1111. uint32_t numss_m1;
  1112. uint32_t ru_bit_mask;
  1113. uint32_t ppet16_ppet8_ru3_ru0[WMI_HOST_MAX_NUM_SS];
  1114. };
  1115. /**
  1116. * struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr
  1117. * @mac_addr31to0: upper 4 bytes of MAC address
  1118. * @mac_addr47to32: lower 2 bytes of MAC address
  1119. */
  1120. typedef struct {
  1121. uint32_t mac_addr31to0;
  1122. uint32_t mac_addr47to32;
  1123. } wmi_host_mac_addr;
  1124. /**
  1125. * struct peer_assoc_params - peer assoc cmd parameter
  1126. * @peer_macaddr: peer mac address
  1127. * @vdev_id: vdev id
  1128. * @peer_new_assoc: peer association type
  1129. * @peer_associd: peer association id
  1130. * @peer_flags: peer flags
  1131. * @peer_caps: peer capabalities
  1132. * @peer_listen_intval: peer listen interval
  1133. * @peer_ht_caps: HT capabalities
  1134. * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k
  1135. * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4)
  1136. * @peer_rate_caps: peer rate capabalities
  1137. * @peer_nss: peer nss
  1138. * @peer_phymode: peer phymode
  1139. * @peer_ht_info: peer HT info
  1140. * @peer_legacy_rates: peer legacy rates
  1141. * @peer_ht_rates: peer ht rates
  1142. * @rx_max_rate: max rx rates
  1143. * @rx_mcs_set: rx mcs
  1144. * @tx_max_rate: max tx rates
  1145. * @tx_mcs_set: tx mcs
  1146. * @vht_capable: VHT capabalities
  1147. * @tx_max_mcs_nss: max tx MCS and NSS
  1148. * @peer_bw_rxnss_override: Peer BW RX NSS overridden or not.
  1149. * @is_pmf_enabled: PMF enabled
  1150. * @is_wme_set: WME enabled
  1151. * @qos_flag: QoS Flags
  1152. * @apsd_flag: APSD flags
  1153. * @ht_flag: HT flags
  1154. * @bw_40: 40 capabale
  1155. * @bw_80: 80 capabale
  1156. * @bw_160: 160 capabale
  1157. * @stbc_flag: STBC flag
  1158. * @ldpc_flag: LDPC flag
  1159. * @static_mimops_flag: statis MIMO PS flags
  1160. * @dynamic_mimops_flag: Dynamic MIMO PS flags
  1161. * @spatial_mux_flag: spatial MUX flags
  1162. * @vht_flag: VHT flags
  1163. * @vht_ng_flag: VHT on 11N/G flags
  1164. * @need_ptk_4_way: Needs 4 way handshake
  1165. * @need_gtk_2_way: Needs 2 way GTK
  1166. * @auth_flag: Is peer authenticated
  1167. * @safe_mode_enabled: Safe enabled for this peer
  1168. * @amsdu_disable: AMSDU disble
  1169. * @peer_mac: Peer mac address
  1170. * @he_flag: HE flags
  1171. * @twt_requester: TWT Requester Support bit in Extended Capabilities element
  1172. * @twt_responder: TWT Responder Support bit in Extended Capabilities element
  1173. * @peer_he_cap_macinfo: Peer HE Cap MAC info
  1174. * @peer_he_ops: Peer HE operation info
  1175. * @peer_he_cap_phyinfo: Peer HE Cap PHY info
  1176. * @peer_he_mcs_count: Peer HE MCS TX/RX MAP count
  1177. * @peer_he_rx_mcs_set: Peer HE RX MCS MAP
  1178. * @peer_he_tx_mcs_set: Peer HE TX MCS MAP
  1179. * @peer_ppet: Peer HE PPET info
  1180. */
  1181. struct peer_assoc_params {
  1182. wmi_host_mac_addr peer_macaddr;
  1183. uint32_t vdev_id;
  1184. uint32_t peer_new_assoc;
  1185. uint32_t peer_associd;
  1186. uint32_t peer_flags;
  1187. uint32_t peer_caps;
  1188. uint32_t peer_listen_intval;
  1189. uint32_t peer_ht_caps;
  1190. uint32_t peer_max_mpdu;
  1191. uint32_t peer_mpdu_density;
  1192. uint32_t peer_rate_caps;
  1193. uint32_t peer_nss;
  1194. uint32_t peer_vht_caps;
  1195. uint32_t peer_phymode;
  1196. uint32_t peer_ht_info[2];
  1197. target_rate_set peer_legacy_rates;
  1198. target_rate_set peer_ht_rates;
  1199. uint32_t rx_max_rate;
  1200. uint32_t rx_mcs_set;
  1201. uint32_t tx_max_rate;
  1202. uint32_t tx_mcs_set;
  1203. uint8_t vht_capable;
  1204. uint32_t peer_bw_rxnss_override;
  1205. #ifndef CONFIG_MCL
  1206. uint32_t tx_max_mcs_nss;
  1207. bool is_pmf_enabled;
  1208. bool is_wme_set;
  1209. bool qos_flag;
  1210. bool apsd_flag;
  1211. bool ht_flag;
  1212. bool bw_40;
  1213. bool bw_80;
  1214. bool bw_160;
  1215. bool stbc_flag;
  1216. bool ldpc_flag;
  1217. bool static_mimops_flag;
  1218. bool dynamic_mimops_flag;
  1219. bool spatial_mux_flag;
  1220. bool vht_flag;
  1221. bool vht_ng_flag;
  1222. bool need_ptk_4_way;
  1223. bool need_gtk_2_way;
  1224. bool auth_flag;
  1225. bool safe_mode_enabled;
  1226. bool amsdu_disable;
  1227. /* Use common structure */
  1228. uint8_t peer_mac[IEEE80211_ADDR_LEN];
  1229. #endif
  1230. bool he_flag;
  1231. bool twt_requester;
  1232. bool twt_responder;
  1233. uint32_t peer_he_cap_macinfo[WMI_HOST_MAX_HECAP_MAC_SIZE];
  1234. uint32_t peer_he_ops;
  1235. uint32_t peer_he_cap_phyinfo[WMI_HOST_MAX_HECAP_PHY_SIZE];
  1236. uint32_t peer_he_mcs_count;
  1237. uint32_t peer_he_rx_mcs_set[WMI_HOST_MAX_HE_RATE_SET];
  1238. uint32_t peer_he_tx_mcs_set[WMI_HOST_MAX_HE_RATE_SET];
  1239. struct wmi_host_ppe_threshold peer_ppet;
  1240. };
  1241. /**
  1242. * struct sta_ps_params - sta ps cmd parameter
  1243. * @vdev_id: vdev id
  1244. * @param: sta ps parameter
  1245. * @value: sta ps parameter value
  1246. */
  1247. struct sta_ps_params {
  1248. uint32_t vdev_id;
  1249. uint32_t param;
  1250. uint32_t value;
  1251. };
  1252. /**
  1253. * struct ap_ps_params - ap ps cmd parameter
  1254. * @vdev_id: vdev id
  1255. * @param: ap ps parameter
  1256. * @value: ap ps parameter value
  1257. */
  1258. struct ap_ps_params {
  1259. uint32_t vdev_id;
  1260. uint32_t param;
  1261. uint32_t value;
  1262. };
  1263. #define WMI_HOST_SCAN_CHAN_FREQ_SHIFT 0
  1264. #define WMI_HOST_SCAN_CHAN_FREQ_MASK 0xffff
  1265. #define WMI_HOST_SCAN_CHAN_MODE_SHIFT 16
  1266. #define WMI_HOST_SCAN_CHAN_MODE_MASK 0xff
  1267. #define WMI_HOST_MAX_CHANS_PER_WMI_CMD 58
  1268. /**
  1269. * struct scan_chan_list_params - scan channel list cmd parameter
  1270. * @num_scan_chans: no of scan channels
  1271. * @chan_info: pointer to wmi channel info
  1272. */
  1273. #ifdef CONFIG_MCL
  1274. /* TODO: This needs clean-up based on how its processed. */
  1275. typedef struct {
  1276. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1277. uint32_t tlv_header;
  1278. /** primary 20 MHz channel frequency in mhz */
  1279. uint32_t mhz;
  1280. /** Center frequency 1 in MHz*/
  1281. uint32_t band_center_freq1;
  1282. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1283. uint32_t band_center_freq2;
  1284. /** channel info described below */
  1285. uint32_t info;
  1286. /** contains min power, max power, reg power and reg class id. */
  1287. uint32_t reg_info_1;
  1288. /** contains antennamax */
  1289. uint32_t reg_info_2;
  1290. } wmi_channel_param;
  1291. struct scan_chan_list_params {
  1292. uint32_t pdev_id;
  1293. uint8_t num_scan_chans;
  1294. wmi_channel_param *chan_info;
  1295. };
  1296. #else
  1297. /**
  1298. * struct scan_chan_list_params - scan channel list cmd parameter
  1299. * @pdev_id: pdev_id
  1300. * @num_chan: no of scan channels
  1301. * @nallchans: nall chans
  1302. * @append: append to existing chan list
  1303. * @ch_param: pointer to channel_paramw
  1304. */
  1305. struct scan_chan_list_params {
  1306. uint32_t pdev_id;
  1307. uint16_t nallchans;
  1308. bool append;
  1309. struct channel_param ch_param[1];
  1310. };
  1311. #endif
  1312. /**
  1313. * struct multiple_vdev_restart_params - Multiple vdev restart cmd parameter
  1314. * @pdev_id: Pdev identifier
  1315. * @requestor_id: Unique id identifying the module
  1316. * @disable_hw_ack: Flag to indicate disabling HW ACK during CAC
  1317. * @cac_duration_ms: CAC duration on the given channel
  1318. * @num_vdevs: No. of vdevs that need to be restarted
  1319. * @ch_param: Pointer to channel_param
  1320. * @vdev_ids: Pointer to array of vdev_ids
  1321. */
  1322. struct multiple_vdev_restart_params {
  1323. uint32_t pdev_id;
  1324. uint32_t requestor_id;
  1325. uint32_t disable_hw_ack;
  1326. uint32_t cac_duration_ms;
  1327. uint32_t num_vdevs;
  1328. struct channel_param ch_param;
  1329. uint32_t vdev_ids[WMI_HOST_PDEV_MAX_VDEVS];
  1330. };
  1331. /**
  1332. * struct fw_hang_params - fw hang command parameters
  1333. * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full
  1334. * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)
  1335. */
  1336. struct fw_hang_params {
  1337. uint32_t type;
  1338. uint32_t delay_time_ms;
  1339. };
  1340. /**
  1341. * struct pdev_utf_params - pdev utf command parameters
  1342. * @utf_payload:
  1343. * @len:
  1344. * @is_ar900b: is it 900b target
  1345. */
  1346. struct pdev_utf_params {
  1347. uint8_t *utf_payload;
  1348. uint32_t len;
  1349. #ifndef CONFIG_MCL
  1350. bool is_ar900b;
  1351. #endif
  1352. };
  1353. /*Adding this due to dependency on wmi_unified.h
  1354. */
  1355. typedef struct {
  1356. uint32_t len;
  1357. uint32_t msgref;
  1358. uint32_t segmentInfo;
  1359. } QVIT_SEG_HDR_INFO_STRUCT;
  1360. struct pdev_qvit_params {
  1361. uint8_t *utf_payload;
  1362. uint32_t len;
  1363. };
  1364. /**
  1365. * struct crash_inject - crash inject command parameters
  1366. * @type: crash inject type
  1367. * @delay_time_ms: time in milliseconds for FW to delay the crash
  1368. */
  1369. struct crash_inject {
  1370. uint32_t type;
  1371. uint32_t delay_time_ms;
  1372. };
  1373. /**
  1374. * struct dbglog_params - fw deboglog command parameters
  1375. * @param: command parameter
  1376. * @val: parameter value
  1377. * @module_id_bitmap: fixed length module id bitmap
  1378. * @bitmap_len: module id bitmap length
  1379. * @cfgvalid: cfgvalid
  1380. */
  1381. struct dbglog_params {
  1382. uint32_t param;
  1383. uint32_t val;
  1384. uint32_t *module_id_bitmap;
  1385. uint32_t bitmap_len;
  1386. #ifndef CONFIG_MCL
  1387. uint32_t cfgvalid[2];
  1388. #endif
  1389. };
  1390. /**
  1391. * struct seg_hdr_info - header info
  1392. * @len: length
  1393. * @msgref: message reference
  1394. * @segmentInfo: segment info
  1395. * @pad: padding
  1396. */
  1397. struct seg_hdr_info {
  1398. uint32_t len;
  1399. uint32_t msgref;
  1400. uint32_t segmentInfo;
  1401. uint32_t pad;
  1402. };
  1403. /**
  1404. * struct tx_send_params - TX parameters
  1405. * @pwr: Tx frame transmission power
  1406. * @mcs_mask: Modulation and coding index mask for transmission
  1407. * bit 0 -> CCK 1 Mbps rate is allowed
  1408. * bit 1 -> CCK 2 Mbps rate is allowed
  1409. * bit 2 -> CCK 5.5 Mbps rate is allowed
  1410. * bit 3 -> CCK 11 Mbps rate is allowed
  1411. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  1412. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  1413. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  1414. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  1415. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  1416. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  1417. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  1418. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  1419. * @nss_mask: Spatial streams permitted
  1420. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  1421. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  1422. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  1423. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  1424. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  1425. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  1426. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  1427. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  1428. * If no bits are set, target will choose what NSS type to use
  1429. * @retry_limit: Maximum number of retries before ACK
  1430. * @chain_mask: Chains to be used for transmission
  1431. * @bw_mask: Bandwidth to be used for transmission
  1432. * bit 0 -> 5MHz
  1433. * bit 1 -> 10MHz
  1434. * bit 2 -> 20MHz
  1435. * bit 3 -> 40MHz
  1436. * bit 4 -> 80MHz
  1437. * bit 5 -> 160MHz
  1438. * bit 6 -> 80_80MHz
  1439. * @preamble_type: Preamble types for transmission
  1440. * bit 0: if set, OFDM
  1441. * bit 1: if set, CCK
  1442. * bit 2: if set, HT
  1443. * bit 3: if set, VHT
  1444. * bit 4: if set, HE
  1445. * @frame_type: Data or Management frame
  1446. * Data:1 Mgmt:0
  1447. */
  1448. struct tx_send_params {
  1449. uint32_t pwr:8,
  1450. mcs_mask:12,
  1451. nss_mask:8,
  1452. retry_limit:4;
  1453. uint32_t chain_mask:8,
  1454. bw_mask:7,
  1455. preamble_type:5,
  1456. frame_type:1,
  1457. reserved:11;
  1458. };
  1459. /**
  1460. * struct wmi_mgmt_params - wmi mgmt cmd parameters
  1461. * @tx_frame: management tx frame
  1462. * @frm_len: frame length
  1463. * @vdev_id: vdev id
  1464. * @chanfreq: channel frequency
  1465. * @pdata: frame data
  1466. * @desc_id: descriptor id relyaed back by target
  1467. * @macaddr: macaddr of peer
  1468. * @qdf_ctx: qdf context for qdf_nbuf_map
  1469. * @tx_param: TX send parameters
  1470. * @tx_params_valid: Flag that indicates if TX params are valid
  1471. * @use_6mbps: specify whether management frame to transmit should
  1472. * use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P)
  1473. * @tx_type: type of management frame (determines what callback to use)
  1474. */
  1475. struct wmi_mgmt_params {
  1476. void *tx_frame;
  1477. uint16_t frm_len;
  1478. uint8_t vdev_id;
  1479. uint16_t chanfreq;
  1480. void *pdata;
  1481. uint16_t desc_id;
  1482. uint8_t *macaddr;
  1483. void *qdf_ctx;
  1484. struct tx_send_params tx_param;
  1485. bool tx_params_valid;
  1486. uint8_t use_6mbps;
  1487. uint8_t tx_type;
  1488. };
  1489. /**
  1490. * struct wmi_offchan_data_tx_params - wmi offchan data tx cmd parameters
  1491. * @tx_frame: management tx frame
  1492. * @frm_len: frame length
  1493. * @vdev_id: vdev id
  1494. * @chanfreq: channel frequency
  1495. * @pdata: frame data
  1496. * @desc_id: descriptor id relyaed back by target
  1497. * @macaddr: macaddr of peer
  1498. * @qdf_ctx: qdf context for qdf_nbuf_map
  1499. * @tx_param: TX send parameters
  1500. * @tx_params_valid: Flag that indicates if TX params are valid
  1501. */
  1502. struct wmi_offchan_data_tx_params {
  1503. void *tx_frame;
  1504. uint16_t frm_len;
  1505. uint8_t vdev_id;
  1506. uint16_t chanfreq;
  1507. void *pdata;
  1508. uint16_t desc_id;
  1509. uint8_t *macaddr;
  1510. void *qdf_ctx;
  1511. struct tx_send_params tx_param;
  1512. bool tx_params_valid;
  1513. };
  1514. #ifndef CONVERGED_TDLS_ENABLE
  1515. /**
  1516. * struct sta_uapsd_params - uapsd auto trig params
  1517. * @wmm_ac: WMM access category from 0 to 3
  1518. * @user_priority: User priority to use in trigger frames
  1519. * @service_interval: service interval
  1520. * @suspend_interval: suspend interval
  1521. * @delay_interval: delay interval
  1522. */
  1523. struct sta_uapsd_params {
  1524. uint32_t wmm_ac;
  1525. uint32_t user_priority;
  1526. uint32_t service_interval;
  1527. uint32_t suspend_interval;
  1528. uint32_t delay_interval;
  1529. };
  1530. /**
  1531. * struct ta_uapsd_trig_params - uapsd trigger parameter
  1532. * @vdevid: vdev id
  1533. * @peer_addr: peer address
  1534. * @auto_triggerparam: trigger parameters
  1535. * @num_ac: no of access category
  1536. */
  1537. struct sta_uapsd_trig_params {
  1538. uint32_t vdevid;
  1539. uint8_t peer_addr[IEEE80211_ADDR_LEN];
  1540. struct sta_uapsd_params *auto_triggerparam;
  1541. uint32_t num_ac;
  1542. };
  1543. #endif
  1544. #define WMI_NUM_AC (4)
  1545. #define WMI_MAX_NUM_AC 4
  1546. enum wmi_peer_rate_report_cond_phy_type {
  1547. WMI_PEER_RATE_REPORT_COND_11B = 0,
  1548. WMI_PEER_RATE_REPORT_COND_11A_G,
  1549. WMI_PEER_RATE_REPORT_COND_11N,
  1550. WMI_PEER_RATE_REPORT_COND_11AC,
  1551. WMI_PEER_RATE_REPORT_COND_MAX_NUM
  1552. };
  1553. /**
  1554. * struct report_rate_delta - peer specific parameters
  1555. * @percent: percentage
  1556. * @delta_min: rate min delta
  1557. */
  1558. struct report_rate_delta {
  1559. uint32_t percent; /* in unit of 12.5% */
  1560. uint32_t delta_min; /* in unit of Mbps */
  1561. };
  1562. /**
  1563. * struct report_rate_per_phy - per phy report parameters
  1564. * @cond_flags: condition flag val
  1565. * @delta: rate delta
  1566. * @report_rate_threshold: rate threshold
  1567. */
  1568. struct report_rate_per_phy {
  1569. /*
  1570. * PEER_RATE_REPORT_COND_FLAG_DELTA,
  1571. * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  1572. * Any of these two conditions or both of
  1573. * them can be set.
  1574. */
  1575. uint32_t cond_flags;
  1576. struct report_rate_delta delta;
  1577. /*
  1578. * In unit of Mbps. There are at most 4 thresholds
  1579. * If the threshold count is less than 4, set zero to
  1580. * the one following the last threshold
  1581. */
  1582. uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH];
  1583. };
  1584. /**
  1585. * struct peer_rate_report_params - peer rate report parameters
  1586. * @rate_report_enable: enable rate report param
  1587. * @backoff_time: backoff time
  1588. * @timer_period: timer
  1589. * @report_per_phy: report per phy type
  1590. */
  1591. struct wmi_peer_rate_report_params {
  1592. uint32_t rate_report_enable;
  1593. uint32_t backoff_time; /* in unit of msecond */
  1594. uint32_t timer_period; /* in unit of msecond */
  1595. /*
  1596. *In the following field, the array index means the phy type,
  1597. * please see enum wmi_peer_rate_report_cond_phy_type for detail
  1598. */
  1599. struct report_rate_per_phy report_per_phy[
  1600. WMI_PEER_RATE_REPORT_COND_MAX_NUM];
  1601. };
  1602. /**
  1603. * struct t_thermal_cmd_params - thermal command parameters
  1604. * @min_temp: minimum temprature
  1605. * @max_temp: maximum temprature
  1606. * @thermal_enable: thermal enable
  1607. */
  1608. struct thermal_cmd_params {
  1609. uint16_t min_temp;
  1610. uint16_t max_temp;
  1611. uint8_t thermal_enable;
  1612. };
  1613. #define WMI_LRO_IPV4_SEED_ARR_SZ 5
  1614. #define WMI_LRO_IPV6_SEED_ARR_SZ 11
  1615. /**
  1616. * struct wmi_lro_config_cmd_t - set LRO init parameters
  1617. * @lro_enable: indicates whether lro is enabled
  1618. * @tcp_flag: If the TCP flags from the packet do not match
  1619. * the values in this field after masking with TCP flags mask
  1620. * below, packet is not LRO eligible
  1621. * @tcp_flag_mask: field for comparing the TCP values provided
  1622. * above with the TCP flags field in the received packet
  1623. * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
  1624. * 5-tuple toeplitz hash for ipv4 packets
  1625. * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
  1626. * 5-tuple toeplitz hash for ipv6 packets
  1627. * @pdev_id: radio on which lro hash is configured
  1628. */
  1629. struct wmi_lro_config_cmd_t {
  1630. uint32_t lro_enable;
  1631. uint32_t tcp_flag:9,
  1632. tcp_flag_mask:9;
  1633. uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ];
  1634. uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ];
  1635. uint32_t pdev_id;
  1636. };
  1637. /**
  1638. * struct wmi_probe_resp_params - send probe response parameters
  1639. * @prb_rsp_template_frm: pointer to template probe response template
  1640. * @prb_rsp_template_len: length of probe response template
  1641. */
  1642. struct wmi_probe_resp_params {
  1643. uint8_t *prb_rsp_template_frm;
  1644. uint32_t prb_rsp_template_len;
  1645. };
  1646. /* struct set_key_params: structure containing
  1647. * installation key parameters
  1648. * @vdev_id: vdev id
  1649. * @key_len: key length
  1650. * @key_idx: key index
  1651. * @peer_mac: peer mac address
  1652. * @key_flags: key flags, 0:pairwise key, 1:group key, 2:static key
  1653. * @key_cipher: key cipher based on security mode
  1654. * @key_txmic_len: tx mic length
  1655. * @key_rxmic_len: rx mic length
  1656. * @key_tsc_counter: key tx sc counter
  1657. * @key_rsc_counter: key rx sc counter
  1658. * @rx_iv: receive IV, applicable only in case of WAPI
  1659. * @tx_iv: transmit IV, applicable only in case of WAPI
  1660. * @key_data: key data
  1661. */
  1662. struct set_key_params {
  1663. uint8_t vdev_id;
  1664. uint16_t key_len;
  1665. uint32_t key_idx;
  1666. uint8_t peer_mac[IEEE80211_ADDR_LEN];
  1667. uint32_t key_flags;
  1668. uint32_t key_cipher;
  1669. uint32_t key_txmic_len;
  1670. uint32_t key_rxmic_len;
  1671. uint64_t key_tsc_counter;
  1672. uint64_t *key_rsc_counter;
  1673. #if defined(ATH_SUPPORT_WAPI) || defined(FEATURE_WLAN_WAPI)
  1674. uint8_t rx_iv[16];
  1675. uint8_t tx_iv[16];
  1676. #endif
  1677. uint8_t key_data[WMI_MAC_MAX_KEY_LENGTH];
  1678. };
  1679. /**
  1680. * struct scan_mac_oui - oui parameters
  1681. * @oui: oui parameters
  1682. * @vdev_id: interface id
  1683. * @enb_probe_req_sno_randomization: control probe req sequence no randomization
  1684. * @ie_whitelist: probe req IE whitelist attrs
  1685. */
  1686. struct scan_mac_oui {
  1687. uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH];
  1688. uint32_t vdev_id;
  1689. bool enb_probe_req_sno_randomization;
  1690. struct probe_req_whitelist_attr ie_whitelist;
  1691. };
  1692. #define WMI_PASSPOINT_REALM_LEN 256
  1693. #define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  1694. #define WMI_PASSPOINT_PLMN_LEN 3
  1695. /**
  1696. * struct wifi_passpoint_network_param - passpoint network block
  1697. * @id: identifier of this network block
  1698. * @realm: null terminated UTF8 encoded realm, 0 if unspecified
  1699. * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified
  1700. * @plmn: mcc/mnc combination as per rules, 0s if unspecified
  1701. */
  1702. struct wifi_passpoint_network_param {
  1703. uint32_t id;
  1704. uint8_t realm[WMI_PASSPOINT_REALM_LEN];
  1705. int64_t roaming_consortium_ids[WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM];
  1706. uint8_t plmn[WMI_PASSPOINT_PLMN_LEN];
  1707. };
  1708. /**
  1709. * struct wifi_passpoint_req_param - passpoint request
  1710. * @request_id: request identifier
  1711. * @vdev_id: vdev that is the target of the request
  1712. * @num_networks: number of valid entries in @networks
  1713. * @networks: passpoint networks
  1714. */
  1715. struct wifi_passpoint_req_param {
  1716. uint32_t request_id;
  1717. uint32_t vdev_id;
  1718. uint32_t num_networks;
  1719. struct wifi_passpoint_network_param networks[];
  1720. };
  1721. /* struct mobility_domain_info - structure containing
  1722. * mobility domain info
  1723. * @mdie_present: mobility domain present or not
  1724. * @mobility_domain: mobility domain
  1725. */
  1726. struct mobility_domain_info {
  1727. uint8_t mdie_present;
  1728. uint16_t mobility_domain;
  1729. };
  1730. #define WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET (16)
  1731. /* This TLV will be filled only in case roam offload
  1732. * for wpa2-psk/pmkid/ese/11r is enabled */
  1733. typedef struct {
  1734. /*
  1735. * TLV tag and len; tag equals
  1736. * WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param
  1737. */
  1738. uint32_t tlv_header;
  1739. uint32_t rssi_cat_gap; /* gap for every category bucket */
  1740. uint32_t prefer_5g; /* prefer select 5G candidate */
  1741. uint32_t select_5g_margin;
  1742. uint32_t reassoc_failure_timeout; /* reassoc failure timeout */
  1743. uint32_t capability;
  1744. uint32_t ht_caps_info;
  1745. uint32_t ampdu_param;
  1746. uint32_t ht_ext_cap;
  1747. uint32_t ht_txbf;
  1748. uint32_t asel_cap;
  1749. uint32_t qos_enabled;
  1750. uint32_t qos_caps;
  1751. uint32_t wmm_caps;
  1752. /* since this is 4 byte aligned, we don't declare it as tlv array */
  1753. uint32_t mcsset[WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET >> 2];
  1754. uint32_t ho_delay_for_rx;
  1755. uint32_t roam_preauth_retry_count;
  1756. uint32_t roam_preauth_no_ack_timeout;
  1757. } roam_offload_param;
  1758. #define WMI_FILS_MAX_RRK_LENGTH 64
  1759. #define WMI_FILS_MAX_RIK_LENGTH WMI_FILS_MAX_RRK_LENGTH
  1760. #define WMI_FILS_MAX_REALM_LENGTH 256
  1761. #define WMI_FILS_MAX_USERNAME_LENGTH 16
  1762. /**
  1763. * struct roam_fils_params - Roam FILS params
  1764. * @username: username
  1765. * @username_length: username length
  1766. * @next_erp_seq_num: next ERP sequence number
  1767. * @rrk: RRK
  1768. * @rrk_length: length of @rrk
  1769. * @rik: RIK
  1770. * @rik_length: length of @rik
  1771. * @realm: realm
  1772. * @realm_len: length of @realm
  1773. */
  1774. struct roam_fils_params {
  1775. uint8_t username[WMI_FILS_MAX_USERNAME_LENGTH];
  1776. uint32_t username_length;
  1777. uint32_t next_erp_seq_num;
  1778. uint8_t rrk[WMI_FILS_MAX_RRK_LENGTH];
  1779. uint32_t rrk_length;
  1780. uint8_t rik[WMI_FILS_MAX_RIK_LENGTH];
  1781. uint32_t rik_length;
  1782. uint8_t realm[WMI_FILS_MAX_REALM_LENGTH];
  1783. uint32_t realm_len;
  1784. };
  1785. /* struct roam_offload_scan_params - structure
  1786. * containing roaming offload scan parameters
  1787. * @is_roam_req_valid: flag to tell whether roam req
  1788. * is valid or NULL
  1789. * @mode: stores flags for scan
  1790. * @vdev_id: vdev id
  1791. * @roam_offload_enabled: flag for offload enable
  1792. * @psk_pmk: pre shared key/pairwise master key
  1793. * @pmk_len: length of PMK
  1794. * @prefer_5ghz: prefer select 5G candidate
  1795. * @roam_rssi_cat_gap: gap for every category bucket
  1796. * @select_5ghz_margin: select 5 Ghz margin
  1797. * @krk: KRK
  1798. * @btk: BTK
  1799. * @reassoc_failure_timeout: reassoc failure timeout
  1800. * @rokh_id_length: r0kh id length
  1801. * @rokh_id: r0kh id
  1802. * @roam_key_mgmt_offload_enabled: roam offload flag
  1803. * @auth_mode: authentication mode
  1804. * @fw_okc: use OKC in firmware
  1805. * @fw_pmksa_cache: use PMKSA cache in firmware
  1806. * @is_ese_assoc: flag to determine ese assoc
  1807. * @mdid: mobility domain info
  1808. * @roam_offload_params: roam offload tlv params
  1809. * @min_delay_btw_roam_scans: Delay btw two scans
  1810. * @roam_trigger_reason_bitmask: Roam reason bitmark
  1811. * @assoc_ie_length: Assoc IE length
  1812. * @assoc_ie: Assoc IE buffer
  1813. * @add_fils_tlv: add FILS TLV boolean
  1814. * @roam_fils_params: roam fils params
  1815. */
  1816. struct roam_offload_scan_params {
  1817. uint8_t is_roam_req_valid;
  1818. uint32_t mode;
  1819. uint32_t vdev_id;
  1820. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  1821. uint8_t roam_offload_enabled;
  1822. uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE];
  1823. uint32_t pmk_len;
  1824. uint8_t prefer_5ghz;
  1825. uint8_t roam_rssi_cat_gap;
  1826. uint8_t select_5ghz_margin;
  1827. uint8_t krk[WMI_KRK_KEY_LEN];
  1828. uint8_t btk[WMI_BTK_KEY_LEN];
  1829. uint32_t reassoc_failure_timeout;
  1830. uint32_t rokh_id_length;
  1831. uint8_t rokh_id[WMI_ROAM_R0KH_ID_MAX_LEN];
  1832. uint8_t roam_key_mgmt_offload_enabled;
  1833. int auth_mode;
  1834. bool fw_okc;
  1835. bool fw_pmksa_cache;
  1836. #endif
  1837. uint32_t min_delay_btw_roam_scans;
  1838. uint32_t roam_trigger_reason_bitmask;
  1839. bool is_ese_assoc;
  1840. bool is_11r_assoc;
  1841. struct mobility_domain_info mdid;
  1842. #ifdef CONFIG_MCL
  1843. /* THis is not available in non tlv target.
  1844. * please remove this and replace with a host based
  1845. * structure */
  1846. roam_offload_param roam_offload_params;
  1847. #endif
  1848. uint32_t assoc_ie_length;
  1849. uint8_t assoc_ie[MAX_ASSOC_IE_LENGTH];
  1850. bool add_fils_tlv;
  1851. #ifdef WLAN_FEATURE_FILS_SK
  1852. struct roam_fils_params roam_fils_params;
  1853. #endif
  1854. };
  1855. /**
  1856. * struct wifi_epno_network - enhanced pno network block
  1857. * @ssid: ssid
  1858. * @rssi_threshold: threshold for considering this SSID as found, required
  1859. * granularity for this threshold is 4dBm to 8dBm
  1860. * @flags: WIFI_PNO_FLAG_XXX
  1861. * @auth_bit_field: auth bit field for matching WPA IE
  1862. */
  1863. struct wifi_epno_network_params {
  1864. struct mac_ssid ssid;
  1865. int8_t rssi_threshold;
  1866. uint8_t flags;
  1867. uint8_t auth_bit_field;
  1868. };
  1869. /**
  1870. * struct wifi_enhanced_pno_params - enhanced pno network params
  1871. * @request_id: request id number
  1872. * @vdev_id: vdev id
  1873. * @min_5ghz_rssi: minimum 5GHz RSSI for a BSSID to be considered
  1874. * @min_24ghz_rssi: minimum 2.4GHz RSSI for a BSSID to be considered
  1875. * @initial_score_max: maximum score that a network can have before bonuses
  1876. * @current_connection_bonus: only report when there is a network's score this
  1877. * much higher than the current connection
  1878. * @same_network_bonus: score bonus for all n/w with the same network flag
  1879. * @secure_bonus: score bonus for networks that are not open
  1880. * @band_5ghz_bonus: 5GHz RSSI score bonus (applied to all 5GHz networks)
  1881. * @num_networks: number of ssids
  1882. * @networks: EPNO networks
  1883. */
  1884. struct wifi_enhanced_pno_params {
  1885. uint32_t request_id;
  1886. uint32_t vdev_id;
  1887. uint32_t min_5ghz_rssi;
  1888. uint32_t min_24ghz_rssi;
  1889. uint32_t initial_score_max;
  1890. uint32_t current_connection_bonus;
  1891. uint32_t same_network_bonus;
  1892. uint32_t secure_bonus;
  1893. uint32_t band_5ghz_bonus;
  1894. uint32_t num_networks;
  1895. struct wifi_epno_network_params networks[];
  1896. };
  1897. enum {
  1898. WMI_AP_RX_DATA_OFFLOAD = 0x00,
  1899. WMI_STA_RX_DATA_OFFLOAD = 0x01,
  1900. };
  1901. /**
  1902. * enum extscan_configuration_flags - extscan config flags
  1903. * @WMI_EXTSCAN_LP_EXTENDED_BATCHING: extended batching
  1904. */
  1905. enum wmi_extscan_configuration_flags {
  1906. WMI_EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001,
  1907. };
  1908. /**
  1909. * enum extscan_report_events_type - extscan report events type
  1910. * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full
  1911. * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan
  1912. * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results
  1913. * (beacons/probe responses + IEs)
  1914. * in real time to HAL, in addition to completion events.
  1915. * Note: To keep backward compatibility,
  1916. * fire completion events regardless of REPORT_EVENTS_EACH_SCAN.
  1917. * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
  1918. * 0 => batching, 1 => no batching
  1919. */
  1920. enum wmi_extscan_report_events_type {
  1921. WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00,
  1922. WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01,
  1923. WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02,
  1924. WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04,
  1925. };
  1926. /**
  1927. * struct extscan_capabilities_params - ext scan capablities
  1928. * @request_id: request_id
  1929. * @vdev_id: vdev id
  1930. */
  1931. struct extscan_capabilities_params {
  1932. uint32_t request_id;
  1933. uint8_t vdev_id;
  1934. };
  1935. /**
  1936. * struct extscan_capabilities_reset_params - ext scan capablities reset
  1937. * parameter
  1938. * @request_id: request_id
  1939. * @vdev_id: vdev id
  1940. */
  1941. struct extscan_capabilities_reset_params {
  1942. uint32_t request_id;
  1943. uint8_t vdev_id;
  1944. };
  1945. /**
  1946. * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter
  1947. * @request_id: request_id
  1948. * @vdev_id: vdev id
  1949. */
  1950. struct extscan_bssid_hotlist_reset_params {
  1951. uint32_t request_id;
  1952. uint8_t vdev_id;
  1953. };
  1954. /**
  1955. * struct extscan_stop_req_params - ext scan stop parameter
  1956. * @request_id: request_id
  1957. * @vdev_id: vdev id
  1958. */
  1959. struct extscan_stop_req_params {
  1960. uint32_t request_id;
  1961. uint8_t vdev_id;
  1962. };
  1963. /**
  1964. * struct ap_threshold_params - ap threshold parameter
  1965. * @bssid: mac address
  1966. * @low: low threshold
  1967. * @high: high threshold
  1968. */
  1969. struct ap_threshold_params {
  1970. struct qdf_mac_addr bssid;
  1971. int32_t low;
  1972. int32_t high;
  1973. };
  1974. /**
  1975. * struct extscan_set_sig_changereq_params - ext scan channel parameter
  1976. * @request_id: request_id
  1977. * @vdev_id: vdev id
  1978. * @rssi_sample_size: Number of samples for averaging RSSI
  1979. * @lostap_sample_size: Number of missed samples to confirm AP loss
  1980. * @min_breaching: Number of APs breaching threshold required for firmware
  1981. * @num_ap: no of scanned ap
  1982. * @ap: ap threshold parameter
  1983. */
  1984. struct extscan_set_sig_changereq_params {
  1985. uint32_t request_id;
  1986. uint8_t vdev_id;
  1987. uint32_t rssi_sample_size;
  1988. uint32_t lostap_sample_size;
  1989. uint32_t min_breaching;
  1990. uint32_t num_ap;
  1991. struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
  1992. };
  1993. /**
  1994. * struct extscan_cached_result_params - ext scan cached parameter
  1995. * @request_id: request_id
  1996. * @vdev_id: vdev id
  1997. * @flush: cached results flush
  1998. */
  1999. struct extscan_cached_result_params {
  2000. uint32_t request_id;
  2001. uint8_t vdev_id;
  2002. bool flush;
  2003. };
  2004. #define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36
  2005. #define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16
  2006. #define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128
  2007. #define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
  2008. #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
  2009. /**
  2010. * struct wifi_scan_channelspec_params - wifi scan channel parameter
  2011. * @channel: Frequency in MHz
  2012. * @dwell_time_ms: dwell time in milliseconds
  2013. * @passive: passive scan
  2014. * @channel_class: channel class
  2015. */
  2016. struct wifi_scan_channelspec_params {
  2017. uint32_t channel;
  2018. uint32_t dwell_time_ms;
  2019. bool passive;
  2020. uint8_t channel_class;
  2021. };
  2022. /**
  2023. * enum wmi_wifi_band - wifi band
  2024. * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band
  2025. * @WMI_WIFI_BAND_BG: 2.4 GHz
  2026. * @WMI_WIFI_BAND_A: 5 GHz without DFS
  2027. * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS
  2028. * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only
  2029. * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS
  2030. * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS
  2031. * @WMI_WIFI_BAND_MAX: max range
  2032. */
  2033. enum wmi_wifi_band {
  2034. WMI_WIFI_BAND_UNSPECIFIED,
  2035. WMI_WIFI_BAND_BG = 1,
  2036. WMI_WIFI_BAND_A = 2,
  2037. WMI_WIFI_BAND_ABG = 3,
  2038. WMI_WIFI_BAND_A_DFS_ONLY = 4,
  2039. /* 5 is reserved */
  2040. WMI_WIFI_BAND_A_WITH_DFS = 6,
  2041. WMI_WIFI_BAND_ABG_WITH_DFS = 7,
  2042. /* Keep it last */
  2043. WMI_WIFI_BAND_MAX
  2044. };
  2045. /**
  2046. * struct wifi_scan_bucket_params - wifi scan bucket spec
  2047. * @bucket: bucket identifier
  2048. * @band: wifi band
  2049. * @period: Desired period, in millisecond; if this is too
  2050. * low, the firmware should choose to generate results as fast as
  2051. * it can instead of failing the command byte
  2052. * for exponential backoff bucket this is the min_period
  2053. * @report_events: 0 => normal reporting (reporting rssi history
  2054. * only, when rssi history buffer is % full)
  2055. * 1 => same as 0 + report a scan completion event after scanning
  2056. * this bucket
  2057. * 2 => same as 1 + forward scan results
  2058. * (beacons/probe responses + IEs) in real time to HAL
  2059. * @max_period: if max_period is non zero or different than period,
  2060. * then this bucket is an exponential backoff bucket and
  2061. * the scan period will grow exponentially as per formula:
  2062. * actual_period(N) = period ^ (N/(step_count+1)) to a
  2063. * maximum period of max_period
  2064. * @exponent: for exponential back off bucket: multiplier:
  2065. * new_period = old_period * exponent
  2066. * @step_count: for exponential back off bucket, number of scans performed
  2067. * at a given period and until the exponent is applied
  2068. * @num_channels: channels to scan; these may include DFS channels
  2069. * Note that a given channel may appear in multiple buckets
  2070. * @min_dwell_time_active: per bucket minimum active dwell time
  2071. * @max_dwell_time_active: per bucket maximum active dwell time
  2072. * @min_dwell_time_passive: per bucket minimum passive dwell time
  2073. * @max_dwell_time_passive: per bucket maximum passive dwell time
  2074. * @channels: Channel list
  2075. */
  2076. struct wifi_scan_bucket_params {
  2077. uint8_t bucket;
  2078. enum wmi_wifi_band band;
  2079. uint32_t period;
  2080. uint32_t report_events;
  2081. uint32_t max_period;
  2082. uint32_t exponent;
  2083. uint32_t step_count;
  2084. uint32_t num_channels;
  2085. uint32_t min_dwell_time_active;
  2086. uint32_t max_dwell_time_active;
  2087. uint32_t min_dwell_time_passive;
  2088. uint32_t max_dwell_time_passive;
  2089. struct wifi_scan_channelspec_params
  2090. channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS];
  2091. };
  2092. /**
  2093. * struct wifi_scan_cmd_req_params - wifi scan command request params
  2094. * @base_period: base timer period
  2095. * @max_ap_per_scan: max ap per scan
  2096. * @report_threshold_percent: report threshold
  2097. * in %, when buffer is this much full, wake up host
  2098. * @report_threshold_num_scans: report threshold number of scans
  2099. * in number of scans, wake up host after these many scans
  2100. * @request_id: request id
  2101. * @vdev_id: vdev that is the target of the request
  2102. * @num_buckets: number of buckets
  2103. * @min_dwell_time_active: per bucket minimum active dwell time
  2104. * @max_dwell_time_active: per bucket maximum active dwell time
  2105. * @min_dwell_time_passive: per bucket minimum passive dwell time
  2106. * @max_dwell_time_passive: per bucket maximum passive dwell time
  2107. * @configuration_flags: configuration flags
  2108. * @extscan_adaptive_dwell_mode: adaptive dwelltime mode for extscan
  2109. * @buckets: buckets array
  2110. */
  2111. struct wifi_scan_cmd_req_params {
  2112. uint32_t base_period;
  2113. uint32_t max_ap_per_scan;
  2114. uint32_t report_threshold_percent;
  2115. uint32_t report_threshold_num_scans;
  2116. uint32_t request_id;
  2117. uint8_t vdev_id;
  2118. uint32_t num_buckets;
  2119. uint32_t min_dwell_time_active;
  2120. uint32_t max_dwell_time_active;
  2121. uint32_t min_dwell_time_passive;
  2122. uint32_t max_dwell_time_passive;
  2123. uint32_t configuration_flags;
  2124. enum scan_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
  2125. struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS];
  2126. };
  2127. /**
  2128. * struct mac_ts_info_tfc - mac ts info parameters
  2129. * @burstSizeDefn: burst size
  2130. * @reserved: reserved
  2131. * @ackPolicy: ack policy
  2132. * @psb: psb
  2133. * @aggregation: aggregation
  2134. * @accessPolicy: access policy
  2135. * @direction: direction
  2136. * @tsid: direction
  2137. * @trafficType: traffic type
  2138. */
  2139. struct mac_ts_info_tfc {
  2140. #ifndef ANI_LITTLE_BIT_ENDIAN
  2141. uint8_t burstSizeDefn:1;
  2142. uint8_t reserved:7;
  2143. #else
  2144. uint8_t reserved:7;
  2145. uint8_t burstSizeDefn:1;
  2146. #endif
  2147. #ifndef ANI_LITTLE_BIT_ENDIAN
  2148. uint16_t ackPolicy:2;
  2149. uint16_t userPrio:3;
  2150. uint16_t psb:1;
  2151. uint16_t aggregation:1;
  2152. uint16_t accessPolicy:2;
  2153. uint16_t direction:2;
  2154. uint16_t tsid:4;
  2155. uint16_t trafficType:1;
  2156. #else
  2157. uint16_t trafficType:1;
  2158. uint16_t tsid:4;
  2159. uint16_t direction:2;
  2160. uint16_t accessPolicy:2;
  2161. uint16_t aggregation:1;
  2162. uint16_t psb:1;
  2163. uint16_t userPrio:3;
  2164. uint16_t ackPolicy:2;
  2165. #endif
  2166. } qdf_packed;
  2167. /**
  2168. * struct mac_ts_info_sch - mac ts info schedule parameters
  2169. * @rsvd: reserved
  2170. * @schedule: schedule bit
  2171. */
  2172. struct mac_ts_info_sch {
  2173. #ifndef ANI_LITTLE_BIT_ENDIAN
  2174. uint8_t rsvd:7;
  2175. uint8_t schedule:1;
  2176. #else
  2177. uint8_t schedule:1;
  2178. uint8_t rsvd:7;
  2179. #endif
  2180. } qdf_packed;
  2181. /**
  2182. * struct mac_ts_info_sch - mac ts info schedule parameters
  2183. * @traffic: mac tfc parameter
  2184. * @schedule: mac schedule parameters
  2185. */
  2186. struct mac_ts_info {
  2187. struct mac_ts_info_tfc traffic;
  2188. struct mac_ts_info_sch schedule;
  2189. } qdf_packed;
  2190. /**
  2191. * struct mac_tspec_ie - mac ts spec
  2192. * @type: type
  2193. * @length: length
  2194. * @tsinfo: tsinfo
  2195. * @nomMsduSz: nomMsduSz
  2196. * @maxMsduSz: maxMsduSz
  2197. * @minSvcInterval: minSvcInterval
  2198. * @maxSvcInterval: maxSvcInterval
  2199. * @inactInterval: inactInterval
  2200. * @suspendInterval: suspendInterval
  2201. * @svcStartTime: svcStartTime
  2202. * @minDataRate: minDataRate
  2203. * @meanDataRate: meanDataRate
  2204. * @peakDataRate: peakDataRate
  2205. * @maxBurstSz: maxBurstSz
  2206. * @delayBound: delayBound
  2207. * @minPhyRate: minPhyRate
  2208. * @surplusBw: surplusBw
  2209. * @mediumTime: mediumTime
  2210. */
  2211. struct mac_tspec_ie {
  2212. uint8_t type;
  2213. uint8_t length;
  2214. struct mac_ts_info tsinfo;
  2215. uint16_t nomMsduSz;
  2216. uint16_t maxMsduSz;
  2217. uint32_t minSvcInterval;
  2218. uint32_t maxSvcInterval;
  2219. uint32_t inactInterval;
  2220. uint32_t suspendInterval;
  2221. uint32_t svcStartTime;
  2222. uint32_t minDataRate;
  2223. uint32_t meanDataRate;
  2224. uint32_t peakDataRate;
  2225. uint32_t maxBurstSz;
  2226. uint32_t delayBound;
  2227. uint32_t minPhyRate;
  2228. uint16_t surplusBw;
  2229. uint16_t mediumTime;
  2230. } qdf_packed;
  2231. /**
  2232. * struct add_ts_param - ADDTS related parameters
  2233. * @staIdx: station index
  2234. * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
  2235. * @tspec: tspec value
  2236. * @status: CDF status
  2237. * @sessionId: session id
  2238. * @tsm_interval: TSM interval period passed from UMAC to WMI
  2239. * @setRICparams: RIC parameters
  2240. * @sme_session_id: sme session id
  2241. */
  2242. struct add_ts_param {
  2243. uint16_t staIdx;
  2244. uint16_t tspecIdx;
  2245. struct mac_tspec_ie tspec;
  2246. QDF_STATUS status;
  2247. uint8_t sessionId;
  2248. #ifdef FEATURE_WLAN_ESE
  2249. uint16_t tsm_interval;
  2250. #endif /* FEATURE_WLAN_ESE */
  2251. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  2252. uint8_t setRICparams;
  2253. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  2254. uint8_t sme_session_id;
  2255. };
  2256. /**
  2257. * struct delts_req_info - DELTS request parameter
  2258. * @tsinfo: ts info
  2259. * @tspec: ts spec
  2260. * @wmeTspecPresent: wme ts spec flag
  2261. * @wsmTspecPresent: wsm ts spec flag
  2262. * @lleTspecPresent: lle ts spec flag
  2263. */
  2264. struct delts_req_info {
  2265. struct mac_ts_info tsinfo;
  2266. struct mac_tspec_ie tspec;
  2267. uint8_t wmeTspecPresent:1;
  2268. uint8_t wsmTspecPresent:1;
  2269. uint8_t lleTspecPresent:1;
  2270. };
  2271. /**
  2272. * struct del_ts_params - DELTS related parameters
  2273. * @staIdx: station index
  2274. * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
  2275. * @bssId: BSSID
  2276. * @sessionId: session id
  2277. * @userPrio: user priority
  2278. * @delTsInfo: DELTS info
  2279. * @setRICparams: RIC parameters
  2280. */
  2281. struct del_ts_params {
  2282. uint16_t staIdx;
  2283. uint16_t tspecIdx;
  2284. uint8_t bssId[IEEE80211_ADDR_LEN];
  2285. uint8_t sessionId;
  2286. uint8_t userPrio;
  2287. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  2288. struct delts_req_info delTsInfo;
  2289. uint8_t setRICparams;
  2290. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  2291. };
  2292. /**
  2293. * struct ll_stats_clear_params - ll stats clear parameter
  2294. * @req_id: request id
  2295. * @sta_id: sta id
  2296. * @stats_clear_mask: stats clear mask
  2297. * @stop_req: stop request
  2298. */
  2299. struct ll_stats_clear_params {
  2300. uint32_t req_id;
  2301. uint8_t sta_id;
  2302. uint32_t stats_clear_mask;
  2303. uint8_t stop_req;
  2304. };
  2305. /**
  2306. * struct ll_stats_set_params - ll stats get parameter
  2307. * @req_id: request id
  2308. * @sta_id: sta id
  2309. * @mpdu_size_threshold: mpdu sixe threshold
  2310. * @aggressive_statistics_gathering: aggressive_statistics_gathering
  2311. */
  2312. struct ll_stats_set_params {
  2313. uint32_t req_id;
  2314. uint8_t sta_id;
  2315. uint32_t mpdu_size_threshold;
  2316. uint32_t aggressive_statistics_gathering;
  2317. };
  2318. /**
  2319. * struct ll_stats_get_params - ll stats parameter
  2320. * @req_id: request id
  2321. * @sta_id: sta id
  2322. * @param_id_mask: param is mask
  2323. */
  2324. struct ll_stats_get_params {
  2325. uint32_t req_id;
  2326. uint8_t sta_id;
  2327. uint32_t param_id_mask;
  2328. };
  2329. /**
  2330. * struct link_status_params - link stats parameter
  2331. * @msg_type: message type is same as the request type
  2332. * @msg_len: length of the entire request
  2333. * @link_status: wme ts spec flag
  2334. * @session_id: wsm ts spec flag
  2335. */
  2336. struct link_status_params {
  2337. uint16_t msg_type;
  2338. uint16_t msg_len;
  2339. uint8_t link_status;
  2340. uint8_t session_id;
  2341. };
  2342. /**
  2343. * struct dhcp_stop_ind_params - DHCP Stop indication message
  2344. * @msgtype: message type is same as the request type
  2345. * @msglen: length of the entire request
  2346. * @device_mode: Mode of the device(ex:STA, AP)
  2347. * @adapter_macaddr: MAC address of the adapter
  2348. * @peer_macaddr: MAC address of the connected peer
  2349. */
  2350. struct dhcp_stop_ind_params {
  2351. uint16_t msgtype;
  2352. uint16_t msglen;
  2353. uint8_t device_mode;
  2354. struct qdf_mac_addr adapter_macaddr;
  2355. struct qdf_mac_addr peer_macaddr;
  2356. };
  2357. #define WMI_MAX_FILTER_TEST_DATA_LEN 8
  2358. #define WMI_MAX_NUM_MULTICAST_ADDRESS 240
  2359. #define WMI_MAX_NUM_FILTERS 20
  2360. #define WMI_MAX_NUM_TESTS_PER_FILTER 10
  2361. /**
  2362. * enum packet_filter_type - packet filter type
  2363. * @WMI_RCV_FILTER_TYPE_INVALID: invalid type
  2364. * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type
  2365. * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type
  2366. * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size
  2367. */
  2368. enum packet_filter_type {
  2369. WMI_RCV_FILTER_TYPE_INVALID,
  2370. WMI_RCV_FILTER_TYPE_FILTER_PKT,
  2371. WMI_RCV_FILTER_TYPE_BUFFER_PKT,
  2372. WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE
  2373. };
  2374. /**
  2375. * enum packet_protocol_type - packet protocol type
  2376. * @WMI_FILTER_HDR_TYPE_INVALID: invalid type
  2377. * @WMI_FILTER_HDR_TYPE_MAC: mac type
  2378. * @WMI_FILTER_HDR_TYPE_ARP: trp type
  2379. * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type
  2380. * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type
  2381. * @WMI_FILTER_HDR_TYPE_UDP: udp type
  2382. * @WMI_FILTER_HDR_TYPE_MAX: max type
  2383. */
  2384. enum packet_protocol_type {
  2385. WMI_FILTER_HDR_TYPE_INVALID,
  2386. WMI_FILTER_HDR_TYPE_MAC,
  2387. WMI_FILTER_HDR_TYPE_ARP,
  2388. WMI_FILTER_HDR_TYPE_IPV4,
  2389. WMI_FILTER_HDR_TYPE_IPV6,
  2390. WMI_FILTER_HDR_TYPE_UDP,
  2391. WMI_FILTER_HDR_TYPE_MAX
  2392. };
  2393. /**
  2394. * enum packet_filter_comp_type - packet filter comparison type
  2395. * @WMI_FILTER_CMP_TYPE_INVALID: invalid type
  2396. * @WMI_FILTER_CMP_TYPE_EQUAL: type equal
  2397. * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal
  2398. * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal
  2399. * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal
  2400. * @WMI_FILTER_CMP_TYPE_MAX: max type
  2401. */
  2402. enum packet_filter_comp_type {
  2403. WMI_FILTER_CMP_TYPE_INVALID,
  2404. WMI_FILTER_CMP_TYPE_EQUAL,
  2405. WMI_FILTER_CMP_TYPE_MASK_EQUAL,
  2406. WMI_FILTER_CMP_TYPE_NOT_EQUAL,
  2407. WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  2408. WMI_FILTER_CMP_TYPE_MAX
  2409. };
  2410. /**
  2411. * struct rcv_pkt_filter_params - receive packet filter parameters
  2412. * @protocolLayer - protocol layer
  2413. * @cmpFlag - comparison flag
  2414. * @dataLength - data length
  2415. * @dataOffset - data offset
  2416. * @reserved - resserved
  2417. * @compareData - compare data
  2418. * @dataMask - data mask
  2419. */
  2420. struct rcv_pkt_filter_params {
  2421. enum packet_protocol_type protocolLayer;
  2422. enum packet_filter_comp_type cmpFlag;
  2423. uint16_t dataLength;
  2424. uint8_t dataOffset;
  2425. uint8_t reserved;
  2426. uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN];
  2427. uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN];
  2428. };
  2429. /**
  2430. * struct rcv_pkt_filter_config - receive packet filter info
  2431. * @filterId - filter id
  2432. * @filterType - filter type
  2433. * @numFieldParams - no of fields
  2434. * @coalesceTime - reserved parameter
  2435. * @self_macaddr - self mac address
  2436. * @bssid - Bssid of the connected AP
  2437. * @paramsData - data parameter
  2438. */
  2439. struct rcv_pkt_filter_config {
  2440. uint8_t filterId;
  2441. enum packet_filter_type filterType;
  2442. uint32_t numFieldParams;
  2443. uint32_t coalesceTime;
  2444. struct qdf_mac_addr self_macaddr;
  2445. struct qdf_mac_addr bssid;
  2446. struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER];
  2447. };
  2448. #define WMI_MAX_NUM_FW_SEGMENTS 4
  2449. /**
  2450. * struct fw_dump_seg_req_param - individual segment details
  2451. * @seg_id - segment id.
  2452. * @seg_start_addr_lo - lower address of the segment.
  2453. * @seg_start_addr_hi - higher address of the segment.
  2454. * @seg_length - length of the segment.
  2455. * @dst_addr_lo - lower address of the destination buffer.
  2456. * @dst_addr_hi - higher address of the destination buffer.
  2457. *
  2458. * This structure carries the information to firmware about the
  2459. * individual segments. This structure is part of firmware memory
  2460. * dump request.
  2461. */
  2462. struct fw_dump_seg_req_param {
  2463. uint8_t seg_id;
  2464. uint32_t seg_start_addr_lo;
  2465. uint32_t seg_start_addr_hi;
  2466. uint32_t seg_length;
  2467. uint32_t dst_addr_lo;
  2468. uint32_t dst_addr_hi;
  2469. };
  2470. /**
  2471. * struct fw_dump_req_param - firmware memory dump request details.
  2472. * @request_id - request id.
  2473. * @num_seg - requested number of segments.
  2474. * @fw_dump_seg_req - individual segment information.
  2475. *
  2476. * This structure carries information about the firmware
  2477. * memory dump request.
  2478. */
  2479. struct fw_dump_req_param {
  2480. uint32_t request_id;
  2481. uint32_t num_seg;
  2482. struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS];
  2483. };
  2484. /**
  2485. * struct wmi_tdls_params - TDLS parameters
  2486. * @vdev_id: vdev id
  2487. * @tdls_state: TDLS state
  2488. * @notification_interval_ms: notification inerval
  2489. * @tx_discovery_threshold: tx discovery threshold
  2490. * @tx_teardown_threshold: tx teardown threashold
  2491. * @rssi_teardown_threshold: RSSI teardown threshold
  2492. * @rssi_delta: RSSI delta
  2493. * @tdls_options: TDLS options
  2494. * @peer_traffic_ind_window: raffic indication window
  2495. * @peer_traffic_response_timeout: traffic response timeout
  2496. * @puapsd_mask: uapsd mask
  2497. * @puapsd_inactivity_time: uapsd inactivity time
  2498. * @puapsd_rx_frame_threshold: uapsd rx frame threshold
  2499. * @teardown_notification_ms: tdls teardown notification interval
  2500. * @tdls_peer_kickout_threshold: tdls packet threshold for
  2501. * peer kickout operation
  2502. */
  2503. struct wmi_tdls_params {
  2504. uint32_t vdev_id;
  2505. uint32_t tdls_state;
  2506. uint32_t notification_interval_ms;
  2507. uint32_t tx_discovery_threshold;
  2508. uint32_t tx_teardown_threshold;
  2509. int32_t rssi_teardown_threshold;
  2510. int32_t rssi_delta;
  2511. uint32_t tdls_options;
  2512. uint32_t peer_traffic_ind_window;
  2513. uint32_t peer_traffic_response_timeout;
  2514. uint32_t puapsd_mask;
  2515. uint32_t puapsd_inactivity_time;
  2516. uint32_t puapsd_rx_frame_threshold;
  2517. uint32_t teardown_notification_ms;
  2518. uint32_t tdls_peer_kickout_threshold;
  2519. };
  2520. /**
  2521. * struct dhcp_offload_info_params - dhcp offload parameters
  2522. * @vdev_id: request data length
  2523. * @dhcp_offload_enabled: dhcp offload enabled
  2524. * @dhcp_client_num: dhcp client no
  2525. * @dhcp_srv_addr: dhcp server ip
  2526. */
  2527. struct dhcp_offload_info_params {
  2528. uint32_t vdev_id;
  2529. bool dhcp_offload_enabled;
  2530. uint32_t dhcp_client_num;
  2531. uint32_t dhcp_srv_addr;
  2532. };
  2533. /**
  2534. * struct app_type2_params - app type2parameter
  2535. * @vdev_id: vdev id
  2536. * @rc4_key: rc4 key
  2537. * @rc4_key_len: rc4 key length
  2538. * @ip_id: NC id
  2539. * @ip_device_ip: NC IP address
  2540. * @ip_server_ip: Push server IP address
  2541. * @tcp_src_port: NC TCP port
  2542. * @tcp_dst_port: Push server TCP port
  2543. * @tcp_seq: tcp sequence
  2544. * @tcp_ack_seq: tcp ack sequence
  2545. * @keepalive_init: Initial ping interval
  2546. * @keepalive_min: Minimum ping interval
  2547. * @keepalive_max: Maximum ping interval
  2548. * @keepalive_inc: Increment of ping interval
  2549. * @gateway_mac: gateway mac address
  2550. * @tcp_tx_timeout_val: tcp tx timeout value
  2551. * @tcp_rx_timeout_val: tcp rx timeout value
  2552. */
  2553. struct app_type2_params {
  2554. uint8_t vdev_id;
  2555. uint8_t rc4_key[16];
  2556. uint32_t rc4_key_len;
  2557. /** ip header parameter */
  2558. uint32_t ip_id;
  2559. uint32_t ip_device_ip;
  2560. uint32_t ip_server_ip;
  2561. /** tcp header parameter */
  2562. uint16_t tcp_src_port;
  2563. uint16_t tcp_dst_port;
  2564. uint32_t tcp_seq;
  2565. uint32_t tcp_ack_seq;
  2566. uint32_t keepalive_init;
  2567. uint32_t keepalive_min;
  2568. uint32_t keepalive_max;
  2569. uint32_t keepalive_inc;
  2570. struct qdf_mac_addr gateway_mac;
  2571. uint32_t tcp_tx_timeout_val;
  2572. uint32_t tcp_rx_timeout_val;
  2573. };
  2574. /**
  2575. * struct app_type1_params - app type1 parameter
  2576. * @vdev_id: vdev id
  2577. * @wakee_mac_addr: mac address
  2578. * @identification_id: identification id
  2579. * @password: password
  2580. * @id_length: id length
  2581. * @pass_length: password length
  2582. */
  2583. struct app_type1_params {
  2584. uint8_t vdev_id;
  2585. struct qdf_mac_addr wakee_mac_addr;
  2586. uint8_t identification_id[8];
  2587. uint8_t password[16];
  2588. uint32_t id_length;
  2589. uint32_t pass_length;
  2590. };
  2591. /**
  2592. * enum wmi_ext_wow_type - wow type
  2593. * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1
  2594. * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2
  2595. * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2
  2596. */
  2597. enum wmi_ext_wow_type {
  2598. WMI_EXT_WOW_TYPE_APP_TYPE1,
  2599. WMI_EXT_WOW_TYPE_APP_TYPE2,
  2600. WMI_EXT_WOW_TYPE_APP_TYPE1_2,
  2601. };
  2602. /**
  2603. * struct ext_wow_params - ext wow parameters
  2604. * @vdev_id: vdev id
  2605. * @type: wow type
  2606. * @wakeup_pin_num: wake up gpio no
  2607. */
  2608. struct ext_wow_params {
  2609. uint8_t vdev_id;
  2610. enum wmi_ext_wow_type type;
  2611. uint32_t wakeup_pin_num;
  2612. };
  2613. /**
  2614. * struct stats_ext_params - ext stats request
  2615. * @vdev_id: vdev id
  2616. * @request_data_len: request data length
  2617. * @request_data: request data
  2618. */
  2619. struct stats_ext_params {
  2620. uint32_t vdev_id;
  2621. uint32_t request_data_len;
  2622. uint8_t request_data[];
  2623. };
  2624. #define WMI_GTK_OFFLOAD_KEK_BYTES 64
  2625. #define WMI_GTK_OFFLOAD_KCK_BYTES 16
  2626. #define WMI_GTK_OFFLOAD_ENABLE 0
  2627. #define WMI_GTK_OFFLOAD_DISABLE 1
  2628. #define MAX_MEM_CHUNKS 32
  2629. /**
  2630. * struct wmi_host_mem_chunk - host memory chunk structure
  2631. * @vaddr: Pointer to virtual address
  2632. * @paddr: Physical address
  2633. * @memctx: qdf memory context for mapped address.
  2634. * @len: length of chunk
  2635. * @req_id: request id from target
  2636. */
  2637. struct wmi_host_mem_chunk {
  2638. uint32_t *vaddr;
  2639. uint32_t paddr;
  2640. qdf_dma_mem_context(memctx);
  2641. uint32_t len;
  2642. uint32_t req_id;
  2643. };
  2644. /**
  2645. * struct wmi_wifi_start_log - Structure to store the params sent to start/
  2646. * stop logging
  2647. * @name: Attribute which indicates the type of logging like per packet
  2648. * statistics, connectivity etc.
  2649. * @verbose_level: Verbose level which can be 0,1,2,3
  2650. * @flag: Flag field for future use
  2651. */
  2652. struct wmi_wifi_start_log {
  2653. uint32_t ring_id;
  2654. uint32_t verbose_level;
  2655. uint32_t flag;
  2656. };
  2657. /**
  2658. * struct wmi_pcl_list - Format of PCL
  2659. * @pcl_list: List of preferred channels
  2660. * @weight_list: Weights of the PCL
  2661. * @pcl_len: Number of channels in the PCL
  2662. */
  2663. struct wmi_pcl_list {
  2664. uint8_t pcl_list[128];
  2665. uint8_t weight_list[128];
  2666. uint32_t pcl_len;
  2667. };
  2668. /**
  2669. * struct wmi_hw_mode_params - HW mode params
  2670. * @mac0_tx_ss: MAC0 Tx spatial stream
  2671. * @mac0_rx_ss: MAC0 Rx spatial stream
  2672. * @mac1_tx_ss: MAC1 Tx spatial stream
  2673. * @mac1_rx_ss: MAC1 Rx spatial stream
  2674. * @mac0_bw: MAC0 bandwidth
  2675. * @mac1_bw: MAC1 bandwidth
  2676. * @dbs_cap: DBS capabality
  2677. * @agile_dfs_cap: Agile DFS capabality
  2678. */
  2679. struct wmi_hw_mode_params {
  2680. uint8_t mac0_tx_ss;
  2681. uint8_t mac0_rx_ss;
  2682. uint8_t mac1_tx_ss;
  2683. uint8_t mac1_rx_ss;
  2684. uint8_t mac0_bw;
  2685. uint8_t mac1_bw;
  2686. uint8_t dbs_cap;
  2687. uint8_t agile_dfs_cap;
  2688. };
  2689. /**
  2690. * struct ssid_hotlist_param - param for SSID Hotlist
  2691. * @ssid: SSID which is being hotlisted
  2692. * @band: Band in which the given SSID should be scanned
  2693. * @rssi_low: Low bound on RSSI
  2694. * @rssi_high: High bound on RSSI
  2695. */
  2696. struct ssid_hotlist_param {
  2697. struct mac_ssid ssid;
  2698. uint8_t band;
  2699. int32_t rssi_low;
  2700. int32_t rssi_high;
  2701. };
  2702. /**
  2703. * struct ssid_hotlist_request_params - set SSID hotlist request struct
  2704. * @request_id: ID of the request
  2705. * @session_id: ID of the session
  2706. * @lost_ssid_sample_size: Number of consecutive scans in which the SSID
  2707. * must not be seen in order to consider the SSID "lost"
  2708. * @ssid_count: Number of valid entries in the @ssids array
  2709. * @ssids: Array that defines the SSIDs that are in the hotlist
  2710. */
  2711. struct ssid_hotlist_request_params {
  2712. uint32_t request_id;
  2713. uint8_t session_id;
  2714. uint32_t lost_ssid_sample_size;
  2715. uint32_t ssid_count;
  2716. struct ssid_hotlist_param ssids[WMI_EXTSCAN_MAX_HOTLIST_SSIDS];
  2717. };
  2718. /**
  2719. * struct wmi_unit_test_cmd - unit test command parameters
  2720. * @vdev_id: vdev id
  2721. * @module_id: module id
  2722. * @num_args: number of arguments
  2723. * @diag_token: dialog token, which identifies the transaction.
  2724. * this number is generated by wifitool and may be used to
  2725. * identify the transaction in the event path
  2726. * @args: arguments
  2727. */
  2728. struct wmi_unit_test_cmd {
  2729. uint32_t vdev_id;
  2730. uint32_t module_id;
  2731. uint32_t num_args;
  2732. uint32_t diag_token;
  2733. uint32_t args[WMI_UNIT_TEST_MAX_NUM_ARGS];
  2734. };
  2735. /**
  2736. * struct extscan_bssid_hotlist_set_params - set hotlist request
  2737. * @request_id: request_id
  2738. * @vdev_id: vdev id
  2739. * @lost_ap_sample_size: number of samples to confirm AP loss
  2740. * @num_ap: Number of hotlist APs
  2741. * @ap: hotlist APs
  2742. */
  2743. struct extscan_bssid_hotlist_set_params {
  2744. uint32_t request_id;
  2745. uint8_t vdev_id;
  2746. uint32_t lost_ap_sample_size;
  2747. uint32_t num_ap;
  2748. struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS];
  2749. };
  2750. /**
  2751. * struct host_mem_req - Host memory request paramseters request by target
  2752. * @req_id: Request id to identify the request.
  2753. * @unit_size: Size of single unit requested.
  2754. * @num_unit_info: Memory chunk info
  2755. * @num_units: number of units requested.
  2756. */
  2757. typedef struct {
  2758. uint32_t req_id;
  2759. uint32_t unit_size;
  2760. uint32_t num_unit_info;
  2761. uint32_t num_units;
  2762. } host_mem_req;
  2763. #define WMI_HOST_DSCP_MAP_MAX (64)
  2764. /**
  2765. * struct wmi_host_ext_resource_config - Extended resource config
  2766. * @host_platform_config: Host plaform configuration.
  2767. * @fw_featuew_bitmap: FW feature requested bitmap.
  2768. */
  2769. typedef struct {
  2770. uint32_t host_platform_config;
  2771. #define WMI_HOST_FW_FEATURE_LTEU_SUPPORT 0x0001
  2772. #define WMI_HOST_FW_FEATURE_COEX_GPIO_SUPPORT 0x0002
  2773. #define WMI_HOST_FW_FEATURE_AUX_RADIO_SPECTRAL_INTF 0x0004
  2774. #define WMI_HOST_FW_FEATURE_AUX_RADIO_CHAN_LOAD_INTF 0x0008
  2775. #define WMI_HOST_FW_FEATURE_BSS_CHANNEL_INFO_64 0x0010
  2776. #define WMI_HOST_FW_FEATURE_PEER_STATS 0x0020
  2777. #define WMI_HOST_FW_FEATURE_VDEV_STATS 0x0040
  2778. #define WMI_HOST_FW_FEATURE_VOW_FEATURES 0x00004000
  2779. #define WMI_HOST_FW_FEATURE_VOW_STATS 0x00008000
  2780. /**
  2781. * @brief fw_feature_bitmask - Enable/Disable features in FW
  2782. * @details
  2783. * The bits in fw_feature_bitmask are used as shown by the masks below:
  2784. * 0x0001 - LTEU Config enable/disable
  2785. * 0x0002 - COEX GPIO Config enable/disable
  2786. * 0x0004 - Aux Radio enhancement for spectral scan enable/disable
  2787. * 0x0008 - Aux Radio enhancement for chan load scan enable/disable
  2788. * 0x0010 - BSS channel info stats enable/disable
  2789. * The features in question are enabled by setting
  2790. * the feature's bit to 1,
  2791. * or disabled by setting the feature's bit to 0.
  2792. */
  2793. uint32_t fw_feature_bitmap;
  2794. /* WLAN priority GPIO number
  2795. * The target uses a GPIO pin to indicate when it is transmitting
  2796. * high-priority traffic (e.g. beacon, management, or AC_VI) or
  2797. * low-priority traffic (e.g. AC_BE, AC_BK). The HW uses this
  2798. * WLAN GPIO pin to determine whether to abort WLAN tx in favor of
  2799. * BT activity.
  2800. * Which GPIO is used for this WLAN tx traffic priority specification
  2801. * varies between platforms, so the host needs to indicate to the
  2802. * target which GPIO to use.
  2803. */
  2804. uint32_t wlan_priority_gpio;
  2805. /* Host will notify target which coex algorithm has to be
  2806. * enabled based on HW, FW capability and device tree config.
  2807. * Till now the coex algorithms were target specific. Now the
  2808. * same target can choose between multiple coex algorithms
  2809. * depending on device tree config on host. For backward
  2810. * compatibility, version support will have option 0 and will
  2811. * rely on FW compile time flags to decide the coex version
  2812. * between VERSION_1, VERSION_2 and VERSION_3. Version info is
  2813. * mandatory from VERSION_4 onwards for any new coex algorithms.
  2814. *
  2815. * 0 = no version support
  2816. * 1 = COEX_VERSION_1 (3 wire coex)
  2817. * 2 = COEX_VERSION_2 (2.5 wire coex)
  2818. * 3 = COEX_VERSION_3 (2.5 wire coex+duty cycle)
  2819. * 4 = COEX_VERSION_4 (4 wire coex)
  2820. */
  2821. uint32_t coex_version;
  2822. /* There are multiple coex implementations on FW to support different
  2823. * hardwares. Since the coex algos are mutually exclusive, host will
  2824. * use below fields to send GPIO info to FW and these GPIO pins will
  2825. * have different usages depending on the feature enabled. This is to
  2826. * avoid adding multiple GPIO fields here for different features.
  2827. *
  2828. * COEX VERSION_4 (4 wire coex) :
  2829. * 4 wire coex feature uses 1 common input request line from BT/ZB/
  2830. * Thread which interrupts the WLAN target processor directly, 1 input
  2831. * priority line from BT and ZB each, 1 output line to grant access to
  2832. * requesting IOT subsystem. WLAN uses the input priority line to
  2833. * identify the requesting IOT subsystem. Request is granted based on
  2834. * IOT interface priority and WLAN traffic. GPIO pin usage is as below:
  2835. * coex_gpio_pin_1 = BT PRIORITY INPUT GPIO
  2836. * coex_gpio_pin_2 = ZIGBEE PRIORITY INPUT GPIO
  2837. * coex_gpio_pin_3 = GRANT OUTPUT GPIO
  2838. * when a BT active interrupt is raised, WLAN reads
  2839. * BT and ZB priority input GPIO pins to compare against the coex
  2840. * priority table and accordingly sets the grant output GPIO to give
  2841. * access to requesting IOT subsystem.
  2842. */
  2843. uint32_t coex_gpio_pin_1;
  2844. uint32_t coex_gpio_pin_2;
  2845. uint32_t coex_gpio_pin_3;
  2846. /* add new members here */
  2847. } wmi_host_ext_resource_config;
  2848. /**
  2849. * struct set_neighbour_rx_params - Neighbour RX params
  2850. * @vdev_id: vdev id
  2851. * @idx: index of param
  2852. * @action: action
  2853. * @type: Type of param
  2854. */
  2855. struct set_neighbour_rx_params {
  2856. uint8_t vdev_id;
  2857. uint32_t idx;
  2858. uint32_t action;
  2859. uint32_t type;
  2860. };
  2861. /**
  2862. * struct set_fwtest_params - FW test params
  2863. * @arg: FW param id
  2864. * @value: value
  2865. */
  2866. struct set_fwtest_params {
  2867. uint32_t arg;
  2868. uint32_t value;
  2869. };
  2870. /**
  2871. * struct set_custom_aggr_size_params - custom aggr size params
  2872. * @vdev_id : vdev id
  2873. * @tx_aggr_size : TX aggr size
  2874. * @rx_aggr_size : RX aggr size
  2875. * @enable_bitmap: Bitmap for aggr size check
  2876. */
  2877. struct set_custom_aggr_size_params {
  2878. uint32_t vdev_id;
  2879. uint32_t tx_aggr_size;
  2880. uint32_t rx_aggr_size;
  2881. uint32_t ac:2,
  2882. aggr_type:1,
  2883. tx_aggr_size_disable:1,
  2884. rx_aggr_size_disable:1,
  2885. tx_ac_enable:1,
  2886. reserved:26;
  2887. };
  2888. /**
  2889. * enum wmi_host_custom_aggr_type_t: custon aggregate type
  2890. * @WMI_HOST_CUSTOM_AGGR_TYPE_AMPDU: A-MPDU aggregation
  2891. * @WMI_HOST_CUSTOM_AGGR_TYPE_AMSDU: A-MSDU aggregation
  2892. * @WMI_HOST_CUSTOM_AGGR_TYPE_MAX: Max type
  2893. */
  2894. enum wmi_host_custom_aggr_type_t {
  2895. WMI_HOST_CUSTOM_AGGR_TYPE_AMPDU = 0,
  2896. WMI_HOST_CUSTOM_AGGR_TYPE_AMSDU = 1,
  2897. WMI_HOST_CUSTOM_AGGR_TYPE_MAX,
  2898. };
  2899. /*
  2900. * msduq_update_params - MSDUQ update param structure
  2901. * @tid_num: TID number
  2902. * @msduq_update_mask: update bit mask
  2903. * @qdepth_thresh_value: threshold value for the queue depth
  2904. */
  2905. #define QDEPTH_THRESH_MAX_UPDATES 1
  2906. typedef struct {
  2907. uint32_t tid_num;
  2908. uint32_t msduq_update_mask;
  2909. uint32_t qdepth_thresh_value;
  2910. } msduq_update_params;
  2911. /**
  2912. * struct set_qdepth_thresh_params - MSDU Queue Depth Threshold Params
  2913. * @vdev_id: vdev id
  2914. * @pdev_id: pdev id
  2915. * @mac_addr: MAC address
  2916. * @num_of_msduq_updates: holds the number of tid updates
  2917. */
  2918. struct set_qdepth_thresh_params {
  2919. uint32_t pdev_id;
  2920. uint32_t vdev_id;
  2921. uint8_t mac_addr[IEEE80211_ADDR_LEN];
  2922. uint32_t num_of_msduq_updates;
  2923. msduq_update_params update_params[QDEPTH_THRESH_MAX_UPDATES];
  2924. };
  2925. /**
  2926. * struct peer_chan_width_switch_info - Peer channel width capability params
  2927. * @mac_addr: MAC address of peer
  2928. * @chan_width: Max supported channel width of peer
  2929. * (enum ieee80211_cwm_width)
  2930. */
  2931. struct peer_chan_width_switch_info {
  2932. uint8_t mac_addr[IEEE80211_ADDR_LEN];
  2933. uint32_t chan_width;
  2934. };
  2935. /**
  2936. * struct peer_chan_width_switch_params - Peer channel width capability wrapper
  2937. * @num_peers: Total number of peers connected to AP
  2938. * @chan_width_peer_list: List of capabilities for all connected peers
  2939. */
  2940. struct peer_chan_width_switch_params {
  2941. uint32_t num_peers;
  2942. struct peer_chan_width_switch_info *chan_width_peer_list;
  2943. };
  2944. /**
  2945. * struct config_ratemask_params - ratemask config parameters
  2946. * @vdev_id: vdev id
  2947. * @type: Type
  2948. * @lower32: Lower 32 bits in the 1st 64-bit value
  2949. * @higher32: Higher 32 bits in the 1st 64-bit value
  2950. * @lower32_2: Lower 32 bits in the 2nd 64-bit value
  2951. */
  2952. struct config_ratemask_params {
  2953. uint8_t vdev_id;
  2954. uint8_t type;
  2955. uint32_t lower32;
  2956. uint32_t higher32;
  2957. uint32_t lower32_2;
  2958. };
  2959. /**
  2960. * struct config_fils_params - FILS config params
  2961. * @vdev_id: vdev id
  2962. * @fd_period: 0 - Disabled, non-zero - Period in ms (mili seconds)
  2963. */
  2964. struct config_fils_params {
  2965. uint8_t vdev_id;
  2966. uint32_t fd_period;
  2967. };
  2968. /**
  2969. * struct peer_add_wds_entry_params - WDS peer entry add params
  2970. * @dest_addr: Pointer to destination macaddr
  2971. * @peer_addr: Pointer to peer mac addr
  2972. * @flags: flags
  2973. * @vdev_id: Vdev id
  2974. */
  2975. struct peer_add_wds_entry_params {
  2976. const uint8_t *dest_addr;
  2977. uint8_t *peer_addr;
  2978. uint32_t flags;
  2979. uint32_t vdev_id;
  2980. };
  2981. /**
  2982. * struct peer_del_wds_entry_params - WDS peer entry del params
  2983. * @dest_addr: Pointer to destination macaddr
  2984. * @vdev_id: Vdev id
  2985. */
  2986. struct peer_del_wds_entry_params {
  2987. uint8_t *dest_addr;
  2988. uint32_t vdev_id;
  2989. };
  2990. /**
  2991. * struct set_bridge_mac_addr_params - set bridge MAC addr params
  2992. * @dest_addr: Pointer to bridge macaddr
  2993. */
  2994. struct set_bridge_mac_addr_params {
  2995. uint8_t *bridge_addr;
  2996. };
  2997. /**
  2998. * struct peer_updatewds_entry_params - WDS peer entry update params
  2999. * @wds_macaddr: Pointer to destination macaddr
  3000. * @peer_add: Pointer to peer mac addr
  3001. * @flags: flags
  3002. * @vdev_id: Vdev id
  3003. */
  3004. struct peer_update_wds_entry_params {
  3005. uint8_t *wds_macaddr;
  3006. uint8_t *peer_macaddr;
  3007. uint32_t flags;
  3008. uint32_t vdev_id;
  3009. };
  3010. /**
  3011. * struct set_ps_mode_params - PS mode params
  3012. * @vdev_id: vdev id
  3013. * @psmode: PS mode
  3014. */
  3015. struct set_ps_mode_params {
  3016. uint8_t vdev_id;
  3017. uint8_t psmode;
  3018. };
  3019. /**
  3020. * @struct tt_level_config - Set Thermal throttlling config
  3021. * @tmplwm: Temperature low water mark
  3022. * @tmphwm: Temperature high water mark
  3023. * @dcoffpercent: dc off percentage
  3024. * @priority: priority
  3025. */
  3026. typedef struct {
  3027. uint32_t tmplwm;
  3028. uint32_t tmphwm;
  3029. uint32_t dcoffpercent;
  3030. uint32_t priority;
  3031. } tt_level_config;
  3032. /**
  3033. * struct thermal_mitigation_params - Thermal mitigation params
  3034. * @enable: Enable/Disable Thermal mitigation
  3035. * @dc: DC
  3036. * @dc_per_event: DC per event
  3037. * @tt_level_config: TT level config params
  3038. */
  3039. struct thermal_mitigation_params {
  3040. uint32_t pdev_id;
  3041. uint32_t enable;
  3042. uint32_t dc;
  3043. uint32_t dc_per_event;
  3044. tt_level_config levelconf[THERMAL_LEVELS];
  3045. };
  3046. /**
  3047. * struct smart_ant_enable_tx_feedback_params - SA tx feeback params
  3048. * @enable: Enable TX feedback for SA
  3049. */
  3050. struct smart_ant_enable_tx_feedback_params {
  3051. int enable;
  3052. };
  3053. /**
  3054. * struct vdev_spectral_configure_params - SPectral config params
  3055. * @vdev_id: VDEV id
  3056. * @count: count
  3057. * @period: period
  3058. * @spectral_pri: Spectral priority
  3059. * @fft_size: FFT size
  3060. * @gc_enable: GC enable
  3061. * @restart_enable: restart enabled
  3062. * @noise_floor_ref: Noise floor reference
  3063. * @init_delay: Init delays
  3064. * @nb_tone_thr: NB tone threshold
  3065. * @str_bin_thr: STR BIN threshold
  3066. * @wb_rpt_mode: WB BIN threshold
  3067. * @rssi_rpt_mode: RSSI report mode
  3068. * @rssi_thr: RSSI threshold
  3069. * @pwr_format: Power format
  3070. * @rpt_mode: Report mdoe
  3071. * @bin_scale: BIN scale
  3072. * @dbm_adj: DBM adjust
  3073. * @chn_mask: chain mask
  3074. */
  3075. struct vdev_spectral_configure_params {
  3076. uint8_t vdev_id;
  3077. uint16_t count;
  3078. uint16_t period;
  3079. uint16_t spectral_pri;
  3080. uint16_t fft_size;
  3081. uint16_t gc_enable;
  3082. uint16_t restart_enable;
  3083. uint16_t noise_floor_ref;
  3084. uint16_t init_delay;
  3085. uint16_t nb_tone_thr;
  3086. uint16_t str_bin_thr;
  3087. uint16_t wb_rpt_mode;
  3088. uint16_t rssi_rpt_mode;
  3089. uint16_t rssi_thr;
  3090. uint16_t pwr_format;
  3091. uint16_t rpt_mode;
  3092. uint16_t bin_scale;
  3093. uint16_t dbm_adj;
  3094. uint16_t chn_mask;
  3095. };
  3096. /**
  3097. * struct vdev_spectral_enable_params - Spectral enabled params
  3098. * @vdev_id: VDEV id
  3099. * @active_valid: Active valid
  3100. * @active: active
  3101. * @enabled_valid: Enabled valid
  3102. * @enabled: enabled
  3103. */
  3104. struct vdev_spectral_enable_params {
  3105. uint8_t vdev_id;
  3106. uint8_t active_valid;
  3107. uint8_t active;
  3108. uint8_t enabled_valid;
  3109. uint8_t enabled;
  3110. };
  3111. /**
  3112. * struct pdev_set_regdomain_params - PDEV set reg domain params
  3113. * @currentRDinuse: Current Reg domain
  3114. * @currentRD2G: Current Reg domain 2G
  3115. * @currentRD5G: Current Reg domain 5G
  3116. * @ctl_2G: CTL 2G
  3117. * @ctl_5G: CTL 5G
  3118. * @dfsDomain: DFS domain
  3119. * @pdev_id: pdev_id
  3120. */
  3121. struct pdev_set_regdomain_params {
  3122. uint16_t currentRDinuse;
  3123. uint16_t currentRD2G;
  3124. uint16_t currentRD5G;
  3125. uint32_t ctl_2G;
  3126. uint32_t ctl_5G;
  3127. uint8_t dfsDomain;
  3128. uint32_t pdev_id;
  3129. };
  3130. /**
  3131. * struct set_quiet_mode_params - Set quiet mode params
  3132. * @enabled: Enabled
  3133. * @period: Quite period
  3134. * @intval: Quite interval
  3135. * @duration: Quite duration
  3136. * @offset: offset
  3137. */
  3138. struct set_quiet_mode_params {
  3139. uint8_t enabled;
  3140. uint8_t period;
  3141. uint16_t intval;
  3142. uint16_t duration;
  3143. uint16_t offset;
  3144. };
  3145. /**
  3146. * struct set_beacon_filter_params - Set beacon filter params
  3147. * @vdev_id: VDEV id
  3148. * @ie: Pointer to IE fields
  3149. */
  3150. struct set_beacon_filter_params {
  3151. uint8_t vdev_id;
  3152. uint32_t *ie;
  3153. };
  3154. /**
  3155. * struct remove_beacon_filter_params - Remove beacon filter params
  3156. * @vdev_id: VDEV id
  3157. */
  3158. struct remove_beacon_filter_params {
  3159. uint8_t vdev_id;
  3160. };
  3161. /**
  3162. * struct mgmt_params - Mgmt params
  3163. * @vdev_id: vdev id
  3164. * @buf_len: length of frame buffer
  3165. * @wbuf: frame buffer
  3166. */
  3167. struct mgmt_params {
  3168. int vdev_id;
  3169. uint32_t buf_len;
  3170. qdf_nbuf_t wbuf;
  3171. };
  3172. /**
  3173. * struct addba_clearresponse_params - Addba clear response params
  3174. * @vdev_id: VDEV id
  3175. */
  3176. struct addba_clearresponse_params {
  3177. uint8_t vdev_id;
  3178. };
  3179. /**
  3180. * struct addba_send_params - ADDBA send params
  3181. * @vdev_id: vdev id
  3182. * @tidno: TID
  3183. * @buffersize: buffer size
  3184. */
  3185. struct addba_send_params {
  3186. uint8_t vdev_id;
  3187. uint8_t tidno;
  3188. uint16_t buffersize;
  3189. };
  3190. /**
  3191. * struct delba_send_params - DELBA send params
  3192. * @vdev_id: vdev id
  3193. * @tidno: TID
  3194. * @initiator: initiator
  3195. * @reasoncode: reason code
  3196. */
  3197. struct delba_send_params {
  3198. uint8_t vdev_id;
  3199. uint8_t tidno;
  3200. uint8_t initiator;
  3201. uint16_t reasoncode;
  3202. };
  3203. /**
  3204. * struct addba_setresponse_arams - Set ADDBA response params
  3205. * @vdev_id: vdev id
  3206. * @tidno: TID
  3207. * @statuscode: status code in response
  3208. */
  3209. struct addba_setresponse_params {
  3210. uint8_t vdev_id;
  3211. uint8_t tidno;
  3212. uint16_t statuscode;
  3213. };
  3214. /**
  3215. * struct singleamsdu_params - Single AMSDU params
  3216. * @vdev_id: vdev is
  3217. * @tidno: TID
  3218. */
  3219. struct singleamsdu_params {
  3220. uint8_t vdev_id;
  3221. uint8_t tidno;
  3222. };
  3223. /**
  3224. * struct set_qbosst_params - Set QBOOST params
  3225. * @vdev_id: vdev id
  3226. * @value: value
  3227. */
  3228. struct set_qboost_params {
  3229. uint8_t vdev_id;
  3230. uint32_t value;
  3231. };
  3232. /**
  3233. * struct mu_scan_params - MU scan params
  3234. * @id: id
  3235. * @type: type
  3236. * @duration: Duration
  3237. * @lteu_tx_power: LTEU tx power
  3238. */
  3239. struct mu_scan_params {
  3240. uint8_t id;
  3241. uint8_t type;
  3242. uint32_t duration;
  3243. uint32_t lteu_tx_power;
  3244. uint32_t rssi_thr_bssid;
  3245. uint32_t rssi_thr_sta;
  3246. uint32_t rssi_thr_sc;
  3247. uint32_t plmn_id;
  3248. uint32_t alpha_num_bssid;
  3249. };
  3250. /**
  3251. * struct lteu_config_params - LTEU config params
  3252. * @lteu_gpio_start: start MU/AP scan after GPIO toggle
  3253. * @lteu_num_bins: no. of elements in the following arrays
  3254. * @use_actual_nf: whether to use the actual NF obtained or a hardcoded one
  3255. * @lteu_weight: weights for MU algo
  3256. * @lteu_thresh: thresholds for MU algo
  3257. * @lteu_gamma: gamma's for MU algo
  3258. * @lteu_scan_timeout: timeout in ms to gpio toggle
  3259. * @alpha_num_ssid: alpha for num active bssid calculation
  3260. * @wifi_tx_power: Wifi Tx power
  3261. */
  3262. struct lteu_config_params {
  3263. uint8_t lteu_gpio_start;
  3264. uint8_t lteu_num_bins;
  3265. uint8_t use_actual_nf;
  3266. uint32_t lteu_weight[LTEU_MAX_BINS];
  3267. uint32_t lteu_thresh[LTEU_MAX_BINS];
  3268. uint32_t lteu_gamma[LTEU_MAX_BINS];
  3269. uint32_t lteu_scan_timeout;
  3270. uint32_t alpha_num_bssid;
  3271. uint32_t wifi_tx_power;
  3272. uint32_t allow_err_packets;
  3273. };
  3274. struct wmi_macaddr_t {
  3275. /** upper 4 bytes of MAC address */
  3276. uint32_t mac_addr31to0;
  3277. /** lower 2 bytes of MAC address */
  3278. uint32_t mac_addr47to32;
  3279. };
  3280. /**
  3281. * struct wlan_profile_params - WLAN profile params
  3282. * @param_id: param id
  3283. * @profile_id: profile id
  3284. * @enable: enable
  3285. */
  3286. struct wlan_profile_params {
  3287. uint32_t param_id;
  3288. uint32_t profile_id;
  3289. uint32_t enable;
  3290. };
  3291. /* struct ht_ie_params - HT IE params
  3292. * @ie_len: IE length
  3293. * @ie_data: pointer to IE data
  3294. * @tx_streams: Tx streams supported for this HT IE
  3295. * @rx_streams: Rx streams supported for this HT IE
  3296. */
  3297. struct ht_ie_params {
  3298. uint32_t ie_len;
  3299. uint8_t *ie_data;
  3300. uint32_t tx_streams;
  3301. uint32_t rx_streams;
  3302. };
  3303. /* struct vht_ie_params - VHT IE params
  3304. * @ie_len: IE length
  3305. * @ie_data: pointer to IE data
  3306. * @tx_streams: Tx streams supported for this VHT IE
  3307. * @rx_streams: Rx streams supported for this VHT IE
  3308. */
  3309. struct vht_ie_params {
  3310. uint32_t ie_len;
  3311. uint8_t *ie_data;
  3312. uint32_t tx_streams;
  3313. uint32_t rx_streams;
  3314. };
  3315. /**
  3316. * struct wmi_host_wmeParams - WME params
  3317. * @wmep_acm: ACM paramete
  3318. * @wmep_aifsn: AIFSN parameters
  3319. * @wmep_logcwmin: cwmin in exponential form
  3320. * @wmep_logcwmax: cwmax in exponential form
  3321. * @wmep_txopLimit: txopLimit
  3322. * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack
  3323. */
  3324. struct wmi_host_wmeParams {
  3325. u_int8_t wmep_acm;
  3326. u_int8_t wmep_aifsn;
  3327. u_int8_t wmep_logcwmin;
  3328. u_int8_t wmep_logcwmax;
  3329. u_int16_t wmep_txopLimit;
  3330. u_int8_t wmep_noackPolicy;
  3331. };
  3332. /**
  3333. * struct wmm_update_params - WMM update params
  3334. * @wmep_array: WME params for each AC
  3335. */
  3336. struct wmm_update_params {
  3337. struct wmi_host_wmeParams *wmep_array;
  3338. };
  3339. /**
  3340. * struct wmi_host_wmevParams - WME params
  3341. * @wmep_acm: ACM paramete
  3342. * @wmep_aifsn: AIFSN parameters
  3343. * @wmep_logcwmin: cwmin in exponential form
  3344. * @wmep_logcwmax: cwmax in exponential form
  3345. * @wmep_txopLimit: txopLimit
  3346. * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack
  3347. */
  3348. struct wmi_host_wme_vparams {
  3349. u_int32_t acm;
  3350. u_int32_t aifs;
  3351. u_int32_t cwmin;
  3352. u_int32_t cwmax;
  3353. union {
  3354. u_int32_t txoplimit;
  3355. u_int32_t mu_edca_timer;
  3356. };
  3357. u_int32_t noackpolicy;
  3358. };
  3359. /**
  3360. * struct ratepwr_table_params - Rate power table params
  3361. * @ratepwr_tbl: pointer to rate power table
  3362. * @ratepwr_len: rate power table len
  3363. */
  3364. struct ratepwr_table_params {
  3365. uint8_t *ratepwr_tbl;
  3366. uint16_t ratepwr_len;
  3367. };
  3368. /**
  3369. * struct ctl_table_params - Ctl table params
  3370. * @ctl_array: pointer to ctl array
  3371. * @ctl_cmd_len: ctl command length
  3372. * @is_acfg_ctl: is acfg_ctl table
  3373. */
  3374. struct ctl_table_params {
  3375. uint8_t *ctl_array;
  3376. uint16_t ctl_cmd_len;
  3377. uint32_t target_type;
  3378. bool is_2g;
  3379. uint32_t ctl_band;
  3380. uint32_t pdev_id;
  3381. };
  3382. /**
  3383. * struct mimogain_table_params - MIMO gain table params
  3384. * @array_gain: pointer to array gain table
  3385. * @tbl_len: table length
  3386. * @multichain_gain_bypass: bypass multichain gain
  3387. */
  3388. struct mimogain_table_params {
  3389. uint8_t *array_gain;
  3390. uint16_t tbl_len;
  3391. bool multichain_gain_bypass;
  3392. uint32_t pdev_id;
  3393. };
  3394. /**
  3395. * struct ratepwr_chainmask_params - Rate power chainmask params
  3396. * @ratepwr_chain_tbl: pointer to ratepwr chain table
  3397. * @num_rate: number of rate in table
  3398. * @pream_type: preamble type
  3399. * @ops: ops
  3400. */
  3401. struct ratepwr_chainmsk_params {
  3402. uint32_t *ratepwr_chain_tbl;
  3403. uint16_t num_rate;
  3404. uint8_t pream_type;
  3405. uint8_t ops;
  3406. };
  3407. struct macaddr_params {
  3408. uint8_t *macaddr;
  3409. };
  3410. /**
  3411. * struct acparams_params - acparams config structure
  3412. * @ac: AC to configure
  3413. * @use_rts: Use rts for this AC
  3414. * @aggrsize_scaling: Aggregrate size scaling for the AC
  3415. * @min_kbps: min kbps req
  3416. */
  3417. struct acparams_params {
  3418. uint8_t ac;
  3419. uint8_t use_rts;
  3420. uint8_t aggrsize_scaling;
  3421. uint32_t min_kbps;
  3422. };
  3423. /**
  3424. * struct vap_dscp_tid_map_params - DSCP tid map params
  3425. * @vdev_id: vdev id
  3426. * @dscp_to_tid_map: pointer to arry of tid to dscp map table
  3427. */
  3428. struct vap_dscp_tid_map_params {
  3429. uint8_t vdev_id;
  3430. uint32_t *dscp_to_tid_map;
  3431. };
  3432. /**
  3433. * struct proxy_ast_reserve_params - Proxy AST reserve params
  3434. * @macaddr: macaddr for proxy ast entry
  3435. */
  3436. struct proxy_ast_reserve_params {
  3437. uint8_t *macaddr;
  3438. };
  3439. /**
  3440. * struct fips_params - FIPS params config
  3441. * @key: pointer to key
  3442. * @key_len: length of key
  3443. * @data: pointer data buf
  3444. * @data_len: length of data buf
  3445. * @mode: mode
  3446. * @op: operation
  3447. * @pdev_id: pdev_id for identifying the MAC
  3448. */
  3449. struct fips_params {
  3450. uint8_t *key;
  3451. uint32_t key_len;
  3452. uint8_t *data;
  3453. uint32_t data_len;
  3454. uint32_t mode;
  3455. uint32_t op;
  3456. uint32_t pdev_id;
  3457. };
  3458. /**
  3459. * struct mcast_group_update_param - Mcast group table update to target
  3460. * @action: Addition/deletion
  3461. * @wildcard: iwldcard table entry?
  3462. * @mcast_ip_addr: mcast ip address to be updated
  3463. * @mcast_ip_addr_bytes: mcast ip addr bytes
  3464. * @ucast_mac_addr: ucast peer mac subscribed to mcast ip
  3465. * @filter_mode: filter mode
  3466. * @nsrcs: number of entries in source list
  3467. * @srcs: source mac accpted
  3468. * @mask: mask
  3469. * @vap_id: vdev id
  3470. * @is_action_delete: is delete
  3471. * @is_filter_mode_snoop:
  3472. * @is_mcast_addr_len:
  3473. */
  3474. struct mcast_group_update_params {
  3475. int action;
  3476. int wildcard;
  3477. uint8_t *mcast_ip_addr;
  3478. int mcast_ip_addr_bytes;
  3479. uint8_t *ucast_mac_addr;
  3480. uint8_t filter_mode;
  3481. uint8_t nsrcs;
  3482. uint8_t *srcs;
  3483. uint8_t *mask;
  3484. uint8_t vap_id;
  3485. bool is_action_delete;
  3486. bool is_filter_mode_snoop;
  3487. bool is_mcast_addr_len;
  3488. };
  3489. /**
  3490. * struct periodic_chan_stats_param - periodic channel stats req param
  3491. * @stats_period: stats period update
  3492. * @enable: enable/disable
  3493. */
  3494. struct periodic_chan_stats_params {
  3495. uint32_t stats_period;
  3496. bool enable;
  3497. uint32_t pdev_id;
  3498. };
  3499. /**
  3500. * enum wmi_host_packet_power_rate_flags: packer power rate flags
  3501. * @WMI_HOST_FLAG_RTSENA: RTS enabled
  3502. * @WMI_HOST_FLAG_CTSENA: CTS enabled
  3503. * @WMI_HOST_FLAG_STBC: STBC is set
  3504. * @WMI_HOST_FLAG_LDPC: LDPC is set
  3505. * @WMI_HOST_FLAG_TXBF: Tx Bf enabled
  3506. * @WMI_HOST_FLAG_MU2: MU2 data
  3507. * @WMI_HOST_FLAG_MU3: MU3 data
  3508. * @WMI_HOST_FLAG_SERIES1: Rate series 1
  3509. * @WMI_HOST_FLAG_SGI: Short gaurd interval
  3510. */
  3511. enum wmi_host_packet_power_rate_flags {
  3512. WMI_HOST_FLAG_RTSENA = 0x0001,
  3513. WMI_HOST_FLAG_CTSENA = 0x0002,
  3514. WMI_HOST_FLAG_STBC = 0x0004,
  3515. WMI_HOST_FLAG_LDPC = 0x0008,
  3516. WMI_HOST_FLAG_TXBF = 0x0010,
  3517. WMI_HOST_FLAG_MU2 = 0x0020,
  3518. WMI_HOST_FLAG_MU3 = 0x0040,
  3519. WMI_HOST_FLAG_SERIES1 = 0x0080,
  3520. WMI_HOST_FLAG_SGI = 0x0100,
  3521. };
  3522. /**
  3523. * enum wmi_host_su_mu_ofdma_flags: packer power su mu ofdma flags
  3524. * @WMI_HOST_FLAG_SU: SU Data
  3525. * @WMI_HOST_FLAG_DL_MU_MIMO_AC: DL AC MU data
  3526. * @WMI_HOST_FLAG_DL_MU_MIMO_AX: DL AX MU data
  3527. * @WMI_HOST_FLAG_DL_OFDMA: DL OFDMA data
  3528. * @WMI_HOST_FLAG_UL_OFDMA: UL OFDMA data
  3529. * @WMI_HOST_FLAG_UL_MU_MIMO: UL MU data
  3530. */
  3531. enum wmi_host_su_mu_ofdma_flags {
  3532. WMI_HOST_FLAG_SU = 0x0001,
  3533. WMI_HOST_FLAG_DL_MU_MIMO_AC = 0x0002,
  3534. WMI_HOST_FLAG_DL_MU_MIMO_AX = 0x0003,
  3535. WMI_HOST_FLAG_DL_OFDMA = 0x0004,
  3536. WMI_HOST_FLAG_UL_OFDMA = 0x0005,
  3537. WMI_HOST_FLAG_UL_MU_MIMO = 0x0006,
  3538. };
  3539. /**
  3540. * enum wmi_host_preamble_type: preamble type
  3541. * @WMI_HOST_PREAMBLE_OFDM: ofdm rate
  3542. * @WMI_HOST_PREAMBLE_CCK: cck rate
  3543. * @WMI_HOST_PREAMBLE_HT: ht rate
  3544. * @WMI_HOST_PREAMBLE_VHT: vht rate
  3545. * @WMI_HOST_PREAMBLE_HE: 11ax he rate
  3546. */
  3547. enum wmi_host_preamble_type {
  3548. WMI_HOST_PREAMBLE_OFDM = 0,
  3549. WMI_HOST_PREAMBLE_CCK = 1,
  3550. WMI_HOST_PREAMBLE_HT = 2,
  3551. WMI_HOST_PREAMBLE_VHT = 3,
  3552. WMI_HOST_PREAMBLE_HE = 4,
  3553. };
  3554. /**
  3555. * struct packet_power_info_params - packet power info params
  3556. * @chainmask: chain mask
  3557. * @chan_width: channel bandwidth
  3558. * @rate_flags: rate flags
  3559. * @su_mu_ofdma: su/mu/ofdma flags
  3560. * @nss: number of spatial streams
  3561. * @preamble: preamble
  3562. * @hw_rate:
  3563. */
  3564. struct packet_power_info_params {
  3565. uint16_t chainmask;
  3566. uint16_t chan_width;
  3567. uint16_t rate_flags;
  3568. uint16_t su_mu_ofdma;
  3569. uint16_t nss;
  3570. uint16_t preamble;
  3571. uint16_t hw_rate;
  3572. uint32_t pdev_id;
  3573. };
  3574. /**
  3575. * WMI_GPIO_CONFIG_CMDID
  3576. */
  3577. enum {
  3578. WMI_HOST_GPIO_PULL_NONE,
  3579. WMI_HOST_GPIO_PULL_UP,
  3580. WMI_HOST_GPIO_PULL_DOWN,
  3581. };
  3582. /**
  3583. * WMI_GPIO_INTTYPE
  3584. */
  3585. enum {
  3586. WMI_HOST_GPIO_INTTYPE_DISABLE,
  3587. WMI_HOST_GPIO_INTTYPE_RISING_EDGE,
  3588. WMI_HOST_GPIO_INTTYPE_FALLING_EDGE,
  3589. WMI_HOST_GPIO_INTTYPE_BOTH_EDGE,
  3590. WMI_HOST_GPIO_INTTYPE_LEVEL_LOW,
  3591. WMI_HOST_GPIO_INTTYPE_LEVEL_HIGH
  3592. };
  3593. /**
  3594. * struct wmi_host_gpio_input_event - GPIO input event structure
  3595. * @gpio_num: GPIO number which changed state
  3596. */
  3597. typedef struct {
  3598. uint32_t gpio_num; /* GPIO number which changed state */
  3599. } wmi_host_gpio_input_event;
  3600. /**
  3601. * struct gpio_config_params - GPIO config params
  3602. * @gpio_num: GPIO number to config
  3603. * @input: input/output
  3604. * @pull_type: pull type
  3605. * @intr_mode: int mode
  3606. */
  3607. struct gpio_config_params {
  3608. uint32_t gpio_num;
  3609. uint32_t input;
  3610. uint32_t pull_type;
  3611. uint32_t intr_mode;
  3612. };
  3613. /**
  3614. * struct gpio_output_params - GPIO output params
  3615. * @gpio_num: GPIO number to configure
  3616. * @set: set/reset
  3617. */
  3618. struct gpio_output_params {
  3619. uint32_t gpio_num;
  3620. uint32_t set;
  3621. };
  3622. /* flags bit 0: to configure wlan priority bitmap */
  3623. #define WMI_HOST_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT (1<<0)
  3624. /* flags bit 1: to configure both period and wlan duration */
  3625. #define WMI_HOST_BTCOEX_PARAM_FLAGS_DUTY_CYCLE_BIT (1<<1)
  3626. struct btcoex_cfg_params {
  3627. /* WLAN priority bitmask for different frame types */
  3628. uint32_t btcoex_wlan_priority_bitmap;
  3629. /* This command is used to configure different btcoex params
  3630. * in different situations.The host sets the appropriate bit(s)
  3631. * in btcoex_param_flags to indicate which configuration parameters
  3632. * are valid within a particular BT coex config message, so that one
  3633. * BT configuration parameter can be configured without affecting
  3634. * other BT configuration parameters.E.g. if the host wants to
  3635. * configure only btcoex_wlan_priority_bitmap it sets only
  3636. * WMI_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT in
  3637. * btcoex_param_flags so that firmware will not overwrite
  3638. * other params with default value passed in the command.
  3639. * Host can also set multiple bits in btcoex_param_flags
  3640. * to configure more than one param in single message.
  3641. */
  3642. uint32_t btcoex_param_flags;
  3643. /* period denotes the total time in milliseconds which WLAN and BT share
  3644. * configured percentage for transmission and reception.
  3645. */
  3646. uint32_t period;
  3647. /* wlan duration is the time in milliseconds given for wlan
  3648. * in above period.
  3649. */
  3650. uint32_t wlan_duration;
  3651. };
  3652. #define WMI_HOST_COEX_CONFIG_BUF_MAX_LEN 32 /* 128 bytes */
  3653. /**
  3654. * coex_ver_cfg_t
  3655. * @coex_version: Version for 4 wire coex
  3656. * @length: Length of payload buffer based on version
  3657. * @config_buf: Payload Buffer
  3658. */
  3659. typedef struct {
  3660. /* VERSION_4 (4 wire coex) */
  3661. uint32_t coex_version;
  3662. /* No. of uint32_t elements in payload buffer. Will depend on the coex
  3663. * version
  3664. */
  3665. uint32_t length;
  3666. /* Payload buffer */
  3667. uint32_t config_buf[WMI_HOST_COEX_CONFIG_BUF_MAX_LEN];
  3668. } coex_ver_cfg_t;
  3669. #define WMI_HOST_RTT_REPORT_CFR 0
  3670. #define WMI_HOST_RTT_NO_REPORT_CFR 1
  3671. #define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR 2
  3672. /**
  3673. * struct rtt_meas_req_test_params
  3674. * @peer: peer mac address
  3675. * @req_frame_type: RTT request frame type
  3676. * @req_bw: requested bandwidth
  3677. * @req_preamble: Preamble
  3678. * @req_num_req: num of requests
  3679. * @req_report_type: report type
  3680. * @num_measurements: number of measurements
  3681. * @asap_mode: priority
  3682. * @lci_requested: LCI requested
  3683. * @loc_civ_requested:
  3684. * @channel_param: channel param
  3685. * @req_id: requested id
  3686. */
  3687. struct rtt_meas_req_test_params {
  3688. uint8_t peer[IEEE80211_ADDR_LEN];
  3689. int req_frame_type;
  3690. int req_bw;
  3691. int req_preamble;
  3692. int req_num_req;
  3693. int req_report_type;
  3694. uint32_t num_measurements;
  3695. uint32_t asap_mode;
  3696. uint32_t lci_requested;
  3697. uint32_t loc_civ_requested;
  3698. struct channel_param channel;
  3699. uint8_t req_id;
  3700. };
  3701. /**
  3702. * struct rtt_meas_req_params - RTT measurement request params
  3703. * @req_id: Request id
  3704. * @vdev_id: vdev id
  3705. * @sta_mac_addr: pointer to station mac address
  3706. * @spoof_mac_addr: pointer to spoof mac address
  3707. * @is_mode_na: 11NA
  3708. * @is_mode_ac: AC
  3709. * @is_bw_20: 20
  3710. * @is_bw_40: 40
  3711. * @is_bw_80: 80
  3712. * @num_probe_rqst: number of probe request
  3713. * @channel_param: channel param
  3714. */
  3715. struct rtt_meas_req_params {
  3716. uint8_t req_id;
  3717. uint8_t vdev_id;
  3718. uint8_t *sta_mac_addr;
  3719. uint8_t *spoof_mac_addr;
  3720. bool is_mode_na;
  3721. bool is_mode_ac;
  3722. bool is_bw_20;
  3723. bool is_bw_40;
  3724. bool is_bw_80;
  3725. uint32_t num_probe_rqst;
  3726. struct channel_param channel;
  3727. };
  3728. /**
  3729. * struct lci_set_params - LCI params
  3730. * @lci_data: pointer to LCI data
  3731. * @latitude_unc: latitude
  3732. * @latitude_0_12: bits 0 to 1 of latitude
  3733. * @latitude_2_33: bits 2 to 33 of latitude
  3734. * @longitude_unc: longitude
  3735. * @longitude_0_1: bits 0 to 1 of longitude
  3736. * @longitude_2_33: bits 2 to 33 of longitude
  3737. * @altitude_type: altitude type
  3738. * @altitude_unc_0_3: altitude bits 0 - 3
  3739. * @altitude_unc_4_5: altitude bits 4 - 5
  3740. * @altitude: altitude
  3741. * @datum: dataum
  3742. * @reg_loc_agmt:
  3743. * @reg_loc_dse:
  3744. * @dep_sta:
  3745. * @version: version
  3746. */
  3747. struct lci_set_params {
  3748. void *lci_data;
  3749. uint8_t latitude_unc:6,
  3750. latitude_0_1:2;
  3751. uint32_t latitude_2_33;
  3752. uint8_t longitude_unc:6,
  3753. longitude_0_1:2;
  3754. uint32_t longitude_2_33;
  3755. uint8_t altitude_type:4,
  3756. altitude_unc_0_3:4;
  3757. uint32_t altitude_unc_4_5:2,
  3758. altitude:30;
  3759. uint8_t datum:3,
  3760. reg_loc_agmt:1,
  3761. reg_loc_dse:1,
  3762. dep_sta:1,
  3763. version:2;
  3764. uint8_t *colocated_bss;
  3765. int msg_len;
  3766. };
  3767. /**
  3768. * struct lcr_set_params - LCR params
  3769. * @lcr_data: pointer to lcr data
  3770. */
  3771. struct lcr_set_params {
  3772. void *lcr_data;
  3773. int msg_len;
  3774. };
  3775. /**
  3776. * struct rtt_keepalive_req_params - RTT keepalive params
  3777. * @macaddr: pointer to macaddress
  3778. * @req_id: Request id
  3779. * @vdev_id: vdev id
  3780. * @stop: start/stop
  3781. */
  3782. struct rtt_keepalive_req_params {
  3783. uint8_t *macaddr;
  3784. uint8_t req_id;
  3785. uint8_t vdev_id;
  3786. bool stop;
  3787. };
  3788. /**
  3789. * struct rx_reorder_queue_setup_params - Reorder queue setup params
  3790. * @peer_mac_addr: Peer mac address
  3791. * @tid: TID
  3792. * @vdev_id: vdev id
  3793. * @hw_qdesc_paddr_lo: lower 32 bits of queue desc adddress
  3794. * @hw_qdesc_paddr_hi: upper 32 bits of queue desc adddress
  3795. * @queue_no: 16-bit number assigned by host for queue
  3796. * @ba_window_size_valid: BA window size validity flag
  3797. * @ba_window_size: BA window size
  3798. */
  3799. struct rx_reorder_queue_setup_params {
  3800. uint8_t *peer_macaddr;
  3801. uint16_t tid;
  3802. uint16_t vdev_id;
  3803. uint32_t hw_qdesc_paddr_lo;
  3804. uint32_t hw_qdesc_paddr_hi;
  3805. uint16_t queue_no;
  3806. uint8_t ba_window_size_valid;
  3807. uint16_t ba_window_size;
  3808. };
  3809. /**
  3810. * struct rx_reorder_queue_remove_params - Reorder queue setup params
  3811. * @peer_mac_addr: Peer mac address
  3812. * @vdev_id: vdev id
  3813. * @peer_tid_bitmap: peer tid bitmap
  3814. */
  3815. struct rx_reorder_queue_remove_params {
  3816. uint8_t *peer_macaddr;
  3817. uint16_t vdev_id;
  3818. uint32_t peer_tid_bitmap;
  3819. };
  3820. /**
  3821. * struct wmi_host_stats_event - Stats event params
  3822. * @stats_id: stats id of type wmi_host_stats_event
  3823. * @num_pdev_stats: number of pdev stats event structures 0 or 1
  3824. * @num_pdev_ext_stats: number of pdev ext stats event structures
  3825. * @num_vdev_stats: number of vdev stats
  3826. * @num_peer_stats: number of peer stats event structures 0 or max peers
  3827. * @num_bcnflt_stats: number of beacon filter stats
  3828. * @num_chan_stats: number of channel stats
  3829. * @pdev_id: device id for the radio
  3830. * @num_bcn_stats: number of beacon stats
  3831. * @num_rssi_stats: number of rssi stats
  3832. */
  3833. typedef struct {
  3834. wmi_host_stats_id stats_id;
  3835. uint32_t num_pdev_stats;
  3836. uint32_t num_pdev_ext_stats;
  3837. uint32_t num_vdev_stats;
  3838. uint32_t num_peer_stats;
  3839. uint32_t num_bcnflt_stats;
  3840. uint32_t num_chan_stats;
  3841. uint32_t pdev_id;
  3842. uint32_t num_bcn_stats;
  3843. uint32_t num_rssi_stats;
  3844. } wmi_host_stats_event;
  3845. /**
  3846. * struct wmi_host_peer_extd_stats - peer extd stats event structure
  3847. * @peer_macaddr: Peer mac address
  3848. * @inactive_time: inactive time in secs
  3849. * @peer_chain_rssi: peer rssi
  3850. * @rx_duration: RX duration
  3851. * @peer_tx_bytes: TX bytes
  3852. * @peer_rx_bytes: RX bytes
  3853. * @last_tx_rate_code: Tx rate code of last frame
  3854. * @last_tx_power: Tx power latest
  3855. * @atf_tokens_allocated: atf tokens allocated
  3856. * @atf_tokens_utilized: atf tokens utilized
  3857. * @num_mu_tx_blacklisted: Blacklisted MU Tx count
  3858. * @sgi_count: sgi count of the peer
  3859. * @reserved: for future use
  3860. */
  3861. typedef struct {
  3862. wmi_host_mac_addr peer_macaddr;
  3863. uint32_t inactive_time;
  3864. uint32_t peer_chain_rssi;
  3865. uint32_t rx_duration;
  3866. uint32_t peer_tx_bytes;
  3867. uint32_t peer_rx_bytes;
  3868. uint32_t last_tx_rate_code;
  3869. uint32_t last_tx_power;
  3870. uint32_t atf_tokens_allocated;
  3871. uint32_t atf_tokens_utilized;
  3872. uint32_t num_mu_tx_blacklisted;
  3873. uint32_t sgi_count;
  3874. uint32_t reserved[2];
  3875. } wmi_host_peer_extd_stats;
  3876. /**
  3877. * struct wmi_host_pdev_ext_stats - peer ext stats structure
  3878. * @rx_rssi_comb: RX rssi
  3879. * @rx_rssi_chain0: RX rssi chain 0
  3880. * @rx_rssi_chain1: RX rssi chain 1
  3881. * @rx_rssi_chain2: RX rssi chain 2
  3882. * @rx_rssi_chain3: RX rssi chain 3
  3883. * @rx_mcs: RX MCS array
  3884. * @tx_mcs: TX MCS array
  3885. * @ack_rssi: Ack rssi
  3886. */
  3887. typedef struct {
  3888. uint32_t rx_rssi_comb;
  3889. uint32_t rx_rssi_chain0;
  3890. uint32_t rx_rssi_chain1;
  3891. uint32_t rx_rssi_chain2;
  3892. uint32_t rx_rssi_chain3;
  3893. uint32_t rx_mcs[10];
  3894. uint32_t tx_mcs[10];
  3895. uint32_t ack_rssi;
  3896. } wmi_host_pdev_ext_stats;
  3897. /**
  3898. * struct wmi_host_dbg_tx_stats - Debug stats
  3899. * @comp_queued: Num HTT cookies queued to dispatch list
  3900. * @comp_delivered: Num HTT cookies dispatched
  3901. * @msdu_enqued: Num MSDU queued to WAL
  3902. * @mpdu_enqued: Num MPDU queue to WAL
  3903. * @wmm_drop: Num MSDUs dropped by WMM limit
  3904. * @local_enqued: Num Local frames queued
  3905. * @local_freed: Num Local frames done
  3906. * @hw_queued: Num queued to HW
  3907. * @hw_reaped: Num PPDU reaped from HW
  3908. * @underrun: Num underruns
  3909. * @hw_paused: HW Paused.
  3910. * @tx_abort: Num PPDUs cleaned up in TX abort
  3911. * @mpdus_requed: Num MPDUs requed by SW
  3912. * @tx_ko: excessive retries
  3913. * @tx_xretry:
  3914. * @data_rc: data hw rate code
  3915. * @self_triggers: Scheduler self triggers
  3916. * @sw_retry_failure: frames dropped due to excessive sw retries
  3917. * @illgl_rate_phy_err: illegal rate phy errors
  3918. * @pdev_cont_xretry: wal pdev continuous xretry
  3919. * @pdev_tx_timeout: wal pdev continuous xretry
  3920. * @pdev_resets: wal pdev resets
  3921. * @stateless_tid_alloc_failure: frames dropped due to non-availability of
  3922. * stateless TIDs
  3923. * @phy_underrun: PhY/BB underrun
  3924. * @txop_ovf: MPDU is more than txop limit
  3925. * @seq_posted: Number of Sequences posted
  3926. * @seq_failed_queueing: Number of Sequences failed queueing
  3927. * @seq_completed: Number of Sequences completed
  3928. * @seq_restarted: Number of Sequences restarted
  3929. * @mu_seq_posted: Number of MU Sequences posted
  3930. * @mpdus_sw_flush: Num MPDUs flushed by SW, HWPAUSED, SW TXABORT
  3931. * (Reset,channel change)
  3932. * @mpdus_hw_filter: Num MPDUs filtered by HW, all filter condition
  3933. * (TTL expired)
  3934. * @mpdus_truncated: Num MPDUs truncated by PDG (TXOP, TBTT,
  3935. * PPDU_duration based on rate, dyn_bw)
  3936. * @mpdus_ack_failed: Num MPDUs that was tried but didn't receive ACK or BA
  3937. * @mpdus_expired: Num MPDUs that was dropped du to expiry.
  3938. * @mc_dropr: Num mc drops
  3939. */
  3940. typedef struct {
  3941. int32_t comp_queued;
  3942. int32_t comp_delivered;
  3943. int32_t msdu_enqued;
  3944. int32_t mpdu_enqued;
  3945. int32_t wmm_drop;
  3946. int32_t local_enqued;
  3947. int32_t local_freed;
  3948. int32_t hw_queued;
  3949. int32_t hw_reaped;
  3950. int32_t underrun;
  3951. uint32_t hw_paused;
  3952. int32_t tx_abort;
  3953. int32_t mpdus_requed;
  3954. uint32_t tx_ko;
  3955. uint32_t tx_xretry;
  3956. uint32_t data_rc;
  3957. uint32_t self_triggers;
  3958. uint32_t sw_retry_failure;
  3959. uint32_t illgl_rate_phy_err;
  3960. uint32_t pdev_cont_xretry;
  3961. uint32_t pdev_tx_timeout;
  3962. uint32_t pdev_resets;
  3963. uint32_t stateless_tid_alloc_failure;
  3964. uint32_t phy_underrun;
  3965. uint32_t txop_ovf;
  3966. uint32_t seq_posted;
  3967. uint32_t seq_failed_queueing;
  3968. uint32_t seq_completed;
  3969. uint32_t seq_restarted;
  3970. uint32_t mu_seq_posted;
  3971. int32_t mpdus_sw_flush;
  3972. int32_t mpdus_hw_filter;
  3973. int32_t mpdus_truncated;
  3974. int32_t mpdus_ack_failed;
  3975. int32_t mpdus_expired;
  3976. uint32_t mc_drop;
  3977. } wmi_host_dbg_tx_stats;
  3978. /**
  3979. * struct wmi_host_dbg_rx_stats - RX Debug stats
  3980. * @mid_ppdu_route_change: Cnts any change in ring routing mid-ppdu
  3981. * @status_rcvd: Total number of statuses processed
  3982. * @r0_frags: Extra frags on rings 0
  3983. * @r1_frags: Extra frags on rings 1
  3984. * @r2_frags: Extra frags on rings 2
  3985. * @r3_frags: Extra frags on rings 3
  3986. * @htt_msdus: MSDUs delivered to HTT
  3987. * @htt_mpdus: MPDUs delivered to HTT
  3988. * @loc_msdus: MSDUs delivered to local stack
  3989. * @loc_mpdus: MPDUS delivered to local stack
  3990. * @oversize_amsdu: AMSDUs that have more MSDUs than the status ring size
  3991. * @phy_errs: Number of PHY errors
  3992. * @phy_err_drop: Number of PHY errors drops
  3993. * @mpdu_errs: Number of mpdu errors - FCS, MIC, ENC etc.
  3994. * @pdev_rx_timeout: Number of rx inactivity timeouts
  3995. * @rx_ovfl_errs: Number of rx overflow errors.
  3996. */
  3997. typedef struct {
  3998. int32_t mid_ppdu_route_change;
  3999. int32_t status_rcvd;
  4000. int32_t r0_frags;
  4001. int32_t r1_frags;
  4002. int32_t r2_frags;
  4003. int32_t r3_frags;
  4004. int32_t htt_msdus;
  4005. int32_t htt_mpdus;
  4006. int32_t loc_msdus;
  4007. int32_t loc_mpdus;
  4008. int32_t oversize_amsdu;
  4009. int32_t phy_errs;
  4010. int32_t phy_err_drop;
  4011. int32_t mpdu_errs;
  4012. uint32_t pdev_rx_timeout;
  4013. int32_t rx_ovfl_errs;
  4014. } wmi_host_dbg_rx_stats;
  4015. /** struct wmi_host_dbg_mem_stats - memory stats
  4016. * @iram_free_size: IRAM free size on target
  4017. * @dram_free_size: DRAM free size on target
  4018. * @sram_free_size: SRAM free size on target
  4019. */
  4020. typedef struct {
  4021. uint32_t iram_free_size;
  4022. uint32_t dram_free_size;
  4023. /* Only Non-TLV */
  4024. uint32_t sram_free_size;
  4025. } wmi_host_dbg_mem_stats;
  4026. typedef struct {
  4027. /* Only TLV */
  4028. int32_t dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
  4029. } wmi_host_dbg_peer_stats;
  4030. /**
  4031. * struct wmi_host_dbg_stats - host debug stats
  4032. * @tx: TX stats of type wmi_host_dbg_tx_stats
  4033. * @rx: RX stats of type wmi_host_dbg_rx_stats
  4034. * @mem: Memory stats of type wmi_host_dbg_mem_stats
  4035. * @peer: peer stats of type wmi_host_dbg_peer_stats
  4036. */
  4037. typedef struct {
  4038. wmi_host_dbg_tx_stats tx;
  4039. wmi_host_dbg_rx_stats rx;
  4040. wmi_host_dbg_mem_stats mem;
  4041. wmi_host_dbg_peer_stats peer;
  4042. } wmi_host_dbg_stats;
  4043. /**
  4044. * struct wmi_host_pdev_stats - PDEV stats
  4045. * @chan_nf: Channel noise floor
  4046. * @tx_frame_count: TX frame count
  4047. * @rx_frame_count: RX frame count
  4048. * @rx_clear_count: rx clear count
  4049. * @cycle_count: cycle count
  4050. * @phy_err_count: Phy error count
  4051. * @chan_tx_pwr: Channel Tx Power
  4052. * @pdev_stats: WAL dbg stats
  4053. * @ackRcvBad:
  4054. * @rtsBad:
  4055. * @rtsGood:
  4056. * @fcsBad:
  4057. * @noBeacons:
  4058. * @mib_int_count:
  4059. */
  4060. typedef struct {
  4061. int32_t chan_nf;
  4062. uint32_t tx_frame_count;
  4063. uint32_t rx_frame_count;
  4064. uint32_t rx_clear_count;
  4065. uint32_t cycle_count;
  4066. uint32_t phy_err_count;
  4067. uint32_t chan_tx_pwr;
  4068. wmi_host_dbg_stats pdev_stats;
  4069. uint32_t ackRcvBad;
  4070. uint32_t rtsBad;
  4071. uint32_t rtsGood;
  4072. uint32_t fcsBad;
  4073. uint32_t noBeacons;
  4074. uint32_t mib_int_count;
  4075. } wmi_host_pdev_stats;
  4076. /**
  4077. * struct wmi_unit_test_event - Structure corresponding to WMI Unit test event
  4078. * @vdev_id: VDEV ID
  4079. * @module_id: MODULE ID
  4080. * @diag_token: Diag Token (the number that was generated in the unit-test cmd)
  4081. * @flag: flag has 2 bits 0x1 indicates status, and 0x2 indicates done-bit
  4082. * @payload_len: payload_len (blindly copied from payload_len field in WMI)
  4083. * @buffer_len: actual number of data bytes in the variable data size TLV
  4084. * buffer_len is likely to be the nearest multiple of 4 (from
  4085. * payload_len). both buffer_len and payload_len need to be
  4086. * passed to wifitool so that the driver can be agnostic
  4087. * regarding these differences.
  4088. * @buffer: data buffer
  4089. */
  4090. typedef struct {
  4091. uint32_t vdev_id;
  4092. uint32_t module_id;
  4093. uint32_t diag_token;
  4094. uint32_t flag;
  4095. uint32_t payload_len;
  4096. uint32_t buffer_len;
  4097. uint8_t buffer[1];
  4098. } wmi_unit_test_event;
  4099. /**
  4100. * struct wmi_host_snr_info - WMI host Signal to noise ration info
  4101. * @bcn_snr: beacon SNR
  4102. * @dat_snr: Data frames SNR
  4103. */
  4104. typedef struct {
  4105. int32_t bcn_snr;
  4106. int32_t dat_snr;
  4107. } wmi_host_snr_info;
  4108. #define WMI_HOST_MAX_TX_RATE_VALUES 10 /*Max Tx Rates */
  4109. #define WMI_HOST_MAX_RSSI_VALUES 10 /*Max Rssi values */
  4110. /* The WLAN_MAX_AC macro cannot be changed without breaking
  4111. * * WMI compatibility.
  4112. * * The maximum value of access category
  4113. * */
  4114. #define WMI_HOST_WLAN_MAX_AC 4
  4115. /* The WMI_HOST_MAX_CHAINS macro cannot be changed without breaking WMI
  4116. * compatibility.
  4117. * The maximum value of number of chains
  4118. */
  4119. #define WMI_HOST_MAX_CHAINS 8
  4120. /**
  4121. * struct wmi_host_vdev_stats - vdev stats structure
  4122. * @vdev_id: unique id identifying the VDEV, generated by the caller
  4123. * Rest all Only TLV
  4124. * @vdev_snr: wmi_host_snr_info
  4125. * @tx_frm_cnt: Total number of packets(per AC) that were successfully
  4126. * transmitted (with and without retries,
  4127. * including multi-cast, broadcast)
  4128. * @rx_frm_cnt: Total number of packets that were successfully received
  4129. * (after appropriate filter rules including multi-cast, broadcast)
  4130. * @multiple_retry_cnt: The number of MSDU packets and MMPDU frames per AC
  4131. * that the 802.11 station successfully transmitted after
  4132. * more than one retransmission attempt
  4133. * @fail_cnt: Total number packets(per AC) failed to transmit
  4134. * @rts_fail_cnt: Total number of RTS/CTS sequence failures for transmission
  4135. * of a packet
  4136. * @rts_succ_cnt: Total number of RTS/CTS sequence success for transmission
  4137. * of a packet
  4138. * @rx_err_cnt: The receive error count. HAL will provide the
  4139. * RxP FCS error global
  4140. * @rx_discard_cnt: The sum of the receive error count and
  4141. * dropped-receive-buffer error count (FCS error)
  4142. * @ack_fail_cnt: Total number packets failed transmit because of no
  4143. * ACK from the remote entity
  4144. * @tx_rate_history:History of last ten transmit rate, in units of 500 kbit/sec
  4145. * @bcn_rssi_history: History of last ten Beacon rssi of the connected Bss
  4146. */
  4147. typedef struct {
  4148. uint32_t vdev_id;
  4149. /* Rest all Only TLV */
  4150. wmi_host_snr_info vdev_snr;
  4151. uint32_t tx_frm_cnt[WMI_HOST_WLAN_MAX_AC];
  4152. uint32_t rx_frm_cnt;
  4153. uint32_t multiple_retry_cnt[WMI_HOST_WLAN_MAX_AC];
  4154. uint32_t fail_cnt[WMI_HOST_WLAN_MAX_AC];
  4155. uint32_t rts_fail_cnt;
  4156. uint32_t rts_succ_cnt;
  4157. uint32_t rx_err_cnt;
  4158. uint32_t rx_discard_cnt;
  4159. uint32_t ack_fail_cnt;
  4160. uint32_t tx_rate_history[WMI_HOST_MAX_TX_RATE_VALUES];
  4161. uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES];
  4162. } wmi_host_vdev_stats;
  4163. /**
  4164. * struct wmi_host_vdev_stats - vdev stats structure
  4165. * @vdev_id: unique id identifying the VDEV, generated by the caller
  4166. * @tx_bcn_succ_cnt: Total number of beacon frame transmitted successfully
  4167. * @tx_bcn_outage_cnt: Total number of failed beacons
  4168. */
  4169. typedef struct {
  4170. uint32_t vdev_id;
  4171. uint32_t tx_bcn_succ_cnt;
  4172. uint32_t tx_bcn_outage_cnt;
  4173. } wmi_host_bcn_stats;
  4174. /**
  4175. * struct wmi_host_vdev_extd_stats - VDEV extended stats
  4176. * @vdev_id: unique id identifying the VDEV, generated by the caller
  4177. * @ppdu_aggr_cnt: No of Aggrs Queued to HW
  4178. * @ppdu_noack: No of PPDU's not Acked includes both aggr and nonaggr's
  4179. * @mpdu_queued: No of MPDU/Subframes's queued to HW in Aggregates
  4180. * @ppdu_nonaggr_cnt: No of NonAggr/MPDU/Subframes's queued to HW
  4181. * in Legacy NonAggregates
  4182. * @mpdu_sw_requed: No of MPDU/Subframes's SW requeued includes
  4183. * both Aggr and NonAggr
  4184. * @mpdu_suc_retry: No of MPDU/Subframes's transmitted Successfully
  4185. * after Single/mul HW retry
  4186. * @mpdu_suc_multitry: No of MPDU/Subframes's transmitted Success
  4187. * after Multiple HW retry
  4188. * @mpdu_fail_retry: No of MPDU/Subframes's failed transmission
  4189. * after Multiple HW retry
  4190. * @reserved[13]: for future extensions set to 0x0
  4191. */
  4192. typedef struct {
  4193. uint32_t vdev_id;
  4194. uint32_t ppdu_aggr_cnt;
  4195. uint32_t ppdu_noack;
  4196. uint32_t mpdu_queued;
  4197. uint32_t ppdu_nonaggr_cnt;
  4198. uint32_t mpdu_sw_requed;
  4199. uint32_t mpdu_suc_retry;
  4200. uint32_t mpdu_suc_multitry;
  4201. uint32_t mpdu_fail_retry;
  4202. uint32_t reserved[13];
  4203. } wmi_host_vdev_extd_stats;
  4204. /**
  4205. * struct wmi_host_vdev_nac_rssi_event - VDEV nac rssi stats
  4206. * @vdev_id: unique id identifying the VDEV, generated by the caller
  4207. * @last_rssi: rssi
  4208. * @avg_rssi: averge rssi
  4209. * @rssi_seq_num: rssi sequence number
  4210. */
  4211. struct wmi_host_vdev_nac_rssi_event {
  4212. uint32_t vdev_id;
  4213. uint32_t last_rssi;
  4214. uint32_t avg_rssi;
  4215. uint32_t rssi_seq_num;
  4216. };
  4217. /**
  4218. * structure wmi_host_peer_retry_stats - peer retry stats
  4219. * @peer_macaddr: peer macaddr
  4220. * @retry_counter_wraparnd_ind: wraparound counter indication
  4221. * @msdu_success: successfully transmitted msdus
  4222. * @msdu_retried: Retried msdus
  4223. * @msdu_mul_retried: msdus retried for more than once
  4224. * @msdu_failed: msdus failed
  4225. * @reserved: for furure extensions
  4226. */
  4227. struct wmi_host_peer_retry_stats {
  4228. wmi_host_mac_addr peer_macaddr;
  4229. uint32_t retry_counter_wraparnd_ind;
  4230. uint32_t msdus_success;
  4231. uint32_t msdus_retried;
  4232. uint32_t msdus_mul_retried;
  4233. uint32_t msdus_failed;
  4234. uint32_t reserved[4];
  4235. };
  4236. /**
  4237. * struct wmi_host_per_chain_rssi_stats - VDEV nac rssi stats
  4238. * @vdev_id: unique id identifying the VDEV, generated by the caller
  4239. * @rssi_avg_beacon: per chain avg rssi for beacon
  4240. * @rssi_avg_data: per chain avg rssi for data
  4241. * @peer_macaddr: peer macaddr
  4242. */
  4243. struct wmi_host_per_chain_rssi_stats {
  4244. uint32_t vdev_id;
  4245. int32_t rssi_avg_beacon[WMI_HOST_MAX_CHAINS];
  4246. int32_t rssi_avg_data[WMI_HOST_MAX_CHAINS];
  4247. wmi_host_mac_addr peer_macaddr;
  4248. };
  4249. /**
  4250. * struct wmi_host_peer_stats - peer stats
  4251. * @peer_macaddr: peer MAC address
  4252. * @peer_rssi: rssi
  4253. * @peer_rssi_seq_num: rssi sequence number
  4254. * @peer_tx_rate: last tx data rate used for peer
  4255. * @peer_rx_rate: last rx data rate used for peer
  4256. * @currentper: Current PER
  4257. * @retries: Retries happened during transmission
  4258. * @txratecount: Maximum Aggregation Size
  4259. * @max4msframelen: Max4msframelen of tx rates used
  4260. * @totalsubframes: Total no of subframes
  4261. * @txbytes: No of bytes transmitted to the client
  4262. * @nobuffs[4]: Packet Loss due to buffer overflows
  4263. * @excretries[4]: Packet Loss due to excessive retries
  4264. * @peer_rssi_changed: how many times peer's RSSI changed by a
  4265. * non-negligible amount
  4266. */
  4267. typedef struct {
  4268. wmi_host_mac_addr peer_macaddr;
  4269. uint32_t peer_rssi;
  4270. uint32_t peer_rssi_seq_num;
  4271. uint32_t peer_tx_rate;
  4272. uint32_t peer_rx_rate;
  4273. uint32_t currentper;
  4274. uint32_t retries;
  4275. uint32_t txratecount;
  4276. uint32_t max4msframelen;
  4277. uint32_t totalsubframes;
  4278. uint32_t txbytes;
  4279. uint32_t nobuffs[4];
  4280. uint32_t excretries[4];
  4281. uint32_t peer_rssi_changed;
  4282. } wmi_host_peer_stats;
  4283. typedef struct {
  4284. uint32_t dummy;
  4285. } wmi_host_bcnflt_stats;
  4286. /**
  4287. * struct wmi_host_chan_stats - WMI chan stats
  4288. * @chan_mhz: Primary channel freq of the channel for which stats are sent
  4289. * @sampling_period_us: Time spent on the channel
  4290. * @rx_clear_count: Aggregate duration over a sampling period for
  4291. * which channel activity was observed
  4292. * @tx_duration_us: Accumalation of the TX PPDU duration over a sampling period
  4293. * @rx_duration_us: Accumalation of the RX PPDU duration over a sampling period
  4294. */
  4295. typedef struct {
  4296. uint32_t chan_mhz;
  4297. uint32_t sampling_period_us;
  4298. uint32_t rx_clear_count;
  4299. uint32_t tx_duration_us;
  4300. uint32_t rx_duration_us;
  4301. } wmi_host_chan_stats;
  4302. #define WMI_EVENT_ID_INVALID 0
  4303. /**
  4304. * Host based ENUM IDs for events to abstract target enums for event_id
  4305. */
  4306. typedef enum {
  4307. wmi_service_ready_event_id = 0,
  4308. wmi_ready_event_id,
  4309. wmi_dbg_msg_event_id,
  4310. wmi_scan_event_id,
  4311. wmi_echo_event_id,
  4312. wmi_update_stats_event_id,
  4313. wmi_inst_rssi_stats_event_id,
  4314. wmi_vdev_start_resp_event_id,
  4315. wmi_vdev_standby_req_event_id,
  4316. wmi_vdev_resume_req_event_id,
  4317. wmi_vdev_stopped_event_id,
  4318. wmi_peer_sta_kickout_event_id,
  4319. wmi_host_swba_event_id,
  4320. wmi_tbttoffset_update_event_id,
  4321. wmi_mgmt_rx_event_id,
  4322. wmi_chan_info_event_id,
  4323. wmi_phyerr_event_id,
  4324. wmi_roam_event_id,
  4325. wmi_profile_match,
  4326. wmi_debug_print_event_id,
  4327. wmi_pdev_qvit_event_id,
  4328. wmi_wlan_profile_data_event_id,
  4329. wmi_rtt_meas_report_event_id,
  4330. wmi_tsf_meas_report_event_id,
  4331. wmi_rtt_error_report_event_id,
  4332. wmi_rtt_keepalive_event_id,
  4333. wmi_oem_cap_event_id,
  4334. wmi_oem_meas_report_event_id,
  4335. wmi_oem_report_event_id,
  4336. wmi_nan_event_id,
  4337. wmi_wow_wakeup_host_event_id,
  4338. wmi_gtk_offload_status_event_id,
  4339. wmi_gtk_rekey_fail_event_id,
  4340. wmi_dcs_interference_event_id,
  4341. wmi_pdev_tpc_config_event_id,
  4342. wmi_csa_handling_event_id,
  4343. wmi_gpio_input_event_id,
  4344. wmi_peer_ratecode_list_event_id,
  4345. wmi_generic_buffer_event_id,
  4346. wmi_mcast_buf_release_event_id,
  4347. wmi_mcast_list_ageout_event_id,
  4348. wmi_vdev_get_keepalive_event_id,
  4349. wmi_wds_peer_event_id,
  4350. wmi_peer_sta_ps_statechg_event_id,
  4351. wmi_pdev_fips_event_id,
  4352. wmi_tt_stats_event_id,
  4353. wmi_pdev_channel_hopping_event_id,
  4354. wmi_pdev_ani_cck_level_event_id,
  4355. wmi_pdev_ani_ofdm_level_event_id,
  4356. wmi_pdev_reserve_ast_entry_event_id,
  4357. wmi_pdev_nfcal_power_event_id,
  4358. wmi_pdev_tpc_event_id,
  4359. wmi_pdev_get_ast_info_event_id,
  4360. wmi_pdev_temperature_event_id,
  4361. wmi_pdev_nfcal_power_all_channels_event_id,
  4362. wmi_pdev_bss_chan_info_event_id,
  4363. wmi_mu_report_event_id,
  4364. wmi_pdev_utf_event_id,
  4365. wmi_pdev_dump_event_id,
  4366. wmi_tx_pause_event_id,
  4367. wmi_dfs_radar_event_id,
  4368. wmi_pdev_l1ss_track_event_id,
  4369. wmi_service_ready_ext_event_id,
  4370. wmi_vdev_install_key_complete_event_id,
  4371. wmi_vdev_mcc_bcn_intvl_change_req_event_id,
  4372. wmi_vdev_tsf_report_event_id,
  4373. wmi_peer_info_event_id,
  4374. wmi_peer_tx_fail_cnt_thr_event_id,
  4375. wmi_peer_estimated_linkspeed_event_id,
  4376. wmi_peer_state_event_id,
  4377. wmi_offload_bcn_tx_status_event_id,
  4378. wmi_offload_prob_resp_tx_status_event_id,
  4379. wmi_mgmt_tx_completion_event_id,
  4380. wmi_tx_delba_complete_event_id,
  4381. wmi_tx_addba_complete_event_id,
  4382. wmi_ba_rsp_ssn_event_id,
  4383. wmi_aggr_state_trig_event_id,
  4384. wmi_roam_synch_event_id,
  4385. wmi_roam_synch_frame_event_id,
  4386. wmi_p2p_disc_event_id,
  4387. wmi_p2p_noa_event_id,
  4388. wmi_p2p_lo_stop_event_id,
  4389. wmi_vdev_add_macaddr_rx_filter_event_id,
  4390. wmi_pdev_resume_event_id,
  4391. wmi_d0_wow_disable_ack_event_id,
  4392. wmi_wow_initial_wakeup_event_id,
  4393. wmi_stats_ext_event_id,
  4394. wmi_iface_link_stats_event_id,
  4395. wmi_peer_link_stats_event_id,
  4396. wmi_radio_link_stats_link,
  4397. wmi_update_fw_mem_dump_event_id,
  4398. wmi_diag_event_id_log_supported_event_id,
  4399. wmi_nlo_match_event_id,
  4400. wmi_nlo_scan_complete_event_id,
  4401. wmi_apfind_event_id,
  4402. wmi_passpoint_match_event_id,
  4403. wmi_chatter_pc_query_event_id,
  4404. wmi_pdev_ftm_intg_event_id,
  4405. wmi_wlan_freq_avoid_event_id,
  4406. wmi_thermal_mgmt_event_id,
  4407. wmi_diag_container_event_id,
  4408. wmi_host_auto_shutdown_event_id,
  4409. wmi_update_whal_mib_stats_event_id,
  4410. wmi_update_vdev_rate_stats_event_id,
  4411. wmi_diag_event_id,
  4412. wmi_unit_test_event_id,
  4413. wmi_ocb_set_sched_event_id,
  4414. wmi_dbg_mesg_flush_complete_event_id,
  4415. wmi_rssi_breach_event_id,
  4416. wmi_uploadh_event_id,
  4417. wmi_captureh_event_id,
  4418. wmi_rfkill_state_change_event_id,
  4419. wmi_tdls_peer_event_id,
  4420. wmi_batch_scan_enabled_event_id,
  4421. wmi_batch_scan_result_event_id,
  4422. wmi_lpi_result_event_id,
  4423. wmi_lpi_status_event_id,
  4424. wmi_lpi_handoff_event_id,
  4425. wmi_extscan_start_stop_event_id,
  4426. wmi_extscan_operation_event_id,
  4427. wmi_extscan_table_usage_event_id,
  4428. wmi_extscan_cached_results_event_id,
  4429. wmi_extscan_wlan_change_results_event_id,
  4430. wmi_extscan_hotlist_match_event_id,
  4431. wmi_extscan_capabilities_event_id,
  4432. wmi_extscan_hotlist_ssid_match_event_id,
  4433. wmi_mdns_stats_event_id,
  4434. wmi_sap_ofl_add_sta_event_id,
  4435. wmi_sap_ofl_del_sta_event_id,
  4436. wmi_ocb_set_config_resp_event_id,
  4437. wmi_ocb_get_tsf_timer_resp_event_id,
  4438. wmi_dcc_get_stats_resp_event_id,
  4439. wmi_dcc_update_ndl_resp_event_id,
  4440. wmi_dcc_stats_event_id,
  4441. wmi_soc_set_hw_mode_resp_event_id,
  4442. wmi_soc_hw_mode_transition_event_id,
  4443. wmi_soc_set_dual_mac_config_resp_event_id,
  4444. wmi_tx_data_traffic_ctrl_event_id,
  4445. wmi_peer_tx_mu_txmit_count_event_id,
  4446. wmi_peer_gid_userpos_list_event_id,
  4447. wmi_pdev_check_cal_version_event_id,
  4448. wmi_atf_peer_stats_event_id,
  4449. wmi_peer_delete_response_event_id,
  4450. wmi_pdev_csa_switch_count_status_event_id,
  4451. wmi_reg_chan_list_cc_event_id,
  4452. wmi_offchan_data_tx_completion_event,
  4453. wmi_dfs_cac_complete_id,
  4454. wmi_dfs_radar_detection_event_id,
  4455. wmi_ext_tbttoffset_update_event_id,
  4456. wmi_11d_new_country_event_id,
  4457. wmi_get_arp_stats_req_id,
  4458. wmi_service_available_event_id,
  4459. wmi_update_rcpi_event_id,
  4460. wmi_pdev_wds_entry_list_event_id,
  4461. wmi_ndp_initiator_rsp_event_id,
  4462. wmi_ndp_indication_event_id,
  4463. wmi_ndp_confirm_event_id,
  4464. wmi_ndp_responder_rsp_event_id,
  4465. wmi_ndp_end_indication_event_id,
  4466. wmi_ndp_end_rsp_event_id,
  4467. wmi_ndl_schedule_update_event_id,
  4468. wmi_oem_response_event_id,
  4469. wmi_peer_stats_info_event_id,
  4470. wmi_pdev_chip_power_stats_event_id,
  4471. wmi_ap_ps_egap_info_event_id,
  4472. wmi_peer_assoc_conf_event_id,
  4473. wmi_vdev_delete_resp_event_id,
  4474. wmi_apf_capability_info_event_id,
  4475. wmi_vdev_encrypt_decrypt_data_rsp_event_id,
  4476. wmi_report_rx_aggr_failure_event_id,
  4477. wmi_pdev_chip_pwr_save_failure_detect_event_id,
  4478. wmi_peer_antdiv_info_event_id,
  4479. wmi_pdev_set_hw_mode_rsp_event_id,
  4480. wmi_pdev_hw_mode_transition_event_id,
  4481. wmi_pdev_set_mac_config_resp_event_id,
  4482. wmi_coex_bt_activity_event_id,
  4483. wmi_mgmt_tx_bundle_completion_event_id,
  4484. wmi_radio_tx_power_level_stats_event_id,
  4485. wmi_report_stats_event_id,
  4486. wmi_dma_buf_release_event_id,
  4487. wmi_sap_obss_detection_report_event_id,
  4488. wmi_obss_color_collision_report_event_id,
  4489. wmi_host_swfda_event_id,
  4490. wmi_sar_get_limits_event_id,
  4491. wmi_pdev_div_rssi_antid_event_id,
  4492. #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
  4493. wmi_host_dfs_status_check_event_id,
  4494. #endif
  4495. wmi_twt_enable_complete_event_id,
  4496. wmi_apf_get_vdev_work_memory_resp_event_id,
  4497. wmi_roam_scan_stats_event_id,
  4498. #ifdef OL_ATH_SMART_LOGGING
  4499. wmi_debug_fatal_condition_eventid,
  4500. #endif /* OL_ATH_SMART_LOGGING */
  4501. wmi_wlan_sar2_result_event_id,
  4502. wmi_esp_estimate_event_id,
  4503. wmi_pdev_ctl_failsafe_check_event_id,
  4504. wmi_events_max,
  4505. } wmi_conv_event_id;
  4506. #define WMI_UNAVAILABLE_PARAM 0
  4507. /**
  4508. * Host based ENUM IDs for PDEV params to abstract target enums
  4509. */
  4510. typedef enum {
  4511. wmi_pdev_param_tx_chain_mask = 0,
  4512. wmi_pdev_param_rx_chain_mask,
  4513. wmi_pdev_param_txpower_limit2g,
  4514. wmi_pdev_param_txpower_limit5g,
  4515. wmi_pdev_param_txpower_scale,
  4516. wmi_pdev_param_beacon_gen_mode,
  4517. wmi_pdev_param_beacon_tx_mode,
  4518. wmi_pdev_param_resmgr_offchan_mode,
  4519. wmi_pdev_param_protection_mode,
  4520. wmi_pdev_param_dynamic_bw,
  4521. wmi_pdev_param_non_agg_sw_retry_th,
  4522. wmi_pdev_param_agg_sw_retry_th,
  4523. wmi_pdev_param_sta_kickout_th,
  4524. wmi_pdev_param_ac_aggrsize_scaling,
  4525. wmi_pdev_param_ltr_enable,
  4526. wmi_pdev_param_ltr_ac_latency_be,
  4527. wmi_pdev_param_ltr_ac_latency_bk,
  4528. wmi_pdev_param_ltr_ac_latency_vi,
  4529. wmi_pdev_param_ltr_ac_latency_vo,
  4530. wmi_pdev_param_ltr_ac_latency_timeout,
  4531. wmi_pdev_param_ltr_sleep_override,
  4532. wmi_pdev_param_ltr_rx_override,
  4533. wmi_pdev_param_ltr_tx_activity_timeout,
  4534. wmi_pdev_param_l1ss_enable,
  4535. wmi_pdev_param_dsleep_enable,
  4536. wmi_pdev_param_pcielp_txbuf_flush,
  4537. wmi_pdev_param_pcielp_txbuf_watermark,
  4538. wmi_pdev_param_pcielp_txbuf_tmo_en,
  4539. wmi_pdev_param_pcielp_txbuf_tmo_value,
  4540. wmi_pdev_param_pdev_stats_update_period,
  4541. wmi_pdev_param_vdev_stats_update_period,
  4542. wmi_pdev_param_peer_stats_update_period,
  4543. wmi_pdev_param_bcnflt_stats_update_period,
  4544. wmi_pdev_param_pmf_qos,
  4545. wmi_pdev_param_arp_ac_override,
  4546. wmi_pdev_param_dcs,
  4547. wmi_pdev_param_ani_enable,
  4548. wmi_pdev_param_ani_poll_period,
  4549. wmi_pdev_param_ani_listen_period,
  4550. wmi_pdev_param_ani_ofdm_level,
  4551. wmi_pdev_param_ani_cck_level,
  4552. wmi_pdev_param_dyntxchain,
  4553. wmi_pdev_param_proxy_sta,
  4554. wmi_pdev_param_idle_ps_config,
  4555. wmi_pdev_param_power_gating_sleep,
  4556. wmi_pdev_param_aggr_burst,
  4557. wmi_pdev_param_rx_decap_mode,
  4558. wmi_pdev_param_fast_channel_reset,
  4559. wmi_pdev_param_burst_dur,
  4560. wmi_pdev_param_burst_enable,
  4561. wmi_pdev_param_smart_antenna_default_antenna,
  4562. wmi_pdev_param_igmpmld_override,
  4563. wmi_pdev_param_igmpmld_tid,
  4564. wmi_pdev_param_antenna_gain,
  4565. wmi_pdev_param_rx_filter,
  4566. wmi_pdev_set_mcast_to_ucast_tid,
  4567. wmi_pdev_param_proxy_sta_mode,
  4568. wmi_pdev_param_set_mcast2ucast_mode,
  4569. wmi_pdev_param_set_mcast2ucast_buffer,
  4570. wmi_pdev_param_remove_mcast2ucast_buffer,
  4571. wmi_pdev_peer_sta_ps_statechg_enable,
  4572. wmi_pdev_param_block_interbss,
  4573. wmi_pdev_param_set_disable_reset_cmdid,
  4574. wmi_pdev_param_set_msdu_ttl_cmdid,
  4575. wmi_pdev_param_set_ppdu_duration_cmdid,
  4576. wmi_pdev_param_txbf_sound_period_cmdid,
  4577. wmi_pdev_param_set_promisc_mode_cmdid,
  4578. wmi_pdev_param_set_burst_mode_cmdid,
  4579. wmi_pdev_param_en_stats,
  4580. wmi_pdev_param_mu_group_policy,
  4581. wmi_pdev_param_noise_detection,
  4582. wmi_pdev_param_noise_threshold,
  4583. wmi_pdev_param_dpd_enable,
  4584. wmi_pdev_param_set_mcast_bcast_echo,
  4585. wmi_pdev_param_atf_strict_sch,
  4586. wmi_pdev_param_atf_sched_duration,
  4587. wmi_pdev_param_ant_plzn,
  4588. wmi_pdev_param_mgmt_retry_limit,
  4589. wmi_pdev_param_sensitivity_level,
  4590. wmi_pdev_param_signed_txpower_2g,
  4591. wmi_pdev_param_signed_txpower_5g,
  4592. wmi_pdev_param_enable_per_tid_amsdu,
  4593. wmi_pdev_param_enable_per_tid_ampdu,
  4594. wmi_pdev_param_cca_threshold,
  4595. wmi_pdev_param_rts_fixed_rate,
  4596. wmi_pdev_param_cal_period,
  4597. wmi_pdev_param_pdev_reset,
  4598. wmi_pdev_param_wapi_mbssid_offset,
  4599. wmi_pdev_param_arp_srcaddr,
  4600. wmi_pdev_param_arp_dstaddr,
  4601. wmi_pdev_param_txpower_decr_db,
  4602. wmi_pdev_param_rx_batchmode,
  4603. wmi_pdev_param_packet_aggr_delay,
  4604. wmi_pdev_param_atf_obss_noise_sch,
  4605. wmi_pdev_param_atf_obss_noise_scaling_factor,
  4606. wmi_pdev_param_cust_txpower_scale,
  4607. wmi_pdev_param_atf_dynamic_enable,
  4608. wmi_pdev_param_atf_ssid_group_policy,
  4609. wmi_pdev_param_rfkill_enable,
  4610. wmi_pdev_param_hw_rfkill_config,
  4611. wmi_pdev_param_low_power_rf_enable,
  4612. wmi_pdev_param_l1ss_track,
  4613. wmi_pdev_param_hyst_en,
  4614. wmi_pdev_param_power_collapse_enable,
  4615. wmi_pdev_param_led_sys_state,
  4616. wmi_pdev_param_led_enable,
  4617. wmi_pdev_param_audio_over_wlan_latency,
  4618. wmi_pdev_param_audio_over_wlan_enable,
  4619. wmi_pdev_param_whal_mib_stats_update_enable,
  4620. wmi_pdev_param_vdev_rate_stats_update_period,
  4621. wmi_pdev_param_cts_cbw,
  4622. wmi_pdev_param_wnts_config,
  4623. wmi_pdev_param_adaptive_early_rx_enable,
  4624. wmi_pdev_param_adaptive_early_rx_min_sleep_slop,
  4625. wmi_pdev_param_adaptive_early_rx_inc_dec_step,
  4626. wmi_pdev_param_early_rx_fix_sleep_slop,
  4627. wmi_pdev_param_bmiss_based_adaptive_bto_enable,
  4628. wmi_pdev_param_bmiss_bto_min_bcn_timeout,
  4629. wmi_pdev_param_bmiss_bto_inc_dec_step,
  4630. wmi_pdev_param_bto_fix_bcn_timeout,
  4631. wmi_pdev_param_ce_based_adaptive_bto_enable,
  4632. wmi_pdev_param_ce_bto_combo_ce_value,
  4633. wmi_pdev_param_tx_chain_mask_2g,
  4634. wmi_pdev_param_rx_chain_mask_2g,
  4635. wmi_pdev_param_tx_chain_mask_5g,
  4636. wmi_pdev_param_rx_chain_mask_5g,
  4637. wmi_pdev_param_tx_chain_mask_cck,
  4638. wmi_pdev_param_tx_chain_mask_1ss,
  4639. wmi_pdev_param_enable_btcoex,
  4640. wmi_pdev_param_atf_peer_stats,
  4641. wmi_pdev_param_btcoex_cfg,
  4642. wmi_pdev_param_mesh_mcast_enable,
  4643. wmi_pdev_param_tx_ack_timeout,
  4644. wmi_pdev_param_soft_tx_chain_mask,
  4645. wmi_pdev_param_cck_tx_enable,
  4646. wmi_pdev_param_esp_indication_period,
  4647. wmi_pdev_param_antenna_gain_half_db,
  4648. wmi_pdev_param_ru26_allowed,
  4649. wmi_pdev_param_esp_ba_window,
  4650. wmi_pdev_param_esp_airtime_fraction,
  4651. wmi_pdev_param_esp_ppdu_duration,
  4652. wmi_pdev_param_use_nol,
  4653. wmi_pdev_param_enable_peer_retry_stats,
  4654. wmi_pdev_param_ul_trig_int,
  4655. wmi_pdev_param_max,
  4656. } wmi_conv_pdev_params_id;
  4657. /**
  4658. * Host based ENUM IDs for VDEV params to abstract target enums
  4659. */
  4660. typedef enum {
  4661. wmi_vdev_param_rts_threshold = 0,
  4662. wmi_vdev_param_fragmentation_threshold,
  4663. wmi_vdev_param_beacon_interval,
  4664. wmi_vdev_param_listen_interval,
  4665. wmi_vdev_param_multicast_rate,
  4666. wmi_vdev_param_mgmt_tx_rate,
  4667. wmi_vdev_param_slot_time,
  4668. wmi_vdev_param_preamble,
  4669. wmi_vdev_param_swba_time,
  4670. wmi_vdev_stats_update_period,
  4671. wmi_vdev_pwrsave_ageout_time,
  4672. wmi_vdev_host_swba_interval,
  4673. wmi_vdev_param_dtim_period,
  4674. wmi_vdev_oc_scheduler_air_time_limit,
  4675. wmi_vdev_param_wds,
  4676. wmi_vdev_param_atim_window,
  4677. wmi_vdev_param_bmiss_count_max,
  4678. wmi_vdev_param_bmiss_first_bcnt,
  4679. wmi_vdev_param_bmiss_final_bcnt,
  4680. wmi_vdev_param_feature_wmm,
  4681. wmi_vdev_param_chwidth,
  4682. wmi_vdev_param_chextoffset,
  4683. wmi_vdev_param_disable_htprotection,
  4684. wmi_vdev_param_sta_quickkickout,
  4685. wmi_vdev_param_mgmt_rate,
  4686. wmi_vdev_param_protection_mode,
  4687. wmi_vdev_param_fixed_rate,
  4688. wmi_vdev_param_sgi,
  4689. wmi_vdev_param_ldpc,
  4690. wmi_vdev_param_tx_stbc,
  4691. wmi_vdev_param_rx_stbc,
  4692. wmi_vdev_param_intra_bss_fwd,
  4693. wmi_vdev_param_def_keyid,
  4694. wmi_vdev_param_nss,
  4695. wmi_vdev_param_bcast_data_rate,
  4696. wmi_vdev_param_mcast_data_rate,
  4697. wmi_vdev_param_mcast_indicate,
  4698. wmi_vdev_param_dhcp_indicate,
  4699. wmi_vdev_param_unknown_dest_indicate,
  4700. wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs,
  4701. wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs,
  4702. wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs,
  4703. wmi_vdev_param_ap_enable_nawds,
  4704. wmi_vdev_param_mcast2ucast_set,
  4705. wmi_vdev_param_enable_rtscts,
  4706. wmi_vdev_param_rc_num_retries,
  4707. wmi_vdev_param_txbf,
  4708. wmi_vdev_param_packet_powersave,
  4709. wmi_vdev_param_drop_unencry,
  4710. wmi_vdev_param_tx_encap_type,
  4711. wmi_vdev_param_ap_detect_out_of_sync_sleeping_sta_time_secs,
  4712. wmi_vdev_param_cabq_maxdur,
  4713. wmi_vdev_param_mfptest_set,
  4714. wmi_vdev_param_rts_fixed_rate,
  4715. wmi_vdev_param_vht_sgimask,
  4716. wmi_vdev_param_vht80_ratemask,
  4717. wmi_vdev_param_early_rx_adjust_enable,
  4718. wmi_vdev_param_early_rx_tgt_bmiss_num,
  4719. wmi_vdev_param_early_rx_bmiss_sample_cycle,
  4720. wmi_vdev_param_early_rx_slop_step,
  4721. wmi_vdev_param_early_rx_init_slop,
  4722. wmi_vdev_param_early_rx_adjust_pause,
  4723. wmi_vdev_param_proxy_sta,
  4724. wmi_vdev_param_meru_vc,
  4725. wmi_vdev_param_rx_decap_type,
  4726. wmi_vdev_param_bw_nss_ratemask,
  4727. wmi_vdev_param_sensor_ap,
  4728. wmi_vdev_param_beacon_rate,
  4729. wmi_vdev_param_dtim_enable_cts,
  4730. wmi_vdev_param_sta_kickout,
  4731. wmi_vdev_param_tx_pwrlimit,
  4732. wmi_vdev_param_snr_num_for_cal,
  4733. wmi_vdev_param_roam_fw_offload,
  4734. wmi_vdev_param_enable_rmc,
  4735. wmi_vdev_param_ibss_max_bcn_lost_ms,
  4736. wmi_vdev_param_max_rate,
  4737. wmi_vdev_param_early_rx_drift_sample,
  4738. wmi_vdev_param_set_ibss_tx_fail_cnt_thr,
  4739. wmi_vdev_param_ebt_resync_timeout,
  4740. wmi_vdev_param_aggr_trig_event_enable,
  4741. wmi_vdev_param_is_ibss_power_save_allowed,
  4742. wmi_vdev_param_is_power_collapse_allowed,
  4743. wmi_vdev_param_is_awake_on_txrx_enabled,
  4744. wmi_vdev_param_inactivity_cnt,
  4745. wmi_vdev_param_txsp_end_inactivity_time_ms,
  4746. wmi_vdev_param_dtim_policy,
  4747. wmi_vdev_param_ibss_ps_warmup_time_secs,
  4748. wmi_vdev_param_ibss_ps_1rx_chain_in_atim_window_enable,
  4749. wmi_vdev_param_rx_leak_window,
  4750. wmi_vdev_param_stats_avg_factor,
  4751. wmi_vdev_param_disconnect_th,
  4752. wmi_vdev_param_rtscts_rate,
  4753. wmi_vdev_param_mcc_rtscts_protection_enable,
  4754. wmi_vdev_param_mcc_broadcast_probe_enable,
  4755. wmi_vdev_param_capabilities,
  4756. wmi_vdev_param_mgmt_tx_power,
  4757. wmi_vdev_param_atf_ssid_sched_policy,
  4758. wmi_vdev_param_disable_dyn_bw_rts,
  4759. wmi_vdev_param_ampdu_subframe_size_per_ac,
  4760. wmi_vdev_param_he_dcm_enable,
  4761. wmi_vdev_param_he_bss_color,
  4762. wmi_vdev_param_he_range_ext_enable,
  4763. wmi_vdev_param_set_hemu_mode,
  4764. wmi_vdev_param_set_he_ltf,
  4765. wmi_vdev_param_set_heop,
  4766. wmi_vdev_param_disable_cabq,
  4767. wmi_vdev_param_rate_dropdown_bmap,
  4768. wmi_vdev_param_tx_power,
  4769. wmi_vdev_param_set_ba_mode,
  4770. wmi_vdev_param_autorate_misc_cfg,
  4771. wmi_vdev_param_amsdu_subframe_size_per_ac,
  4772. wmi_vdev_param_set_he_sounding_mode,
  4773. wmi_vdev_param_sifs_trigger_rate,
  4774. wmi_vdev_param_ul_shortgi,
  4775. wmi_vdev_param_ul_he_ltf,
  4776. wmi_vdev_param_ul_nss,
  4777. wmi_vdev_param_ul_ppdu_bw,
  4778. wmi_vdev_param_ul_ldpc,
  4779. wmi_vdev_param_ul_stbc,
  4780. wmi_vdev_param_ul_fixed_rate,
  4781. wmi_vdev_param_rawmode_open_war,
  4782. wmi_vdev_param_max,
  4783. } wmi_conv_vdev_param_id;
  4784. /**
  4785. * Host based ENUM IDs for service bits to abstract target enums
  4786. */
  4787. typedef enum {
  4788. wmi_service_beacon_offload = 0,
  4789. wmi_service_scan_offload,
  4790. wmi_service_roam_offload,
  4791. wmi_service_bcn_miss_offload,
  4792. wmi_service_sta_pwrsave,
  4793. wmi_service_sta_advanced_pwrsave,
  4794. wmi_service_ap_uapsd,
  4795. wmi_service_ap_dfs,
  4796. wmi_service_11ac,
  4797. wmi_service_blockack,
  4798. wmi_service_phyerr,
  4799. wmi_service_bcn_filter,
  4800. wmi_service_rtt,
  4801. wmi_service_ratectrl,
  4802. wmi_service_wow,
  4803. wmi_service_ratectrl_cache,
  4804. wmi_service_iram_tids,
  4805. wmi_service_burst,
  4806. wmi_service_smart_antenna_sw_support,
  4807. wmi_service_gtk_offload,
  4808. wmi_service_scan_sch,
  4809. wmi_service_csa_offload,
  4810. wmi_service_chatter,
  4811. wmi_service_coex_freqavoid,
  4812. wmi_service_packet_power_save,
  4813. wmi_service_force_fw_hang,
  4814. wmi_service_smart_antenna_hw_support,
  4815. wmi_service_gpio,
  4816. wmi_sta_uapsd_basic_auto_trig,
  4817. wmi_sta_uapsd_var_auto_trig,
  4818. wmi_service_sta_keep_alive,
  4819. wmi_service_tx_encap,
  4820. wmi_service_ap_ps_detect_out_of_sync,
  4821. wmi_service_early_rx,
  4822. wmi_service_enhanced_proxy_sta,
  4823. wmi_service_tt,
  4824. wmi_service_atf,
  4825. wmi_service_peer_caching,
  4826. wmi_service_coex_gpio,
  4827. wmi_service_aux_spectral_intf,
  4828. wmi_service_aux_chan_load_intf,
  4829. wmi_service_bss_channel_info_64,
  4830. wmi_service_ext_res_cfg_support,
  4831. wmi_service_mesh,
  4832. wmi_service_restrt_chnl_support,
  4833. wmi_service_roam_scan_offload,
  4834. wmi_service_arpns_offload,
  4835. wmi_service_nlo,
  4836. wmi_service_sta_dtim_ps_modulated_dtim,
  4837. wmi_service_sta_smps,
  4838. wmi_service_fwtest,
  4839. wmi_service_sta_wmmac,
  4840. wmi_service_tdls,
  4841. wmi_service_mcc_bcn_interval_change,
  4842. wmi_service_adaptive_ocs,
  4843. wmi_service_ba_ssn_support,
  4844. wmi_service_filter_ipsec_natkeepalive,
  4845. wmi_service_wlan_hb,
  4846. wmi_service_lte_ant_share_support,
  4847. wmi_service_batch_scan,
  4848. wmi_service_qpower,
  4849. wmi_service_plmreq,
  4850. wmi_service_thermal_mgmt,
  4851. wmi_service_rmc,
  4852. wmi_service_mhf_offload,
  4853. wmi_service_coex_sar,
  4854. wmi_service_bcn_txrate_override,
  4855. wmi_service_nan,
  4856. wmi_service_l1ss_stat,
  4857. wmi_service_estimate_linkspeed,
  4858. wmi_service_obss_scan,
  4859. wmi_service_tdls_offchan,
  4860. wmi_service_tdls_uapsd_buffer_sta,
  4861. wmi_service_tdls_uapsd_sleep_sta,
  4862. wmi_service_ibss_pwrsave,
  4863. wmi_service_lpass,
  4864. wmi_service_extscan,
  4865. wmi_service_d0wow,
  4866. wmi_service_hsoffload,
  4867. wmi_service_roam_ho_offload,
  4868. wmi_service_rx_full_reorder,
  4869. wmi_service_dhcp_offload,
  4870. wmi_service_sta_rx_ipa_offload_support,
  4871. wmi_service_mdns_offload,
  4872. wmi_service_sap_auth_offload,
  4873. wmi_service_dual_band_simultaneous_support,
  4874. wmi_service_ocb,
  4875. wmi_service_ap_arpns_offload,
  4876. wmi_service_per_band_chainmask_support,
  4877. wmi_service_packet_filter_offload,
  4878. wmi_service_mgmt_tx_htt,
  4879. wmi_service_mgmt_tx_wmi,
  4880. wmi_service_ext_msg,
  4881. wmi_service_mawc,
  4882. wmi_service_peer_stats,
  4883. wmi_service_mesh_11s,
  4884. wmi_service_periodic_chan_stat_support,
  4885. wmi_service_tx_mode_push_only,
  4886. wmi_service_tx_mode_push_pull,
  4887. wmi_service_tx_mode_dynamic,
  4888. wmi_service_check_cal_version,
  4889. wmi_service_btcoex_duty_cycle,
  4890. wmi_service_4_wire_coex_support,
  4891. wmi_service_multiple_vdev_restart,
  4892. wmi_service_peer_assoc_conf,
  4893. wmi_service_egap,
  4894. wmi_service_sta_pmf_offload,
  4895. wmi_service_unified_wow_capability,
  4896. wmi_service_enterprise_mesh,
  4897. wmi_service_apf_offload,
  4898. wmi_service_sync_delete_cmds,
  4899. wmi_service_ratectrl_limit_max_min_rates,
  4900. wmi_service_nan_data,
  4901. wmi_service_nan_rtt,
  4902. wmi_service_11ax,
  4903. wmi_service_deprecated_replace,
  4904. wmi_service_tdls_conn_tracker_in_host_mode,
  4905. wmi_service_enhanced_mcast_filter,
  4906. wmi_service_half_rate_quarter_rate_support,
  4907. wmi_service_vdev_rx_filter,
  4908. wmi_service_p2p_listen_offload_support,
  4909. wmi_service_mark_first_wakeup_packet,
  4910. wmi_service_multiple_mcast_filter_set,
  4911. wmi_service_host_managed_rx_reorder,
  4912. wmi_service_flash_rdwr_support,
  4913. wmi_service_wlan_stats_report,
  4914. wmi_service_tx_msdu_id_new_partition_support,
  4915. wmi_service_dfs_phyerr_offload,
  4916. wmi_service_rcpi_support,
  4917. wmi_service_fw_mem_dump_support,
  4918. wmi_service_peer_stats_info,
  4919. wmi_service_regulatory_db,
  4920. wmi_service_11d_offload,
  4921. wmi_service_hw_data_filtering,
  4922. wmi_service_pkt_routing,
  4923. wmi_service_offchan_tx_wmi,
  4924. wmi_service_chan_load_info,
  4925. wmi_service_extended_nss_support,
  4926. wmi_service_ack_timeout,
  4927. wmi_service_widebw_scan,
  4928. wmi_service_bcn_offload_start_stop_support,
  4929. wmi_service_offchan_data_tid_support,
  4930. wmi_service_support_dma,
  4931. wmi_service_8ss_tx_bfee,
  4932. wmi_service_fils_support,
  4933. wmi_service_mawc_support,
  4934. wmi_service_wow_wakeup_by_timer_pattern,
  4935. wmi_service_11k_neighbour_report_support,
  4936. wmi_service_ap_obss_detection_offload,
  4937. wmi_service_bss_color_offload,
  4938. wmi_service_gmac_offload_support,
  4939. wmi_service_host_dfs_check_support,
  4940. wmi_service_dual_beacon_on_single_mac_scc_support,
  4941. wmi_service_dual_beacon_on_single_mac_mcc_support,
  4942. wmi_service_twt_requestor,
  4943. wmi_service_twt_responder,
  4944. wmi_service_listen_interval_offload_support,
  4945. #ifdef OL_ATH_SMART_LOGGING
  4946. wmi_service_smart_logging_support,
  4947. #endif
  4948. wmi_service_infra_mbssid,
  4949. wmi_service_esp_support,
  4950. wmi_service_obss_spatial_reuse,
  4951. wmi_service_per_vdev_chain_support,
  4952. wmi_services_max,
  4953. } wmi_conv_service_ids;
  4954. #define WMI_SERVICE_UNAVAILABLE 0xFFFF
  4955. /**
  4956. * enum WMI_DBG_PARAM - Debug params
  4957. * @WMI_DBGLOG_LOG_LEVEL: Set the loglevel
  4958. * @WMI_DBGLOG_VAP_ENABLE: Enable VAP level debug
  4959. * @WMI_DBGLOG_VAP_DISABLE: Disable VAP level debug
  4960. * @WMI_DBGLOG_MODULE_ENABLE: Enable MODULE level debug
  4961. * @WMI_DBGLOG_MODULE_DISABLE: Disable MODULE level debug
  4962. * @WMI_DBGLOG_MOD_LOG_LEVEL: Enable MODULE level debug
  4963. * @WMI_DBGLOG_TYPE: set type of the debug output
  4964. * @WMI_DBGLOG_REPORT_ENABLE: Enable Disable debug
  4965. */
  4966. typedef enum {
  4967. WMI_DBGLOG_LOG_LEVEL = 0x1,
  4968. WMI_DBGLOG_VAP_ENABLE,
  4969. WMI_DBGLOG_VAP_DISABLE,
  4970. WMI_DBGLOG_MODULE_ENABLE,
  4971. WMI_DBGLOG_MODULE_DISABLE,
  4972. WMI_DBGLOG_MOD_LOG_LEVEL,
  4973. WMI_DBGLOG_TYPE,
  4974. WMI_DBGLOG_REPORT_ENABLE
  4975. } WMI_DBG_PARAM;
  4976. /**
  4977. * struct wmi_host_fw_ver - FW version in non-tlv target
  4978. * @sw_version: Versin info
  4979. * @sw_version_1: Second dword of version
  4980. */
  4981. struct wmi_host_fw_ver {
  4982. uint32_t sw_version;
  4983. uint32_t sw_version_1;
  4984. };
  4985. /**
  4986. * struct wmi_host_fw_abi_ver - FW version in non-tlv target
  4987. * @sw_version: Versin info
  4988. * @abi_version: ABI version
  4989. */
  4990. struct wmi_host_fw_abi_ver {
  4991. uint32_t sw_version;
  4992. uint32_t abi_version;
  4993. };
  4994. /**
  4995. * struct target_resource_config - Resource config sent from host to target
  4996. * abstracted out to include union of both configs
  4997. * @num_vdevs: Number vdevs configured
  4998. * @num_peers: Number of peers
  4999. * @num_active_peers: Number of active peers for peer cache
  5000. * @num_offload_peers: Number of offload peers
  5001. * @num_offload_reorder_buffs: number of offload reorder buffs
  5002. * @num_peer_keys: number of peer keys
  5003. * @num_tids: number of tids
  5004. * @ast_skid_limit: AST skid limit
  5005. * @tx_chain_mask: TX chain mask
  5006. * @rx_chain_mask: RX chain mask
  5007. * @rx_timeout_pri: RX reorder timeout per AC
  5008. * @rx_decap_mode: RX decap mode
  5009. * @scan_max_pending_req: Scan mac pending req
  5010. * @bmiss_offload_max_vdev: Beacom miss offload max vdevs
  5011. * @roam_offload_max_vdev: Roam offload max vdevs
  5012. * @roam_offload_max_ap_profiles: roam offload max ap profiles
  5013. * @num_mcast_groups: num mcast groups
  5014. * @num_mcast_table_elems: number of macst table elems
  5015. * @mcast2ucast_mode: mcast enhance mode
  5016. * @tx_dbg_log_size: DBG log buf size
  5017. * @num_wds_entries: number of WDS entries
  5018. * @dma_burst_size: DMA burst size.
  5019. * @mac_aggr_delim: Mac aggr delim
  5020. * @rx_skip_defrag_timeout_dup_detection_check: Defrag dup check in host?
  5021. * @vow_config: vow configuration
  5022. * @gtk_offload_max_vdev: Max vdevs for GTK offload
  5023. * @num_msdu_desc: Number of msdu desc
  5024. * @max_frag_entries: Max frag entries
  5025. * End common
  5026. * @max_peer_ext_stats: Max peer EXT stats
  5027. * @smart_ant_cap: Smart antenna capabilities
  5028. * @BK_Minfree: BIN configuration for BK traffic
  5029. * @BE_Minfree: BIN configuration for BE traffic
  5030. * @VI_Minfree: BIN configuration for VI traffic
  5031. * @VO_Minfree: BIN configuration for VO traffic
  5032. * @rx_batchmode: RX batch mode
  5033. * @tt_support: Thermal throttling support
  5034. * @atf_config: ATF config
  5035. * @mgmt_comp_evt_bundle_support: bundle support required for mgmt complete evt
  5036. * @tx_msdu_new_partition_id_support: new partiition id support for tx msdu
  5037. * @iphdr_pad_config: ipheader pad config
  5038. * @qwrap_config: Qwrap configuration
  5039. * @alloc_frag_desc_for_data_pkt: Frag desc for data
  5040. * Added in MCL
  5041. * @num_tdls_vdevs:
  5042. * @num_tdls_conn_table_entries:
  5043. * @beacon_tx_offload_max_vdev:
  5044. * @num_multicast_filter_entries:
  5045. * @num_wow_filters:
  5046. * @num_keep_alive_pattern:
  5047. * @keep_alive_pattern_size:
  5048. * @max_tdls_concurrent_sleep_sta:
  5049. * @max_tdls_concurrent_buffer_sta:
  5050. * @wmi_send_separate:
  5051. * @num_ocb_vdevs:
  5052. * @num_ocb_channels:
  5053. * @num_ocb_schedules:
  5054. * @num_packet_filters: maximum number of packet filter rules to support
  5055. * @num_max_sta_vdevs: maximum number of concurrent station vdevs to support
  5056. * @num_ns_ext_tuples_cfg:
  5057. * @apf_instruction_size:
  5058. * @max_bssid_rx_filters:
  5059. * @use_pdev_id:
  5060. * @max_num_dbs_scan_duty_cycle: max dbs can duty cycle value
  5061. * @cce_disable: disable cce component
  5062. * @peer_map_unmap_v2: enable peer map/unmap version 2 messaging
  5063. * @twt_ap_pdev_count: Number of MAC on which AP TWT feature is supported
  5064. * @twt_ap_sta_count: Max no of STA with which TWT sessions can be formed
  5065. * by the AP
  5066. * @max_bssid_indicator: max number of MBSS VAPs
  5067. */
  5068. typedef struct {
  5069. uint32_t num_vdevs;
  5070. uint32_t num_peers;
  5071. uint32_t num_active_peers;
  5072. uint32_t num_offload_peers;
  5073. uint32_t num_offload_reorder_buffs;
  5074. uint32_t num_peer_keys;
  5075. uint32_t num_tids;
  5076. uint32_t ast_skid_limit;
  5077. uint32_t tx_chain_mask;
  5078. uint32_t rx_chain_mask;
  5079. uint32_t rx_timeout_pri[4];
  5080. uint32_t rx_decap_mode;
  5081. uint32_t scan_max_pending_req;
  5082. uint32_t bmiss_offload_max_vdev;
  5083. uint32_t roam_offload_max_vdev;
  5084. uint32_t roam_offload_max_ap_profiles;
  5085. uint32_t num_mcast_groups;
  5086. uint32_t num_mcast_table_elems;
  5087. uint32_t mcast2ucast_mode;
  5088. uint32_t tx_dbg_log_size;
  5089. uint32_t num_wds_entries;
  5090. uint32_t dma_burst_size;
  5091. uint32_t mac_aggr_delim;
  5092. uint32_t rx_skip_defrag_timeout_dup_detection_check;
  5093. uint32_t vow_config;
  5094. uint32_t gtk_offload_max_vdev;
  5095. uint32_t num_msdu_desc; /* Number of msdu desc */
  5096. uint32_t max_frag_entries;
  5097. uint32_t scheduler_params;
  5098. /* End common */
  5099. /* Added for Beeliner */
  5100. uint32_t max_peer_ext_stats;
  5101. uint32_t smart_ant_cap;
  5102. uint32_t BK_Minfree;
  5103. uint32_t BE_Minfree;
  5104. uint32_t VI_Minfree;
  5105. uint32_t VO_Minfree;
  5106. uint32_t rx_batchmode;
  5107. uint32_t tt_support;
  5108. uint32_t atf_config:1,
  5109. mgmt_comp_evt_bundle_support:1,
  5110. tx_msdu_new_partition_id_support:1;
  5111. uint32_t iphdr_pad_config;
  5112. uint32_t
  5113. qwrap_config:16,
  5114. alloc_frag_desc_for_data_pkt:16;
  5115. /* Added in MCL */
  5116. uint32_t num_tdls_vdevs;
  5117. uint32_t num_tdls_conn_table_entries;
  5118. uint32_t beacon_tx_offload_max_vdev;
  5119. uint32_t num_multicast_filter_entries;
  5120. uint32_t num_wow_filters;
  5121. uint32_t num_keep_alive_pattern;
  5122. uint32_t keep_alive_pattern_size;
  5123. uint32_t max_tdls_concurrent_sleep_sta;
  5124. uint32_t max_tdls_concurrent_buffer_sta;
  5125. uint32_t wmi_send_separate;
  5126. uint32_t num_ocb_vdevs;
  5127. uint32_t num_ocb_channels;
  5128. uint32_t num_ocb_schedules;
  5129. uint32_t num_packet_filters;
  5130. uint32_t num_max_sta_vdevs;
  5131. uint32_t num_ns_ext_tuples_cfg;
  5132. uint32_t apf_instruction_size;
  5133. uint32_t max_bssid_rx_filters;
  5134. uint32_t use_pdev_id;
  5135. uint32_t max_num_dbs_scan_duty_cycle;
  5136. bool cce_disable;
  5137. bool peer_map_unmap_v2;
  5138. uint32_t twt_ap_pdev_count;
  5139. uint32_t twt_ap_sta_count;
  5140. uint32_t max_bssid_indicator;
  5141. uint32_t eapol_minrate_set:1,
  5142. eapol_minrate_ac_set:2;
  5143. } target_resource_config;
  5144. /**
  5145. * struct wds_addr_event - WDS addr event structure
  5146. * @event_type: event type add/delete
  5147. * @peer_mac: peer mac
  5148. * @dest_mac: destination mac address
  5149. * @vdev_id: vdev id
  5150. */
  5151. typedef struct {
  5152. uint32_t event_type[4];
  5153. u_int8_t peer_mac[IEEE80211_ADDR_LEN];
  5154. u_int8_t dest_mac[IEEE80211_ADDR_LEN];
  5155. uint32_t vdev_id;
  5156. } wds_addr_event_t;
  5157. /**
  5158. * Enum replicated for host abstraction with FW
  5159. */
  5160. typedef enum {
  5161. /* Event respose of START CMD */
  5162. WMI_HOST_VDEV_START_RESP_EVENT = 0,
  5163. /* Event respose of RESTART CMD */
  5164. WMI_HOST_VDEV_RESTART_RESP_EVENT,
  5165. } WMI_HOST_START_EVENT_PARAM;
  5166. /**
  5167. * struct wmi_host_vdev_start_resp - VDEV start response
  5168. * @vdev_id: vdev id
  5169. * @requestor_id: requestor id that requested the VDEV start request
  5170. * @resp_type: Respose of Event type START/RESTART
  5171. * @status: status of the response
  5172. * @chain_mask: Vdev chain mask
  5173. * @smps_mode: Vdev mimo power save mode
  5174. * @mac_id: mac_id field contains the MAC identifier that the
  5175. * VDEV is bound to. The valid range is 0 to (num_macs-1).
  5176. * @cfgd_tx_streams: Configured Transmit Streams
  5177. * @cfgd_rx_streams: Configured Receive Streams
  5178. */
  5179. typedef struct {
  5180. uint32_t vdev_id;
  5181. uint32_t requestor_id;
  5182. WMI_HOST_START_EVENT_PARAM resp_type;
  5183. uint32_t status;
  5184. uint32_t chain_mask;
  5185. uint32_t smps_mode;
  5186. uint32_t mac_id;
  5187. uint32_t cfgd_tx_streams;
  5188. uint32_t cfgd_rx_streams;
  5189. } wmi_host_vdev_start_resp;
  5190. /**
  5191. * struct wmi_host_vdev_delete_resp - VDEV delete response
  5192. * @vdev_id: vdev id
  5193. */
  5194. struct wmi_host_vdev_delete_resp {
  5195. uint32_t vdev_id;
  5196. };
  5197. /**
  5198. * struct wmi_host_roam_event - host roam event param
  5199. * @vdev_id: vdev id
  5200. * @reason: roam reason
  5201. * @rssi: RSSI
  5202. */
  5203. typedef struct {
  5204. uint32_t vdev_id;
  5205. uint32_t reason;
  5206. uint32_t rssi;
  5207. } wmi_host_roam_event;
  5208. /**
  5209. * ENUM wmi_host_scan_event_type - Scan event type
  5210. */
  5211. enum wmi_host_scan_event_type {
  5212. WMI_HOST_SCAN_EVENT_STARTED = 0x1,
  5213. WMI_HOST_SCAN_EVENT_COMPLETED = 0x2,
  5214. WMI_HOST_SCAN_EVENT_BSS_CHANNEL = 0x4,
  5215. WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  5216. WMI_HOST_SCAN_EVENT_DEQUEUED = 0x10,
  5217. WMI_HOST_SCAN_EVENT_PREEMPTED = 0x20,
  5218. WMI_HOST_SCAN_EVENT_START_FAILED = 0x40,
  5219. WMI_HOST_SCAN_EVENT_RESTARTED = 0x80,
  5220. WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  5221. WMI_HOST_SCAN_EVENT_INVALID = 0x200,
  5222. WMI_HOST_SCAN_EVENT_GPIO_TIMEOUT = 0x400,
  5223. WMI_HOST_SCAN_EVENT_MAX = 0x8000
  5224. };
  5225. /**
  5226. * ENUM wmi_host_scan_completion_reason - Scan completion event type
  5227. */
  5228. enum wmi_host_scan_completion_reason {
  5229. /** scan related events */
  5230. WMI_HOST_SCAN_REASON_NONE = 0xFF,
  5231. WMI_HOST_SCAN_REASON_COMPLETED = 0,
  5232. WMI_HOST_SCAN_REASON_CANCELLED = 1,
  5233. WMI_HOST_SCAN_REASON_PREEMPTED = 2,
  5234. WMI_HOST_SCAN_REASON_TIMEDOUT = 3,
  5235. WMI_HOST_SCAN_REASON_INTERNAL_FAILURE = 4,
  5236. WMI_HOST_SCAN_REASON_MAX,
  5237. };
  5238. /**
  5239. * struct wmi_host_scan_event - Scan event response from target
  5240. * @event: event type
  5241. * @reason: Reason for event
  5242. * @channel_freq: channel frequency
  5243. * @requestor: requestor id
  5244. * @scan_id: scan id
  5245. * @vdev_id: vdev id
  5246. */
  5247. typedef struct {
  5248. uint32_t event;
  5249. uint32_t reason;
  5250. uint32_t channel_freq;
  5251. uint32_t requestor;
  5252. uint32_t scan_id;
  5253. uint32_t vdev_id;
  5254. } wmi_host_scan_event;
  5255. /**
  5256. * struct wmi_host_pdev_reserve_ast_entry_event - Reserve AST entry
  5257. * @result: result
  5258. */
  5259. typedef struct {
  5260. uint32_t result;
  5261. } wmi_host_pdev_reserve_ast_entry_event;
  5262. /**
  5263. * struct wmi_host_mcast_ageout_entry - mcast aged-out entry
  5264. * @grp_addr: IPv4/6 mcast group addr
  5265. * @vdev_id: vdev id
  5266. */
  5267. typedef struct {
  5268. uint8_t grp_addr[16];
  5269. uint32_t vdev_id;
  5270. } wmi_host_mcast_ageout_entry;
  5271. /**
  5272. * struct wmi_host_mcast_list_ageout_event - List of mcast entry aged-out
  5273. * @num_entry: Number of mcast entries timed-out
  5274. * @entry: List of wmi_host_mcast_ageout_entry
  5275. */
  5276. typedef struct {
  5277. uint32_t num_entry;
  5278. wmi_host_mcast_ageout_entry entry[1];
  5279. } wmi_host_mcast_list_ageout_event;
  5280. /**
  5281. * struct wmi_host_pdev_nfcal_power_all_channels_event - NF cal event data
  5282. * @nfdbr:
  5283. * chan[0 ~ 7]: {NFCalPower_chain0, NFCalPower_chain1,
  5284. * NFCalPower_chain2, NFCalPower_chain3,
  5285. * NFCalPower_chain4, NFCalPower_chain5,
  5286. * NFCalPower_chain6, NFCalPower_chain7},
  5287. * @nfdbm:
  5288. * chan[0 ~ 7]: {NFCalPower_chain0, NFCalPower_chain1,
  5289. * NFCalPower_chain2, NFCalPower_chain3,
  5290. * NFCalPower_chain4, NFCalPower_chain5,
  5291. * NFCalPower_chain6, NFCalPower_chain7},
  5292. * @freqnum:
  5293. * chan[0 ~ 7]: frequency number
  5294. * @pdev_id: pdev_id
  5295. */
  5296. typedef struct {
  5297. int8_t nfdbr[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
  5298. int8_t nfdbm[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
  5299. uint32_t freqnum[WMI_HOST_RXG_CAL_CHAN_MAX];
  5300. uint32_t pdev_id;
  5301. } wmi_host_pdev_nfcal_power_all_channels_event;
  5302. /**
  5303. * enum wmi_host_pdev_tpc_event_offset: offsets of TPC events
  5304. * @WMI_HOST_TX_POWER_MAX: offset of max tx power
  5305. * @WMI_HOST_TX_POWER_MIN: offset of min tx power
  5306. * @WMI_HOST_TX_POWER_LEN: size of tpc values
  5307. */
  5308. enum wmi_host_pdev_tpc_event_offset {
  5309. WMI_HOST_TX_POWER_MAX,
  5310. WMI_HOST_TX_POWER_MIN,
  5311. WMI_HOST_TX_POWER_LEN,
  5312. };
  5313. /**
  5314. * struct wmi_host_pdev_tpc_event - WMI host pdev TPC event
  5315. * @pdev_id: pdev_id
  5316. * @tpc:
  5317. */
  5318. typedef struct {
  5319. uint32_t pdev_id;
  5320. int32_t tpc[WMI_HOST_TX_POWER_LEN];
  5321. } wmi_host_pdev_tpc_event;
  5322. /**
  5323. * struct wmi_host_pdev_generic_buffer_event
  5324. * @buf_type: Buffer type
  5325. * @frag_id: Frag id
  5326. * @more_frag: more frags pending
  5327. * @buf_len: buffer length
  5328. * @buf_info: variable length buffer
  5329. */
  5330. typedef struct {
  5331. uint32_t buf_type;
  5332. uint32_t frag_id;
  5333. uint32_t more_frag;
  5334. uint32_t buf_len;
  5335. uint32_t buf_info[1];
  5336. } wmi_host_pdev_generic_buffer_event;
  5337. /**
  5338. * Enum for host buffer event
  5339. */
  5340. enum {
  5341. WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE,
  5342. WMI_HOST_BUFFER_TYPE_CTL_TABLE,
  5343. };
  5344. /**
  5345. * struct wmi_host_pdev_tpc_config_event - host pdev tpc config event
  5346. * @pdev_id: pdev_id
  5347. * @regDomain:
  5348. * @chanFreq:
  5349. * @phyMode:
  5350. * @twiceAntennaReduction:
  5351. * @twiceMaxRDPower:
  5352. * @twiceAntennaGain:
  5353. * @powerLimit:
  5354. * @rateMax:
  5355. * @numTxChain:
  5356. * @ctl:
  5357. * @flags:
  5358. * @maxRegAllowedPower:
  5359. * @maxRegAllowedPowerAGCDD:
  5360. * @maxRegAllowedPowerAGSTBC:
  5361. * @maxRegAllowedPowerAGTXBF:
  5362. * @ratesArray:
  5363. */
  5364. typedef struct {
  5365. uint32_t pdev_id;
  5366. uint32_t regDomain;
  5367. uint32_t chanFreq;
  5368. uint32_t phyMode;
  5369. uint32_t twiceAntennaReduction;
  5370. uint32_t twiceMaxRDPower;
  5371. int32_t twiceAntennaGain;
  5372. uint32_t powerLimit;
  5373. uint32_t rateMax;
  5374. uint32_t numTxChain;
  5375. uint32_t ctl;
  5376. uint32_t flags;
  5377. int8_t maxRegAllowedPower[WMI_HOST_TPC_TX_NUM_CHAIN];
  5378. int8_t maxRegAllowedPowerAGCDD[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
  5379. int8_t maxRegAllowedPowerAGSTBC[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
  5380. int8_t maxRegAllowedPowerAGTXBF[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
  5381. uint8_t ratesArray[WMI_HOST_TPC_RATE_MAX];
  5382. } wmi_host_pdev_tpc_config_event;
  5383. /**
  5384. * Enums for TPC event
  5385. */
  5386. typedef enum {
  5387. WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  5388. WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  5389. WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  5390. } WMI_HOST_TPC_CONFIG_EVENT_FLAG;
  5391. /**
  5392. * Medium Utilization evaluation algorithms
  5393. * These algorithms can be complementary rather than exclusive.
  5394. */
  5395. typedef enum {
  5396. WMI_HOST_MU_BASIC_ALGO = 0x1,
  5397. WMI_HOST_MU_PER_BSSID_ALGO = 0x2,
  5398. WMI_HOST_MU_HIDDEN_NODE_ALGO = 0x4,
  5399. } WMI_HOST_MU_ALGO_TYPE;
  5400. /* max MU alg combinations supported by target */
  5401. #define WMI_HOST_MU_MAX_ALGO_TYPE 3
  5402. /**
  5403. * struct wmi_host_mu_db_entry
  5404. * @event_type: 0=AP, 1=STA, 2=Small Cell(SC)
  5405. * @bssid_mac_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC
  5406. * @tx_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC
  5407. * @avg_duration_us: Avg. duration for which node was transmitting
  5408. * @avg_rssi: Avg. RSSI of all TX packets by node. Unit dBm
  5409. * @mu_percent: % medium utilization by node
  5410. */
  5411. typedef struct {
  5412. uint32_t entry_type;
  5413. wmi_host_mac_addr bssid_mac_addr;
  5414. wmi_host_mac_addr tx_addr;
  5415. uint32_t avg_duration_us;
  5416. uint32_t avg_rssi;
  5417. uint32_t mu_percent;
  5418. } wmi_host_mu_db_entry;
  5419. /**
  5420. * struct wmi_host_mu_report_event - WMI_MU_REPORT_EVENTID
  5421. * @mu_request_id: request id
  5422. * @status_reason: MU_STATUS_REASON
  5423. * @total_mu: MU_ALG_TYPE combinations
  5424. * @num_active_bssid: number of active bssid
  5425. * @hidden_node_mu : hidden node algo MU per bin
  5426. * @num_TA_entries : No. of entries found in MU db report
  5427. */
  5428. typedef struct {
  5429. uint32_t mu_request_id;
  5430. uint32_t status_reason;
  5431. uint32_t total_mu[WMI_HOST_MU_MAX_ALGO_TYPE];
  5432. uint32_t num_active_bssid;
  5433. uint32_t hidden_node_mu[LTEU_MAX_BINS];
  5434. uint32_t num_TA_entries;
  5435. } wmi_host_mu_report_event;
  5436. /**
  5437. * struct wmi_host_mgmt_tx_compl_event - TX completion event
  5438. * @desc_id: from tx_send_cmd
  5439. * @status: WMI_MGMT_TX_COMP_STATUS_TYPE
  5440. * @pdev_id: pdev_id
  5441. * @ppdu_id: ppdu_id
  5442. */
  5443. typedef struct {
  5444. uint32_t desc_id;
  5445. uint32_t status;
  5446. uint32_t pdev_id;
  5447. uint32_t ppdu_id;
  5448. } wmi_host_mgmt_tx_compl_event;
  5449. /**
  5450. * struct wmi_host_offchan_data_tx_compl_event - TX completion event
  5451. * @desc_id: from tx_send_cmd
  5452. * @status: VWMI_MGMT_TX_COMP_STATUS_TYPE
  5453. * @pdev_id: pdev_id
  5454. */
  5455. struct wmi_host_offchan_data_tx_compl_event {
  5456. uint32_t desc_id;
  5457. uint32_t status;
  5458. uint32_t pdev_id;
  5459. };
  5460. #define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17
  5461. /**
  5462. * struct wmi_host_tim_info - TIM info in SWBA event
  5463. * @tim_len: TIM length
  5464. * @tim_mcast:
  5465. * @tim_bitmap: TIM bitmap
  5466. * @tim_changed: TIM changed
  5467. * @tim_num_ps_pending: TIM num PS sta pending
  5468. * @vdev_id: Vdev id
  5469. */
  5470. typedef struct {
  5471. uint32_t tim_len;
  5472. uint32_t tim_mcast;
  5473. uint32_t tim_bitmap[WMI_HOST_TIM_BITMAP_ARRAY_SIZE];
  5474. uint32_t tim_changed;
  5475. uint32_t tim_num_ps_pending;
  5476. uint32_t vdev_id;
  5477. } wmi_host_tim_info;
  5478. /**
  5479. * struct wmi_host_p2p_noa_descriptor - NoA desc in SWBA event
  5480. * @type_count: Absence count
  5481. * @duration: NoA duration
  5482. * @interval: NoA interval
  5483. * @start_time: start time
  5484. */
  5485. typedef struct {
  5486. uint32_t type_count;
  5487. uint32_t duration;
  5488. uint32_t interval;
  5489. uint32_t start_time;
  5490. } wmi_host_p2p_noa_descriptor;
  5491. /* Maximum number of NOA Descriptors supported */
  5492. #define WMI_HOST_P2P_MAX_NOA_DESCRIPTORS 4
  5493. /**
  5494. * struct wmi_host_p2p_noa_info - p2p noa information
  5495. * @modified: NoA modified
  5496. * @index: Index
  5497. * @oppPS: Oppurtunstic ps
  5498. * @ctwindow: CT window
  5499. * @num_descriptors: number of descriptors
  5500. * @noa_descriptors: noa descriptors
  5501. * @vdev_id: Vdev id
  5502. */
  5503. typedef struct {
  5504. uint8_t modified;
  5505. uint8_t index;
  5506. uint8_t oppPS;
  5507. uint8_t ctwindow;
  5508. uint8_t num_descriptors;
  5509. wmi_host_p2p_noa_descriptor
  5510. noa_descriptors[WMI_HOST_P2P_MAX_NOA_DESCRIPTORS];
  5511. uint32_t vdev_id;
  5512. } wmi_host_p2p_noa_info;
  5513. /**
  5514. * struct wmi_host_peer_sta_kickout_event
  5515. * @peer_macaddr: peer mac address
  5516. * @reason: kickout reason
  5517. * @rssi: rssi
  5518. * @pdev_id: pdev_id
  5519. */
  5520. typedef struct {
  5521. uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
  5522. uint32_t reason;
  5523. uint32_t rssi;
  5524. } wmi_host_peer_sta_kickout_event;
  5525. /**
  5526. * struct wmi_host_peer_sta_ps_statechange_event - ST ps state change event
  5527. * @peer_macaddr: peer mac address
  5528. * @peer_ps_stats: peer PS state
  5529. * @pdev_id: pdev_id
  5530. */
  5531. typedef struct {
  5532. uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
  5533. uint32_t peer_ps_state;
  5534. } wmi_host_peer_sta_ps_statechange_event;
  5535. /* Maximum CCK, OFDM rates supported */
  5536. #define WMI_SA_MAX_CCK_OFDM_RATES 12
  5537. /* Maximum MCS rates supported; 4 rates in each dword */
  5538. #define WMI_SA_MAX_MCS_RATES 40
  5539. #define WMI_SA_MAX_RATE_COUNTERS 4
  5540. /* Maximum rate series used for transmission */
  5541. #define SA_MAX_RATE_SERIES 2
  5542. #define SA_MAX_LEGACY_RATE_DWORDS 3
  5543. #define SA_MAX_HT_RATE_DWORDS 10
  5544. #define SA_BYTES_IN_DWORD 4
  5545. #define SA_MASK_BYTE 0xff
  5546. /* TODO: ratecode_160 needs to add for future chips */
  5547. /**
  5548. * struct wmi_sa_rate_cap - smart antenna rat capabilities
  5549. * @pdev_id: pdev_id
  5550. * @ratecode_legacy: Rate code array for CCK OFDM
  5551. * @ratecode_20: Rate code array for 20MHz BW
  5552. * @ratecode_40: Rate code array for 40MHz BW
  5553. * @ratecode_80: Rate code array for 80MHz BW
  5554. * @ratecount: Max Rate count for each mode
  5555. */
  5556. typedef struct {
  5557. uint8_t ratecode_legacy[WMI_SA_MAX_CCK_OFDM_RATES];
  5558. uint8_t ratecode_20[WMI_SA_MAX_MCS_RATES];
  5559. uint8_t ratecode_40[WMI_SA_MAX_MCS_RATES];
  5560. uint8_t ratecode_80[WMI_SA_MAX_MCS_RATES];
  5561. uint8_t ratecount[WMI_SA_MAX_RATE_COUNTERS];
  5562. } wmi_sa_rate_cap;
  5563. /** Preamble types to be used with VDEV fixed rate configuration */
  5564. typedef enum {
  5565. WMI_HOST_RATE_PREAMBLE_OFDM,
  5566. WMI_HOST_RATE_PREAMBLE_CCK,
  5567. WMI_HOST_RATE_PREAMBLE_HT,
  5568. WMI_HOST_RATE_PREAMBLE_VHT,
  5569. WMI_HOST_RATE_PREAMBLE_HE,
  5570. } WMI_HOST_RATE_PREAMBLE;
  5571. #define WMI_HOST_FIXED_RATE_NONE (0xff)
  5572. /** slot time long */
  5573. #define WMI_HOST_VDEV_SLOT_TIME_LONG 0x1
  5574. /** slot time short */
  5575. #define WMI_HOST_VDEV_SLOT_TIME_SHORT 0x2
  5576. /** preablbe long */
  5577. #define WMI_HOST_VDEV_PREAMBLE_LONG 0x1
  5578. /** preablbe short */
  5579. #define WMI_HOST_VDEV_PREAMBLE_SHORT 0x2
  5580. /** found a better AP */
  5581. #define WMI_HOST_ROAM_REASON_BETTER_AP 0x1
  5582. /** beacon miss detected */
  5583. #define WMI_HOST_ROAM_REASON_BMISS 0x2
  5584. /** deauth/disassoc received */
  5585. #define WMI_HOST_ROAM_REASON_DEAUTH 0x2
  5586. /** connected AP's low rssi condition detected */
  5587. #define WMI_HOST_ROAM_REASON_LOW_RSSI 0x3
  5588. /** found another AP that matches SSID and Security profile in
  5589. * WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS
  5590. */
  5591. #define WMI_HOST_ROAM_REASON_SUITABLE_AP 0x4
  5592. /** LFR3.0 roaming failed, indicate the disconnection to host */
  5593. #define WMI_HOST_ROAM_REASON_HO_FAILED 0x5
  5594. /** values for vdev_type */
  5595. #define WMI_HOST_VDEV_TYPE_AP 0x1
  5596. #define WMI_HOST_VDEV_TYPE_STA 0x2
  5597. #define WMI_HOST_VDEV_TYPE_IBSS 0x3
  5598. #define WMI_HOST_VDEV_TYPE_MONITOR 0x4
  5599. /** values for vdev_subtype */
  5600. #define WMI_HOST_VDEV_SUBTYPE_P2P_DEVICE 0x1
  5601. #define WMI_HOST_VDEV_SUBTYPE_P2P_CLIENT 0x2
  5602. #define WMI_HOST_VDEV_SUBTYPE_P2P_GO 0x3
  5603. #define WMI_HOST_VDEV_SUBTYPE_PROXY_STA 0x4
  5604. #define WMI_HOST_VDEV_SUBTYPE_MESH 0x5
  5605. #define WMI_HOST_MGMT_TID 17
  5606. /* Disable aging & learning */
  5607. #define WMI_HOST_WDS_FLAG_STATIC 0x1
  5608. /**
  5609. * Peer param enum abstracted from target
  5610. */
  5611. typedef enum {
  5612. /** mimo powersave state */
  5613. WMI_HOST_PEER_MIMO_PS_STATE = 0x1,
  5614. /** enable/disable AMPDU . initial value (enabled) */
  5615. WMI_HOST_PEER_AMPDU = 0x2,
  5616. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  5617. WMI_HOST_PEER_AUTHORIZE = 0x3,
  5618. /** peer channel bandwidth */
  5619. WMI_HOST_PEER_CHWIDTH = 0x4,
  5620. /** peer NSS */
  5621. WMI_HOST_PEER_NSS = 0x5,
  5622. /** USE 4 ADDR */
  5623. WMI_HOST_PEER_USE_4ADDR = 0x6,
  5624. /** Enable extended peer stats */
  5625. WMI_HOST_PEER_EXT_STATS_ENABLE = 0x7,
  5626. /*Use FIXED Pwr */
  5627. WMI_HOST_PEER_USE_FIXED_PWR = 0x8,
  5628. /* Set peer fixed rate */
  5629. WMI_HOST_PEER_PARAM_FIXED_RATE = 0x9,
  5630. /* Whitelist peer TIDs */
  5631. WMI_HOST_PEER_SET_MU_WHITELIST = 0xa,
  5632. /* set group membership status */
  5633. WMI_HOST_PEER_MEMBERSHIP = 0xb,
  5634. WMI_HOST_PEER_USERPOS = 0xc,
  5635. WMI_HOST_PEER_CRIT_PROTO_HINT_ENABLED = 0xd,
  5636. WMI_HOST_PEER_TX_FAIL_CNT_THR = 0xe,
  5637. WMI_HOST_PEER_SET_HW_RETRY_CTS2S = 0xf,
  5638. WMI_HOST_PEER_IBSS_ATIM_WINDOW_LENGTH = 0x10,
  5639. WMI_HOST_PEER_PHYMODE = 0x11,
  5640. WMI_HOST_PEER_SET_MAC_TX_RATE = 0x12,
  5641. /* Set default Rx routing */
  5642. WMI_HOST_PEER_SET_DEFAULT_ROUTING = 0x13,
  5643. WMI_HOST_PEER_SET_MIN_TX_RATE = 0x14,
  5644. /* peer NSS for 160Mhx */
  5645. WMI_HOST_PEER_NSS_VHT160 = 0x15,
  5646. /* peer NSS for 160Mhx */
  5647. WMI_HOST_PEER_NSS_VHT80_80 = 0x16,
  5648. /* Set SU sounding interval */
  5649. WMI_HOST_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL = 0x17,
  5650. /* Set MU sounding interval */
  5651. WMI_HOST_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL = 0x18,
  5652. /* Enable sounding interval set */
  5653. WMI_HOST_PEER_PARAM_TXBF_SOUNDING_ENABLE = 0x19,
  5654. /* Enable MU support */
  5655. WMI_HOST_PEER_PARAM_MU_ENABLE = 0x1a,
  5656. /* Enable OFDMA support */
  5657. WMI_HOST_PEER_PARAM_OFDMA_ENABLE = 0x1b,
  5658. } PEER_PARAM_ENUM;
  5659. #define WMI_HOST_PEER_MIMO_PS_NONE 0x0
  5660. #define WMI_HOST_PEER_MIMO_PS_STATIC 0x1
  5661. #define WMI_HOST_PEER_MIMO_PS_DYNAMIC 0x2
  5662. typedef enum {
  5663. HOST_PLATFORM_HIGH_PERF,
  5664. HOST_PLATFORM_LOW_PERF,
  5665. HOST_PLATFORM_LOW_PERF_NO_FETCH,
  5666. } HOST_PLATFORM_TYPE;
  5667. enum wmi_host_sta_ps_mode {
  5668. /** enable power save for the given STA VDEV */
  5669. WMI_HOST_STA_PS_MODE_DISABLED = 0,
  5670. /** disable power save for a given STA VDEV */
  5671. WMI_HOST_STA_PS_MODE_ENABLED = 1,
  5672. };
  5673. enum wmi_host_sta_powersave_param {
  5674. /**
  5675. * Controls how frames are retrievd from AP while STA is sleeping
  5676. *
  5677. * (see enum wmi_sta_ps_param_rx_wake_policy)
  5678. */
  5679. WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  5680. /**
  5681. * The STA will go active after this many TX
  5682. *
  5683. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  5684. */
  5685. WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  5686. /**
  5687. * Number of PS-Poll to send before STA wakes up
  5688. *
  5689. * (see enum wmi_sta_ps_param_pspoll_count)
  5690. *
  5691. */
  5692. WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2,
  5693. /**
  5694. * TX/RX inactivity time in msec before going to sleep.
  5695. *
  5696. * The power save SM will monitor tx/rx activity on the VDEV, if no
  5697. * activity for the specified msec of the parameter
  5698. * the Power save SM will go to sleep.
  5699. */
  5700. WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3,
  5701. /**
  5702. * Set uapsd configuration.
  5703. *
  5704. * (see enum wmi_sta_ps_param_uapsd)
  5705. */
  5706. WMI_HOST_STA_PS_PARAM_UAPSD = 4,
  5707. };
  5708. /* prefix used by scan requestor ids on the host
  5709. * replicated here form wmi_unified.h*/
  5710. #define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000
  5711. /* prefix used by scan request ids generated on the host */
  5712. /* host cycles through the lower 12 bits to generate ids */
  5713. #define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000
  5714. #define WMI_HOST_RC_DS_FLAG 0x01 /* Dual stream flag */
  5715. #define WMI_HOST_RC_CW40_FLAG 0x02 /* CW 40 */
  5716. #define WMI_HOST_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  5717. #define WMI_HOST_RC_HT_FLAG 0x08 /* HT */
  5718. #define WMI_HOST_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  5719. #define WMI_HOST_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  5720. #define WMI_HOST_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  5721. #define WMI_HOST_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  5722. #define WMI_HOST_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  5723. #define WMI_HOST_RC_TS_FLAG 0x200 /* Three stream flag */
  5724. #define WMI_HOST_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  5725. /** HT Capabilities*/
  5726. #define WMI_HOST_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  5727. /* Short Guard Interval with HT20 */
  5728. #define WMI_HOST_HT_CAP_HT20_SGI 0x0002
  5729. #define WMI_HOST_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  5730. #define WMI_HOST_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  5731. #define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT 3
  5732. #define WMI_HOST_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  5733. #define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT 4
  5734. #define WMI_HOST_HT_CAP_LDPC 0x0040 /* LDPC supported */
  5735. #define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  5736. #define WMI_HOST_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  5737. #define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  5738. #define WMI_HOST_HT_CAP_HT40_SGI 0x0800
  5739. #define WMI_HOST_HT_CAP_RX_LDPC 0x1000
  5740. #define WMI_HOST_HT_CAP_TX_LDPC 0x2000
  5741. #define WMI_HOST_HT_CAP_IBF_BFER 0x4000
  5742. /* These macros should be used when we wish to advertise STBC support for
  5743. * only 1SS or 2SS or 3SS. */
  5744. #define WMI_HOST_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  5745. #define WMI_HOST_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  5746. #define WMI_HOST_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  5747. #define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED | \
  5748. WMI_HOST_HT_CAP_HT20_SGI | \
  5749. WMI_HOST_HT_CAP_HT40_SGI | \
  5750. WMI_HOST_HT_CAP_TX_STBC | \
  5751. WMI_HOST_HT_CAP_RX_STBC | \
  5752. WMI_HOST_HT_CAP_LDPC)
  5753. /* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  5754. field. The fields not defined here are not supported, or reserved.
  5755. Do not change these masks and if you have to add new one follow the
  5756. bitmask as specified by 802.11ac draft.
  5757. */
  5758. #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  5759. #define WMI_HOST_VHT_CAP_RX_LDPC 0x00000010
  5760. #define WMI_HOST_VHT_CAP_SGI_80MHZ 0x00000020
  5761. #define WMI_HOST_VHT_CAP_SGI_160MHZ 0x00000040
  5762. #define WMI_HOST_VHT_CAP_TX_STBC 0x00000080
  5763. #define WMI_HOST_VHT_CAP_RX_STBC_MASK 0x00000300
  5764. #define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT 8
  5765. #define WMI_HOST_VHT_CAP_SU_BFER 0x00000800
  5766. #define WMI_HOST_VHT_CAP_SU_BFEE 0x00001000
  5767. #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  5768. #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  5769. #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  5770. #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  5771. #define WMI_HOST_VHT_CAP_MU_BFER 0x00080000
  5772. #define WMI_HOST_VHT_CAP_MU_BFEE 0x00100000
  5773. #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  5774. #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23
  5775. #define WMI_HOST_VHT_CAP_RX_FIXED_ANT 0x10000000
  5776. #define WMI_HOST_VHT_CAP_TX_FIXED_ANT 0x20000000
  5777. #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  5778. /* These macros should be used when we wish to advertise STBC support for
  5779. * only 1SS or 2SS or 3SS. */
  5780. #define WMI_HOST_VHT_CAP_RX_STBC_1SS 0x00000100
  5781. #define WMI_HOST_VHT_CAP_RX_STBC_2SS 0x00000200
  5782. #define WMI_HOST_VHT_CAP_RX_STBC_3SS 0x00000300
  5783. #define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 | \
  5784. WMI_HOST_VHT_CAP_SGI_80MHZ | \
  5785. WMI_HOST_VHT_CAP_TX_STBC | \
  5786. WMI_HOST_VHT_CAP_RX_STBC_MASK | \
  5787. WMI_HOST_VHT_CAP_RX_LDPC | \
  5788. WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  5789. WMI_HOST_VHT_CAP_RX_FIXED_ANT | \
  5790. WMI_HOST_VHT_CAP_TX_FIXED_ANT)
  5791. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  5792. 802.11ac
  5793. */
  5794. #define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
  5795. #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  5796. #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  5797. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  5798. enum wmi_host_ap_ps_param_uapsd {
  5799. WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  5800. WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  5801. WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  5802. WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  5803. WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  5804. WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  5805. WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  5806. WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  5807. };
  5808. /** U-APSD maximum service period of peer station */
  5809. enum wmi_host_ap_ps_peer_param_max_sp {
  5810. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  5811. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  5812. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  5813. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  5814. /* keep last! */
  5815. MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP,
  5816. };
  5817. #define WMI_HOST_UAPSD_AC_TYPE_DELI 0
  5818. #define WMI_HOST_UAPSD_AC_TYPE_TRIG 1
  5819. #define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \
  5820. ((type == WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\
  5821. (1<<((ac<<1)+1)))
  5822. enum wmi_host_ap_ps_peer_param_wnm_sleep {
  5823. WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE,
  5824. WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE,
  5825. };
  5826. enum wmi_host_ap_ps_peer_param {
  5827. /** Set uapsd configuration for a given peer.
  5828. *
  5829. * This will include the delivery and trigger enabled state for every AC.
  5830. * The host MLME needs to set this based on AP capability and stations
  5831. * request Set in the association request received from the station.
  5832. *
  5833. * Lower 8 bits of the value specify the UAPSD configuration.
  5834. *
  5835. * (see enum wmi_ap_ps_param_uapsd)
  5836. * The default value is 0.
  5837. */
  5838. WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0,
  5839. /**
  5840. * Set the service period for a UAPSD capable station
  5841. *
  5842. * The service period from wme ie in the (re)assoc request frame.
  5843. *
  5844. * (see enum wmi_ap_ps_peer_param_max_sp)
  5845. */
  5846. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1,
  5847. /** Time in seconds for aging out buffered frames
  5848. * for STA in power save */
  5849. WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  5850. /** Specify frame types that are considered SIFS
  5851. * RESP trigger frame */
  5852. WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  5853. /** Specifies the trigger state of TID.
  5854. * Valid only for UAPSD frame type */
  5855. WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  5856. /** Specifies the WNM sleep state of a STA */
  5857. WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  5858. };
  5859. #define WMI_HOST_RXERR_CRC 0x01 /* CRC error on frame */
  5860. #define WMI_HOST_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  5861. #define WMI_HOST_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  5862. #define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  5863. enum wmi_host_sta_ps_param_uapsd {
  5864. WMI_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  5865. WMI_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  5866. WMI_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  5867. WMI_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  5868. WMI_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  5869. WMI_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  5870. WMI_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  5871. WMI_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  5872. };
  5873. enum wmi_host_sta_ps_param_rx_wake_policy {
  5874. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  5875. * the Power save SM(state machine) will come out of sleep by either
  5876. * sending null frame (or) a data frame (with PS==0) in response to TIM
  5877. * bit set in the received beacon frame from AP.
  5878. */
  5879. WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  5880. /* Here the power save state machine will not wakeup in response to TIM
  5881. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  5882. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  5883. * access categories are delivery-enabled, the station will send a UAPSD
  5884. * trigger frame, otherwise it will send a PS-Poll.
  5885. */
  5886. WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  5887. };
  5888. enum wmi_host_sta_ps_param_pspoll_count {
  5889. WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  5890. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  5891. * will send before waking up.
  5892. */
  5893. };
  5894. /** Number of tx frames/beacon that cause the power save SM to wake up.
  5895. *
  5896. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  5897. * meaning, It will cause the SM to never wake up. This is useful if you want
  5898. * to keep the system to sleep all the time for some kind of test mode . host
  5899. * can change this parameter any time. It will affect at the next tx frame.
  5900. */
  5901. enum wmi_host_sta_ps_param_tx_wake_threshold {
  5902. WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  5903. WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  5904. /* Values greater than one indicate that many TX attempts per beacon
  5905. * interval before the STA will wake up
  5906. */
  5907. };
  5908. /*
  5909. * Transmit power scale factor.
  5910. *
  5911. */
  5912. typedef enum {
  5913. WMI_HOST_TP_SCALE_MAX = 0, /* no scaling (default) */
  5914. WMI_HOST_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  5915. WMI_HOST_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  5916. WMI_HOST_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  5917. WMI_HOST_TP_SCALE_MIN = 4, /* min, but still on */
  5918. WMI_HOST_TP_SCALE_SIZE = 5, /* max num of enum */
  5919. } WMI_HOST_TP_SCALE;
  5920. enum {
  5921. WMI_HOST_RATEPWR_TABLE_OPS_SET,
  5922. WMI_HOST_RATEPWR_TABLE_OPS_GET,
  5923. };
  5924. /* reserved up through 0xF */
  5925. /**
  5926. * struct wmi_host_dcs_mib_stats - WLAN IM stats from target to host
  5927. * Below statistics are sent from target to host periodically.
  5928. * These are collected at target as long as target is running
  5929. * and target chip is not in sleep.
  5930. * @listen_time:
  5931. * @reg_tx_frame_cnt:
  5932. * @reg_rx_frame_cnt:
  5933. * @reg_rxclr_cnt:
  5934. * @reg_cycle_cnt: delta cycle count
  5935. * @reg_rxclr_ext_cnt:
  5936. * @reg_ofdm_phyerr_cnt:
  5937. * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register
  5938. */
  5939. typedef struct _hp_dcs_mib_stats {
  5940. int32_t listen_time;
  5941. uint32_t reg_tx_frame_cnt;
  5942. uint32_t reg_rx_frame_cnt;
  5943. uint32_t reg_rxclr_cnt;
  5944. uint32_t reg_cycle_cnt;
  5945. uint32_t reg_rxclr_ext_cnt;
  5946. uint32_t reg_ofdm_phyerr_cnt;
  5947. uint32_t reg_cck_phyerr_cnt;
  5948. } wmi_host_dcs_mib_stats_t;
  5949. /**
  5950. * struct wmi_host_dcs_im_tgt_stats - DCS IM target stats
  5951. * @reg_tsf32: current running TSF from the TSF-1
  5952. * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if
  5953. * and at different ranges, this would not gaurantee that
  5954. * this is the least rssi.
  5955. * @tx_waste_time: Sum of all the failed durations in the last
  5956. * one second interval.
  5957. * @rx_time: count how many times the hal_rxerr_phy is marked, in this
  5958. * time period
  5959. * @phyerr_cnt:
  5960. * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained
  5961. * in mib structure
  5962. * @chan_nf: Channel noise floor (Units are in dBm)
  5963. * @my_bss_rx_cycle_count: BSS rx cycle count
  5964. * @reg_rxclr_ext40_cnt: extension channel 40Mhz rxclear count
  5965. * @reg_rxclr_ext80_cnt: extension channel 80Mhz rxclear count
  5966. */
  5967. typedef struct _wmi_host_dcs_im_tgt_stats {
  5968. uint32_t reg_tsf32;
  5969. uint32_t last_ack_rssi;
  5970. uint32_t tx_waste_time;
  5971. uint32_t rx_time;
  5972. uint32_t phyerr_cnt;
  5973. wmi_host_dcs_mib_stats_t mib_stats;
  5974. uint32_t chan_nf;
  5975. uint32_t my_bss_rx_cycle_count;
  5976. /* these fields are added here for backward compatibility instead of
  5977. * wmi_host_dcs_mib_stats_t
  5978. */
  5979. uint32_t reg_rxclr_ext40_cnt;
  5980. uint32_t reg_rxclr_ext80_cnt;
  5981. } wmi_host_dcs_im_tgt_stats_t;
  5982. /**
  5983. * Enum for pktlog req
  5984. */
  5985. typedef enum {
  5986. WMI_HOST_PKTLOG_EVENT_RX = 0x1,
  5987. WMI_HOST_PKTLOG_EVENT_TX = 0x2,
  5988. WMI_HOST_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  5989. WMI_HOST_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  5990. WMI_HOST_PKTLOG_EVENT_DBG_PRINT = 0x10, /* DEBUG prints */
  5991. /* To support Smart Antenna */
  5992. WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA = 0x20,
  5993. WMI_HOST_PKTLOG_EVENT_H_INFO = 0x40,
  5994. WMI_HOST_PKTLOG_EVENT_STEERING = 0x80,
  5995. /* To support Tx data Capture */
  5996. WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE = 0x100,
  5997. } WMI_HOST_PKTLOG_EVENT;
  5998. /**
  5999. * wmi_host_phyerr
  6000. *
  6001. */
  6002. #define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN 0x26
  6003. #define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT 0x24
  6004. #define WMI_HOST_AR900B_DFS_PHYERR_MASK 0x4
  6005. #define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK 0x4000000
  6006. /**
  6007. * struct wmi_host_perchain_rssi_info - per chain RSSI info
  6008. * @rssi_pri20: RSSI on primary 20
  6009. * @rssi_sec20: RSSI on secomdary 20
  6010. * @rssi_sec40: RSSI secondary 40
  6011. * @rssi_sec80: RSSI secondary 80
  6012. */
  6013. typedef struct wmi_host_perchain_rssi_info {
  6014. int8_t rssi_pri20;
  6015. int8_t rssi_sec20;
  6016. int8_t rssi_sec40;
  6017. int8_t rssi_sec80;
  6018. } wmi_host_perchain_rssi_info_t;
  6019. /**
  6020. * struct _wmi_host_rf_info - RF measurement information
  6021. * @rssi_comb: RSSI Information
  6022. * @pc_rssi_info[4]: For now, we know we are getting information
  6023. * for only 4 chains at max. For future extensions
  6024. * use a define
  6025. * @noise_floor: Noise floor information
  6026. */
  6027. typedef struct _wmi_host_rf_info {
  6028. int8_t rssi_comb;
  6029. wmi_host_perchain_rssi_info_t pc_rssi_info[4];
  6030. int16_t noise_floor[4];
  6031. } wmi_host_rf_info_t;
  6032. /**
  6033. * struct _wmi_host_chan_info
  6034. * @center_freq1: center frequency 1 in MHz
  6035. * @center_freq2: center frequency 2 in MHz -valid only for
  6036. * 11ACVHT 80PLUS80 mode
  6037. * @chan_width: channel width in MHz
  6038. */
  6039. typedef struct _wmi_host_chan_info {
  6040. u_int16_t center_freq1;
  6041. u_int16_t center_freq2;
  6042. u_int8_t chan_width;
  6043. } wmi_host_chan_info_t;
  6044. /**
  6045. * struct wmi_host_phyerr
  6046. * @rf_info:
  6047. * @chan_info:
  6048. * @tsf64:
  6049. * @phy_err_code:
  6050. * @tsf_timestamp:
  6051. * @bufp:
  6052. * @buf_len:
  6053. * @phy_err_mask0:
  6054. * @phy_err_mask1:
  6055. * @pdev_id: pdev_id
  6056. */
  6057. typedef struct _wmi_host_phyerr {
  6058. wmi_host_rf_info_t rf_info;
  6059. wmi_host_chan_info_t chan_info;
  6060. uint64_t tsf64;
  6061. int32_t phy_err_code;
  6062. uint32_t tsf_timestamp;
  6063. uint8_t *bufp;
  6064. uint32_t buf_len;
  6065. uint32_t phy_err_mask0;
  6066. uint32_t phy_err_mask1;
  6067. uint32_t pdev_id;
  6068. } wmi_host_phyerr_t;
  6069. /**
  6070. * struct wmi_host_rtt_event_hdr
  6071. * @req_id: request id
  6072. * @status: status
  6073. * @meas_done: measurement done flag
  6074. * @meas_type: measurement type
  6075. * @report_type: report type
  6076. * @v3_status: v2 status
  6077. * @v3_finish:
  6078. * @v3_tm_start:
  6079. * @num_ap: number of AP
  6080. * @result: resuult
  6081. * @dest_mac: destination mac
  6082. */
  6083. typedef struct {
  6084. uint16_t req_id;
  6085. uint16_t status:1,
  6086. meas_done:1,
  6087. meas_type:3,
  6088. report_type:3,
  6089. v3_status:2,
  6090. v3_finish:1,
  6091. v3_tm_start:1,
  6092. num_ap:4;
  6093. uint16_t result;
  6094. uint8_t dest_mac[IEEE80211_ADDR_LEN];
  6095. } wmi_host_rtt_event_hdr;
  6096. /**
  6097. * struct wmi_host_rtt_meas_event - RTT measurement event
  6098. * @chain_mask:
  6099. * @bw:
  6100. * @rsvd:
  6101. * @txrxchain_mask: Bit:0-3:chain mask
  6102. * Bit 4-5: band width info
  6103. * 00 --Legacy 20, 01 --HT/VHT20
  6104. * 10 --HT/VHT40, 11 -- VHT80
  6105. * @tod: resolution of 0.1ns
  6106. * @toa: resolution of 0.1ns
  6107. * @t3:
  6108. * @t4:
  6109. * @rssi0:
  6110. * @rssi1:
  6111. * @rssi2:
  6112. * @rssi3:
  6113. */
  6114. typedef struct {
  6115. uint32_t chain_mask:3,
  6116. bw:2,
  6117. rsvd:27;
  6118. uint32_t txrxchain_mask;
  6119. uint64_t tod;
  6120. uint64_t toa;
  6121. uint64_t t3;
  6122. uint64_t t4;
  6123. uint32_t rssi0;
  6124. uint32_t rssi1;
  6125. uint32_t rssi2;
  6126. uint32_t rssi3;
  6127. } wmi_host_rtt_meas_event;
  6128. /*----RTT Report event definition ----*/
  6129. typedef enum {
  6130. /* rtt cmd header parsing error --terminate */
  6131. WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0,
  6132. /* rtt body parsing error -- skip current STA REQ */
  6133. WMI_HOST_RTT_COMMAND_ERROR,
  6134. /* rtt no resource -- terminate */
  6135. WMI_HOST_RTT_MODULE_BUSY,
  6136. /* STA exceed the support limit -- only server the first n STA */
  6137. WMI_HOST_RTT_TOO_MANY_STA,
  6138. /* any allocate failure */
  6139. WMI_HOST_RTT_NO_RESOURCE,
  6140. /* can not find vdev with vdev ID - skip current STA REQ */
  6141. WMI_HOST_RTT_VDEV_ERROR,
  6142. /* Tx failure -- continiue and measure number */
  6143. WMI_HOST_RTT_TRANSIMISSION_ERROR,
  6144. /* wait for first TM timer expire-terminate current STA measurement */
  6145. WMI_HOST_RTT_TM_TIMER_EXPIRE,
  6146. /* we do not support RTT measurement with this type of frame */
  6147. WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT,
  6148. /* whole RTT measurement timer expire-terminate
  6149. ** current STA measurement */
  6150. WMI_HOST_RTT_TIMER_EXPIRE,
  6151. /* channel swicth failed */
  6152. WMI_HOST_RTT_CHAN_SWITCH_ERROR,
  6153. /* TMR trans error, this dest peer will be skipped */
  6154. WMI_HOST_RTT_TMR_TRANS_ERROR,
  6155. /* V3 only. If both CFR and Token mismatch, do not report */
  6156. WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN,
  6157. /* For First TM, if CFR is bad, then do not report */
  6158. WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR,
  6159. /* do not allow report type2 mix with type 0, 1 */
  6160. WMI_HOST_RTT_REPORT_TYPE2_MIX,
  6161. /* LCI Configuration OK. - Responder only */
  6162. WMI_HOST_RTT_LCI_CFG_OK,
  6163. /* LCR configuration OK. - Responder only */
  6164. WMI_HOST_RTT_LCR_CFG_OK,
  6165. /* Bad configuration LCI (or) LCR request - Responder only */
  6166. WMI_HOST_RTT_CFG_ERROR,
  6167. WMI_HOST_WMI_RTT_REJECT_MAX,
  6168. } WMI_HOST_RTT_ERROR_INDICATOR;
  6169. typedef struct {
  6170. wmi_host_rtt_event_hdr hdr;
  6171. WMI_HOST_RTT_ERROR_INDICATOR reject_reason;
  6172. } wmi_host_rtt_error_report_event;
  6173. #if defined(AR9888)
  6174. typedef enum {
  6175. WMI_HOST_PROF_CPU_IDLE,
  6176. WMI_HOST_PROF_PPDU_PROC,
  6177. WMI_HOST_PROF_PPDU_POST,
  6178. WMI_HOST_PROF_HTT_TX_INPUT,
  6179. WMI_HOST_PROF_MSDU_ENQ,
  6180. WMI_HOST_PROF_PPDU_POST_HAL,
  6181. WMI_HOST_PROF_COMPUTE_TX_TIME,
  6182. /* Add new ID's above this. */
  6183. WMI_HOST_PROF_MAX_ID,
  6184. } wmi_host_profile_id_t;
  6185. #endif
  6186. #define WMI_HOST_WLAN_PROFILE_MAX_HIST 3
  6187. #define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32
  6188. #if defined(AR9888)
  6189. #define WMI_HOST_MAX_PROFILE WMI_HOST_PROF_MAX_ID
  6190. #else
  6191. #define WMI_HOST_MAX_PROFILE WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT
  6192. #endif
  6193. /**
  6194. * struct wmi_host_wlan_profile - Host profile param
  6195. * @id: profile id
  6196. * @cnt: Count
  6197. * @tot:
  6198. * @min: minimum
  6199. * @max: Mac
  6200. * @hist_intvl: history interval
  6201. * @hist: profile data history
  6202. */
  6203. typedef struct {
  6204. uint32_t id;
  6205. uint32_t cnt;
  6206. uint32_t tot;
  6207. uint32_t min;
  6208. uint32_t max;
  6209. uint32_t hist_intvl;
  6210. uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST];
  6211. } wmi_host_wlan_profile_t;
  6212. /**
  6213. * struct wmi_host_wlan_profile_ctx_t - profile context
  6214. * @tot: time in us
  6215. * @tx_msdu_cnt: MSDU TX count
  6216. * @tx_mpdu_cnt: MPDU tx count
  6217. * @tx_ppdu_cnt: PPDU tx count
  6218. * @rx_msdu_cnt: MSDU RX count
  6219. * @rx_mpdu_cnt: MPDU RXcount
  6220. * @bin_count: Bin count
  6221. */
  6222. typedef struct {
  6223. uint32_t tot;
  6224. uint32_t tx_msdu_cnt;
  6225. uint32_t tx_mpdu_cnt;
  6226. uint32_t tx_ppdu_cnt;
  6227. uint32_t rx_msdu_cnt;
  6228. uint32_t rx_mpdu_cnt;
  6229. uint32_t bin_count;
  6230. } wmi_host_wlan_profile_ctx_t;
  6231. /**
  6232. * struct wmi_host_chan_info_event - Channel info WMI event
  6233. * @pdev_id: pdev_id
  6234. * @err_code: Error code
  6235. * @freq: Channel freq
  6236. * @cmd_flags: Read flags
  6237. * @noise_floor: Noise Floor value
  6238. * @rx_clear_count: rx clear count
  6239. * @cycle_count: cycle count
  6240. * @chan_tx_pwr_range: channel tx power per range
  6241. * @chan_tx_pwr_tp: channel tx power per throughput
  6242. * @rx_frame_count: rx frame count
  6243. * @rx_11b_mode_data_duration: 11b mode data duration
  6244. * @my_bss_rx_cycle_count: BSS rx cycle count
  6245. * @tx_frame_cnt: tx frame count
  6246. * @mac_clk_mhz: mac clock
  6247. * @vdev_id: unique id identifying the VDEV
  6248. */
  6249. typedef struct {
  6250. uint32_t pdev_id;
  6251. uint32_t err_code;
  6252. uint32_t freq;
  6253. uint32_t cmd_flags;
  6254. uint32_t noise_floor;
  6255. uint32_t rx_clear_count;
  6256. uint32_t cycle_count;
  6257. uint32_t chan_tx_pwr_range;
  6258. uint32_t chan_tx_pwr_tp;
  6259. uint32_t rx_frame_count;
  6260. uint32_t rx_11b_mode_data_duration;
  6261. uint32_t my_bss_rx_cycle_count;
  6262. uint32_t tx_frame_cnt;
  6263. uint32_t mac_clk_mhz;
  6264. uint32_t vdev_id;
  6265. } wmi_host_chan_info_event;
  6266. /**
  6267. * struct wmi_host_pdev_channel_hopping_event
  6268. * @pdev_id: pdev_id
  6269. * @noise_floor_report_iter: Noise threshold iterations with high values
  6270. * @noise_floor_total_iter: Total noise threshold iterations
  6271. */
  6272. typedef struct {
  6273. uint32_t pdev_id;
  6274. uint32_t noise_floor_report_iter;
  6275. uint32_t noise_floor_total_iter;
  6276. } wmi_host_pdev_channel_hopping_event;
  6277. /**
  6278. * struct wmi_host_pdev_bss_chan_info_event
  6279. * @pdev_id: pdev_id
  6280. * @freq: Units in MHz
  6281. * @noise_floor: units are dBm
  6282. * @rx_clear_count_low:
  6283. * @rx_clear_count_high:
  6284. * @cycle_count_low:
  6285. * @cycle_count_high:
  6286. * @tx_cycle_count_low:
  6287. * @tx_cycle_count_high:
  6288. * @rx_cycle_count_low:
  6289. * @rx_cycle_count_high:
  6290. * @rx_bss_cycle_count_low:
  6291. * @rx_bss_cycle_count_high:
  6292. * @reserved:
  6293. */
  6294. typedef struct {
  6295. uint32_t pdev_id;
  6296. uint32_t freq;
  6297. uint32_t noise_floor;
  6298. uint32_t rx_clear_count_low;
  6299. uint32_t rx_clear_count_high;
  6300. uint32_t cycle_count_low;
  6301. uint32_t cycle_count_high;
  6302. uint32_t tx_cycle_count_low;
  6303. uint32_t tx_cycle_count_high;
  6304. uint32_t rx_cycle_count_low;
  6305. uint32_t rx_cycle_count_high;
  6306. uint32_t rx_bss_cycle_count_low;
  6307. uint32_t rx_bss_cycle_count_high;
  6308. uint32_t reserved;
  6309. } wmi_host_pdev_bss_chan_info_event;
  6310. /**
  6311. * struct wmi_host_pdev_ctl_failsafe_event
  6312. * @ctl_failsafe_status: Indicate if Failsafe value is imposed on CTL
  6313. */
  6314. struct wmi_host_pdev_ctl_failsafe_event {
  6315. uint32_t ctl_failsafe_status;
  6316. };
  6317. #define WMI_HOST_INST_STATS_INVALID_RSSI 0
  6318. /**
  6319. * struct wmi_host_inst_stats_resp
  6320. * @iRSSI: Instantaneous RSSI
  6321. * @peer_macaddr: peer mac address
  6322. * @pdev_id: pdev_id
  6323. */
  6324. typedef struct {
  6325. uint32_t iRSSI;
  6326. wmi_host_mac_addr peer_macaddr;
  6327. uint32_t pdev_id;
  6328. } wmi_host_inst_stats_resp;
  6329. /* Event definition and new structure addition to send event
  6330. * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id
  6331. */
  6332. #define WMI_HOST_INVALID_PEER_AST_INDEX 0xffff
  6333. #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK 0x1
  6334. #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK 0x2
  6335. /**
  6336. * struct wmi_host_tx_data_traffic_ctrl_event
  6337. * @peer_ast_idx: For vdev based control, peer_ast_idx will be
  6338. * WMI_INVALID_PEER_AST_INDEX
  6339. * @vdev_id: only applies if peer_ast_idx == INVALID
  6340. * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or
  6341. * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK
  6342. * @wmm_ac: Indicates AC to be blocked or unblocked
  6343. * Bits 4-31 : Reserved (Shall be zero)
  6344. * Bits 0-3 : WMM AC NO [ BE (1), BK (2), VI (3), VO (4)]
  6345. * Started numbering from 1 to preserve backward compatibility
  6346. */
  6347. typedef struct {
  6348. uint32_t peer_ast_idx;
  6349. uint32_t vdev_id;
  6350. uint32_t ctrl_cmd;
  6351. uint32_t wmm_ac;
  6352. } wmi_host_tx_data_traffic_ctrl_event;
  6353. /**
  6354. * struct wmi_host_ath_dcs_cw_int
  6355. * @channel: either number or freq in mhz
  6356. */
  6357. typedef struct {
  6358. uint32_t channel;
  6359. } wmi_host_ath_dcs_cw_int;
  6360. #define WMI_MAX_POWER_DBG_ARGS 8
  6361. /**
  6362. * struct wmi_power_dbg_params - power debug command parameter
  6363. * @pdev_id: subsystem identifier
  6364. * @module_id: parameter id
  6365. * @num_arg: no of arguments
  6366. * @args: arguments
  6367. */
  6368. struct wmi_power_dbg_params {
  6369. uint32_t pdev_id;
  6370. uint32_t module_id;
  6371. uint32_t num_args;
  6372. uint32_t args[WMI_MAX_POWER_DBG_ARGS];
  6373. };
  6374. /**
  6375. * struct wmi_fw_dump_seg_req - individual segment details
  6376. * @seg_id - segment id.
  6377. * @seg_start_addr_lo - lower address of the segment.
  6378. * @seg_start_addr_hi - higher address of the segment.
  6379. * @seg_length - length of the segment.
  6380. * @dst_addr_lo - lower address of the destination buffer.
  6381. * @dst_addr_hi - higher address of the destination buffer.
  6382. *
  6383. * This structure carries the information to firmware about the
  6384. * individual segments. This structure is part of firmware memory
  6385. * dump request.
  6386. */
  6387. struct wmi_fw_dump_seg_req {
  6388. uint8_t seg_id;
  6389. uint32_t seg_start_addr_lo;
  6390. uint32_t seg_start_addr_hi;
  6391. uint32_t seg_length;
  6392. uint32_t dst_addr_lo;
  6393. uint32_t dst_addr_hi;
  6394. };
  6395. /**
  6396. * enum wmi_userspace_log_level - Log level at userspace
  6397. * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection
  6398. * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log
  6399. * level with minimal user impact. This is the default value.
  6400. * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily
  6401. * trying to reproduce a problem, wifi performances and power can be impacted
  6402. * but device should not otherwise be significantly impacted
  6403. * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to
  6404. * actively debug a problem
  6405. *
  6406. * Various log levels defined in the userspace for logging applications
  6407. */
  6408. enum wmi_userspace_log_level {
  6409. WMI_LOG_LEVEL_NO_COLLECTION,
  6410. WMI_LOG_LEVEL_NORMAL_COLLECT,
  6411. WMI_LOG_LEVEL_ISSUE_REPRO,
  6412. WMI_LOG_LEVEL_ACTIVE,
  6413. };
  6414. /**
  6415. * HW mode config type replicated from FW header
  6416. * @WMI_HOST_HW_MODE_SINGLE: Only one PHY is active.
  6417. * @WMI_HOST_HW_MODE_DBS: Both PHYs are active in different bands,
  6418. * one in 2G and another in 5G.
  6419. * @WMI_HOST_HW_MODE_SBS_PASSIVE: Both PHYs are in passive mode (only rx) in
  6420. * same band; no tx allowed.
  6421. * @WMI_HOST_HW_MODE_SBS: Both PHYs are active in the same band.
  6422. * Support for both PHYs within one band is planned
  6423. * for 5G only(as indicated in WMI_MAC_PHY_CAPABILITIES),
  6424. * but could be extended to other bands in the future.
  6425. * The separation of the band between the two PHYs needs
  6426. * to be communicated separately.
  6427. * @WMI_HOST_HW_MODE_DBS_SBS: 3 PHYs, with 2 on the same band doing SBS
  6428. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  6429. * @WMI_HOST_HW_MODE_DBS_OR_SBS: Two PHY with one PHY capabale of both 2G and
  6430. * 5G. It can support SBS (5G + 5G) OR DBS (5G + 2G).
  6431. * @WMI_HOST_HW_MODE_MAX: Max hw_mode_id. Used to indicate invalid mode.
  6432. */
  6433. enum wmi_host_hw_mode_config_type {
  6434. WMI_HOST_HW_MODE_SINGLE = 0,
  6435. WMI_HOST_HW_MODE_DBS = 1,
  6436. WMI_HOST_HW_MODE_SBS_PASSIVE = 2,
  6437. WMI_HOST_HW_MODE_SBS = 3,
  6438. WMI_HOST_HW_MODE_DBS_SBS = 4,
  6439. WMI_HOST_HW_MODE_DBS_OR_SBS = 5,
  6440. WMI_HOST_HW_MODE_MAX,
  6441. };
  6442. /*
  6443. * struct wmi_host_peer_txmu_cnt_event
  6444. * @tx_mu_transmitted - MU-MIMO tx count
  6445. */
  6446. typedef struct {
  6447. uint32_t tx_mu_transmitted;
  6448. } wmi_host_peer_txmu_cnt_event;
  6449. /**
  6450. * struct esp_estimation_event - esp airtime estimation event
  6451. * @ac_airtime_percentage: Estimated Airtime
  6452. * @pdev_id: PDEV_ID of Data
  6453. */
  6454. struct esp_estimation_event {
  6455. uint32_t ac_airtime_percentage;
  6456. uint32_t pdev_id;
  6457. };
  6458. /*
  6459. * struct wmi_peer_gid_userpos_list_event
  6460. * @usr_list - User list
  6461. */
  6462. #define GID_OVERLOAD_GROUP_COUNT 15
  6463. typedef struct {
  6464. uint32_t usr_list[GID_OVERLOAD_GROUP_COUNT];
  6465. } wmi_host_peer_gid_userpos_list_event;
  6466. /**
  6467. * enum rcpi_measurement_type - for identifying type of rcpi measurement
  6468. * @RCPI_MEASUREMENT_TYPE_AVG_MGMT: avg rcpi of mgmt frames
  6469. * @RCPI_MEASUREMENT_TYPE_AVG_DATA: avg rcpi of data frames
  6470. * @RCPI_MEASUREMENT_TYPE_LAST_MGMT: rcpi of last mgmt frame
  6471. * @RCPI_MEASUREMENT_TYPE_LAST_DATA: rcpi of last data frame
  6472. * @RCPI_MEASUREMENT_TYPE_INVALID: invalid rcpi measurement type
  6473. */
  6474. enum rcpi_measurement_type {
  6475. RCPI_MEASUREMENT_TYPE_AVG_MGMT = 0x1,
  6476. RCPI_MEASUREMENT_TYPE_AVG_DATA = 0x2,
  6477. RCPI_MEASUREMENT_TYPE_LAST_MGMT = 0x3,
  6478. RCPI_MEASUREMENT_TYPE_LAST_DATA = 0x4,
  6479. RCPI_MEASUREMENT_TYPE_INVALID = 0x5,
  6480. };
  6481. /**
  6482. * struct rcpi_req - RCPI req parameter
  6483. * @vdev_id: virtual device id
  6484. * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type
  6485. * @mac_addr: peer mac addr for which measurement is required
  6486. */
  6487. struct rcpi_req {
  6488. uint32_t vdev_id;
  6489. enum rcpi_measurement_type measurement_type;
  6490. uint8_t mac_addr[IEEE80211_ADDR_LEN];
  6491. };
  6492. /**
  6493. * struct rcpi_res - RCPI response parameter
  6494. * @vdev_id: virtual device id
  6495. * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type
  6496. * @mac_addr: peer mac addr for which measurement is required
  6497. * @rcpi_value: value of RCPI computed by firmware
  6498. */
  6499. struct rcpi_res {
  6500. uint32_t vdev_id;
  6501. enum rcpi_measurement_type measurement_type;
  6502. uint8_t mac_addr[IEEE80211_ADDR_LEN];
  6503. int32_t rcpi_value;
  6504. };
  6505. #define WMI_HOST_BOARD_MCN_STRING_MAX_SIZE 19
  6506. #define WMI_HOST_BOARD_MCN_STRING_BUF_SIZE \
  6507. (WMI_HOST_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  6508. typedef struct {
  6509. uint32_t software_cal_version;
  6510. uint32_t board_cal_version;
  6511. /* board_mcn_detail:
  6512. * Provide a calibration message string for the host to display.
  6513. * Note: on a big-endian host, the 4 bytes within each uint32_t portion
  6514. * of a WMI message will be automatically byteswapped by the copy engine
  6515. * as the messages are transferred between host and target, to convert
  6516. * between the target's little-endianness and the host's big-endianness.
  6517. * Consequently, a big-endian host should manually unswap the bytes
  6518. * within the board_mcn_detail string buffer to get the bytes back into
  6519. * the desired natural order.
  6520. */
  6521. uint8_t board_mcn_detail[WMI_HOST_BOARD_MCN_STRING_BUF_SIZE];
  6522. uint32_t cal_ok; /* filled with CALIBRATION_STATUS enum value */
  6523. } wmi_host_pdev_check_cal_version_event;
  6524. /**
  6525. * enum WMI_HOST_CALIBRATION_STATUS - Host defined Enums for cal status
  6526. * @WMI_HOST_NO_FEATURE: The board was calibrated with a meta
  6527. * which did not have this feature
  6528. * @WMI_HOST_CALIBRATION_OK: The calibration status is OK
  6529. * @WMI_HOST_CALIBRATION_NOT_OK: The calibration status is NOT OK
  6530. */
  6531. enum WMI_HOST_CALIBRATION_STATUS {
  6532. WMI_HOST_NO_FEATURE = 0,
  6533. WMI_HOST_CALIBRATION_OK,
  6534. WMI_HOST_CALIBRATION_NOT_OK,
  6535. };
  6536. /**
  6537. * struct wmi_host_pdev_utf_event - Host defined struct to hold utf event data
  6538. * @data: Pointer to data
  6539. * @datalen: Data length
  6540. * @pdev_id: Pdev_id of data
  6541. *
  6542. */
  6543. struct wmi_host_pdev_utf_event {
  6544. uint8_t *data;
  6545. uint16_t datalen;
  6546. uint32_t pdev_id;
  6547. };
  6548. /**
  6549. * struct wmi_host_utf_seg_header_info - Host defined struct to map seg info in
  6550. * UTF event
  6551. * @len: segment length
  6552. * @msgref: message reference
  6553. * @segment_info: segment info
  6554. * @pdev_id: pdev_id
  6555. *
  6556. */
  6557. struct wmi_host_utf_seg_header_info {
  6558. uint32_t len;
  6559. uint32_t msgref;
  6560. uint32_t segment_info;
  6561. uint32_t pdev_id;
  6562. };
  6563. /**
  6564. * struct wmi_host_pdev_qvit_event - Host defined struct to hold qvit event data
  6565. * @data: Pointer to data
  6566. * @datalen: Data length
  6567. *
  6568. */
  6569. struct wmi_host_pdev_qvit_event {
  6570. uint8_t *data;
  6571. uint16_t datalen;
  6572. uint32_t pdev_id;
  6573. };
  6574. /**
  6575. * struct wmi_host_peer_delete_response_event - Peer Delete response event param
  6576. * @vdev_id: vdev id
  6577. * @mac_address: Peer Mac Address
  6578. *
  6579. */
  6580. struct wmi_host_peer_delete_response_event {
  6581. uint32_t vdev_id;
  6582. struct qdf_mac_addr mac_address;
  6583. };
  6584. /**
  6585. * @struct wmi_host_dcs_interference_param
  6586. * @interference_type: Type of DCS Interference
  6587. * @uint32_t pdev_id: pdev id
  6588. */
  6589. struct wmi_host_dcs_interference_param {
  6590. uint32_t interference_type;
  6591. uint32_t pdev_id;
  6592. };
  6593. /*
  6594. * struct wmi_host_fips_event_param: FIPS event param
  6595. * @pdev_id: pdev id
  6596. * @error_status: Error status: 0 (no err), 1, or OPER_TIMEOUR
  6597. * @data_len: FIPS data length
  6598. * @data: pointer to data
  6599. */
  6600. struct wmi_host_fips_event_param {
  6601. uint32_t pdev_id;
  6602. uint32_t error_status;
  6603. uint32_t data_len;
  6604. uint32_t *data;
  6605. };
  6606. /**
  6607. * struct wmi_host_proxy_ast_reserve_param
  6608. * @pdev_id: pdev id
  6609. * @result: result
  6610. */
  6611. struct wmi_host_proxy_ast_reserve_param {
  6612. uint32_t pdev_id;
  6613. uint32_t result;
  6614. };
  6615. /**
  6616. * struct wmi_host_pdev_band_to_mac - freq range for mac
  6617. * @pdev_id: PDEV ID to identifiy mac
  6618. * @start_freq: start frequency value
  6619. * @end_freq: end frequency value
  6620. */
  6621. struct wmi_host_pdev_band_to_mac {
  6622. uint32_t pdev_id;
  6623. uint32_t start_freq;
  6624. uint32_t end_freq;
  6625. };
  6626. #define WMI_HOST_MAX_PDEV 3
  6627. #ifdef OL_ATH_SMART_LOGGING
  6628. #define WMI_HOST_SMART_LOG_SCENARIO_SET(flag, scenario) ((flag) |= (scenario))
  6629. #define WMI_HOST_SMART_LOG_SCENARIO_GET(flag, scenario) ((flag) & (scenario))
  6630. /**
  6631. * enum wmi_host_smart_log_scenario - Smart log scenarios to be enabled/disabled
  6632. * @WMI_HOST_SMART_LOG_ALL: All smart logging features.
  6633. * @WMI_HOST_SMART_LOG_CE_FULL_DETECT_BY_FW: CE with full detect by FW.
  6634. * @WMI_HOST_SMART_LOG_TX_RX_TIMEOUT: Tx/Rx timeout.
  6635. * @WMI_HOST_SMART_LOG_STA_KICKOUT: STA Kickout.
  6636. * @WMI_HOST_SMART_LOG_BCN_CMD_FAILURE: Beacon command failure.
  6637. * @WMI_HOST_SMART_LOG_P1_PING_FAILURE: P1 ping failure. Ping failure detection
  6638. * is done by host entities. So, host should be able to control the
  6639. * enable/disable of this feature. Yet, this is provided in case the
  6640. * corresponding FW specific debugs alone have to be enabled/disabled.
  6641. * @WMI_HOST_SMART_LOG_CONNECTION_FAILURE: Connection failure. Connection
  6642. * failure detection is done by host entities. So, host should be able to
  6643. * control the enable/disable of this feature. Yet, this is provided in case the
  6644. * corresponding FW specific debugs alone have to be enabled/disabled.
  6645. * @WMI_HOST_SMART_LOG_FW_INITIATED_PKT_LOG: FW Initiated packetlog.
  6646. * @WMI_HOST_SMART_LOG_EXTENSION_1: If WMI_HOST_SMART_LOG_EXTENSION_1 is set,
  6647. * then the 'log_case_ext_1' field in 'wmi_smart_logging' is used; else
  6648. * log_case_ext_1 is ignored.
  6649. */
  6650. enum wmi_host_smart_log_scenario {
  6651. WMI_HOST_SMART_LOG_ALL = 0x0,
  6652. WMI_HOST_SMART_LOG_CE_FULL_DETECT_BY_FW = 0x1,
  6653. WMI_HOST_SMART_LOG_TX_RX_TIMEOUT = 0x2,
  6654. WMI_HOST_SMART_LOG_STA_KICKOUT = 0x4,
  6655. WMI_HOST_SMART_LOG_BCN_CMD_FAILURE = 0x8,
  6656. WMI_HOST_SMART_LOG_P1_PING_FAILURE = 0x10,
  6657. WMI_HOST_SMART_LOG_CONNECTION_FAILURE = 0x20,
  6658. WMI_HOST_SMART_LOG_FW_INITIATED_PKT_LOG = 0x40,
  6659. /* New scenarios to be added here */
  6660. WMI_HOST_SMART_LOG_EXTENSION_1 = 0x80000000,
  6661. };
  6662. /**
  6663. * struct wmi_fatal_condition_event - Fatal condition event param
  6664. * @type: Type of event
  6665. * @subtype: Subtype of event
  6666. * @type_subtype_specific_data: Data specific to combination of type and
  6667. * subtype. This is held in a union with the original "reserved0" for backward
  6668. * compatibility with any code that might refer to it. The previously-reserved
  6669. * field now holds data under some conditions. The kind of data depends on the
  6670. * above "type" and "subtype" fields. The interpretation of the
  6671. * type_subtype_specific_data field based on different type + subtype values is
  6672. * shown below:
  6673. * 1. type == WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG + subtype
  6674. * == WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START ->
  6675. * type_subtype_specific_data = WMI_HOST_PKTLOG_EVENT
  6676. * For any type+subtype combinations not listed above, the recipient is expected
  6677. * to ignore the type_subtype_specific_data field.
  6678. */
  6679. struct wmi_fatal_condition_event {
  6680. uint32_t type;
  6681. uint32_t subtype;
  6682. union {
  6683. uint32_t reserved0;
  6684. uint32_t type_subtype_specific_data;
  6685. };
  6686. };
  6687. /*Currently the Max fatal events is 3 */
  6688. #define FATAL_EVENTS_MAX 3
  6689. /**
  6690. * struct wmi_debug_fatal_events: Fatal events list
  6691. * @num_events:Number of events
  6692. * @event[FATAL_EVENTS_MAX]: Each event data
  6693. */
  6694. struct wmi_debug_fatal_events {
  6695. uint32_t num_events;
  6696. struct wmi_fatal_condition_event event[FATAL_EVENTS_MAX];
  6697. };
  6698. /**
  6699. * enum wmi_host_fatal_condition_type - Values that 'type' can take in
  6700. * wmi_fatal_condition_event
  6701. * @WMI_HOST_FATAL_CONDITION_EVENT_COMPLETION: Fatal condition event completion
  6702. * @WMI_HOST_FATAL_CONDITION_CE_FAILURE: CE failure
  6703. * @WMI_HOST_FATAL_CONDITION_TIMEOUTS: Communication timeouts
  6704. * @WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE: Connection issue
  6705. * @WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG: Configuration for FW initiated
  6706. * packetlog
  6707. */
  6708. enum wmi_host_fatal_condition_type {
  6709. WMI_HOST_FATAL_CONDITION_EVENT_COMPLETION,
  6710. WMI_HOST_FATAL_CONDITION_CE_FAILURE,
  6711. WMI_HOST_FATAL_CONDITION_TIMEOUTS,
  6712. WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE,
  6713. WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG,
  6714. };
  6715. /**
  6716. * enum wmi_host_fatal_condition_subtype_timeouts - Possible subtypes for
  6717. * WMI_HOST_FATAL_CONDITION_TIMEOUTS
  6718. * @WMI_HOST_FATAL_SUBTYPE_TX_TIMEOUT: Tx timeout
  6719. * @WMI_HOST_FATAL_SUBTYPE_RX_TIMEOUT: Rx timeout
  6720. */
  6721. enum wmi_host_fatal_condition_subtype_timeouts {
  6722. WMI_HOST_FATAL_SUBTYPE_TX_TIMEOUT,
  6723. WMI_HOST_FATAL_SUBTYPE_RX_TIMEOUT,
  6724. };
  6725. /**
  6726. * enum wmi_host_fatal_condition_subtype_connection_issue - Possible subtypes
  6727. * for WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE
  6728. * @WMI_HOST_FATAL_SUBTYPE_STA_KICKOUT: STA Kickout
  6729. * @WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_START_DEBUG: Start debugging for P1
  6730. * ping failure
  6731. * @WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_STOP_DEBUG: Stop debugging for P1
  6732. * ping failure
  6733. * @WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_START_DEBUG: Start debugging for
  6734. * connection failure
  6735. * @WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_STOP_DEBUG: Stop debugging for
  6736. * connection failure
  6737. */
  6738. enum wmi_host_fatal_condition_subtype_connection_issue {
  6739. WMI_HOST_FATAL_SUBTYPE_STA_KICKOUT,
  6740. WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_START_DEBUG,
  6741. WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_STOP_DEBUG,
  6742. WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_START_DEBUG,
  6743. WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_STOP_DEBUG,
  6744. };
  6745. /**
  6746. * enum wmi_host_fatal_condition_subtype_packet_log_config - Possible subtypes
  6747. * for WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG
  6748. * @WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START: Start FW initiated packetlog
  6749. * @WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_STOP: Stop FW initiated packetlog
  6750. */
  6751. enum wmi_host_fatal_condition_subtype_packet_log_config {
  6752. WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START,
  6753. WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_STOP,
  6754. };
  6755. #endif /* OL_ATH_SMART_LOGGING */
  6756. /**
  6757. * struct wmi_init_cmd_param - INIT command params
  6758. * @target_resource_config: pointer to resource config
  6759. * @num_mem_chunks: number of memory chunks
  6760. * @struct wmi_host_mem_chunk: pointer to memory chunks
  6761. * @hw_mode_index: HW mode index chosen
  6762. * @num_band_to_mac: Number of band to mac setting
  6763. * @struct wmi_host_pdev_band_to_mac: band to mac setting
  6764. */
  6765. struct wmi_init_cmd_param {
  6766. target_resource_config *res_cfg;
  6767. uint8_t num_mem_chunks;
  6768. struct wmi_host_mem_chunk *mem_chunks;
  6769. uint32_t hw_mode_id;
  6770. uint32_t num_band_to_mac;
  6771. struct wmi_host_pdev_band_to_mac band_to_mac[WMI_HOST_MAX_PDEV];
  6772. };
  6773. /**
  6774. * struct pdev_csa_switch_count_status - CSA switch count status event param
  6775. * @pdev_id: Physical device identifier
  6776. * @current_switch_count: Current CSA switch count
  6777. * @num_vdevs: Number of vdevs that need restart
  6778. * @vdev_ids: Array containing the vdev ids that need restart
  6779. */
  6780. struct pdev_csa_switch_count_status {
  6781. uint32_t pdev_id;
  6782. uint32_t current_switch_count;
  6783. uint32_t num_vdevs;
  6784. uint32_t *vdev_ids;
  6785. };
  6786. /**
  6787. * enum wmi_host_active-apf_mode - FW_ACTIVE_APF_MODE, replicated from FW header
  6788. * @WMI_HOST_ACTIVE_APF_DISABLED: APF is disabled for all packets in active mode
  6789. * @WMI_HOST_ACTIVE_APF_ENABLED: APF is enabled for all packets in active mode
  6790. * @WMI_HOST_ACTIVE_APF_ADAPTIVE: APF is enabled for packets up to some
  6791. * threshold in active mode
  6792. */
  6793. enum wmi_host_active_apf_mode {
  6794. WMI_HOST_ACTIVE_APF_DISABLED = (1 << 1),
  6795. WMI_HOST_ACTIVE_APF_ENABLED = (1 << 2),
  6796. WMI_HOST_ACTIVE_APF_ADAPTIVE = (1 << 3)
  6797. };
  6798. /**
  6799. * struct coex_config_params - Coex config command params
  6800. * @vdev_id: Virtual AP device identifier
  6801. * @config_type: Configuration type - wmi_coex_config_type enum
  6802. * @config_arg1: Configuration argument based on config type
  6803. * @config_arg2: Configuration argument based on config type
  6804. * @config_arg3: Configuration argument based on config type
  6805. * @config_arg4: Configuration argument based on config type
  6806. * @config_arg5: Configuration argument based on config type
  6807. * @config_arg6: Configuration argument based on config type
  6808. */
  6809. struct coex_config_params {
  6810. uint32_t vdev_id;
  6811. uint32_t config_type;
  6812. uint32_t config_arg1;
  6813. uint32_t config_arg2;
  6814. uint32_t config_arg3;
  6815. uint32_t config_arg4;
  6816. uint32_t config_arg5;
  6817. uint32_t config_arg6;
  6818. };
  6819. #define WMI_HOST_PDEV_ID_SOC 0xFF
  6820. #define WMI_HOST_PDEV_ID_0 0
  6821. #define WMI_HOST_PDEV_ID_1 1
  6822. #define WMI_HOST_PDEV_ID_2 2
  6823. /**
  6824. * struct tbttoffset_params - Tbttoffset event params
  6825. * @vdev_id: Virtual AP device identifier
  6826. * @tbttoffset : Tbttoffset for the virtual AP device
  6827. */
  6828. struct tbttoffset_params {
  6829. uint32_t vdev_id;
  6830. uint32_t tbttoffset;
  6831. };
  6832. /**
  6833. * struct wmi_host_ready_ev_param - Data revieved in ready event
  6834. * @status: FW init status. Success or Failure.
  6835. * @num_dscp_table: Number of DSCP table supported in FW
  6836. * @num_extra_mac_addr: Extra mac address present in ready event. Used
  6837. * in DBDC mode to provide multiple mac per pdev.
  6838. * @num_total_peer: Total number of peers FW could allocate. Zero means
  6839. * FW could allocate num peers requested by host in init.
  6840. * Otherwise, host need update it max_peer to this value.
  6841. * @num_extra_peer: Number of extra peers created and used within FW. Host
  6842. * should expect peer_id can be num_total_peer + num_extra_peer
  6843. * but it can create only upto num_total_peer.
  6844. * @agile_capability: Boolean specification of whether the target supports
  6845. * agile DFS, by means of using one 80 MHz radio chain for
  6846. * radar detection, concurrently with using another radio
  6847. * chain for non-160 MHz regular operation.
  6848. */
  6849. struct wmi_host_ready_ev_param {
  6850. uint32_t status;
  6851. uint32_t num_dscp_table;
  6852. uint32_t num_extra_mac_addr;
  6853. uint32_t num_total_peer;
  6854. uint32_t num_extra_peer;
  6855. bool agile_capability;
  6856. };
  6857. enum bcn_offload_control_param {
  6858. BCN_OFFLD_CTRL_TX_DISABLE = 0,
  6859. BCN_OFFLD_CTRL_TX_ENABLE,
  6860. BCN_OFFLD_CTRL_SWBA_DISABLE,
  6861. BCN_OFFLD_CTRL_SWBA_ENABLE,
  6862. };
  6863. /**
  6864. * struct bcn_offload_control - Beacon offload control params
  6865. * @vdev_id: vdev identifer of VAP to control beacon tx
  6866. * @bcn_ctrl_op: values from enum bcn_offload_control_param
  6867. */
  6868. struct bcn_offload_control {
  6869. uint32_t vdev_id;
  6870. enum bcn_offload_control_param bcn_ctrl_op;
  6871. };
  6872. #ifdef OBSS_PD
  6873. /**
  6874. * struct wmi_host_obss_spatial_reuse_set_param - OBSS_PD_SPATIAL Reuse
  6875. * structure
  6876. * @enable: Enable/Disable Spatial Reuse
  6877. * @obss_min: Minimum OBSS level to use
  6878. * @obss_max: Maximum OBSS level to use
  6879. * @pdev_id: Pdev id
  6880. */
  6881. struct wmi_host_obss_spatial_reuse_set_param {
  6882. uint32_t enable;
  6883. int32_t obss_min;
  6884. int32_t obss_max;
  6885. uint32_t vdev_id;
  6886. };
  6887. /**
  6888. * struct wmi_host_obss_spatial_reuse_set_def_thresh - default obsspd offsets
  6889. * @obss_min: Minimum OBSS level to use
  6890. * @obss_max: Maximum OBSS level to use
  6891. * @vdev_type: vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
  6892. */
  6893. struct wmi_host_obss_spatial_reuse_set_def_thresh {
  6894. int32_t obss_min;
  6895. int32_t obss_max;
  6896. uint32_t vdev_type;
  6897. };
  6898. #endif
  6899. /**
  6900. * struct wds_entry - WDS entry structure
  6901. * @peer_mac: peer mac
  6902. * @wds_mac: wds mac address
  6903. * @flags: flags
  6904. */
  6905. struct wdsentry {
  6906. u_int8_t peer_mac[IEEE80211_ADDR_LEN];
  6907. u_int8_t wds_mac[IEEE80211_ADDR_LEN];
  6908. uint32_t flags;
  6909. };
  6910. /**
  6911. * struct wmi_obss_detection_cfg_param - obss detection cfg
  6912. * @vdev_id: vdev id
  6913. * @obss_detect_period_ms: detection period in ms
  6914. * @obss_11b_ap_detect_mode: detect whether there is 11b ap/ibss
  6915. * @obss_11b_sta_detect_mode: detect whether there is 11b sta
  6916. * connected with other APs
  6917. * @obss_11g_ap_detect_mode: detect whether there is 11g AP
  6918. * @obss_11a_detect_mode: detect whether there is legacy 11a traffic
  6919. * @obss_ht_legacy_detect_mode: detect whether there is ap which is
  6920. * ht legacy mode
  6921. * @obss_ht_mixed_detect_mode: detect whether there is ap which is ht mixed mode
  6922. * @obss_ht_20mhz_detect_mode: detect whether there is ap which has 20M only
  6923. * station
  6924. */
  6925. struct wmi_obss_detection_cfg_param {
  6926. uint32_t vdev_id;
  6927. uint32_t obss_detect_period_ms;
  6928. uint32_t obss_11b_ap_detect_mode;
  6929. uint32_t obss_11b_sta_detect_mode;
  6930. uint32_t obss_11g_ap_detect_mode;
  6931. uint32_t obss_11a_detect_mode;
  6932. uint32_t obss_ht_legacy_detect_mode;
  6933. uint32_t obss_ht_mixed_detect_mode;
  6934. uint32_t obss_ht_20mhz_detect_mode;
  6935. };
  6936. /**
  6937. * enum wmi_obss_detection_reason - obss detection event reasons
  6938. * @OBSS_OFFLOAD_DETECTION_DISABLED: OBSS detection disabled
  6939. * @OBSS_OFFLOAD_DETECTION_PRESENT: OBSS present detection
  6940. * @OBSS_OFFLOAD_DETECTION_ABSENT: OBSS absent detection
  6941. *
  6942. * Defines different types of reasons for obss detection event from firmware.
  6943. */
  6944. enum wmi_obss_detection_reason {
  6945. OBSS_OFFLOAD_DETECTION_DISABLED = 0,
  6946. OBSS_OFFLOAD_DETECTION_PRESENT = 1,
  6947. OBSS_OFFLOAD_DETECTION_ABSENT = 2,
  6948. };
  6949. /**
  6950. * struct wmi_obss_detect_info - OBSS detection info from firmware
  6951. * @vdev_id: ID of the vdev to which this info belongs.
  6952. * @reason: Indicate if present or Absent detection,
  6953. * also if not supported offload for this vdev.
  6954. * @matched_detection_masks: Detection bit map.
  6955. * @matched_bssid_addr: MAC address valid for only if info is present detection.
  6956. */
  6957. struct wmi_obss_detect_info {
  6958. uint32_t vdev_id;
  6959. enum wmi_obss_detection_reason reason;
  6960. uint32_t matched_detection_masks;
  6961. uint8_t matched_bssid_addr[IEEE80211_ADDR_LEN];
  6962. };
  6963. #ifdef QCA_SUPPORT_CP_STATS
  6964. /**
  6965. * struct wmi_host_congestion_stats - host definition of congestion stats
  6966. * @vdev_id: ID of the vdev to which this info belongs.
  6967. * @congestion: This field holds the congestion percentage =
  6968. * (busy_time/total_time)*100
  6969. * for the interval from when the vdev was started to the current time
  6970. * (or the time at which the vdev was stopped).
  6971. */
  6972. struct wmi_host_congestion_stats {
  6973. uint32_t vdev_id;
  6974. uint32_t congestion;
  6975. };
  6976. #endif
  6977. #ifdef FEATURE_WLAN_APF
  6978. /**
  6979. * struct wmi_apf_write_memory_params - Android Packet Filter write memory
  6980. * params
  6981. * @vdev_id: VDEV on which APF memory is to be written
  6982. * @apf_version: APF version number
  6983. * @program_len: Length reserved for program in the APF work memory
  6984. * @addr_offset: Relative address in APF work memory to start writing
  6985. * @length: Size of the write
  6986. * @buf: Pointer to the buffer
  6987. */
  6988. struct wmi_apf_write_memory_params {
  6989. uint8_t vdev_id;
  6990. uint32_t apf_version;
  6991. uint32_t program_len;
  6992. uint32_t addr_offset;
  6993. uint32_t length;
  6994. uint8_t *buf;
  6995. };
  6996. /**
  6997. * struct wmi_apf_read_memory_params - Android Packet Filter read memory params
  6998. * @vdev_id: vdev id
  6999. * @addr_offset: Relative address in APF work memory to read from
  7000. * @length: Size of the memory fetch
  7001. */
  7002. struct wmi_apf_read_memory_params {
  7003. uint8_t vdev_id;
  7004. uint32_t addr_offset;
  7005. uint32_t length;
  7006. };
  7007. /**
  7008. * struct wmi_apf_read_memory_resp_event_params - Event containing read Android
  7009. * Packet Filter memory response
  7010. * @vdev_id: vdev id
  7011. * @offset: Read memory offset
  7012. * @length: Read memory length
  7013. * @more_data: Indicates more data to come
  7014. * @data: Pointer to the data
  7015. */
  7016. struct wmi_apf_read_memory_resp_event_params {
  7017. uint32_t vdev_id;
  7018. uint32_t offset;
  7019. uint32_t length;
  7020. bool more_data;
  7021. uint8_t *data;
  7022. };
  7023. #endif /* FEATURE_WLAN_APF */
  7024. /* vdev control flags (per bits) */
  7025. #define WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP 0x00000001
  7026. #define WMI_HOST_VDEV_FLAGS_TRANSMIT_AP 0x00000002
  7027. #define WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004
  7028. /* Begin of roam scan stats definitions */
  7029. #define WMI_ROAM_SCAN_STATS_MAX 5
  7030. #define WMI_ROAM_SCAN_STATS_CANDIDATES_MAX 4
  7031. #define WMI_ROAM_SCAN_STATS_CHANNELS_MAX 50
  7032. /**
  7033. * struct wmi_roam_scan_stats_req - Structure to hold roam scan stats request
  7034. * @vdev_id: interface id
  7035. */
  7036. struct wmi_roam_scan_stats_req {
  7037. uint32_t vdev_id;
  7038. };
  7039. /**
  7040. * struct wmi_roam_scan_cand - Roam scan candidates
  7041. * @score: score of AP
  7042. * @rssi: rssi of the AP
  7043. * @freq: center frequency
  7044. * @bssid: bssid of AP
  7045. */
  7046. struct wmi_roam_scan_cand {
  7047. uint32_t score;
  7048. uint32_t rssi;
  7049. uint32_t freq;
  7050. uint8_t bssid[QDF_MAC_ADDR_SIZE];
  7051. };
  7052. /**
  7053. * struct wmi_roam_scan_stats_params - Roam scan details
  7054. * @time_stamp: time at which this roam scan happened
  7055. * @client_id: id of client which triggered this scan
  7056. * @num_scan_chans: number of channels that were scanned as part of this scan
  7057. * @scan_freqs: frequencies of the channels that were scanned
  7058. * @is_roam_successful: whether a successful roaming happened after this scan
  7059. * @old_bssid: bssid to which STA is connected just before this scan
  7060. * @new_bssid: bssid to which STA is roamed to in case of successful roaming
  7061. * @num_roam_candidates: no.of roam candidates that are being reported
  7062. * @roam_candidate: roam scan candidate details
  7063. * @trigger_id: reason for triggering this roam or roam scan
  7064. * @trigger_value: threshold value related to trigger_id
  7065. */
  7066. struct wmi_roam_scan_stats_params {
  7067. uint64_t time_stamp;
  7068. uint32_t client_id;
  7069. uint32_t num_scan_chans;
  7070. uint32_t scan_freqs[WMI_ROAM_SCAN_STATS_CHANNELS_MAX];
  7071. uint32_t is_roam_successful;
  7072. /* Bssid to which STA is connected when the roam scan is triggered */
  7073. uint8_t old_bssid[QDF_MAC_ADDR_SIZE];
  7074. /*
  7075. * Bssid to which STA is connected after roaming. Will be valid only
  7076. * if is_roam_successful is true.
  7077. */
  7078. uint8_t new_bssid[QDF_MAC_ADDR_SIZE];
  7079. /* Number of roam candidates that are being reported in the stats */
  7080. uint32_t num_roam_candidates;
  7081. struct wmi_roam_scan_cand cand[WMI_ROAM_SCAN_STATS_CANDIDATES_MAX];
  7082. uint32_t trigger_id;
  7083. uint32_t trigger_value;
  7084. };
  7085. /**
  7086. * struct wmi_roam_scan_stats_res - Roam scan stats response from firmware
  7087. * @num_roam_scan: number of roam scans triggered
  7088. * @roam_scan: place holder to indicate the array of
  7089. * wmi_roam_scan_stats_params followed by this structure
  7090. */
  7091. struct wmi_roam_scan_stats_res {
  7092. uint32_t num_roam_scans;
  7093. struct wmi_roam_scan_stats_params roam_scan[0];
  7094. };
  7095. /* End of roam scan stats definitions */
  7096. /**
  7097. * enum wmi_obss_color_collision_evt_type - bss color collision event type
  7098. * @OBSS_COLOR_COLLISION_DETECTION_DISABLE: OBSS color detection disabled
  7099. * @OBSS_COLOR_COLLISION_DETECTION: OBSS color collision detection
  7100. * @OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY: OBSS free slot detection with
  7101. * within expiry period
  7102. * @OBSS_COLOR_FREE_SLOT_AVAILABLE: OBSS free slot detection
  7103. *
  7104. * Defines different types of type for obss color collision event type.
  7105. */
  7106. enum wmi_obss_color_collision_evt_type {
  7107. OBSS_COLOR_COLLISION_DETECTION_DISABLE = 0,
  7108. OBSS_COLOR_COLLISION_DETECTION = 1,
  7109. OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY = 2,
  7110. OBSS_COLOR_FREE_SLOT_AVAILABLE = 3,
  7111. };
  7112. /**
  7113. * struct wmi_obss_color_collision_cfg_param - obss color collision cfg
  7114. * @vdev_id: vdev id
  7115. * @flags: proposed for future use cases, currently not used.
  7116. * @evt_type: bss color collision event.
  7117. * @current_bss_color: current bss color.
  7118. * @detection_period_ms: scan interval for both AP and STA mode.
  7119. * @scan_period_ms: scan period for passive scan to detect collision.
  7120. * @free_slot_expiry_time_ms: FW to notify host at timer expiry after
  7121. * which Host will disable the bss color.
  7122. */
  7123. struct wmi_obss_color_collision_cfg_param {
  7124. uint32_t vdev_id;
  7125. uint32_t flags;
  7126. enum wmi_obss_color_collision_evt_type evt_type;
  7127. uint32_t current_bss_color;
  7128. uint32_t detection_period_ms;
  7129. uint32_t scan_period_ms;
  7130. uint32_t free_slot_expiry_time_ms;
  7131. };
  7132. /**
  7133. * struct wmi_obss_color_collision_info - bss color detection info from firmware
  7134. * @vdev_id: ID of the vdev to which this info belongs.
  7135. * @evt_type: bss color collision event.
  7136. * @obss_color_bitmap_bit0to31: Bit set indicating BSS color present.
  7137. * @obss_color_bitmap_bit32to63: Bit set indicating BSS color present.
  7138. */
  7139. struct wmi_obss_color_collision_info {
  7140. uint32_t vdev_id;
  7141. enum wmi_obss_color_collision_evt_type evt_type;
  7142. uint32_t obss_color_bitmap_bit0to31;
  7143. uint32_t obss_color_bitmap_bit32to63;
  7144. };
  7145. #endif /* _WMI_UNIFIED_PARAM_H_ */