wmi_unified_param.h 238 KB

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