wmi_unified_param.h 263 KB

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