wmi_unified_param.h 226 KB

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