wlan_cfg.c 180 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947
  1. /*
  2. * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. #include "wlan_ipa_ucfg_api.h"
  20. #include "wlan_ipa_main.h"
  21. #if defined(CONFIG_HL_SUPPORT)
  22. #include "wlan_tgt_def_config_hl.h"
  23. #else
  24. #include "wlan_tgt_def_config.h"
  25. #endif
  26. #include "qdf_trace.h"
  27. #include "qdf_mem.h"
  28. #include <cdp_txrx_ops.h>
  29. #include "wlan_cfg.h"
  30. #include "cfg_ucfg_api.h"
  31. #include "hal_api.h"
  32. #include "dp_types.h"
  33. #include <qdf_module.h>
  34. /*
  35. * The max allowed size for tx comp ring is 8191.
  36. * This is limited by h/w ring max size.
  37. * As this is not a power of 2 it does not work with nss offload so the
  38. * nearest available size which is power of 2 is 4096 chosen for nss
  39. */
  40. #define WLAN_CFG_TX_RING_MASK_0 BIT(0)
  41. #define WLAN_CFG_TX_RING_MASK_1 BIT(1)
  42. #define WLAN_CFG_TX_RING_MASK_2 BIT(2)
  43. #define WLAN_CFG_TX_RING_MASK_3 BIT(3)
  44. #define WLAN_CFG_TX_RING_MASK_4 BIT(4)
  45. #define WLAN_CFG_TX_RING_MASK_5 BIT(5)
  46. #define WLAN_CFG_TX_RING_MASK_6 BIT(6)
  47. #define WLAN_CFG_TX_RING_MASK_7 BIT(7)
  48. #define WLAN_CFG_RX_MON_RING_MASK_0 0x1
  49. #define WLAN_CFG_RX_MON_RING_MASK_1 0x2
  50. #define WLAN_CFG_RX_MON_RING_MASK_2 0x4
  51. #define WLAN_CFG_RX_MON_RING_MASK_3 0x0
  52. #define WLAN_CFG_TX_MON_RING_MASK_0 BIT(0)
  53. #define WLAN_CFG_TX_MON_RING_MASK_1 BIT(1)
  54. #define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 0x1
  55. #define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 0x2
  56. #define WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2 0x4
  57. #define WLAN_CFG_HOST2TXMON_RING_MASK_0 0x1
  58. #define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 0x1
  59. #define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 0x2
  60. #define WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2 0x4
  61. #define WLAN_CFG_RX_ERR_RING_MASK_0 0x1
  62. #define WLAN_CFG_RX_ERR_RING_MASK_1 0x0
  63. #define WLAN_CFG_RX_ERR_RING_MASK_2 0x0
  64. #define WLAN_CFG_RX_ERR_RING_MASK_3 0x0
  65. #define WLAN_CFG_RX_WBM_REL_RING_MASK_0 0x1
  66. #define WLAN_CFG_RX_WBM_REL_RING_MASK_1 0x0
  67. #define WLAN_CFG_RX_WBM_REL_RING_MASK_2 0x0
  68. #define WLAN_CFG_RX_WBM_REL_RING_MASK_3 0x0
  69. #define WLAN_CFG_REO_STATUS_RING_MASK_0 0x1
  70. #define WLAN_CFG_REO_STATUS_RING_MASK_1 0x0
  71. #define WLAN_CFG_REO_STATUS_RING_MASK_2 0x0
  72. #define WLAN_CFG_REO_STATUS_RING_MASK_3 0x0
  73. #define WLAN_CFG_RXDMA2HOST_RING_MASK_0 0x1
  74. #define WLAN_CFG_RXDMA2HOST_RING_MASK_1 0x2
  75. #define WLAN_CFG_RXDMA2HOST_RING_MASK_2 0x4
  76. #define WLAN_CFG_RXDMA2HOST_RING_MASK_3 0x0
  77. #define WLAN_CFG_HOST2RXDMA_RING_MASK_0 0x1
  78. #define WLAN_CFG_HOST2RXDMA_RING_MASK_1 0x2
  79. #define WLAN_CFG_HOST2RXDMA_RING_MASK_2 0x4
  80. #define WLAN_CFG_HOST2RXDMA_RING_MASK_3 0x0
  81. #define WLAN_CFG_UMAC_RESET_INTR_MASK_0 0x1
  82. #define WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0 0x1
  83. #define WLAN_CFG_REO2PPE_RING_MASK_0 0x1
  84. #define WLAN_CFG_PPE2TCL_RING_MASK_0 0x1
  85. struct dp_int_mask_assignment {
  86. uint8_t tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  87. uint8_t rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  88. uint8_t rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  89. uint8_t host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  90. uint8_t rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  91. uint8_t host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  92. uint8_t rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  93. uint8_t rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  94. uint8_t rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  95. uint8_t reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  96. uint8_t rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  97. uint8_t rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  98. uint8_t tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  99. uint8_t host2txmon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  100. uint8_t tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  101. uint8_t ppeds_wbm_release_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  102. uint8_t reo2ppe_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  103. uint8_t ppe2tcl_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  104. uint8_t umac_reset_intr_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  105. };
  106. #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
  107. /*
  108. * For BE, there are 18 available MSI interrupts, assigned in the manner
  109. * below.
  110. * TX(5) + RX(8) + (REO ERR + WBM ERR)(1) +
  111. * (REO status + RXDMA[0] + RXDMA[1])(1) + NEAR_Full_RX(2) + NEAR_Full_TX(1)
  112. * For IPA_OFFLOAD enabled case, 2 TX/RX rings would be assigned to IPA.
  113. */
  114. #ifdef CONFIG_BERYLLIUM
  115. #ifdef IPA_OFFLOAD
  116. /*
  117. * NEAR-FULL IRQ mask should be updated, if any change is made to
  118. * the below TX mask.
  119. */
  120. static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  121. [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4,
  122. [2] = WLAN_CFG_TX_RING_MASK_2};
  123. #else /* !IPA_OFFLOAD */
  124. #ifdef QCA_WIFI_KIWI_V2
  125. static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  126. [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4,
  127. [2] = WLAN_CFG_TX_RING_MASK_2, [3] = WLAN_CFG_TX_RING_MASK_5,
  128. [4] = WLAN_CFG_TX_RING_MASK_6};
  129. #else /* !QCA_WIFI_KIWI_V2 */
  130. static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  131. [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4,
  132. [2] = WLAN_CFG_TX_RING_MASK_2, [3] = WLAN_CFG_TX_RING_MASK_6,
  133. [4] = WLAN_CFG_TX_RING_MASK_7};
  134. #endif /* QCA_WIFI_KIWI_V2 */
  135. #endif /* IPA_OFFLOAD */
  136. static inline const
  137. uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx)
  138. {
  139. return &tx_ring_mask_msi[0];
  140. }
  141. #else
  142. static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  143. [0] = WLAN_CFG_TX_RING_MASK_0};
  144. #ifdef TX_MULTI_TCL
  145. static const uint8_t multi_tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  146. [0] = WLAN_CFG_TX_RING_MASK_0, [4] = WLAN_CFG_TX_RING_MASK_2};
  147. #ifdef IPA_OFFLOAD
  148. static inline const
  149. uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx)
  150. {
  151. if (cfg_ctx->ipa_enabled)
  152. return &tx_ring_mask_msi[0];
  153. return &multi_tx_ring_mask_msi[0];
  154. }
  155. #else
  156. static inline const
  157. uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx)
  158. {
  159. return &multi_tx_ring_mask_msi[0];
  160. }
  161. #endif /* IPA_OFFLOAD */
  162. #else
  163. static inline const
  164. uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx)
  165. {
  166. return &tx_ring_mask_msi[0];
  167. }
  168. #endif /* TX_MULTI_TCL */
  169. #endif /* CONFIG_BERYLLIUM */
  170. #ifdef CONFIG_BERYLLIUM
  171. #ifdef IPA_OFFLOAD
  172. static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  173. [5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1,
  174. [7] = WLAN_CFG_RX_RING_MASK_2, [9] = WLAN_CFG_RX_RING_MASK_4,
  175. [10] = WLAN_CFG_RX_RING_MASK_5, [11] = WLAN_CFG_RX_RING_MASK_6};
  176. #else
  177. static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  178. [5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1,
  179. [7] = WLAN_CFG_RX_RING_MASK_2, [8] = WLAN_CFG_RX_RING_MASK_3,
  180. [9] = WLAN_CFG_RX_RING_MASK_4, [10] = WLAN_CFG_RX_RING_MASK_5,
  181. [11] = WLAN_CFG_RX_RING_MASK_6, [12] = WLAN_CFG_RX_RING_MASK_7};
  182. #endif /* IPA_OFFLOAD */
  183. #else /* !defined(CONFIG_BERYLLIUM) */
  184. #ifdef IPA_OFFLOAD
  185. static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  186. [1] = WLAN_CFG_RX_RING_MASK_0, [2] = WLAN_CFG_RX_RING_MASK_1,
  187. [3] = WLAN_CFG_RX_RING_MASK_2};
  188. #else
  189. static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  190. [1] = WLAN_CFG_RX_RING_MASK_0, [2] = WLAN_CFG_RX_RING_MASK_1,
  191. [3] = WLAN_CFG_RX_RING_MASK_2 | WLAN_CFG_RX_RING_MASK_3};
  192. #endif
  193. #endif /* CONFIG_BERYLLIUM */
  194. #ifdef CONFIG_BERYLLIUM
  195. static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  196. [13] = WLAN_CFG_RXDMA2HOST_RING_MASK_0};
  197. #else
  198. static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  199. [6] = WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  200. WLAN_CFG_RXDMA2HOST_RING_MASK_1};
  201. #endif /* CONFIG_BERYLLIUM */
  202. #ifdef CONFIG_BERYLLIUM
  203. #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
  204. static const uint8_t rx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  205. [14] = WLAN_CFG_RX_MON_RING_MASK_0 | WLAN_CFG_RX_MON_RING_MASK_1};
  206. #else
  207. static const uint8_t rx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  208. [5] = WLAN_CFG_RX_MON_RING_MASK_0};
  209. #endif
  210. #else
  211. static const uint8_t rx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  212. [1] = WLAN_CFG_RX_MON_RING_MASK_0, [2] = WLAN_CFG_RX_MON_RING_MASK_1};
  213. #endif
  214. static const uint8_t host2rxdma_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
  215. static const uint8_t host2rxdma_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
  216. static const uint8_t rxdma2host_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
  217. #ifdef CONFIG_BERYLLIUM
  218. static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  219. [14] = WLAN_CFG_RX_ERR_RING_MASK_0};
  220. static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  221. [14] = WLAN_CFG_RX_WBM_REL_RING_MASK_0};
  222. static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  223. [13] = WLAN_CFG_REO_STATUS_RING_MASK_0};
  224. #else
  225. static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  226. [6] = WLAN_CFG_RX_ERR_RING_MASK_0};
  227. static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  228. [6] = WLAN_CFG_RX_WBM_REL_RING_MASK_0};
  229. static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  230. [6] = WLAN_CFG_REO_STATUS_RING_MASK_0};
  231. #endif
  232. #ifdef CONFIG_BERYLLIUM
  233. #ifdef WLAN_FEATURE_NEAR_FULL_IRQ
  234. static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  235. [15] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1};
  236. static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  237. [16] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1};
  238. static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  239. [17] = WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK};
  240. #else
  241. static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  242. 0 };
  243. static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  244. 0 };
  245. static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  246. 0 };
  247. #endif
  248. #else
  249. static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  250. 0 };
  251. static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  252. 0 };
  253. static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  254. 0 };
  255. #endif
  256. #ifdef CONFIG_BERYLLIUM
  257. #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
  258. static const uint8_t tx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  259. [13] = WLAN_CFG_TX_MON_RING_MASK_0 | WLAN_CFG_TX_MON_RING_MASK_1};
  260. #else
  261. static const uint8_t tx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
  262. #endif /* WLAN_FEATURE_LOCAL_PKT_CAPTURE */
  263. #else
  264. static const uint8_t tx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
  265. #endif
  266. #else
  267. /* Integrated configuration + 16 possible MSI configurations */
  268. #define NUM_INTERRUPT_COMBINATIONS 17
  269. /*
  270. * This structure contains the best possible mask assignment for a given
  271. * number of MSIs available in the system.
  272. */
  273. #ifdef IPA_OFFLOAD
  274. static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = {
  275. /* Interrupt assignment for integrated configuration */
  276. {
  277. /* tx ring masks */
  278. { WLAN_CFG_TX_RING_MASK_0,
  279. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  280. /* rx ring masks */
  281. { 0, 0, 0, 0, 0, 0, 0,
  282. WLAN_CFG_RX_RING_MASK_0,
  283. WLAN_CFG_RX_RING_MASK_1,
  284. WLAN_CFG_RX_RING_MASK_2,
  285. 0},
  286. /* rx mon ring masks */
  287. { 0, 0, 0, 0,
  288. WLAN_CFG_RX_MON_RING_MASK_0,
  289. WLAN_CFG_RX_MON_RING_MASK_1,
  290. WLAN_CFG_RX_MON_RING_MASK_2,
  291. 0, 0, 0, 0},
  292. /* host2rxdma ring masks */
  293. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  294. /* rxdma2host ring masks */
  295. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  296. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  297. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  298. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  299. 0, 0, 0, 0, 0, 0, 0},
  300. /* host2rxdma mon ring masks */
  301. { 0, 0, 0, 0,
  302. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  303. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  304. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  305. 0, 0, 0, 0},
  306. /* rxdma2host mon ring masks */
  307. { 0, 0, 0, 0,
  308. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  309. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  310. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  311. 0, 0, 0, 0},
  312. /* rx err ring masks */
  313. { WLAN_CFG_RX_ERR_RING_MASK_0,
  314. WLAN_CFG_RX_ERR_RING_MASK_1,
  315. WLAN_CFG_RX_ERR_RING_MASK_2,
  316. WLAN_CFG_RX_ERR_RING_MASK_3,
  317. 0, 0, 0, 0, 0, 0, 0},
  318. /* rx wbm rel ring masks */
  319. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  320. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  321. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  322. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  323. 0, 0, 0, 0, 0, 0, 0},
  324. /* reo status ring masks */
  325. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  326. WLAN_CFG_REO_STATUS_RING_MASK_1,
  327. WLAN_CFG_REO_STATUS_RING_MASK_2,
  328. WLAN_CFG_REO_STATUS_RING_MASK_3,
  329. 0, 0, 0, 0, 0, 0, 0},
  330. },
  331. /* Interrupt assignment for 1 MSI combination */
  332. {
  333. /* tx ring masks */
  334. { WLAN_CFG_TX_RING_MASK_0,
  335. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  336. /* rx ring masks */
  337. { WLAN_CFG_RX_RING_MASK_0 |
  338. WLAN_CFG_RX_RING_MASK_1 |
  339. WLAN_CFG_RX_RING_MASK_2,
  340. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  341. /* rx mon ring masks */
  342. { WLAN_CFG_RX_MON_RING_MASK_0 |
  343. WLAN_CFG_RX_MON_RING_MASK_1 |
  344. WLAN_CFG_RX_MON_RING_MASK_2,
  345. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  346. /* host2rxdma ring masks */
  347. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  348. /* rxdma2host ring masks */
  349. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  350. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  351. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  352. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  353. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  354. /* host2rxdma mon ring masks */
  355. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  356. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  357. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  358. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  359. /* rxdma2host mon ring masks */
  360. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  361. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  362. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  363. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  364. /* rx err ring masks */
  365. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  366. WLAN_CFG_RX_ERR_RING_MASK_1 |
  367. WLAN_CFG_RX_ERR_RING_MASK_2 |
  368. WLAN_CFG_RX_ERR_RING_MASK_3,
  369. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  370. /* rx wbm rel ring masks */
  371. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  372. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  373. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  374. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  375. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  376. /* reo status ring masks */
  377. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  378. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  379. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  380. WLAN_CFG_REO_STATUS_RING_MASK_3,
  381. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  382. },
  383. /* Interrupt assignment for 2 MSI combination */
  384. {
  385. /* tx ring masks */
  386. { WLAN_CFG_TX_RING_MASK_0,
  387. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  388. /* rx ring masks */
  389. { WLAN_CFG_RX_RING_MASK_0 |
  390. WLAN_CFG_RX_RING_MASK_1,
  391. WLAN_CFG_RX_RING_MASK_2,
  392. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  393. /* rx mon ring masks */
  394. { WLAN_CFG_RX_MON_RING_MASK_0 |
  395. WLAN_CFG_RX_MON_RING_MASK_1,
  396. WLAN_CFG_RX_MON_RING_MASK_2,
  397. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  398. /* host2rxdma ring masks */
  399. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  400. /* rxdma2host ring masks */
  401. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  402. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  403. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  404. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  405. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  406. /* host2rxdma mon ring masks */
  407. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  408. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  409. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  410. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  411. /* rxdma2host mon ring masks */
  412. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  413. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  414. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  415. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  416. /* rx err ring masks */
  417. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  418. WLAN_CFG_RX_ERR_RING_MASK_1,
  419. WLAN_CFG_RX_ERR_RING_MASK_2 |
  420. WLAN_CFG_RX_ERR_RING_MASK_3,
  421. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  422. /* rx wbm rel ring masks */
  423. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  424. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  425. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  426. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  427. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  428. /* reo status ring masks */
  429. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  430. WLAN_CFG_REO_STATUS_RING_MASK_1,
  431. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  432. WLAN_CFG_REO_STATUS_RING_MASK_3,
  433. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  434. },
  435. /* Interrupt assignment for 3 MSI combination */
  436. {
  437. /* tx ring masks */
  438. { WLAN_CFG_TX_RING_MASK_0,
  439. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  440. /* rx ring masks */
  441. { WLAN_CFG_RX_RING_MASK_0,
  442. WLAN_CFG_RX_RING_MASK_1,
  443. WLAN_CFG_RX_RING_MASK_2,
  444. 0, 0, 0, 0, 0, 0, 0, 0},
  445. /* rx mon ring masks */
  446. { 0, 0,
  447. WLAN_CFG_RX_MON_RING_MASK_0 |
  448. WLAN_CFG_RX_MON_RING_MASK_1 |
  449. WLAN_CFG_RX_MON_RING_MASK_2,
  450. 0, 0, 0, 0, 0, 0, 0, 0},
  451. /* host2rxdma ring masks */
  452. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  453. /* rxdma2host ring masks */
  454. { 0, 0,
  455. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  456. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  457. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  458. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  459. 0, 0, 0, 0, 0, 0, 0, 0},
  460. /* host2rxdma mon ring masks */
  461. { 0, 0,
  462. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  463. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  464. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  465. 0, 0, 0, 0, 0, 0, 0, 0},
  466. /* rxdma2host mon ring masks */
  467. { 0, 0,
  468. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  469. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  470. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  471. 0, 0, 0, 0, 0, 0, 0, 0},
  472. /* rx err ring masks */
  473. { 0, 0,
  474. WLAN_CFG_RX_ERR_RING_MASK_0 |
  475. WLAN_CFG_RX_ERR_RING_MASK_1 |
  476. WLAN_CFG_RX_ERR_RING_MASK_2 |
  477. WLAN_CFG_RX_ERR_RING_MASK_3,
  478. 0, 0, 0, 0, 0, 0, 0, 0},
  479. /* rx wbm rel ring masks */
  480. { 0, 0,
  481. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  482. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  483. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  484. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  485. 0, 0, 0, 0, 0, 0, 0, 0},
  486. /* reo status ring masks */
  487. { 0, 0,
  488. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  489. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  490. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  491. WLAN_CFG_REO_STATUS_RING_MASK_3,
  492. 0, 0, 0, 0, 0, 0, 0, 0},
  493. },
  494. /* Interrupt assignment for 4 MSI combination */
  495. {
  496. /* tx ring masks */
  497. { WLAN_CFG_TX_RING_MASK_0,
  498. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  499. /* rx ring masks */
  500. { WLAN_CFG_RX_RING_MASK_0,
  501. WLAN_CFG_RX_RING_MASK_1,
  502. WLAN_CFG_RX_RING_MASK_2,
  503. 0, 0, 0, 0, 0, 0, 0, 0},
  504. /* rx mon ring masks */
  505. { WLAN_CFG_RX_MON_RING_MASK_0,
  506. WLAN_CFG_RX_MON_RING_MASK_1,
  507. WLAN_CFG_RX_MON_RING_MASK_2,
  508. 0, 0, 0, 0, 0, 0, 0, 0},
  509. /* host2rxdma ring masks */
  510. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  511. /* rxdma2host ring masks */
  512. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  513. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  514. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  515. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  516. 0, 0, 0, 0, 0, 0, 0},
  517. /* host2rxdma mon ring masks */
  518. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  519. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  520. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  521. 0, 0, 0, 0, 0, 0, 0, 0},
  522. /* rxdma2host mon ring masks */
  523. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  524. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  525. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  526. 0, 0, 0, 0, 0, 0, 0, 0},
  527. /* rx err ring masks */
  528. { WLAN_CFG_RX_ERR_RING_MASK_0,
  529. WLAN_CFG_RX_ERR_RING_MASK_1,
  530. WLAN_CFG_RX_ERR_RING_MASK_2,
  531. WLAN_CFG_RX_ERR_RING_MASK_3,
  532. 0, 0, 0, 0, 0, 0, 0},
  533. /* rx wbm rel ring masks */
  534. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  535. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  536. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  537. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  538. 0, 0, 0, 0, 0, 0, 0},
  539. /* reo status ring masks */
  540. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  541. WLAN_CFG_REO_STATUS_RING_MASK_1,
  542. WLAN_CFG_REO_STATUS_RING_MASK_2,
  543. WLAN_CFG_REO_STATUS_RING_MASK_3,
  544. 0, 0, 0, 0, 0, 0, 0},
  545. },
  546. /* Interrupt assignment for 5 MSI combination */
  547. {
  548. /* tx ring masks */
  549. { WLAN_CFG_TX_RING_MASK_0,
  550. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  551. /* rx ring masks */
  552. { WLAN_CFG_RX_RING_MASK_0,
  553. WLAN_CFG_RX_RING_MASK_1,
  554. WLAN_CFG_RX_RING_MASK_2,
  555. 0, 0, 0, 0, 0, 0, 0, 0},
  556. /* rx mon ring masks */
  557. { 0, 0, 0, 0,
  558. WLAN_CFG_RX_MON_RING_MASK_0 |
  559. WLAN_CFG_RX_MON_RING_MASK_1 |
  560. WLAN_CFG_RX_MON_RING_MASK_2,
  561. 0, 0, 0, 0, 0, 0},
  562. /* host2rxdma ring masks */
  563. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  564. /* rxdma2host ring masks */
  565. { 0, 0, 0, 0,
  566. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  567. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  568. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  569. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  570. 0, 0, 0, 0, 0, 0},
  571. /* host2rxdma mon ring masks */
  572. { 0, 0, 0, 0,
  573. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  574. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  575. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  576. 0, 0, 0, 0, 0, 0},
  577. /* rxdma2host mon ring masks */
  578. { 0, 0, 0, 0,
  579. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  580. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  581. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  582. 0, 0, 0, 0, 0, 0},
  583. /* rx err ring masks */
  584. { 0, 0, 0, 0,
  585. WLAN_CFG_RX_ERR_RING_MASK_0 |
  586. WLAN_CFG_RX_ERR_RING_MASK_1 |
  587. WLAN_CFG_RX_ERR_RING_MASK_2 |
  588. WLAN_CFG_RX_ERR_RING_MASK_3,
  589. 0, 0, 0, 0, 0, 0},
  590. /* rx wbm rel ring masks */
  591. { 0, 0, 0, 0,
  592. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  593. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  594. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  595. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  596. 0, 0, 0, 0, 0, 0},
  597. /* reo status ring masks */
  598. { 0, 0, 0, 0,
  599. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  600. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  601. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  602. WLAN_CFG_REO_STATUS_RING_MASK_3,
  603. 0, 0, 0, 0, 0, 0},
  604. },
  605. /* Interrupt assignment for 6 MSI combination */
  606. {
  607. /* tx ring masks */
  608. { WLAN_CFG_TX_RING_MASK_0,
  609. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  610. /* rx ring masks */
  611. { 0, 0,
  612. WLAN_CFG_RX_RING_MASK_0,
  613. WLAN_CFG_RX_RING_MASK_1,
  614. WLAN_CFG_RX_RING_MASK_2,
  615. 0, 0, 0, 0, 0, 0},
  616. /* rx mon ring masks */
  617. { WLAN_CFG_RX_MON_RING_MASK_0,
  618. WLAN_CFG_RX_MON_RING_MASK_1,
  619. WLAN_CFG_RX_MON_RING_MASK_2,
  620. 0, 0, 0, 0, 0, 0, 0, 0},
  621. /* host2rxdma ring masks */
  622. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  623. /* rxdma2host ring masks */
  624. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  625. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  626. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  627. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  628. 0, 0, 0, 0, 0, 0, 0},
  629. /* host2rxdma mon ring masks */
  630. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  631. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  632. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  633. 0, 0, 0, 0, 0, 0, 0, 0},
  634. /* rxdma2host mon ring masks */
  635. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  636. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  637. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  638. 0, 0, 0, 0, 0, 0, 0, 0},
  639. /* rx err ring masks */
  640. { WLAN_CFG_RX_ERR_RING_MASK_0,
  641. WLAN_CFG_RX_ERR_RING_MASK_1,
  642. WLAN_CFG_RX_ERR_RING_MASK_2,
  643. WLAN_CFG_RX_ERR_RING_MASK_3,
  644. 0, 0, 0, 0, 0, 0, 0},
  645. /* rx wbm rel ring masks */
  646. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  647. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  648. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  649. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  650. 0, 0, 0, 0, 0, 0, 0},
  651. /* reo status ring masks */
  652. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  653. WLAN_CFG_REO_STATUS_RING_MASK_1,
  654. WLAN_CFG_REO_STATUS_RING_MASK_2,
  655. WLAN_CFG_REO_STATUS_RING_MASK_3,
  656. 0, 0, 0, 0, 0, 0, 0},
  657. },
  658. /* Interrupt assignment for 7 MSI combination */
  659. {
  660. /* tx ring masks */
  661. { WLAN_CFG_TX_RING_MASK_0,
  662. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  663. /* rx ring masks */
  664. { 0, 0, 0,
  665. WLAN_CFG_RX_RING_MASK_0,
  666. WLAN_CFG_RX_RING_MASK_1,
  667. WLAN_CFG_RX_RING_MASK_2,
  668. 0, 0, 0, 0},
  669. /* rx mon ring masks */
  670. { 0, 0, 0,
  671. WLAN_CFG_RX_MON_RING_MASK_0,
  672. WLAN_CFG_RX_MON_RING_MASK_1,
  673. WLAN_CFG_RX_MON_RING_MASK_2,
  674. 0, 0, 0, 0, 0},
  675. /* host2rxdma ring masks */
  676. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  677. /* rxdma2host ring masks */
  678. { 0, 0, 0,
  679. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  680. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  681. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  682. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  683. 0, 0, 0, 0},
  684. /* host2rxdma mon ring masks */
  685. { 0, 0, 0,
  686. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  687. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  688. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  689. 0, 0, 0, 0, 0},
  690. /* rxdma2host mon ring masks */
  691. { 0, 0, 0,
  692. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  693. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  694. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  695. 0, 0, 0, 0, 0},
  696. /* rx err ring masks */
  697. { 0, 0, 0,
  698. WLAN_CFG_RX_ERR_RING_MASK_0,
  699. WLAN_CFG_RX_ERR_RING_MASK_1,
  700. WLAN_CFG_RX_ERR_RING_MASK_2,
  701. WLAN_CFG_RX_ERR_RING_MASK_3,
  702. 0, 0, 0, 0},
  703. /* rx wbm rel ring masks */
  704. { 0, 0, 0,
  705. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  706. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  707. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  708. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  709. 0, 0, 0, 0},
  710. /* reo status ring masks */
  711. { 0, 0, 0,
  712. WLAN_CFG_REO_STATUS_RING_MASK_0,
  713. WLAN_CFG_REO_STATUS_RING_MASK_1,
  714. WLAN_CFG_REO_STATUS_RING_MASK_2,
  715. WLAN_CFG_REO_STATUS_RING_MASK_3,
  716. 0, 0, 0, 0},
  717. },
  718. /* Interrupt assignment for 8 MSI combination */
  719. {
  720. /* tx ring masks */
  721. { WLAN_CFG_TX_RING_MASK_0,
  722. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  723. /* rx ring masks */
  724. { 0, 0, 0, 0,
  725. WLAN_CFG_RX_RING_MASK_0,
  726. WLAN_CFG_RX_RING_MASK_1,
  727. WLAN_CFG_RX_RING_MASK_2,
  728. 0, 0, 0, 0},
  729. /* rx mon ring masks */
  730. { 0, 0, 0,
  731. WLAN_CFG_RX_MON_RING_MASK_0,
  732. WLAN_CFG_RX_MON_RING_MASK_1,
  733. WLAN_CFG_RX_MON_RING_MASK_2,
  734. 0, 0, 0, 0, 0},
  735. /* host2rxdma ring masks */
  736. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  737. /* rxdma2host ring masks */
  738. { 0, 0, 0,
  739. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  740. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  741. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  742. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  743. 0, 0, 0, 0},
  744. /* host2rxdma mon ring masks */
  745. { 0, 0, 0,
  746. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  747. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  748. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  749. 0, 0, 0, 0, 0},
  750. /* rxdma2host mon ring masks */
  751. { 0, 0, 0,
  752. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  753. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  754. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  755. 0, 0, 0, 0, 0},
  756. /* rx err ring masks */
  757. { 0, 0, 0,
  758. WLAN_CFG_RX_ERR_RING_MASK_0,
  759. WLAN_CFG_RX_ERR_RING_MASK_1,
  760. WLAN_CFG_RX_ERR_RING_MASK_2,
  761. WLAN_CFG_RX_ERR_RING_MASK_3,
  762. 0, 0, 0, 0},
  763. /* rx wbm rel ring masks */
  764. { 0, 0, 0,
  765. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  766. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  767. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  768. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  769. 0, 0, 0, 0},
  770. /* reo status ring masks */
  771. { 0, 0, 0,
  772. WLAN_CFG_REO_STATUS_RING_MASK_0,
  773. WLAN_CFG_REO_STATUS_RING_MASK_1,
  774. WLAN_CFG_REO_STATUS_RING_MASK_2,
  775. WLAN_CFG_REO_STATUS_RING_MASK_3,
  776. 0, 0, 0, 0},
  777. /* ppe2tcl ring masks */
  778. { 0, 0, 0,
  779. WLAN_CFG_REO_STATUS_RING_MASK_0,
  780. WLAN_CFG_REO_STATUS_RING_MASK_1,
  781. WLAN_CFG_REO_STATUS_RING_MASK_2,
  782. WLAN_CFG_REO_STATUS_RING_MASK_3,
  783. 0, 0, 0, 0},
  784. /* reo2ppe ring masks */
  785. { 0, 0, 0,
  786. WLAN_CFG_REO_STATUS_RING_MASK_0,
  787. WLAN_CFG_REO_STATUS_RING_MASK_1,
  788. WLAN_CFG_REO_STATUS_RING_MASK_2,
  789. WLAN_CFG_REO_STATUS_RING_MASK_3,
  790. 0, 0, 0, 0},
  791. },
  792. /* Interrupt assignment for 9 MSI combination */
  793. {
  794. /* tx ring masks */
  795. { WLAN_CFG_TX_RING_MASK_0,
  796. WLAN_CFG_TX_RING_MASK_1,
  797. WLAN_CFG_TX_RING_MASK_2,
  798. WLAN_CFG_TX_RING_MASK_3,
  799. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  800. /* rx ring masks */
  801. { 0, 0, 0, 0,
  802. WLAN_CFG_RX_RING_MASK_0,
  803. WLAN_CFG_RX_RING_MASK_1,
  804. WLAN_CFG_RX_RING_MASK_2,
  805. WLAN_CFG_RX_RING_MASK_3,
  806. 0, 0, 0, 0, 0, 0, 0, 0},
  807. /* rx mon ring masks */
  808. { 0, 0, 0,
  809. WLAN_CFG_RX_MON_RING_MASK_0,
  810. WLAN_CFG_RX_MON_RING_MASK_1,
  811. WLAN_CFG_RX_MON_RING_MASK_2,
  812. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  813. /* host2rxdma ring masks */
  814. { 0, 0, 0,
  815. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  816. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  817. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  818. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  819. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  820. /* rxdma2host ring masks */
  821. { 0, 0, 0,
  822. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  823. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  824. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  825. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  826. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  827. /* host2rxdma mon ring masks */
  828. { 0, 0, 0,
  829. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  830. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  831. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  832. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  833. /* rxdma2host mon ring masks */
  834. { 0, 0, 0,
  835. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  836. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  837. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  838. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  839. /* rx err ring masks */
  840. { 0, 0, 0,
  841. WLAN_CFG_RX_ERR_RING_MASK_0,
  842. WLAN_CFG_RX_ERR_RING_MASK_1,
  843. WLAN_CFG_RX_ERR_RING_MASK_2,
  844. WLAN_CFG_RX_ERR_RING_MASK_3,
  845. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  846. /* rx wbm rel ring masks */
  847. { 0, 0, 0,
  848. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  849. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  850. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  851. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  852. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  853. /* reo status ring masks */
  854. { 0, 0, 0,
  855. WLAN_CFG_REO_STATUS_RING_MASK_0,
  856. WLAN_CFG_REO_STATUS_RING_MASK_1,
  857. WLAN_CFG_REO_STATUS_RING_MASK_2,
  858. WLAN_CFG_REO_STATUS_RING_MASK_3,
  859. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  860. /* rx_ring_near_full_irq mask */
  861. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  862. /* rx_ring_near_full_irq_2 mask */
  863. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  864. /* tx_ring_near_full_irq mask */
  865. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  866. /* host2txmon ring masks */
  867. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  868. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  869. /* tx mon ring masks */
  870. { WLAN_CFG_TX_MON_RING_MASK_0,
  871. WLAN_CFG_TX_MON_RING_MASK_1,
  872. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  873. /* ppe ds wbm release ring ring mask */
  874. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  875. /* Reo2ppe ring mask */
  876. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  877. /* ppe2tcl ring mask */
  878. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  879. /* umac reset mask */
  880. {0, 0, 0, 0, 0, 0, 0, 0,
  881. WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  882. },
  883. /* Interrupt assignment for 10 MSI combination */
  884. {
  885. /* tx ring masks */
  886. { WLAN_CFG_TX_RING_MASK_0,
  887. WLAN_CFG_TX_RING_MASK_1,
  888. WLAN_CFG_TX_RING_MASK_2,
  889. WLAN_CFG_TX_RING_MASK_3,
  890. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  891. /* rx ring masks */
  892. { 0, 0, 0, 0,
  893. WLAN_CFG_RX_RING_MASK_0,
  894. WLAN_CFG_RX_RING_MASK_1,
  895. WLAN_CFG_RX_RING_MASK_2,
  896. WLAN_CFG_RX_RING_MASK_3,
  897. 0, 0, 0, 0, 0, 0, 0, 0},
  898. /* rx mon ring masks */
  899. { 0, 0, 0,
  900. WLAN_CFG_RX_MON_RING_MASK_0,
  901. WLAN_CFG_RX_MON_RING_MASK_1,
  902. WLAN_CFG_RX_MON_RING_MASK_2,
  903. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  904. /* host2rxdma ring masks */
  905. { 0, 0, 0,
  906. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  907. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  908. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  909. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  910. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  911. /* rxdma2host ring masks */
  912. { 0, 0, 0,
  913. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  914. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  915. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  916. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  917. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  918. /* host2rxdma mon ring masks */
  919. { 0, 0, 0,
  920. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  921. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  922. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  923. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  924. /* rxdma2host mon ring masks */
  925. { 0, 0, 0,
  926. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  927. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  928. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  929. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  930. /* rx err ring masks */
  931. { 0, 0, 0,
  932. WLAN_CFG_RX_ERR_RING_MASK_0,
  933. WLAN_CFG_RX_ERR_RING_MASK_1,
  934. WLAN_CFG_RX_ERR_RING_MASK_2,
  935. WLAN_CFG_RX_ERR_RING_MASK_3,
  936. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  937. /* rx wbm rel ring masks */
  938. { 0, 0, 0,
  939. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  940. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  941. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  942. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  943. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  944. /* reo status ring masks */
  945. { 0, 0, 0,
  946. WLAN_CFG_REO_STATUS_RING_MASK_0,
  947. WLAN_CFG_REO_STATUS_RING_MASK_1,
  948. WLAN_CFG_REO_STATUS_RING_MASK_2,
  949. WLAN_CFG_REO_STATUS_RING_MASK_3,
  950. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  951. /* rx_ring_near_full_irq mask */
  952. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  953. /* rx_ring_near_full_irq_2 mask */
  954. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  955. /* tx_ring_near_full_irq mask */
  956. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  957. /* host2txmon ring masks */
  958. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  959. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  960. /* tx mon ring masks */
  961. { WLAN_CFG_TX_MON_RING_MASK_0,
  962. WLAN_CFG_TX_MON_RING_MASK_1,
  963. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  964. /* ppe ds wbm release ring ring mask */
  965. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  966. /* Reo2ppe ring mask */
  967. {0, 0, 0, 0, 0, 0, 0, 0,
  968. 0, 0, 0, 0, 0, 0, 0, 0},
  969. /* ppe2tcl ring mask */
  970. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  971. /* umac reset mask */
  972. {0, 0, 0, 0, 0, 0, 0, 0,
  973. 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0},
  974. },
  975. /* Interrupt assignment for 11 MSI combination */
  976. {
  977. /* tx ring masks */
  978. { WLAN_CFG_TX_RING_MASK_0,
  979. WLAN_CFG_TX_RING_MASK_1,
  980. WLAN_CFG_TX_RING_MASK_2,
  981. WLAN_CFG_TX_RING_MASK_3,
  982. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  983. /* rx ring masks */
  984. { 0, 0, 0, 0,
  985. WLAN_CFG_RX_RING_MASK_0,
  986. WLAN_CFG_RX_RING_MASK_1,
  987. WLAN_CFG_RX_RING_MASK_2,
  988. WLAN_CFG_RX_RING_MASK_3,
  989. 0, 0, 0, 0, 0, 0, 0, 0},
  990. /* rx mon ring masks */
  991. { 0, 0, 0,
  992. WLAN_CFG_RX_MON_RING_MASK_0,
  993. WLAN_CFG_RX_MON_RING_MASK_1,
  994. WLAN_CFG_RX_MON_RING_MASK_2,
  995. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  996. /* host2rxdma ring masks */
  997. { 0, 0, 0,
  998. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  999. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1000. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1001. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1002. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1003. /* rxdma2host ring masks */
  1004. { 0, 0, 0,
  1005. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1006. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1007. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1008. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1009. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1010. /* host2rxdma mon ring masks */
  1011. { 0, 0, 0,
  1012. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1013. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1014. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1015. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1016. /* rxdma2host mon ring masks */
  1017. { 0, 0, 0,
  1018. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1019. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1020. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1021. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1022. /* rx err ring masks */
  1023. { 0, 0, 0,
  1024. WLAN_CFG_RX_ERR_RING_MASK_0,
  1025. WLAN_CFG_RX_ERR_RING_MASK_1,
  1026. WLAN_CFG_RX_ERR_RING_MASK_2,
  1027. WLAN_CFG_RX_ERR_RING_MASK_3,
  1028. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1029. /* rx wbm rel ring masks */
  1030. { 0, 0, 0,
  1031. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1032. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1033. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1034. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1035. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1036. /* reo status ring masks */
  1037. { 0, 0, 0,
  1038. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1039. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1040. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1041. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1042. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1043. /* rx_ring_near_full_irq mask */
  1044. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1045. /* rx_ring_near_full_irq_2 mask */
  1046. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1047. /* tx_ring_near_full_irq mask */
  1048. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1049. /* host2txmon ring masks */
  1050. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1051. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1052. /* tx mon ring masks */
  1053. { WLAN_CFG_TX_MON_RING_MASK_0,
  1054. WLAN_CFG_TX_MON_RING_MASK_1,
  1055. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1056. /* ppe wbm ds release ring ring mask */
  1057. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1058. /* Reo2ppe ring mask */
  1059. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1060. /* ppe2tcl ring mask */
  1061. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1062. /* umac reset mask */
  1063. {0, 0, 0, 0, 0, 0, 0, 0,
  1064. 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0},
  1065. },
  1066. /* Interrupt assignment for 12 MSI combination */
  1067. {
  1068. /* tx ring masks */
  1069. { WLAN_CFG_TX_RING_MASK_0,
  1070. WLAN_CFG_TX_RING_MASK_1,
  1071. WLAN_CFG_TX_RING_MASK_2,
  1072. WLAN_CFG_TX_RING_MASK_3,
  1073. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1074. /* rx ring masks */
  1075. { 0, 0, 0, 0,
  1076. WLAN_CFG_RX_RING_MASK_0,
  1077. WLAN_CFG_RX_RING_MASK_1,
  1078. WLAN_CFG_RX_RING_MASK_2,
  1079. WLAN_CFG_RX_RING_MASK_3,
  1080. 0, 0, 0, 0, 0, 0, 0, 0},
  1081. /* rx mon ring masks */
  1082. { 0, 0, 0, 0, 0, 0, 0, 0,
  1083. WLAN_CFG_RX_MON_RING_MASK_0,
  1084. WLAN_CFG_RX_MON_RING_MASK_1,
  1085. WLAN_CFG_RX_MON_RING_MASK_2,
  1086. 0, 0, 0, 0, 0},
  1087. /* host2rxdma ring masks */
  1088. { 0, 0, 0, 0, 0, 0, 0, 0,
  1089. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1090. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1091. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1092. 0, 0, 0, 0, 0},
  1093. /* rxdma2host ring masks */
  1094. { 0, 0, 0, 0, 0, 0, 0, 0,
  1095. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1096. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1097. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1098. 0, 0, 0, 0, 0},
  1099. /* host2rxdma mon ring masks */
  1100. { 0, 0, 0, 0, 0, 0, 0, 0,
  1101. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1102. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1103. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1104. 0, 0, 0, 0, 0},
  1105. /* rxdma2host mon ring masks */
  1106. { 0, 0, 0, 0, 0, 0, 0, 0,
  1107. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1108. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1109. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1110. 0, 0, 0, 0, 0},
  1111. /* rx err ring masks */
  1112. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1113. WLAN_CFG_RX_ERR_RING_MASK_0,
  1114. 0, 0, 0, 0},
  1115. /* rx wbm rel ring masks */
  1116. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1117. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1118. 0, 0, 0, 0},
  1119. /* reo status ring masks */
  1120. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1121. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1122. 0, 0, 0, 0},
  1123. /* rx_ring_near_full_irq mask */
  1124. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1125. /* rx_ring_near_full_irq_2 mask */
  1126. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1127. /* tx_ring_near_full_irq mask */
  1128. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1129. /* host2txmon ring masks */
  1130. { 0, 0, 0, 0, 0, 0, 0, 0,
  1131. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1132. 0, 0, 0, 0, 0, 0, 0},
  1133. /* tx mon ring masks */
  1134. { 0, 0, 0, 0, 0, 0, 0, 0,
  1135. WLAN_CFG_TX_MON_RING_MASK_0,
  1136. WLAN_CFG_TX_MON_RING_MASK_1,
  1137. 0, 0, 0, 0, 0, 0},
  1138. /* ppe ds wbm release ring ring mask */
  1139. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1140. /* Reo2ppe ring mask */
  1141. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1142. 0, 0, 0, 0, 0, 0},
  1143. /* ppe2tcl ring mask */
  1144. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1145. /* umac reset mask */
  1146. {0, 0, 0, 0, 0, 0, 0, 0,
  1147. 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0},
  1148. },
  1149. /* Interrupt assignment for 13 MSI combination */
  1150. {
  1151. /* tx ring masks */
  1152. { WLAN_CFG_TX_RING_MASK_0,
  1153. WLAN_CFG_TX_RING_MASK_1,
  1154. WLAN_CFG_TX_RING_MASK_2,
  1155. WLAN_CFG_TX_RING_MASK_3,
  1156. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1157. /* rx ring masks */
  1158. { 0, 0, 0, 0,
  1159. WLAN_CFG_RX_RING_MASK_0,
  1160. WLAN_CFG_RX_RING_MASK_1,
  1161. WLAN_CFG_RX_RING_MASK_2,
  1162. WLAN_CFG_RX_RING_MASK_3,
  1163. 0, 0, 0, 0, 0, 0, 0, 0},
  1164. /* rx mon ring masks */
  1165. { 0, 0, 0, 0, 0, 0, 0, 0,
  1166. WLAN_CFG_RX_MON_RING_MASK_0,
  1167. WLAN_CFG_RX_MON_RING_MASK_1,
  1168. WLAN_CFG_RX_MON_RING_MASK_2,
  1169. 0, 0, 0, 0, 0},
  1170. /* host2rxdma ring masks */
  1171. { 0, 0, 0, 0, 0, 0, 0, 0,
  1172. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1173. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1174. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1175. 0, 0, 0, 0, 0},
  1176. /* rxdma2host ring masks */
  1177. { 0, 0, 0, 0, 0, 0, 0, 0,
  1178. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1179. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1180. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1181. 0, 0, 0, 0, 0},
  1182. /* host2rxdma mon ring masks */
  1183. { 0, 0, 0, 0, 0, 0, 0, 0,
  1184. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1185. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1186. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1187. 0, 0, 0, 0, 0},
  1188. /* rxdma2host mon ring masks */
  1189. { 0, 0, 0, 0, 0, 0, 0, 0,
  1190. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1191. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1192. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1193. 0, 0, 0, 0, 0},
  1194. /* rx err ring masks */
  1195. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1196. WLAN_CFG_RX_ERR_RING_MASK_0,
  1197. 0, 0, 0, 0},
  1198. /* rx wbm rel ring masks */
  1199. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1200. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1201. 0, 0, 0, 0},
  1202. /* reo status ring masks */
  1203. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1204. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1205. 0, 0, 0, 0},
  1206. /* rx_ring_near_full_irq mask */
  1207. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1208. /* rx_ring_near_full_irq_2 mask */
  1209. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1210. /* tx_ring_near_full_irq mask */
  1211. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1212. /* host2txmon ring masks */
  1213. { 0, 0, 0, 0, 0, 0, 0, 0,
  1214. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1215. 0, 0, 0, 0, 0, 0, 0},
  1216. /* tx mon ring masks */
  1217. { 0, 0, 0, 0, 0, 0, 0, 0,
  1218. WLAN_CFG_TX_MON_RING_MASK_0,
  1219. WLAN_CFG_TX_MON_RING_MASK_1,
  1220. 0, 0, 0, 0, 0, 0},
  1221. /* ppe ds wbm release ring ring mask */
  1222. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1223. /* Reo2ppe ring mask */
  1224. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1225. 0, 0, 0, 0, 0},
  1226. /* ppe2tcl ring mask */
  1227. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1228. /* umac reset mask */
  1229. {0, 0, 0, 0, 0, 0, 0, 0,
  1230. 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0},
  1231. },
  1232. /* Interrupt assignment for 14 MSI combination */
  1233. {
  1234. /* tx ring masks */
  1235. { WLAN_CFG_TX_RING_MASK_0,
  1236. WLAN_CFG_TX_RING_MASK_1,
  1237. WLAN_CFG_TX_RING_MASK_2,
  1238. WLAN_CFG_TX_RING_MASK_3,
  1239. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1240. /* rx ring masks */
  1241. { 0, 0, 0, 0,
  1242. WLAN_CFG_RX_RING_MASK_0,
  1243. WLAN_CFG_RX_RING_MASK_1,
  1244. WLAN_CFG_RX_RING_MASK_2,
  1245. WLAN_CFG_RX_RING_MASK_3,
  1246. 0, 0, 0, 0, 0, 0, 0, 0},
  1247. /* rx mon ring masks */
  1248. { 0, 0, 0, 0, 0, 0, 0, 0,
  1249. WLAN_CFG_RX_MON_RING_MASK_0,
  1250. WLAN_CFG_RX_MON_RING_MASK_1,
  1251. WLAN_CFG_RX_MON_RING_MASK_2,
  1252. 0, 0, 0, 0, 0},
  1253. /* host2rxdma ring masks */
  1254. { 0, 0, 0, 0, 0, 0, 0, 0,
  1255. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1256. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1257. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1258. 0, 0, 0, 0, 0},
  1259. /* rxdma2host ring masks */
  1260. { 0, 0, 0, 0, 0, 0, 0, 0,
  1261. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1262. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1263. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1264. 0, 0, 0, 0, 0},
  1265. /* host2rxdma mon ring masks */
  1266. { 0, 0, 0, 0, 0, 0, 0, 0,
  1267. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1268. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1269. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1270. 0, 0, 0, 0, 0},
  1271. /* rxdma2host mon ring masks */
  1272. { 0, 0, 0, 0, 0, 0, 0, 0,
  1273. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1274. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1275. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1276. 0, 0, 0, 0, 0},
  1277. /* rx err ring masks */
  1278. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1279. WLAN_CFG_RX_ERR_RING_MASK_0,
  1280. 0, 0, 0, 0},
  1281. /* rx wbm rel ring masks */
  1282. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1283. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1284. 0, 0, 0, 0},
  1285. /* reo status ring masks */
  1286. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1287. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1288. 0, 0, 0, 0},
  1289. /* rx_ring_near_full_irq mask */
  1290. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1291. /* rx_ring_near_full_irq_2 mask */
  1292. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1293. /* tx_ring_near_full_irq mask */
  1294. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1295. /* host2txmon ring masks */
  1296. { 0, 0, 0, 0, 0, 0, 0, 0,
  1297. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1298. 0, 0, 0, 0, 0, 0, 0},
  1299. /* tx mon ring masks */
  1300. { 0, 0, 0, 0, 0, 0, 0, 0,
  1301. WLAN_CFG_TX_MON_RING_MASK_0,
  1302. WLAN_CFG_TX_MON_RING_MASK_1,
  1303. 0, 0, 0, 0, 0, 0},
  1304. /* ppe ds wbm release ring ring mask */
  1305. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1306. /* Reo2ppe ring mask */
  1307. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1308. /* ppe2tcl ring mask */
  1309. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1310. /* umac reset mask */
  1311. {0, 0, 0, 0, 0, 0, 0, 0,
  1312. 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0},
  1313. },
  1314. /* Interrupt assignment for 15 MSI combination */
  1315. {
  1316. /* tx ring masks */
  1317. { WLAN_CFG_TX_RING_MASK_0,
  1318. WLAN_CFG_TX_RING_MASK_1,
  1319. WLAN_CFG_TX_RING_MASK_2,
  1320. WLAN_CFG_TX_RING_MASK_3,
  1321. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1322. /* rx ring masks */
  1323. { 0, 0, 0, 0,
  1324. WLAN_CFG_RX_RING_MASK_0,
  1325. WLAN_CFG_RX_RING_MASK_1,
  1326. WLAN_CFG_RX_RING_MASK_2,
  1327. WLAN_CFG_RX_RING_MASK_3,
  1328. 0, 0, 0, 0, 0, 0, 0, 0},
  1329. /* rx mon ring masks */
  1330. { 0, 0, 0, 0, 0, 0, 0, 0,
  1331. WLAN_CFG_RX_MON_RING_MASK_0,
  1332. WLAN_CFG_RX_MON_RING_MASK_1,
  1333. WLAN_CFG_RX_MON_RING_MASK_2,
  1334. 0, 0, 0, 0, 0},
  1335. /* host2rxdma ring masks */
  1336. { 0, 0, 0, 0, 0, 0, 0, 0,
  1337. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1338. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1339. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1340. 0, 0, 0, 0, 0},
  1341. /* rxdma2host ring masks */
  1342. { 0, 0, 0, 0, 0, 0, 0, 0,
  1343. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1344. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1345. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1346. 0, 0, 0, 0, 0},
  1347. /* host2rxdma mon ring masks */
  1348. { 0, 0, 0, 0, 0, 0, 0, 0,
  1349. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1350. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1351. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1352. 0, 0, 0, 0, 0},
  1353. /* rxdma2host mon ring masks */
  1354. { 0, 0, 0, 0, 0, 0, 0, 0,
  1355. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1356. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1357. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1358. 0, 0, 0, 0, 0},
  1359. /* rx err ring masks */
  1360. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1361. WLAN_CFG_RX_ERR_RING_MASK_0,
  1362. 0, 0, 0, 0},
  1363. /* rx wbm rel ring masks */
  1364. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1365. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1366. 0, 0, 0, 0},
  1367. /* reo status ring masks */
  1368. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1369. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1370. 0, 0, 0, 0},
  1371. /* rx_ring_near_full_irq mask */
  1372. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1373. /* rx_ring_near_full_irq_2 mask */
  1374. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1375. /* tx_ring_near_full_irq mask */
  1376. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1377. /* host2txmon ring masks */
  1378. { 0, 0, 0, 0, 0, 0, 0, 0,
  1379. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1380. 0, 0, 0, 0, 0, 0, 0},
  1381. /* tx mon ring masks */
  1382. { 0, 0, 0, 0, 0, 0, 0, 0,
  1383. WLAN_CFG_TX_MON_RING_MASK_0,
  1384. WLAN_CFG_TX_MON_RING_MASK_1,
  1385. 0, 0, 0, 0, 0, 0},
  1386. /* ppe ds wbm release ring ring mask */
  1387. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1388. /* Reo2ppe ring mask */
  1389. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1390. 0, 0, 0, 0, 0},
  1391. /* ppe2tcl ring mask */
  1392. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1393. /* umac reset mask */
  1394. {0, 0, 0, 0, 0, 0, 0, 0,
  1395. 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0},
  1396. },
  1397. /* Interrupt assignment for 16 MSI combination */
  1398. {
  1399. /* tx ring masks */
  1400. { WLAN_CFG_TX_RING_MASK_0,
  1401. WLAN_CFG_TX_RING_MASK_1,
  1402. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1403. /* rx ring masks */
  1404. { 0, 0, 0, 0,
  1405. WLAN_CFG_RX_RING_MASK_0,
  1406. WLAN_CFG_RX_RING_MASK_1,
  1407. WLAN_CFG_RX_RING_MASK_2,
  1408. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1409. /* rx mon ring masks */
  1410. { 0, 0, 0, 0, 0, 0, 0, 0,
  1411. WLAN_CFG_RX_MON_RING_MASK_0,
  1412. WLAN_CFG_RX_MON_RING_MASK_1,
  1413. WLAN_CFG_RX_MON_RING_MASK_2,
  1414. 0, 0, 0, 0, 0},
  1415. /* host2rxdma ring masks */
  1416. { 0, 0, 0, 0, 0, 0, 0, 0,
  1417. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1418. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1419. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1420. 0, 0, 0, 0, 0},
  1421. /* rxdma2host ring masks */
  1422. { 0, 0, 0, 0, 0, 0, 0, 0,
  1423. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1424. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1425. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1426. 0, 0, 0, 0, 0},
  1427. /* host2rxdma mon ring masks */
  1428. { 0, 0, 0, 0, 0, 0, 0, 0,
  1429. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1430. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1431. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1432. 0, 0, 0, 0, 0},
  1433. /* rxdma2host mon ring masks */
  1434. { 0, 0, 0, 0, 0, 0, 0, 0,
  1435. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1436. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1437. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1438. 0, 0, 0, 0, 0},
  1439. /* rx err ring masks */
  1440. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1441. WLAN_CFG_RX_ERR_RING_MASK_0,
  1442. 0, 0, 0, 0},
  1443. /* rx wbm rel ring masks */
  1444. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1445. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1446. 0, 0, 0, 0},
  1447. /* reo status ring masks */
  1448. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1449. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1450. 0, 0, 0, 0},
  1451. /* rx_ring_near_full_irq mask */
  1452. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1453. /* rx_ring_near_full_irq_2 mask */
  1454. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1455. /* tx_ring_near_full_irq mask */
  1456. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1457. /* host2txmon ring masks */
  1458. { 0, 0, 0, 0, 0, 0, 0, 0,
  1459. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1460. 0, 0, 0, 0, 0, 0, 0},
  1461. /* tx mon ring masks */
  1462. { 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1463. WLAN_CFG_TX_MON_RING_MASK_0,
  1464. WLAN_CFG_TX_MON_RING_MASK_1,
  1465. 0, 0, 0, 0, 0},
  1466. /* ppe ds wbm release ring ring mask */
  1467. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1468. /* Reo2ppe ring mask */
  1469. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1470. 0, 0, 0, 0, 0},
  1471. /* ppe2tcl ring mask */
  1472. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1473. /* umac reset mask */
  1474. {0, 0, 0, 0, 0, 0, 0, 0,
  1475. 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0},
  1476. },
  1477. };
  1478. #else
  1479. /* DS and Umac reset not supported if available MSI lines are less than 8 */
  1480. static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = {
  1481. /* Interrupt assignment for integrated configuration */
  1482. {
  1483. /* tx ring masks */
  1484. { WLAN_CFG_TX_RING_MASK_0,
  1485. WLAN_CFG_TX_RING_MASK_1,
  1486. WLAN_CFG_TX_RING_MASK_2,
  1487. WLAN_CFG_TX_RING_MASK_3,
  1488. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1489. /* rx ring masks */
  1490. { 0, 0, 0, 0, 0, 0, 0,
  1491. WLAN_CFG_RX_RING_MASK_0,
  1492. WLAN_CFG_RX_RING_MASK_1,
  1493. WLAN_CFG_RX_RING_MASK_2,
  1494. WLAN_CFG_RX_RING_MASK_3,
  1495. 0, 0, 0, 0, 0},
  1496. /* rx mon ring masks */
  1497. { 0, 0, 0, 0,
  1498. WLAN_CFG_RX_MON_RING_MASK_0,
  1499. WLAN_CFG_RX_MON_RING_MASK_1,
  1500. WLAN_CFG_RX_MON_RING_MASK_2,
  1501. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1502. /* host2rxdma ring masks */
  1503. { WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1504. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1505. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1506. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1507. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1508. /* rxdma2host ring masks */
  1509. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1510. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1511. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1512. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1513. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1514. /* host2rxdma mon ring masks */
  1515. { 0, 0, 0, 0,
  1516. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1517. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1518. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1519. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1520. /* rxdma2host mon ring masks */
  1521. { 0, 0, 0, 0,
  1522. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1523. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1524. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1525. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1526. /* rx err ring masks */
  1527. { WLAN_CFG_RX_ERR_RING_MASK_0,
  1528. WLAN_CFG_RX_ERR_RING_MASK_1,
  1529. WLAN_CFG_RX_ERR_RING_MASK_2,
  1530. WLAN_CFG_RX_ERR_RING_MASK_3,
  1531. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1532. /* rx wbm rel ring masks */
  1533. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1534. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1535. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1536. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1537. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1538. /* reo status ring masks */
  1539. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  1540. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1541. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1542. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1543. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1544. /* rx_ring_near_full_irq mask */
  1545. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1546. /* rx_ring_near_full_irq_2 mask */
  1547. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1548. /* tx_ring_near_full_irq mask */
  1549. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1550. /* host2txmon ring masks */
  1551. {WLAN_CFG_HOST2TXMON_RING_MASK_0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1552. 0, 0, 0, 0, 0, 0},
  1553. /* tx mon ring masks */
  1554. {WLAN_CFG_TX_MON_RING_MASK_0, WLAN_CFG_TX_MON_RING_MASK_1, 0,
  1555. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1556. /* ppe ds wbm release ring ring mask */
  1557. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1558. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0},
  1559. /* Reo2ppe ring mask */
  1560. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1561. WLAN_CFG_REO2PPE_RING_MASK_0, 0, 0},
  1562. /* ppe2tcl ring mask */
  1563. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1564. WLAN_CFG_PPE2TCL_RING_MASK_0, 0},
  1565. /* umac reset mask */
  1566. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1567. WLAN_CFG_UMAC_RESET_INTR_MASK_0},
  1568. },
  1569. /* Interrupt assignment for 1 MSI combination */
  1570. {
  1571. /* tx ring masks */
  1572. { WLAN_CFG_TX_RING_MASK_0 |
  1573. WLAN_CFG_TX_RING_MASK_1 |
  1574. WLAN_CFG_TX_RING_MASK_2 |
  1575. WLAN_CFG_TX_RING_MASK_3,
  1576. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1577. /* rx ring masks */
  1578. { WLAN_CFG_RX_RING_MASK_0 |
  1579. WLAN_CFG_RX_RING_MASK_1 |
  1580. WLAN_CFG_RX_RING_MASK_2 |
  1581. WLAN_CFG_RX_RING_MASK_3,
  1582. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1583. /* rx mon ring masks */
  1584. { WLAN_CFG_RX_MON_RING_MASK_0 |
  1585. WLAN_CFG_RX_MON_RING_MASK_1 |
  1586. WLAN_CFG_RX_MON_RING_MASK_2,
  1587. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1588. /* host2rxdma ring masks */
  1589. { WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1590. WLAN_CFG_HOST2RXDMA_RING_MASK_1 |
  1591. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1592. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1593. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1594. /* rxdma2host ring masks */
  1595. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1596. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  1597. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1598. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1599. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1600. /* host2rxdma mon ring masks */
  1601. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1602. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  1603. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1604. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1605. /* rxdma2host mon ring masks */
  1606. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1607. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  1608. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1609. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1610. /* rx err ring masks */
  1611. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  1612. WLAN_CFG_RX_ERR_RING_MASK_1 |
  1613. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1614. WLAN_CFG_RX_ERR_RING_MASK_3,
  1615. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1616. /* rx wbm rel ring masks */
  1617. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1618. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  1619. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1620. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1621. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1622. /* reo status ring masks */
  1623. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1624. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  1625. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1626. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1627. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1628. /* rx_ring_near_full_irq mask */
  1629. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1630. /* rx_ring_near_full_irq_2 mask */
  1631. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1632. /* tx_ring_near_full_irq mask */
  1633. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1634. /* host2txmon ring masks */
  1635. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1636. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1637. /* tx mon ring masks */
  1638. { WLAN_CFG_TX_MON_RING_MASK_0 |
  1639. WLAN_CFG_TX_MON_RING_MASK_1,
  1640. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1641. /* ppe ds wbm release ring ring mask */
  1642. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1643. /* Reo2ppe ring mask */
  1644. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1645. /* ppe2tcl ring mask */
  1646. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1647. /* umac reset mask */
  1648. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1649. },
  1650. /* Interrupt assignment for 2 MSI combination */
  1651. {
  1652. /* tx ring masks */
  1653. { WLAN_CFG_TX_RING_MASK_0 |
  1654. WLAN_CFG_TX_RING_MASK_1,
  1655. WLAN_CFG_TX_RING_MASK_2 |
  1656. WLAN_CFG_TX_RING_MASK_3,
  1657. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1658. /* rx ring masks */
  1659. { WLAN_CFG_RX_RING_MASK_0 |
  1660. WLAN_CFG_RX_RING_MASK_1,
  1661. WLAN_CFG_RX_RING_MASK_2 |
  1662. WLAN_CFG_RX_RING_MASK_3,
  1663. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1664. /* rx mon ring masks */
  1665. { WLAN_CFG_RX_MON_RING_MASK_0 |
  1666. WLAN_CFG_RX_MON_RING_MASK_1,
  1667. WLAN_CFG_RX_MON_RING_MASK_2,
  1668. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1669. /* host2rxdma ring masks */
  1670. { WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1671. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1672. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1673. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1674. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1675. /* rxdma2host ring masks */
  1676. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1677. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1678. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1679. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1680. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1681. /* host2rxdma mon ring masks */
  1682. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1683. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1684. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1685. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1686. /* rxdma2host mon ring masks */
  1687. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1688. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1689. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1690. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1691. /* rx err ring masks */
  1692. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  1693. WLAN_CFG_RX_ERR_RING_MASK_1,
  1694. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1695. WLAN_CFG_RX_ERR_RING_MASK_3,
  1696. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1697. /* rx wbm rel ring masks */
  1698. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1699. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1700. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1701. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1702. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1703. /* reo status ring masks */
  1704. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1705. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1706. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1707. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1708. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1709. /* rx_ring_near_full_irq mask */
  1710. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1711. /* rx_ring_near_full_irq_2 mask */
  1712. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1713. /* tx_ring_near_full_irq mask */
  1714. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1715. /* host2txmon ring masks */
  1716. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1717. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1718. /* tx mon ring masks */
  1719. { WLAN_CFG_TX_MON_RING_MASK_0,
  1720. WLAN_CFG_TX_MON_RING_MASK_1,
  1721. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1722. /* ppe ds wbm release ring ring mask */
  1723. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1724. /* Reo2ppe ring mask */
  1725. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1726. /* ppe2tcl ring mask */
  1727. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1728. /* umac reset mask */
  1729. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1730. },
  1731. /* Interrupt assignment for 3 MSI combination */
  1732. {
  1733. /* tx ring masks */
  1734. { WLAN_CFG_TX_RING_MASK_0 |
  1735. WLAN_CFG_TX_RING_MASK_1,
  1736. WLAN_CFG_TX_RING_MASK_2 |
  1737. WLAN_CFG_TX_RING_MASK_3,
  1738. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1739. /* rx ring masks */
  1740. { WLAN_CFG_RX_RING_MASK_0 |
  1741. WLAN_CFG_RX_RING_MASK_1,
  1742. WLAN_CFG_RX_RING_MASK_2 |
  1743. WLAN_CFG_RX_RING_MASK_3,
  1744. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1745. /* rx mon ring masks */
  1746. { 0, 0,
  1747. WLAN_CFG_RX_MON_RING_MASK_0 |
  1748. WLAN_CFG_RX_MON_RING_MASK_1 |
  1749. WLAN_CFG_RX_MON_RING_MASK_2,
  1750. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1751. /* host2rxdma ring masks */
  1752. { 0, 0,
  1753. WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1754. WLAN_CFG_HOST2RXDMA_RING_MASK_1 |
  1755. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1756. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1757. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1758. /* rxdma2host ring masks */
  1759. { 0, 0,
  1760. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1761. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  1762. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1763. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1764. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1765. /* host2rxdma mon ring masks */
  1766. { 0, 0,
  1767. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1768. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  1769. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1770. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1771. /* rxdma2host mon ring masks */
  1772. { 0, 0,
  1773. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1774. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  1775. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1776. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1777. /* rx err ring masks */
  1778. { 0, 0,
  1779. WLAN_CFG_RX_ERR_RING_MASK_0 |
  1780. WLAN_CFG_RX_ERR_RING_MASK_1 |
  1781. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1782. WLAN_CFG_RX_ERR_RING_MASK_3,
  1783. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1784. /* rx wbm rel ring masks */
  1785. { 0, 0,
  1786. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1787. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  1788. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1789. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1790. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1791. /* reo status ring masks */
  1792. { 0, 0,
  1793. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1794. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  1795. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1796. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1797. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1798. /* rx_ring_near_full_irq mask */
  1799. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1800. /* rx_ring_near_full_irq_2 mask */
  1801. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1802. /* tx_ring_near_full_irq mask */
  1803. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1804. /* host2txmon ring masks */
  1805. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1806. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1807. /* tx mon ring masks */
  1808. { WLAN_CFG_TX_MON_RING_MASK_0,
  1809. WLAN_CFG_TX_MON_RING_MASK_1,
  1810. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1811. /* ppe ds wbm release ring ring mask */
  1812. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1813. /* Reo2ppe ring mask */
  1814. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1815. /* ppe2tcl ring mask */
  1816. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1817. /* umac reset mask */
  1818. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1819. },
  1820. /* Interrupt assignment for 4 MSI combination */
  1821. {
  1822. /* tx ring masks */
  1823. { WLAN_CFG_TX_RING_MASK_0,
  1824. WLAN_CFG_TX_RING_MASK_1,
  1825. WLAN_CFG_TX_RING_MASK_2,
  1826. WLAN_CFG_TX_RING_MASK_3,
  1827. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1828. /* rx ring masks */
  1829. { WLAN_CFG_RX_RING_MASK_0,
  1830. WLAN_CFG_RX_RING_MASK_1,
  1831. WLAN_CFG_RX_RING_MASK_2,
  1832. WLAN_CFG_RX_RING_MASK_3,
  1833. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1834. /* rx mon ring masks */
  1835. { WLAN_CFG_RX_MON_RING_MASK_0,
  1836. WLAN_CFG_RX_MON_RING_MASK_1,
  1837. WLAN_CFG_RX_MON_RING_MASK_2,
  1838. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1839. /* host2rxdma ring masks */
  1840. { WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1841. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1842. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1843. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1844. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1845. /* rxdma2host ring masks */
  1846. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1847. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1848. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1849. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1850. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1851. /* host2rxdma mon ring masks */
  1852. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1853. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1854. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1855. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1856. /* rxdma2host mon ring masks */
  1857. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1858. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1859. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1860. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1861. /* rx err ring masks */
  1862. { WLAN_CFG_RX_ERR_RING_MASK_0,
  1863. WLAN_CFG_RX_ERR_RING_MASK_1,
  1864. WLAN_CFG_RX_ERR_RING_MASK_2,
  1865. WLAN_CFG_RX_ERR_RING_MASK_3,
  1866. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1867. /* rx wbm rel ring masks */
  1868. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1869. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1870. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1871. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1872. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1873. /* reo status ring masks */
  1874. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  1875. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1876. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1877. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1878. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1879. /* rx_ring_near_full_irq mask */
  1880. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1881. /* rx_ring_near_full_irq_2 mask */
  1882. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1883. /* tx_ring_near_full_irq mask */
  1884. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1885. /* host2txmon ring masks */
  1886. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1887. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1888. /* tx mon ring masks */
  1889. { WLAN_CFG_TX_MON_RING_MASK_0,
  1890. WLAN_CFG_TX_MON_RING_MASK_1,
  1891. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1892. /* ppe ds wbm release ring ring mask */
  1893. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1894. /* Reo2ppe ring mask */
  1895. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1896. /* ppe2tcl ring mask */
  1897. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1898. /* umac reset mask */
  1899. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1900. },
  1901. /* Interrupt assignment for 5 MSI combination */
  1902. {
  1903. /* tx ring masks */
  1904. { WLAN_CFG_TX_RING_MASK_0,
  1905. WLAN_CFG_TX_RING_MASK_1,
  1906. WLAN_CFG_TX_RING_MASK_2,
  1907. WLAN_CFG_TX_RING_MASK_3,
  1908. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1909. /* rx ring masks */
  1910. { WLAN_CFG_RX_RING_MASK_0,
  1911. WLAN_CFG_RX_RING_MASK_1,
  1912. WLAN_CFG_RX_RING_MASK_2,
  1913. WLAN_CFG_RX_RING_MASK_3,
  1914. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1915. /* rx mon ring masks */
  1916. { 0, 0, 0, 0,
  1917. WLAN_CFG_RX_MON_RING_MASK_0 |
  1918. WLAN_CFG_RX_MON_RING_MASK_1 |
  1919. WLAN_CFG_RX_MON_RING_MASK_2,
  1920. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1921. /* host2rxdma ring masks */
  1922. { 0, 0, 0, 0,
  1923. WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1924. WLAN_CFG_HOST2RXDMA_RING_MASK_1 |
  1925. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1926. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1927. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1928. /* rxdma2host ring masks */
  1929. { 0, 0, 0, 0,
  1930. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1931. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  1932. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1933. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1934. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1935. /* host2rxdma mon ring masks */
  1936. { 0, 0, 0, 0,
  1937. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1938. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  1939. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1940. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1941. /* rxdma2host mon ring masks */
  1942. { 0, 0, 0, 0,
  1943. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1944. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  1945. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1946. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1947. /* rx err ring masks */
  1948. { 0, 0, 0, 0,
  1949. WLAN_CFG_RX_ERR_RING_MASK_0 |
  1950. WLAN_CFG_RX_ERR_RING_MASK_1 |
  1951. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1952. WLAN_CFG_RX_ERR_RING_MASK_3,
  1953. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1954. /* rx wbm rel ring masks */
  1955. { 0, 0, 0, 0,
  1956. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1957. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  1958. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1959. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1960. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1961. /* reo status ring masks */
  1962. { 0, 0, 0, 0,
  1963. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1964. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  1965. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1966. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1967. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1968. /* rx_ring_near_full_irq mask */
  1969. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1970. /* rx_ring_near_full_irq_2 mask */
  1971. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1972. /* tx_ring_near_full_irq mask */
  1973. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1974. /* host2txmon ring masks */
  1975. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1976. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1977. /* tx mon ring masks */
  1978. { WLAN_CFG_TX_MON_RING_MASK_0,
  1979. WLAN_CFG_TX_MON_RING_MASK_1,
  1980. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1981. /* ppe ds wbm release ring ring mask */
  1982. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1983. /* Reo2ppe ring mask */
  1984. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1985. /* ppe2tcl ring mask */
  1986. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1987. /* umac reset mask */
  1988. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1989. },
  1990. /* Interrupt assignment for 6 MSI combination */
  1991. {
  1992. /* tx ring masks */
  1993. { WLAN_CFG_TX_RING_MASK_0,
  1994. WLAN_CFG_TX_RING_MASK_1,
  1995. WLAN_CFG_TX_RING_MASK_2,
  1996. WLAN_CFG_TX_RING_MASK_3,
  1997. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1998. /* rx ring masks */
  1999. { 0, 0,
  2000. WLAN_CFG_RX_RING_MASK_0,
  2001. WLAN_CFG_RX_RING_MASK_1,
  2002. WLAN_CFG_RX_RING_MASK_2,
  2003. WLAN_CFG_RX_RING_MASK_3,
  2004. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2005. /* rx mon ring masks */
  2006. { WLAN_CFG_RX_MON_RING_MASK_0,
  2007. WLAN_CFG_RX_MON_RING_MASK_1,
  2008. WLAN_CFG_RX_MON_RING_MASK_2,
  2009. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2010. /* host2rxdma ring masks */
  2011. { WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2012. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2013. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2014. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2015. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2016. /* rxdma2host ring masks */
  2017. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2018. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2019. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2020. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2021. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2022. /* host2rxdma mon ring masks */
  2023. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2024. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2025. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2026. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2027. /* rxdma2host mon ring masks */
  2028. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2029. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2030. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2031. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2032. /* rx err ring masks */
  2033. { WLAN_CFG_RX_ERR_RING_MASK_0,
  2034. WLAN_CFG_RX_ERR_RING_MASK_1,
  2035. WLAN_CFG_RX_ERR_RING_MASK_2,
  2036. WLAN_CFG_RX_ERR_RING_MASK_3,
  2037. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2038. /* rx wbm rel ring masks */
  2039. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2040. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2041. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2042. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2043. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2044. /* reo status ring masks */
  2045. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  2046. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2047. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2048. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2049. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2050. /* rx_ring_near_full_irq mask */
  2051. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2052. /* rx_ring_near_full_irq_2 mask */
  2053. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2054. /* tx_ring_near_full_irq mask */
  2055. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2056. /* host2txmon ring masks */
  2057. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2058. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2059. /* tx mon ring masks */
  2060. { WLAN_CFG_TX_MON_RING_MASK_0,
  2061. WLAN_CFG_TX_MON_RING_MASK_1,
  2062. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2063. /* ppe ds wbm release ring ring mask */
  2064. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2065. /* Reo2ppe ring mask */
  2066. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2067. /* ppe2tcl ring mask */
  2068. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2069. /* umac reset mask */
  2070. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2071. },
  2072. /* Interrupt assignment for 7 MSI combination */
  2073. {
  2074. /* tx ring masks */
  2075. { WLAN_CFG_TX_RING_MASK_0,
  2076. WLAN_CFG_TX_RING_MASK_1,
  2077. WLAN_CFG_TX_RING_MASK_2,
  2078. WLAN_CFG_TX_RING_MASK_3,
  2079. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2080. /* rx ring masks */
  2081. { 0, 0, 0,
  2082. WLAN_CFG_RX_RING_MASK_0,
  2083. WLAN_CFG_RX_RING_MASK_1,
  2084. WLAN_CFG_RX_RING_MASK_2,
  2085. WLAN_CFG_RX_RING_MASK_3,
  2086. 0, 0, 0, 0, 0, 0, 0, 0},
  2087. /* rx mon ring masks */
  2088. { 0, 0, 0,
  2089. WLAN_CFG_RX_MON_RING_MASK_0,
  2090. WLAN_CFG_RX_MON_RING_MASK_1,
  2091. WLAN_CFG_RX_MON_RING_MASK_2,
  2092. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2093. /* host2rxdma ring masks */
  2094. { 0, 0, 0,
  2095. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2096. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2097. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2098. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2099. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2100. /* rxdma2host ring masks */
  2101. { 0, 0, 0,
  2102. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2103. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2104. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2105. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2106. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2107. /* host2rxdma mon ring masks */
  2108. { 0, 0, 0,
  2109. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2110. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2111. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2112. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2113. /* rxdma2host mon ring masks */
  2114. { 0, 0, 0,
  2115. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2116. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2117. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2118. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2119. /* rx err ring masks */
  2120. { 0, 0, 0,
  2121. WLAN_CFG_RX_ERR_RING_MASK_0,
  2122. WLAN_CFG_RX_ERR_RING_MASK_1,
  2123. WLAN_CFG_RX_ERR_RING_MASK_2,
  2124. WLAN_CFG_RX_ERR_RING_MASK_3,
  2125. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2126. /* rx wbm rel ring masks */
  2127. { 0, 0, 0,
  2128. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2129. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2130. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2131. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2132. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2133. /* reo status ring masks */
  2134. { 0, 0, 0,
  2135. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2136. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2137. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2138. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2139. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2140. /* rx_ring_near_full_irq mask */
  2141. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2142. /* rx_ring_near_full_irq_2 mask */
  2143. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2144. /* tx_ring_near_full_irq mask */
  2145. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2146. /* host2txmon ring masks */
  2147. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2148. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2149. /* tx mon ring masks */
  2150. { WLAN_CFG_TX_MON_RING_MASK_0,
  2151. WLAN_CFG_TX_MON_RING_MASK_1,
  2152. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2153. /* ppe ds wbm release ring ring mask */
  2154. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2155. /* Reo2ppe ring mask */
  2156. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2157. /* ppe2tcl ring mask */
  2158. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2159. /* umac reset mask */
  2160. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2161. },
  2162. /* Interrupt assignment for 8 MSI combination */
  2163. {
  2164. /* tx ring masks */
  2165. { WLAN_CFG_TX_RING_MASK_0,
  2166. WLAN_CFG_TX_RING_MASK_1,
  2167. WLAN_CFG_TX_RING_MASK_2,
  2168. WLAN_CFG_TX_RING_MASK_3,
  2169. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2170. /* rx ring masks */
  2171. { 0, 0, 0, 0,
  2172. WLAN_CFG_RX_RING_MASK_0,
  2173. WLAN_CFG_RX_RING_MASK_1,
  2174. WLAN_CFG_RX_RING_MASK_2,
  2175. WLAN_CFG_RX_RING_MASK_3,
  2176. 0, 0, 0, 0, 0, 0, 0, 0},
  2177. /* rx mon ring masks */
  2178. { 0, 0, 0,
  2179. WLAN_CFG_RX_MON_RING_MASK_0,
  2180. WLAN_CFG_RX_MON_RING_MASK_1,
  2181. WLAN_CFG_RX_MON_RING_MASK_2,
  2182. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2183. /* host2rxdma ring masks */
  2184. { 0, 0, 0,
  2185. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2186. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2187. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2188. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2189. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2190. /* rxdma2host ring masks */
  2191. { 0, 0, 0,
  2192. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2193. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2194. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2195. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2196. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2197. /* host2rxdma mon ring masks */
  2198. { 0, 0, 0,
  2199. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2200. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2201. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2202. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2203. /* rxdma2host mon ring masks */
  2204. { 0, 0, 0,
  2205. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2206. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2207. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2208. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2209. /* rx err ring masks */
  2210. { 0, 0, 0,
  2211. WLAN_CFG_RX_ERR_RING_MASK_0,
  2212. WLAN_CFG_RX_ERR_RING_MASK_1,
  2213. WLAN_CFG_RX_ERR_RING_MASK_2,
  2214. WLAN_CFG_RX_ERR_RING_MASK_3,
  2215. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2216. /* rx wbm rel ring masks */
  2217. { 0, 0, 0,
  2218. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2219. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2220. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2221. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2222. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2223. /* reo status ring masks */
  2224. { 0, 0, 0,
  2225. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2226. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2227. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2228. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2229. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2230. /* rx_ring_near_full_irq mask */
  2231. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2232. /* rx_ring_near_full_irq_2 mask */
  2233. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2234. /* tx_ring_near_full_irq mask */
  2235. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2236. /* host2txmon ring masks */
  2237. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2238. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2239. /* tx mon ring masks */
  2240. { WLAN_CFG_TX_MON_RING_MASK_0,
  2241. WLAN_CFG_TX_MON_RING_MASK_1,
  2242. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2243. /* ppe ds wbm release ring ring mask */
  2244. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2245. /* Reo2ppe ring mask */
  2246. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2247. /* ppe2tcl ring mask */
  2248. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2249. /* umac reset mask */
  2250. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2251. },
  2252. /* Interrupt assignment for 9 MSI combination */
  2253. {
  2254. /* tx ring masks */
  2255. { WLAN_CFG_TX_RING_MASK_0,
  2256. WLAN_CFG_TX_RING_MASK_1,
  2257. WLAN_CFG_TX_RING_MASK_2,
  2258. WLAN_CFG_TX_RING_MASK_3,
  2259. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2260. /* rx ring masks */
  2261. { 0, 0, 0, 0,
  2262. WLAN_CFG_RX_RING_MASK_0,
  2263. WLAN_CFG_RX_RING_MASK_1,
  2264. WLAN_CFG_RX_RING_MASK_2,
  2265. WLAN_CFG_RX_RING_MASK_3,
  2266. 0, 0, 0, 0, 0, 0, 0, 0},
  2267. /* rx mon ring masks */
  2268. { 0, 0, 0,
  2269. WLAN_CFG_RX_MON_RING_MASK_0,
  2270. WLAN_CFG_RX_MON_RING_MASK_1,
  2271. WLAN_CFG_RX_MON_RING_MASK_2,
  2272. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2273. /* host2rxdma ring masks */
  2274. { 0, 0, 0,
  2275. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2276. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2277. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2278. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2279. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2280. /* rxdma2host ring masks */
  2281. { 0, 0, 0,
  2282. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2283. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2284. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2285. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2286. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2287. /* host2rxdma mon ring masks */
  2288. { 0, 0, 0,
  2289. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2290. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2291. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2292. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2293. /* rxdma2host mon ring masks */
  2294. { 0, 0, 0,
  2295. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2296. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2297. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2298. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2299. /* rx err ring masks */
  2300. { 0, 0, 0,
  2301. WLAN_CFG_RX_ERR_RING_MASK_0,
  2302. WLAN_CFG_RX_ERR_RING_MASK_1,
  2303. WLAN_CFG_RX_ERR_RING_MASK_2,
  2304. WLAN_CFG_RX_ERR_RING_MASK_3,
  2305. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2306. /* rx wbm rel ring masks */
  2307. { 0, 0, 0,
  2308. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2309. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2310. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2311. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2312. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2313. /* reo status ring masks */
  2314. { 0, 0, 0,
  2315. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2316. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2317. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2318. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2319. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2320. /* rx_ring_near_full_irq mask */
  2321. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2322. /* rx_ring_near_full_irq_2 mask */
  2323. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2324. /* tx_ring_near_full_irq mask */
  2325. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2326. /* host2txmon ring masks */
  2327. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2328. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2329. /* tx mon ring masks */
  2330. { WLAN_CFG_TX_MON_RING_MASK_0,
  2331. WLAN_CFG_TX_MON_RING_MASK_1,
  2332. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2333. /* ppe ds wbm release ring ring mask */
  2334. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2335. /* Reo2ppe ring mask */
  2336. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2337. /* ppe2tcl ring mask */
  2338. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2339. /* umac reset mask */
  2340. {0, 0, 0, 0, 0, 0, 0, 0,
  2341. WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  2342. },
  2343. /* Interrupt assignment for 10 MSI combination */
  2344. {
  2345. /* tx ring masks */
  2346. { WLAN_CFG_TX_RING_MASK_0,
  2347. WLAN_CFG_TX_RING_MASK_1,
  2348. WLAN_CFG_TX_RING_MASK_2,
  2349. WLAN_CFG_TX_RING_MASK_3,
  2350. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2351. /* rx ring masks */
  2352. { 0, 0, 0, 0,
  2353. WLAN_CFG_RX_RING_MASK_0,
  2354. WLAN_CFG_RX_RING_MASK_1,
  2355. WLAN_CFG_RX_RING_MASK_2,
  2356. WLAN_CFG_RX_RING_MASK_3,
  2357. 0, 0, 0, 0, 0, 0, 0, 0},
  2358. /* rx mon ring masks */
  2359. { 0, 0, 0,
  2360. WLAN_CFG_RX_MON_RING_MASK_0,
  2361. WLAN_CFG_RX_MON_RING_MASK_1,
  2362. WLAN_CFG_RX_MON_RING_MASK_2,
  2363. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2364. /* host2rxdma ring masks */
  2365. { 0, 0, 0,
  2366. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2367. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2368. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2369. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2370. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2371. /* rxdma2host ring masks */
  2372. { 0, 0, 0,
  2373. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2374. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2375. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2376. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2377. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2378. /* host2rxdma mon ring masks */
  2379. { 0, 0, 0,
  2380. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2381. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2382. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2383. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2384. /* rxdma2host mon ring masks */
  2385. { 0, 0, 0,
  2386. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2387. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2388. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2389. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2390. /* rx err ring masks */
  2391. { 0, 0, 0,
  2392. WLAN_CFG_RX_ERR_RING_MASK_0,
  2393. WLAN_CFG_RX_ERR_RING_MASK_1,
  2394. WLAN_CFG_RX_ERR_RING_MASK_2,
  2395. WLAN_CFG_RX_ERR_RING_MASK_3,
  2396. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2397. /* rx wbm rel ring masks */
  2398. { 0, 0, 0,
  2399. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2400. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2401. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2402. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2403. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2404. /* reo status ring masks */
  2405. { 0, 0, 0,
  2406. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2407. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2408. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2409. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2410. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2411. /* rx_ring_near_full_irq mask */
  2412. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2413. /* rx_ring_near_full_irq_2 mask */
  2414. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2415. /* tx_ring_near_full_irq mask */
  2416. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2417. /* host2txmon ring masks */
  2418. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2419. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2420. /* tx mon ring masks */
  2421. { WLAN_CFG_TX_MON_RING_MASK_0,
  2422. WLAN_CFG_TX_MON_RING_MASK_1,
  2423. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2424. /* ppe ds wbm release ring ring mask */
  2425. { 0, 0, 0, 0, 0, 0, WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0,
  2426. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2427. /* Reo2ppe ring mask */
  2428. {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  2429. 0, 0, 0, 0, 0, 0, 0, 0},
  2430. /* ppe2tcl ring mask */
  2431. {0, 0, 0, 0, 0, 0, 0, 0,
  2432. WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  2433. /* umac reset mask */
  2434. {0, 0, 0, 0, 0, 0, 0, 0,
  2435. 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0},
  2436. },
  2437. /* Interrupt assignment for 11 MSI combination */
  2438. {
  2439. /* tx ring masks */
  2440. { WLAN_CFG_TX_RING_MASK_0,
  2441. WLAN_CFG_TX_RING_MASK_1,
  2442. WLAN_CFG_TX_RING_MASK_2,
  2443. WLAN_CFG_TX_RING_MASK_3,
  2444. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2445. /* rx ring masks */
  2446. { 0, 0, 0, 0,
  2447. WLAN_CFG_RX_RING_MASK_0,
  2448. WLAN_CFG_RX_RING_MASK_1,
  2449. WLAN_CFG_RX_RING_MASK_2,
  2450. WLAN_CFG_RX_RING_MASK_3,
  2451. 0, 0, 0, 0, 0, 0, 0, 0},
  2452. /* rx mon ring masks */
  2453. { 0, 0, 0,
  2454. WLAN_CFG_RX_MON_RING_MASK_0,
  2455. WLAN_CFG_RX_MON_RING_MASK_1,
  2456. WLAN_CFG_RX_MON_RING_MASK_2,
  2457. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2458. /* host2rxdma ring masks */
  2459. { 0, 0, 0,
  2460. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2461. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2462. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2463. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2464. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2465. /* rxdma2host ring masks */
  2466. { 0, 0, 0,
  2467. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2468. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2469. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2470. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2471. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2472. /* host2rxdma mon ring masks */
  2473. { 0, 0, 0,
  2474. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2475. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2476. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2477. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2478. /* rxdma2host mon ring masks */
  2479. { 0, 0, 0,
  2480. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2481. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2482. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2483. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2484. /* rx err ring masks */
  2485. { 0, 0, 0,
  2486. WLAN_CFG_RX_ERR_RING_MASK_0,
  2487. WLAN_CFG_RX_ERR_RING_MASK_1,
  2488. WLAN_CFG_RX_ERR_RING_MASK_2,
  2489. WLAN_CFG_RX_ERR_RING_MASK_3,
  2490. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2491. /* rx wbm rel ring masks */
  2492. { 0, 0, 0,
  2493. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2494. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2495. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2496. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2497. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2498. /* reo status ring masks */
  2499. { 0, 0, 0,
  2500. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2501. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2502. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2503. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2504. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2505. /* rx_ring_near_full_irq mask */
  2506. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2507. /* rx_ring_near_full_irq_2 mask */
  2508. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2509. /* tx_ring_near_full_irq mask */
  2510. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2511. /* host2txmon ring masks */
  2512. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2513. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2514. /* tx mon ring masks */
  2515. { WLAN_CFG_TX_MON_RING_MASK_0,
  2516. WLAN_CFG_TX_MON_RING_MASK_1,
  2517. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2518. /* ppe wbm ds release ring ring mask */
  2519. { 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0,
  2520. 0, 0, 0, 0, 0, 0, 0, 0},
  2521. /* Reo2ppe ring mask */
  2522. {0, 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  2523. 0, 0, 0, 0, 0, 0, 0},
  2524. /* ppe2tcl ring mask */
  2525. {0, 0, 0, 0, 0, 0, 0, 0, 0,
  2526. WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0, 0, 0, 0},
  2527. /* umac reset mask */
  2528. {0, 0, 0, 0, 0, 0, 0, 0,
  2529. 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0},
  2530. },
  2531. /* Interrupt assignment for 12 MSI combination */
  2532. {
  2533. /* tx ring masks */
  2534. { WLAN_CFG_TX_RING_MASK_0,
  2535. WLAN_CFG_TX_RING_MASK_1,
  2536. WLAN_CFG_TX_RING_MASK_2,
  2537. WLAN_CFG_TX_RING_MASK_3,
  2538. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2539. /* rx ring masks */
  2540. { 0, 0, 0, 0,
  2541. WLAN_CFG_RX_RING_MASK_0,
  2542. WLAN_CFG_RX_RING_MASK_1,
  2543. WLAN_CFG_RX_RING_MASK_2,
  2544. WLAN_CFG_RX_RING_MASK_3,
  2545. 0, 0, 0, 0, 0, 0, 0, 0},
  2546. /* rx mon ring masks */
  2547. { 0, 0, 0, 0, 0, 0, 0, 0,
  2548. WLAN_CFG_RX_MON_RING_MASK_0,
  2549. WLAN_CFG_RX_MON_RING_MASK_1,
  2550. WLAN_CFG_RX_MON_RING_MASK_2,
  2551. 0, 0, 0, 0, 0},
  2552. /* host2rxdma ring masks */
  2553. { 0, 0, 0, 0, 0, 0, 0, 0,
  2554. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2555. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2556. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2557. 0, 0, 0, 0, 0},
  2558. /* rxdma2host ring masks */
  2559. { 0, 0, 0, 0, 0, 0, 0, 0,
  2560. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2561. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2562. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2563. 0, 0, 0, 0, 0},
  2564. /* host2rxdma mon ring masks */
  2565. { 0, 0, 0, 0, 0, 0, 0, 0,
  2566. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2567. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2568. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2569. 0, 0, 0, 0, 0},
  2570. /* rxdma2host mon ring masks */
  2571. { 0, 0, 0, 0, 0, 0, 0, 0,
  2572. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2573. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2574. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2575. 0, 0, 0, 0, 0},
  2576. /* rx err ring masks */
  2577. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2578. WLAN_CFG_RX_ERR_RING_MASK_0,
  2579. 0, 0, 0, 0},
  2580. /* rx wbm rel ring masks */
  2581. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2582. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2583. 0, 0, 0, 0},
  2584. /* reo status ring masks */
  2585. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2586. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2587. 0, 0, 0, 0},
  2588. /* rx_ring_near_full_irq mask */
  2589. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2590. /* rx_ring_near_full_irq_2 mask */
  2591. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2592. /* tx_ring_near_full_irq mask */
  2593. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2594. /* host2txmon ring masks */
  2595. { 0, 0, 0, 0, 0, 0, 0, 0,
  2596. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2597. 0, 0, 0, 0, 0, 0, 0},
  2598. /* tx mon ring masks */
  2599. { 0, 0, 0, 0, 0, 0, 0, 0,
  2600. WLAN_CFG_TX_MON_RING_MASK_0,
  2601. WLAN_CFG_TX_MON_RING_MASK_1,
  2602. 0, 0, 0, 0, 0, 0},
  2603. /* ppe ds wbm release ring ring mask */
  2604. { 0, 0, 0, 0, 0, 0, 0, 0,
  2605. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  2606. /* Reo2ppe ring mask */
  2607. {0, 0, 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  2608. 0, 0, 0, 0, 0, 0},
  2609. /* ppe2tcl ring mask */
  2610. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2611. WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0, 0, 0},
  2612. /* umac reset mask */
  2613. {0, 0, 0, 0, 0, 0, 0, 0,
  2614. 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0},
  2615. },
  2616. /* Interrupt assignment for 13 MSI combination */
  2617. {
  2618. /* tx ring masks */
  2619. { WLAN_CFG_TX_RING_MASK_0,
  2620. WLAN_CFG_TX_RING_MASK_1,
  2621. WLAN_CFG_TX_RING_MASK_2,
  2622. WLAN_CFG_TX_RING_MASK_3,
  2623. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2624. /* rx ring masks */
  2625. { 0, 0, 0, 0,
  2626. WLAN_CFG_RX_RING_MASK_0,
  2627. WLAN_CFG_RX_RING_MASK_1,
  2628. WLAN_CFG_RX_RING_MASK_2,
  2629. WLAN_CFG_RX_RING_MASK_3,
  2630. 0, 0, 0, 0, 0, 0, 0, 0},
  2631. /* rx mon ring masks */
  2632. { 0, 0, 0, 0, 0, 0, 0, 0,
  2633. WLAN_CFG_RX_MON_RING_MASK_0,
  2634. WLAN_CFG_RX_MON_RING_MASK_1,
  2635. WLAN_CFG_RX_MON_RING_MASK_2,
  2636. 0, 0, 0, 0, 0},
  2637. /* host2rxdma ring masks */
  2638. { 0, 0, 0, 0, 0, 0, 0, 0,
  2639. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2640. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2641. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2642. 0, 0, 0, 0, 0},
  2643. /* rxdma2host ring masks */
  2644. { 0, 0, 0, 0, 0, 0, 0, 0,
  2645. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2646. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2647. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2648. 0, 0, 0, 0, 0},
  2649. /* host2rxdma mon ring masks */
  2650. { 0, 0, 0, 0, 0, 0, 0, 0,
  2651. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2652. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2653. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2654. 0, 0, 0, 0, 0},
  2655. /* rxdma2host mon ring masks */
  2656. { 0, 0, 0, 0, 0, 0, 0, 0,
  2657. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2658. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2659. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2660. 0, 0, 0, 0, 0},
  2661. /* rx err ring masks */
  2662. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2663. WLAN_CFG_RX_ERR_RING_MASK_0,
  2664. 0, 0, 0, 0},
  2665. /* rx wbm rel ring masks */
  2666. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2667. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2668. 0, 0, 0, 0},
  2669. /* reo status ring masks */
  2670. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2671. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2672. 0, 0, 0, 0},
  2673. /* rx_ring_near_full_irq mask */
  2674. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2675. /* rx_ring_near_full_irq_2 mask */
  2676. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2677. /* tx_ring_near_full_irq mask */
  2678. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2679. /* host2txmon ring masks */
  2680. { 0, 0, 0, 0, 0, 0, 0, 0,
  2681. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2682. 0, 0, 0, 0, 0, 0, 0},
  2683. /* tx mon ring masks */
  2684. { 0, 0, 0, 0, 0, 0, 0, 0,
  2685. WLAN_CFG_TX_MON_RING_MASK_0,
  2686. WLAN_CFG_TX_MON_RING_MASK_1,
  2687. 0, 0, 0, 0, 0, 0},
  2688. /* ppe ds wbm release ring ring mask */
  2689. { 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2690. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0, 0, 0},
  2691. /* Reo2ppe ring mask */
  2692. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  2693. 0, 0, 0, 0, 0},
  2694. /* ppe2tcl ring mask */
  2695. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2696. WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0, 0},
  2697. /* umac reset mask */
  2698. {0, 0, 0, 0, 0, 0, 0, 0,
  2699. 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0},
  2700. },
  2701. /* Interrupt assignment for 14 MSI combination */
  2702. {
  2703. /* tx ring masks */
  2704. { WLAN_CFG_TX_RING_MASK_0,
  2705. WLAN_CFG_TX_RING_MASK_1,
  2706. WLAN_CFG_TX_RING_MASK_2,
  2707. WLAN_CFG_TX_RING_MASK_3,
  2708. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2709. /* rx ring masks */
  2710. { 0, 0, 0, 0,
  2711. WLAN_CFG_RX_RING_MASK_0,
  2712. WLAN_CFG_RX_RING_MASK_1,
  2713. WLAN_CFG_RX_RING_MASK_2,
  2714. WLAN_CFG_RX_RING_MASK_3,
  2715. 0, 0, 0, 0, 0, 0, 0, 0},
  2716. /* rx mon ring masks */
  2717. { 0, 0, 0, 0, 0, 0, 0, 0,
  2718. WLAN_CFG_RX_MON_RING_MASK_0,
  2719. WLAN_CFG_RX_MON_RING_MASK_1,
  2720. WLAN_CFG_RX_MON_RING_MASK_2,
  2721. 0, 0, 0, 0, 0},
  2722. /* host2rxdma ring masks */
  2723. { 0, 0, 0, 0, 0, 0, 0, 0,
  2724. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2725. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2726. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2727. 0, 0, 0, 0, 0},
  2728. /* rxdma2host ring masks */
  2729. { 0, 0, 0, 0, 0, 0, 0, 0,
  2730. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2731. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2732. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2733. 0, 0, 0, 0, 0},
  2734. /* host2rxdma mon ring masks */
  2735. { 0, 0, 0, 0, 0, 0, 0, 0,
  2736. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2737. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2738. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2739. 0, 0, 0, 0, 0},
  2740. /* rxdma2host mon ring masks */
  2741. { 0, 0, 0, 0, 0, 0, 0, 0,
  2742. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2743. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2744. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2745. 0, 0, 0, 0, 0},
  2746. /* rx err ring masks */
  2747. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2748. WLAN_CFG_RX_ERR_RING_MASK_0,
  2749. 0, 0, 0, 0},
  2750. /* rx wbm rel ring masks */
  2751. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2752. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2753. 0, 0, 0, 0},
  2754. /* reo status ring masks */
  2755. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2756. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2757. 0, 0, 0, 0},
  2758. /* rx_ring_near_full_irq mask */
  2759. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2760. /* rx_ring_near_full_irq_2 mask */
  2761. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2762. /* tx_ring_near_full_irq mask */
  2763. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2764. /* host2txmon ring masks */
  2765. { 0, 0, 0, 0, 0, 0, 0, 0,
  2766. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2767. 0, 0, 0, 0, 0, 0, 0},
  2768. /* tx mon ring masks */
  2769. { 0, 0, 0, 0, 0, 0, 0, 0,
  2770. WLAN_CFG_TX_MON_RING_MASK_0,
  2771. WLAN_CFG_TX_MON_RING_MASK_1,
  2772. 0, 0, 0, 0, 0, 0},
  2773. /* ppe ds wbm release ring ring mask */
  2774. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2775. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0, 0},
  2776. /* Reo2ppe ring mask */
  2777. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2778. WLAN_CFG_REO2PPE_RING_MASK_0, 0, 0, 0, 0},
  2779. /* ppe2tcl ring mask */
  2780. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2781. 0, WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0},
  2782. /* umac reset mask */
  2783. {0, 0, 0, 0, 0, 0, 0, 0,
  2784. 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0},
  2785. },
  2786. /* Interrupt assignment for 15 MSI combination */
  2787. {
  2788. /* tx ring masks */
  2789. { WLAN_CFG_TX_RING_MASK_0,
  2790. WLAN_CFG_TX_RING_MASK_1,
  2791. WLAN_CFG_TX_RING_MASK_2,
  2792. WLAN_CFG_TX_RING_MASK_3,
  2793. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2794. /* rx ring masks */
  2795. { 0, 0, 0, 0,
  2796. WLAN_CFG_RX_RING_MASK_0,
  2797. WLAN_CFG_RX_RING_MASK_1,
  2798. WLAN_CFG_RX_RING_MASK_2,
  2799. WLAN_CFG_RX_RING_MASK_3,
  2800. 0, 0, 0, 0, 0, 0, 0, 0},
  2801. /* rx mon ring masks */
  2802. { 0, 0, 0, 0, 0, 0, 0, 0,
  2803. WLAN_CFG_RX_MON_RING_MASK_0,
  2804. WLAN_CFG_RX_MON_RING_MASK_1,
  2805. WLAN_CFG_RX_MON_RING_MASK_2,
  2806. 0, 0, 0, 0, 0},
  2807. /* host2rxdma ring masks */
  2808. { 0, 0, 0, 0, 0, 0, 0, 0,
  2809. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2810. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2811. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2812. 0, 0, 0, 0, 0},
  2813. /* rxdma2host ring masks */
  2814. { 0, 0, 0, 0, 0, 0, 0, 0,
  2815. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2816. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2817. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2818. 0, 0, 0, 0, 0},
  2819. /* host2rxdma mon ring masks */
  2820. { 0, 0, 0, 0, 0, 0, 0, 0,
  2821. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2822. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2823. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2824. 0, 0, 0, 0, 0},
  2825. /* rxdma2host mon ring masks */
  2826. { 0, 0, 0, 0, 0, 0, 0, 0,
  2827. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2828. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2829. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2830. 0, 0, 0, 0, 0},
  2831. /* rx err ring masks */
  2832. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2833. WLAN_CFG_RX_ERR_RING_MASK_0,
  2834. 0, 0, 0, 0},
  2835. /* rx wbm rel ring masks */
  2836. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2837. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2838. 0, 0, 0, 0},
  2839. /* reo status ring masks */
  2840. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2841. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2842. 0, 0, 0, 0},
  2843. /* rx_ring_near_full_irq mask */
  2844. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2845. /* rx_ring_near_full_irq_2 mask */
  2846. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2847. /* tx_ring_near_full_irq mask */
  2848. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2849. /* host2txmon ring masks */
  2850. { 0, 0, 0, 0, 0, 0, 0, 0,
  2851. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2852. 0, 0, 0, 0, 0, 0, 0},
  2853. /* tx mon ring masks */
  2854. { 0, 0, 0, 0, 0, 0, 0, 0,
  2855. WLAN_CFG_TX_MON_RING_MASK_0,
  2856. WLAN_CFG_TX_MON_RING_MASK_1,
  2857. 0, 0, 0, 0, 0, 0},
  2858. /* ppe ds wbm release ring ring mask */
  2859. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2860. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0},
  2861. /* Reo2ppe ring mask */
  2862. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2863. 0, WLAN_CFG_REO2PPE_RING_MASK_0, 0, 0, 0},
  2864. /* ppe2tcl ring mask */
  2865. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2866. 0, 0, WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0},
  2867. /* umac reset mask */
  2868. {0, 0, 0, 0, 0, 0, 0, 0,
  2869. 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0},
  2870. },
  2871. /* Interrupt assignment for 16 MSI combination */
  2872. {
  2873. /* tx ring masks */
  2874. { WLAN_CFG_TX_RING_MASK_0,
  2875. WLAN_CFG_TX_RING_MASK_1,
  2876. WLAN_CFG_TX_RING_MASK_2,
  2877. WLAN_CFG_TX_RING_MASK_3,
  2878. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2879. /* rx ring masks */
  2880. { 0, 0, 0, 0,
  2881. WLAN_CFG_RX_RING_MASK_0,
  2882. WLAN_CFG_RX_RING_MASK_1,
  2883. WLAN_CFG_RX_RING_MASK_2,
  2884. WLAN_CFG_RX_RING_MASK_3,
  2885. 0, 0, 0, 0, 0, 0, 0, 0},
  2886. /* rx mon ring masks */
  2887. { 0, 0, 0, 0, 0, 0, 0, 0,
  2888. WLAN_CFG_RX_MON_RING_MASK_0,
  2889. WLAN_CFG_RX_MON_RING_MASK_1,
  2890. WLAN_CFG_RX_MON_RING_MASK_2,
  2891. 0, 0, 0, 0, 0},
  2892. /* host2rxdma ring masks */
  2893. { 0, 0, 0, 0, 0, 0, 0, 0,
  2894. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2895. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2896. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2897. 0, 0, 0, 0, 0},
  2898. /* rxdma2host ring masks */
  2899. { 0, 0, 0, 0, 0, 0, 0, 0,
  2900. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2901. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2902. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2903. 0, 0, 0, 0, 0},
  2904. /* host2rxdma mon ring masks */
  2905. { 0, 0, 0, 0, 0, 0, 0, 0,
  2906. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2907. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2908. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2909. 0, 0, 0, 0, 0},
  2910. /* rxdma2host mon ring masks */
  2911. { 0, 0, 0, 0, 0, 0, 0, 0,
  2912. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2913. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2914. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2915. 0, 0, 0, 0, 0},
  2916. /* rx err ring masks */
  2917. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2918. WLAN_CFG_RX_ERR_RING_MASK_0,
  2919. 0, 0, 0, 0},
  2920. /* rx wbm rel ring masks */
  2921. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2922. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2923. 0, 0, 0, 0},
  2924. /* reo status ring masks */
  2925. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2926. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2927. 0, 0, 0, 0},
  2928. /* rx_ring_near_full_irq mask */
  2929. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2930. /* rx_ring_near_full_irq_2 mask */
  2931. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2932. /* tx_ring_near_full_irq mask */
  2933. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2934. /* host2txmon ring masks */
  2935. { 0, 0, 0, 0, 0, 0, 0, 0,
  2936. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2937. 0, 0, 0, 0, 0, 0, 0},
  2938. /* tx mon ring masks */
  2939. { 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2940. WLAN_CFG_TX_MON_RING_MASK_0,
  2941. WLAN_CFG_TX_MON_RING_MASK_1,
  2942. 0, 0, 0, 0, 0},
  2943. /* ppe ds wbm release ring ring mask */
  2944. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2945. 0, WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0},
  2946. /* Reo2ppe ring mask */
  2947. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2948. 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0, 0, 0},
  2949. /* ppe2tcl ring mask */
  2950. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2951. 0, 0, 0, WLAN_CFG_PPE2TCL_RING_MASK_0, 0},
  2952. /* umac reset mask */
  2953. {0, 0, 0, 0, 0, 0, 0, 0,
  2954. 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0},
  2955. },
  2956. };
  2957. #endif
  2958. struct dp_int_mask_assignment dp_ur_mask_assignment_8msi =
  2959. /* Interrupt assignment for 8 MSI combination with Umac reset support */
  2960. {
  2961. /* tx ring masks */
  2962. { WLAN_CFG_TX_RING_MASK_0,
  2963. WLAN_CFG_TX_RING_MASK_1,
  2964. WLAN_CFG_TX_RING_MASK_2,
  2965. WLAN_CFG_TX_RING_MASK_3,
  2966. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2967. /* rx ring masks */
  2968. { 0, 0, 0, 0,
  2969. WLAN_CFG_RX_RING_MASK_0,
  2970. WLAN_CFG_RX_RING_MASK_1,
  2971. WLAN_CFG_RX_RING_MASK_2 |
  2972. WLAN_CFG_RX_RING_MASK_3,
  2973. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2974. /* rx mon ring masks */
  2975. { 0, 0, 0,
  2976. WLAN_CFG_RX_MON_RING_MASK_0,
  2977. WLAN_CFG_RX_MON_RING_MASK_1,
  2978. WLAN_CFG_RX_MON_RING_MASK_2,
  2979. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2980. /* host2rxdma ring masks */
  2981. { 0, 0, 0,
  2982. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2983. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2984. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2985. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2986. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2987. /* rxdma2host ring masks */
  2988. { 0, 0, 0,
  2989. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2990. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2991. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2992. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2993. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2994. /* host2rxdma mon ring masks */
  2995. { 0, 0, 0,
  2996. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2997. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2998. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2999. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3000. /* rxdma2host mon ring masks */
  3001. { 0, 0, 0,
  3002. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  3003. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  3004. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  3005. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3006. /* rx err ring masks */
  3007. { 0, 0, 0,
  3008. WLAN_CFG_RX_ERR_RING_MASK_0,
  3009. WLAN_CFG_RX_ERR_RING_MASK_1,
  3010. WLAN_CFG_RX_ERR_RING_MASK_2,
  3011. WLAN_CFG_RX_ERR_RING_MASK_3,
  3012. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3013. /* rx wbm rel ring masks */
  3014. { 0, 0, 0,
  3015. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  3016. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  3017. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  3018. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  3019. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3020. /* reo status ring masks */
  3021. { 0, 0, 0,
  3022. WLAN_CFG_REO_STATUS_RING_MASK_0,
  3023. WLAN_CFG_REO_STATUS_RING_MASK_1,
  3024. WLAN_CFG_REO_STATUS_RING_MASK_2,
  3025. WLAN_CFG_REO_STATUS_RING_MASK_3,
  3026. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3027. /* rx_ring_near_full_irq mask */
  3028. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3029. /* rx_ring_near_full_irq_2 mask */
  3030. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3031. /* tx_ring_near_full_irq mask */
  3032. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3033. /* host2txmon ring masks */
  3034. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  3035. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3036. /* tx mon ring masks */
  3037. { WLAN_CFG_TX_MON_RING_MASK_0,
  3038. WLAN_CFG_TX_MON_RING_MASK_1,
  3039. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3040. /* ppe ds wbm release ring ring mask */
  3041. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3042. /* Reo2ppe ring mask */
  3043. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3044. /* ppe2tcl ring mask */
  3045. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3046. /* umac reset mask */
  3047. {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0,
  3048. 0, 0, 0, 0, 0, 0, 0, 0},
  3049. };
  3050. struct dp_int_mask_assignment dp_ds_mask_assignment_8msi =
  3051. /* Interrupt assignment for 8 MSI combination */
  3052. {
  3053. /* tx ring masks */
  3054. { WLAN_CFG_TX_RING_MASK_0,
  3055. WLAN_CFG_TX_RING_MASK_1,
  3056. WLAN_CFG_TX_RING_MASK_2 |
  3057. WLAN_CFG_TX_RING_MASK_3,
  3058. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3059. /* rx ring masks */
  3060. { 0, 0, 0,
  3061. WLAN_CFG_RX_RING_MASK_0,
  3062. WLAN_CFG_RX_RING_MASK_1,
  3063. WLAN_CFG_RX_RING_MASK_2 |
  3064. WLAN_CFG_RX_RING_MASK_3,
  3065. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3066. /* rx mon ring masks */
  3067. { 0, 0,
  3068. WLAN_CFG_RX_MON_RING_MASK_0,
  3069. WLAN_CFG_RX_MON_RING_MASK_1,
  3070. WLAN_CFG_RX_MON_RING_MASK_2,
  3071. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3072. /* host2rxdma ring masks */
  3073. { 0, 0,
  3074. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  3075. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  3076. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  3077. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  3078. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3079. /* rxdma2host ring masks */
  3080. { 0, 0,
  3081. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  3082. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  3083. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  3084. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  3085. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3086. /* host2rxdma mon ring masks */
  3087. { 0, 0,
  3088. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  3089. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  3090. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  3091. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3092. /* rxdma2host mon ring masks */
  3093. { 0, 0,
  3094. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  3095. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  3096. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  3097. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3098. /* rx err ring masks */
  3099. { 0, 0,
  3100. WLAN_CFG_RX_ERR_RING_MASK_0,
  3101. WLAN_CFG_RX_ERR_RING_MASK_1,
  3102. WLAN_CFG_RX_ERR_RING_MASK_2 |
  3103. WLAN_CFG_RX_ERR_RING_MASK_3,
  3104. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3105. /* rx wbm rel ring masks */
  3106. { 0, 0,
  3107. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  3108. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  3109. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  3110. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  3111. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3112. /* reo status ring masks */
  3113. { 0, 0,
  3114. WLAN_CFG_REO_STATUS_RING_MASK_0,
  3115. WLAN_CFG_REO_STATUS_RING_MASK_1,
  3116. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  3117. WLAN_CFG_REO_STATUS_RING_MASK_3,
  3118. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3119. /* rx_ring_near_full_irq mask */
  3120. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3121. /* rx_ring_near_full_irq_2 mask */
  3122. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3123. /* tx_ring_near_full_irq mask */
  3124. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3125. /* host2txmon ring masks */
  3126. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  3127. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3128. /* tx mon ring masks */
  3129. { WLAN_CFG_TX_MON_RING_MASK_0,
  3130. WLAN_CFG_TX_MON_RING_MASK_1,
  3131. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3132. /* ppe ds wbm release ring ring mask */
  3133. { WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0,
  3134. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3135. /* Reo2ppe ring mask */
  3136. {0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0, 0,
  3137. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3138. /* ppe2tcl ring mask */
  3139. {0, 0, 0, 0, 0, 0, WLAN_CFG_PPE2TCL_RING_MASK_0, 0,
  3140. 0, 0, 0, 0, 0, 0, 0, 0},
  3141. /* umac reset mask */
  3142. {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0,
  3143. 0, 0, 0, 0, 0, 0, 0, 0},
  3144. };
  3145. struct dp_int_mask_assignment dp_ds_mask_assignment_9msi =
  3146. /* Interrupt assignment for 9 MSI combination */
  3147. {
  3148. /* tx ring masks */
  3149. { WLAN_CFG_TX_RING_MASK_0,
  3150. WLAN_CFG_TX_RING_MASK_1,
  3151. WLAN_CFG_TX_RING_MASK_2,
  3152. WLAN_CFG_TX_RING_MASK_3,
  3153. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3154. /* rx ring masks */
  3155. { 0, 0, 0, 0,
  3156. WLAN_CFG_RX_RING_MASK_0,
  3157. WLAN_CFG_RX_RING_MASK_1,
  3158. WLAN_CFG_RX_RING_MASK_2 |
  3159. WLAN_CFG_RX_RING_MASK_3,
  3160. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3161. /* rx mon ring masks */
  3162. { 0, 0, 0,
  3163. WLAN_CFG_RX_MON_RING_MASK_0,
  3164. WLAN_CFG_RX_MON_RING_MASK_1,
  3165. WLAN_CFG_RX_MON_RING_MASK_2,
  3166. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3167. /* host2rxdma ring masks */
  3168. { 0, 0, 0,
  3169. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  3170. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  3171. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  3172. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  3173. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3174. /* rxdma2host ring masks */
  3175. { 0, 0, 0,
  3176. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  3177. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  3178. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  3179. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  3180. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3181. /* host2rxdma mon ring masks */
  3182. { 0, 0, 0,
  3183. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  3184. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  3185. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  3186. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3187. /* rxdma2host mon ring masks */
  3188. { 0, 0, 0,
  3189. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  3190. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  3191. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  3192. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3193. /* rx err ring masks */
  3194. { 0, 0, 0,
  3195. WLAN_CFG_RX_ERR_RING_MASK_0,
  3196. WLAN_CFG_RX_ERR_RING_MASK_1,
  3197. WLAN_CFG_RX_ERR_RING_MASK_2,
  3198. WLAN_CFG_RX_ERR_RING_MASK_3,
  3199. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3200. /* rx wbm rel ring masks */
  3201. { 0, 0, 0,
  3202. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  3203. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  3204. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  3205. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  3206. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3207. /* reo status ring masks */
  3208. { 0, 0, 0,
  3209. WLAN_CFG_REO_STATUS_RING_MASK_0,
  3210. WLAN_CFG_REO_STATUS_RING_MASK_1,
  3211. WLAN_CFG_REO_STATUS_RING_MASK_2,
  3212. WLAN_CFG_REO_STATUS_RING_MASK_3,
  3213. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3214. /* rx_ring_near_full_irq mask */
  3215. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3216. /* rx_ring_near_full_irq_2 mask */
  3217. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3218. /* tx_ring_near_full_irq mask */
  3219. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3220. /* host2txmon ring masks */
  3221. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  3222. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3223. /* tx mon ring masks */
  3224. { WLAN_CFG_TX_MON_RING_MASK_0,
  3225. WLAN_CFG_TX_MON_RING_MASK_1,
  3226. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3227. /* ppe ds wbm release ring ring mask */
  3228. { WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0, 0,
  3229. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3230. /* Reo2ppe ring mask */
  3231. {0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  3232. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3233. /* ppe2tcl ring mask */
  3234. {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_PPE2TCL_RING_MASK_0,
  3235. 0, 0, 0, 0, 0, 0, 0, 0},
  3236. /* umac reset mask */
  3237. {0, 0, 0, 0, 0, 0, 0, 0,
  3238. WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  3239. };
  3240. #endif
  3241. /* g_wlan_srng_cfg[] - Per ring_type specific configuration */
  3242. struct wlan_srng_cfg g_wlan_srng_cfg[MAX_RING_TYPES];
  3243. #ifndef WLAN_SOFTUMAC_SUPPORT
  3244. /* REO_DST ring configuration */
  3245. struct wlan_srng_cfg wlan_srng_reo_cfg = {
  3246. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING,
  3247. .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_REO_RING,
  3248. .low_threshold = 0,
  3249. };
  3250. /* WBM2SW_RELEASE ring configuration */
  3251. struct wlan_srng_cfg wlan_srng_wbm_release_cfg = {
  3252. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING,
  3253. .batch_count_threshold = 0,
  3254. .low_threshold = 0,
  3255. };
  3256. #endif
  3257. /* RXDMA_BUF ring configuration */
  3258. struct wlan_srng_cfg wlan_srng_rxdma_buf_cfg = {
  3259. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  3260. .batch_count_threshold = 0,
  3261. .low_threshold = WLAN_CFG_RXDMA_REFILL_RING_SIZE >> 3,
  3262. };
  3263. /* RXDMA_MONITOR_BUF ring configuration */
  3264. struct wlan_srng_cfg wlan_srng_rxdma_monitor_buf_cfg = {
  3265. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  3266. .batch_count_threshold = 0,
  3267. .low_threshold = WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE >> 3,
  3268. };
  3269. /* RXDMA_MONITOR_STATUS ring configuration */
  3270. #ifdef DP_CON_MON_MSI_ENABLED
  3271. /*
  3272. * Configure batch count threshold as 1 to enable interrupt
  3273. * when HW updated TP (monitor status buffer DMA is done),
  3274. * then host could reap monitor status srng. timer threshold
  3275. * based interrupt is only used for low threshold interrupt which
  3276. * can not be used for monitor status buffer reaping directly
  3277. * unless configure low threshold value to a big value, perhaps
  3278. * (number of entries - 2).
  3279. */
  3280. struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = {
  3281. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  3282. .batch_count_threshold = 1,
  3283. .low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3,
  3284. };
  3285. #else
  3286. struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = {
  3287. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  3288. .batch_count_threshold = 0,
  3289. .low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3,
  3290. };
  3291. #endif
  3292. /* TX_MONITOR_BUF ring configuration */
  3293. struct wlan_srng_cfg wlan_srng_tx_monitor_buf_cfg = {
  3294. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_TX,
  3295. .batch_count_threshold = 0,
  3296. .low_threshold = WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MAX >> 3,
  3297. };
  3298. /* DEFAULT_CONFIG ring configuration */
  3299. struct wlan_srng_cfg wlan_srng_default_cfg = {
  3300. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_OTHER,
  3301. .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_OTHER,
  3302. .low_threshold = 0,
  3303. };
  3304. /* DEFAULT_CONFIG source ring configuration */
  3305. struct wlan_srng_cfg wlan_src_srng_default_cfg = {
  3306. .timer_threshold = 0,
  3307. .batch_count_threshold = 0,
  3308. .low_threshold = 0,
  3309. };
  3310. #ifdef WLAN_SOFTUMAC_SUPPORT
  3311. void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
  3312. {
  3313. g_wlan_srng_cfg[RXDMA_BUF] = wlan_srng_rxdma_buf_cfg;
  3314. g_wlan_srng_cfg[RXDMA_MONITOR_BUF] =
  3315. wlan_srng_rxdma_monitor_buf_cfg;
  3316. g_wlan_srng_cfg[RXDMA_MONITOR_STATUS] =
  3317. wlan_srng_rxdma_monitor_status_cfg;
  3318. g_wlan_srng_cfg[RXDMA_MONITOR_DST] = wlan_srng_default_cfg;
  3319. g_wlan_srng_cfg[RXDMA_MONITOR_DESC] = wlan_srng_default_cfg;
  3320. g_wlan_srng_cfg[DIR_BUF_RX_DMA_SRC] = wlan_srng_default_cfg;
  3321. #ifdef WLAN_FEATURE_CIF_CFR
  3322. g_wlan_srng_cfg[WIFI_POS_SRC] = wlan_srng_default_cfg;
  3323. #endif
  3324. g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg;
  3325. *wlan_cfg = g_wlan_srng_cfg;
  3326. }
  3327. #else
  3328. void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
  3329. {
  3330. g_wlan_srng_cfg[REO_DST] = wlan_srng_reo_cfg;
  3331. g_wlan_srng_cfg[WBM2SW_RELEASE] = wlan_srng_wbm_release_cfg;
  3332. g_wlan_srng_cfg[REO_EXCEPTION] = wlan_srng_default_cfg;
  3333. g_wlan_srng_cfg[REO_REINJECT] = wlan_src_srng_default_cfg;
  3334. g_wlan_srng_cfg[REO_CMD] = wlan_src_srng_default_cfg;
  3335. g_wlan_srng_cfg[REO_STATUS] = wlan_srng_default_cfg;
  3336. g_wlan_srng_cfg[TCL_DATA] = wlan_src_srng_default_cfg;
  3337. g_wlan_srng_cfg[TCL_CMD_CREDIT] = wlan_src_srng_default_cfg;
  3338. g_wlan_srng_cfg[TCL_STATUS] = wlan_srng_default_cfg;
  3339. g_wlan_srng_cfg[WBM_IDLE_LINK] = wlan_src_srng_default_cfg;
  3340. g_wlan_srng_cfg[SW2WBM_RELEASE] = wlan_src_srng_default_cfg;
  3341. g_wlan_srng_cfg[RXDMA_BUF] = wlan_srng_rxdma_buf_cfg;
  3342. g_wlan_srng_cfg[RXDMA_DST] = wlan_srng_default_cfg;
  3343. g_wlan_srng_cfg[RXDMA_MONITOR_BUF] =
  3344. wlan_srng_rxdma_monitor_buf_cfg;
  3345. g_wlan_srng_cfg[RXDMA_MONITOR_STATUS] =
  3346. wlan_srng_rxdma_monitor_status_cfg;
  3347. g_wlan_srng_cfg[RXDMA_MONITOR_DST] = wlan_srng_default_cfg;
  3348. g_wlan_srng_cfg[REO2PPE] = wlan_srng_default_cfg;
  3349. g_wlan_srng_cfg[PPE2TCL] = wlan_srng_default_cfg;
  3350. g_wlan_srng_cfg[RXDMA_MONITOR_DESC] = wlan_srng_default_cfg;
  3351. g_wlan_srng_cfg[DIR_BUF_RX_DMA_SRC] = wlan_srng_default_cfg;
  3352. #ifdef WLAN_FEATURE_CIF_CFR
  3353. g_wlan_srng_cfg[WIFI_POS_SRC] = wlan_srng_default_cfg;
  3354. #endif
  3355. g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg;
  3356. *wlan_cfg = g_wlan_srng_cfg;
  3357. }
  3358. #endif
  3359. static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = {
  3360. 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,
  3361. 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0,
  3362. 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4,
  3363. 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c,
  3364. 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa
  3365. };
  3366. #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
  3367. #ifdef WLAN_SOFTUMAC_SUPPORT
  3368. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3369. int num_dp_msi,
  3370. int interrupt_mode,
  3371. bool is_monitor_mode,
  3372. bool ppeds_attached,
  3373. bool umac_reset_support)
  3374. { int i = 0;
  3375. for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
  3376. wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
  3377. rx_mon_ring_mask_msi[i];
  3378. wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0;
  3379. if (is_monitor_mode) {
  3380. wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
  3381. if (interrupt_mode == DP_INTR_POLL)
  3382. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
  3383. else
  3384. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3385. rxdma2host_ring_mask_msi[i];
  3386. } else {
  3387. wlan_cfg_ctx->int_rx_ring_mask[i] =
  3388. rx_ring_mask_msi[i];
  3389. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3390. rxdma2host_ring_mask_msi[i];
  3391. }
  3392. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  3393. host2rxdma_mon_ring_mask_msi[i];
  3394. wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
  3395. rxdma2host_mon_ring_mask_msi[i];
  3396. }
  3397. }
  3398. #else
  3399. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3400. int num_dp_msi,
  3401. int interrupt_mode,
  3402. bool is_monitor_mode,
  3403. bool ppeds_attached,
  3404. bool umac_reset_support)
  3405. { int i = 0;
  3406. const uint8_t *tx_ring_intr_mask =
  3407. wlan_cfg_get_tx_ring_int_mask(wlan_cfg_ctx);
  3408. for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
  3409. wlan_cfg_ctx->int_tx_ring_mask[i] = tx_ring_intr_mask[i];
  3410. if (wlan_cfg_ctx->int_tx_ring_mask[i])
  3411. wlan_cfg_ctx->tx_rings_grp_bitmap |= BIT(i);
  3412. wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
  3413. rx_mon_ring_mask_msi[i];
  3414. wlan_cfg_ctx->int_tx_mon_ring_mask[i] = tx_mon_ring_mask_msi[i];
  3415. wlan_cfg_ctx->int_rx_err_ring_mask[i] =
  3416. rx_err_ring_mask_msi[i];
  3417. wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] =
  3418. rx_wbm_rel_ring_mask_msi[i];
  3419. wlan_cfg_ctx->int_reo_status_ring_mask[i] =
  3420. reo_status_ring_mask_msi[i];
  3421. if (is_monitor_mode) {
  3422. wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
  3423. if (interrupt_mode == DP_INTR_POLL)
  3424. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
  3425. else
  3426. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3427. rxdma2host_ring_mask_msi[i];
  3428. } else {
  3429. wlan_cfg_ctx->int_rx_ring_mask[i] =
  3430. rx_ring_mask_msi[i];
  3431. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3432. rxdma2host_ring_mask_msi[i];
  3433. }
  3434. wlan_cfg_ctx->int_host2rxdma_ring_mask[i] =
  3435. host2rxdma_ring_mask_msi[i];
  3436. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  3437. host2rxdma_mon_ring_mask_msi[i];
  3438. wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
  3439. rxdma2host_mon_ring_mask_msi[i];
  3440. wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] =
  3441. rx_ring_near_full_irq_1_mask_msi[i];
  3442. wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] =
  3443. rx_ring_near_full_irq_2_mask_msi[i];
  3444. wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] =
  3445. tx_ring_near_full_irq_mask_msi[i];
  3446. }
  3447. }
  3448. #endif
  3449. #else
  3450. static void
  3451. wlan_cfg_mask_assignment(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3452. struct dp_int_mask_assignment *mask_assignment,
  3453. int interrupt_index, int i, bool is_monitor_mode)
  3454. {
  3455. int int_host2rxdma_mon_ring_mask;
  3456. bool host2rxmon_mask_set = false;
  3457. bool txmon_hw_support = false;
  3458. wlan_cfg_ctx->int_tx_ring_mask[i] =
  3459. mask_assignment->tx_ring_mask[i];
  3460. wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
  3461. mask_assignment->rx_mon_ring_mask[i];
  3462. wlan_cfg_ctx->int_rx_err_ring_mask[i] =
  3463. mask_assignment->rx_err_ring_mask[i];
  3464. wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] =
  3465. mask_assignment->rx_wbm_rel_ring_mask[i];
  3466. wlan_cfg_ctx->int_reo_status_ring_mask[i] =
  3467. mask_assignment->reo_status_ring_mask[i];
  3468. wlan_cfg_ctx->int_ppeds_wbm_release_ring_mask[i] =
  3469. mask_assignment->ppeds_wbm_release_ring_mask[i];
  3470. wlan_cfg_ctx->int_ppe2tcl_ring_mask[i] =
  3471. mask_assignment->ppe2tcl_ring_mask[i];
  3472. wlan_cfg_ctx->int_reo2ppe_ring_mask[i] =
  3473. mask_assignment->reo2ppe_ring_mask[i];
  3474. if (is_monitor_mode) {
  3475. wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
  3476. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
  3477. } else {
  3478. wlan_cfg_ctx->int_rx_ring_mask[i] =
  3479. mask_assignment->rx_ring_mask[i];
  3480. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3481. mask_assignment->rxdma2host_ring_mask[i];
  3482. }
  3483. wlan_cfg_ctx->int_host2rxdma_ring_mask[i] =
  3484. mask_assignment->host2rxdma_ring_mask[i];
  3485. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  3486. mask_assignment->host2rxdma_mon_ring_mask[i];
  3487. wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
  3488. mask_assignment->rxdma2host_mon_ring_mask[i];
  3489. wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] =
  3490. mask_assignment->rx_ring_near_full_irq_1_mask[i];
  3491. wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] =
  3492. mask_assignment->rx_ring_near_full_irq_2_mask[i];
  3493. wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] =
  3494. mask_assignment->tx_ring_near_full_irq_mask[i];
  3495. txmon_hw_support = wlan_cfg_get_txmon_hw_support(wlan_cfg_ctx);
  3496. if (txmon_hw_support) {
  3497. wlan_cfg_ctx->int_tx_mon_ring_mask[i] =
  3498. mask_assignment->tx_mon_ring_mask[i];
  3499. wlan_cfg_ctx->int_host2txmon_ring_mask[i] =
  3500. mask_assignment->host2txmon_ring_mask[i];
  3501. int_host2rxdma_mon_ring_mask =
  3502. mask_assignment->host2rxdma_mon_ring_mask[i];
  3503. if (int_host2rxdma_mon_ring_mask && !host2rxmon_mask_set) {
  3504. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[interrupt_index] =
  3505. mask_assignment->host2rxdma_mon_ring_mask[i];
  3506. host2rxmon_mask_set = true;
  3507. }
  3508. } else {
  3509. wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0;
  3510. wlan_cfg_ctx->int_host2txmon_ring_mask[i] = 0;
  3511. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  3512. mask_assignment->host2rxdma_mon_ring_mask[i];
  3513. }
  3514. wlan_cfg_ctx->int_umac_reset_intr_mask[i] =
  3515. mask_assignment->umac_reset_intr_mask[i];
  3516. }
  3517. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3518. int num_dp_msi,
  3519. int interrupt_mode,
  3520. bool is_monitor_mode,
  3521. bool ppeds_attached,
  3522. bool umac_reset_support)
  3523. {
  3524. int i = 0;
  3525. int interrupt_index = 0;
  3526. struct dp_int_mask_assignment *mask_assignment;
  3527. if(interrupt_mode == DP_INTR_INTEGRATED) {
  3528. interrupt_index = 0;
  3529. } else if (interrupt_mode == DP_INTR_MSI || interrupt_mode ==
  3530. DP_INTR_POLL) {
  3531. interrupt_index = num_dp_msi;
  3532. } else {
  3533. qdf_err("Interrupt mode %d", interrupt_mode);
  3534. }
  3535. for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
  3536. if (!ppeds_attached) {
  3537. if (interrupt_index == 8 && umac_reset_support)
  3538. mask_assignment = &dp_ur_mask_assignment_8msi;
  3539. else
  3540. mask_assignment =
  3541. &dp_mask_assignment[interrupt_index];
  3542. } else if (interrupt_index == 8) {
  3543. mask_assignment = &dp_ds_mask_assignment_8msi;
  3544. } else if (interrupt_index == 9) {
  3545. mask_assignment = &dp_ds_mask_assignment_9msi;
  3546. } else {
  3547. mask_assignment = &dp_mask_assignment[interrupt_index];
  3548. }
  3549. wlan_cfg_mask_assignment(wlan_cfg_ctx, mask_assignment,
  3550. interrupt_index, i, is_monitor_mode);
  3551. }
  3552. }
  3553. #endif
  3554. #ifdef IPA_OFFLOAD
  3555. #define WLAN_CFG_IPA_ENABLE_MASK BIT(0)
  3556. #ifdef IPA_WDI3_TX_TWO_PIPES
  3557. /**
  3558. * wlan_soc_ipa_cfg_attach() - Update ipa tx and tx alt config
  3559. * in dp soc cfg context
  3560. * @psoc: Object manager psoc
  3561. * @wlan_cfg_ctx: dp soc cfg ctx
  3562. *
  3563. * Return: None
  3564. */
  3565. static void
  3566. wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3567. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3568. {
  3569. if (ucfg_ipa_get_pld_enable()) {
  3570. wlan_cfg_ctx->ipa_enabled =
  3571. (get_ipa_config((struct wlan_objmgr_psoc *)psoc) &
  3572. WLAN_CFG_IPA_ENABLE_MASK);
  3573. dp_info("is IPA enabled from ini: %d",
  3574. wlan_cfg_ctx->ipa_enabled);
  3575. } else {
  3576. wlan_cfg_ctx->ipa_enabled = false;
  3577. dp_info("IPA disabled from platform driver");
  3578. }
  3579. wlan_cfg_ctx->ipa_tx_ring_size =
  3580. cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE);
  3581. wlan_cfg_ctx->ipa_tx_comp_ring_size =
  3582. cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE);
  3583. wlan_cfg_ctx->ipa_tx_alt_ring_size =
  3584. cfg_get(psoc, CFG_DP_IPA_TX_ALT_RING_SIZE);
  3585. wlan_cfg_ctx->ipa_tx_alt_comp_ring_size =
  3586. cfg_get(psoc, CFG_DP_IPA_TX_ALT_COMP_RING_SIZE);
  3587. }
  3588. #else /* !IPA_WDI3_TX_TWO_PIPES */
  3589. /**
  3590. * wlan_soc_ipa_cfg_attach() - Update ipa config in dp soc
  3591. * cfg context
  3592. * @psoc: Object manager psoc
  3593. * @wlan_cfg_ctx: dp soc cfg ctx
  3594. *
  3595. * Return: None
  3596. */
  3597. static void
  3598. wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3599. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3600. {
  3601. if (ucfg_ipa_get_pld_enable()) {
  3602. wlan_cfg_ctx->ipa_enabled =
  3603. (get_ipa_config((struct wlan_objmgr_psoc *)psoc) &
  3604. WLAN_CFG_IPA_ENABLE_MASK);
  3605. dp_info("is IPA enabled from ini: %d",
  3606. wlan_cfg_ctx->ipa_enabled);
  3607. } else {
  3608. wlan_cfg_ctx->ipa_enabled = false;
  3609. dp_info("IPA disabled from platform driver");
  3610. }
  3611. wlan_cfg_ctx->ipa_tx_ring_size =
  3612. cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE);
  3613. wlan_cfg_ctx->ipa_tx_comp_ring_size =
  3614. cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE);
  3615. }
  3616. #endif /* IPA_WDI3_TX_TWO_PIPES */
  3617. #else /* !IPA_OFFLOAD */
  3618. static inline void
  3619. wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3620. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3621. {
  3622. }
  3623. #endif
  3624. #ifdef DP_HW_COOKIE_CONVERT_EXCEPTION
  3625. static void
  3626. wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3627. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3628. {
  3629. wlan_cfg_ctx->hw_cc_enabled =
  3630. cfg_get(psoc, CFG_DP_HW_CC_ENABLE);
  3631. }
  3632. #else
  3633. static void
  3634. wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3635. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3636. {
  3637. wlan_cfg_ctx->hw_cc_enabled = true;
  3638. }
  3639. #endif
  3640. #ifdef WLAN_SUPPORT_PPEDS
  3641. /**
  3642. * wlan_soc_ppe_cfg_attach() - Update ppe config in dp soc
  3643. * cfg context
  3644. * @psoc: Object manager psoc
  3645. * @wlan_cfg_ctx: dp soc cfg ctx
  3646. *
  3647. * Return: None
  3648. */
  3649. static void
  3650. wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3651. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3652. {
  3653. uint32_t ppeds_cfg;
  3654. uint8_t psoc_id;
  3655. /*
  3656. * The CFG_DP_PPEDS_WIFI_SOC_CFG provides WLAN SoC level PPEDS
  3657. * enable/disable support. The bit map position corresponds to
  3658. * WLAN SoC position in config/wireless file. With this we can
  3659. * configure PPEDS for multiple WLAN SoC having same device ID.
  3660. */
  3661. psoc_id = wlan_psoc_get_id((struct wlan_objmgr_psoc *)psoc);
  3662. ppeds_cfg = cfg_get(psoc, CFG_DP_PPEDS_WIFI_SOC_CFG);
  3663. if (!(ppeds_cfg & (1 << psoc_id))) {
  3664. dp_info("ppeds_cfg is disabled for psoc_id %d", psoc_id);
  3665. return;
  3666. }
  3667. /*
  3668. * The CFG_DP_PPEDS_ENABLE provides ppeds enable/disable support
  3669. * based on device ID in corresponding INI file.
  3670. */
  3671. wlan_cfg_ctx->ppeds_enable = cfg_get(psoc, CFG_DP_PPEDS_ENABLE);
  3672. if (!wlan_cfg_ctx->ppeds_enable)
  3673. return;
  3674. wlan_cfg_ctx->reo2ppe_ring = cfg_get(psoc, CFG_DP_REO2PPE_RING);
  3675. wlan_cfg_ctx->ppe2tcl_ring = cfg_get(psoc, CFG_DP_PPE2TCL_RING);
  3676. wlan_cfg_ctx->ppeds_num_tx_desc = cfg_get(psoc, CFG_DP_PPEDS_TX_DESC);
  3677. wlan_cfg_ctx->ppeds_tx_desc_hotlist_len =
  3678. cfg_get(psoc, CFG_DP_PPEDS_TX_DESC_HOTLIST_LEN);
  3679. wlan_cfg_ctx->ppeds_tx_comp_napi_budget =
  3680. cfg_get(psoc, CFG_DP_PPEDS_TX_CMP_NAPI_BUDGET);
  3681. }
  3682. #else
  3683. static inline void
  3684. wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3685. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3686. {
  3687. }
  3688. #endif
  3689. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  3690. /**
  3691. * wlan_cfg_get_lsb_set_pos() - returns position of LSB which is set
  3692. * @val: value to test
  3693. *
  3694. * Return: position of LSB which is set
  3695. */
  3696. static uint8_t wlan_cfg_get_lsb_set_pos(uint8_t val)
  3697. {
  3698. uint8_t pos = 0;
  3699. while (pos < 8) {
  3700. if (val & (1 << pos))
  3701. return pos;
  3702. pos++;
  3703. }
  3704. return 0;
  3705. }
  3706. /**
  3707. * wlan_multi_soc_mlo_cfg_attach() - Update multi soc mlo config in dp soc
  3708. * cfg context
  3709. * @psoc: Object manager psoc
  3710. * @wlan_cfg_ctx: dp soc cfg ctx
  3711. *
  3712. * Return: None
  3713. */
  3714. static void
  3715. wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3716. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3717. {
  3718. uint8_t rx_ring_map;
  3719. rx_ring_map =
  3720. cfg_get(psoc, CFG_DP_MLO_RX_RING_MAP);
  3721. wlan_cfg_ctx->mlo_chip_rx_ring_map = rx_ring_map;
  3722. }
  3723. #else
  3724. static inline void
  3725. wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3726. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3727. {
  3728. }
  3729. #endif
  3730. #ifdef WLAN_FEATURE_11BE_MLO
  3731. /**
  3732. * wlan_soc_mlo_cfg_attach() - Update mlo config in dp soc
  3733. * cfg context
  3734. * @psoc: Object manager psoc
  3735. * @wlan_cfg_ctx: dp soc cfg ctx
  3736. *
  3737. * Return: None
  3738. */
  3739. static void
  3740. wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3741. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3742. {
  3743. wlan_multi_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  3744. }
  3745. #else
  3746. static inline void
  3747. wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3748. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3749. {
  3750. }
  3751. #endif
  3752. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  3753. /**
  3754. * wlan_soc_vdev_hw_stats_cfg_attach() - Update hw vdev stats config in dp soc
  3755. * cfg context
  3756. * @psoc: Object manager psoc
  3757. * @wlan_cfg_ctx: dp soc cfg ctx
  3758. *
  3759. * Return: None
  3760. */
  3761. static void
  3762. wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3763. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3764. {
  3765. wlan_cfg_ctx->vdev_stats_hw_offload_config = cfg_get(psoc,
  3766. CFG_DP_VDEV_STATS_HW_OFFLOAD_CONFIG);
  3767. wlan_cfg_ctx->vdev_stats_hw_offload_timer = cfg_get(psoc,
  3768. CFG_DP_VDEV_STATS_HW_OFFLOAD_TIMER);
  3769. }
  3770. #else
  3771. static void
  3772. wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3773. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3774. {
  3775. }
  3776. #endif
  3777. #ifdef WLAN_TX_PKT_CAPTURE_ENH
  3778. static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3779. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3780. {
  3781. int i = 0;
  3782. uint8_t rbm_id = 0;
  3783. wlan_cfg_ctx->tx_capt_max_mem_allowed =
  3784. cfg_get(psoc, CFG_DP_TX_CAPT_MAX_MEM_MB) * 1024 * 1024;
  3785. for (i = 0; i < MAX_PDEV_CNT; i++) {
  3786. switch (i) {
  3787. case 0:
  3788. rbm_id = cfg_get(psoc, CFG_DP_TX_CAPT_RADIO_0_RBM_ID);
  3789. break;
  3790. case 1:
  3791. rbm_id = cfg_get(psoc, CFG_DP_TX_CAPT_RADIO_1_RBM_ID);
  3792. break;
  3793. case 2:
  3794. rbm_id = cfg_get(psoc, CFG_DP_TX_CAPT_RADIO_2_RBM_ID);
  3795. break;
  3796. default:
  3797. rbm_id = cfg_get(psoc, CFG_DP_TX_CAPT_RADIO_3_RBM_ID);
  3798. break;
  3799. }
  3800. wlan_cfg_ctx->tx_capt_rbm_id[i] = rbm_id;
  3801. }
  3802. }
  3803. #else
  3804. static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3805. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3806. {
  3807. }
  3808. #endif
  3809. #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
  3810. static void
  3811. wlan_soc_local_pkt_capture_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3812. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3813. {
  3814. wlan_cfg_ctx->local_pkt_capture =
  3815. cfg_get(psoc, CFG_DP_LOCAL_PKT_CAPTURE);
  3816. }
  3817. #else
  3818. static void
  3819. wlan_soc_local_pkt_capture_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3820. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3821. {
  3822. }
  3823. #endif
  3824. void
  3825. wlan_cfg_soc_update_tgt_params(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3826. struct cdp_ctrl_objmgr_psoc *psoc)
  3827. {
  3828. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc,
  3829. CFG_DP_REO_RINGS_MAP);
  3830. }
  3831. #ifdef CONFIG_SAWF_STATS
  3832. /**
  3833. * wlan_soc_sawf_stats_cfg_attach() - Update sawf stats config in dp soc
  3834. * cfg context
  3835. * @psoc: Object manager psoc
  3836. * @wlan_cfg_ctx: dp soc cfg ctx
  3837. *
  3838. * Return: None
  3839. */
  3840. static void
  3841. wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3842. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3843. {
  3844. wlan_cfg_ctx->sawf_stats = cfg_get(psoc, CFG_DP_SAWF_STATS);
  3845. }
  3846. uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3847. {
  3848. return cfg->sawf_stats;
  3849. }
  3850. qdf_export_symbol(wlan_cfg_get_sawf_stats_config);
  3851. void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3852. uint8_t val)
  3853. {
  3854. cfg->sawf_stats = val;
  3855. }
  3856. #else
  3857. static void
  3858. wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3859. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3860. {
  3861. }
  3862. uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3863. {
  3864. return 0;
  3865. }
  3866. qdf_export_symbol(wlan_cfg_get_sawf_stats_config);
  3867. void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3868. uint8_t val)
  3869. {
  3870. }
  3871. #endif /* CONFIG_SAWF_STATS */
  3872. #ifdef DP_TX_PACKET_INSPECT_FOR_ILP
  3873. /**
  3874. * wlan_soc_tx_packet_inspect_attach() - Update TX packet inspection config
  3875. * @psoc: object manager psoc
  3876. * @wlan_cfg_ctx: dp soc cfg ctx
  3877. *
  3878. * Return: None
  3879. */
  3880. static void
  3881. wlan_soc_tx_packet_inspect_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3882. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3883. {
  3884. wlan_cfg_ctx->tx_pkt_inspect_for_ilp =
  3885. cfg_get(psoc, CFG_TX_PKT_INSPECT_FOR_ILP);
  3886. }
  3887. #else
  3888. static void
  3889. wlan_soc_tx_packet_inspect_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3890. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3891. {
  3892. }
  3893. #endif
  3894. #ifdef DP_UMAC_HW_RESET_SUPPORT
  3895. /**
  3896. * wlan_soc_umac_reset_cfg_attach() - Update umac reset buffer window config
  3897. * @psoc: object manager psoc
  3898. * @wlan_cfg_ctx: dp soc cfg ctx
  3899. *
  3900. * Return: None
  3901. */
  3902. static void
  3903. wlan_soc_umac_reset_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3904. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3905. {
  3906. wlan_cfg_ctx->umac_reset_buffer_window =
  3907. cfg_get(psoc, CFG_DP_UMAC_RESET_BUFFER_WINDOW);
  3908. }
  3909. #else
  3910. static void
  3911. wlan_soc_umac_reset_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3912. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3913. {
  3914. }
  3915. #endif /* DP_UMAC_HW_RESET_SUPPORT */
  3916. #ifdef WLAN_SOFTUMAC_SUPPORT
  3917. struct wlan_cfg_dp_soc_ctxt *
  3918. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  3919. {
  3920. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
  3921. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
  3922. uint32_t gro_bit_set;
  3923. if (!wlan_cfg_ctx)
  3924. return NULL;
  3925. wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
  3926. wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS;
  3927. wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
  3928. wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
  3929. wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
  3930. wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
  3931. wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
  3932. CFG_DP_TX_EXT_DESC_POOLS);
  3933. wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
  3934. wlan_cfg_ctx->num_tx_spl_desc = cfg_get(psoc, CFG_DP_TX_SPL_DESC);
  3935. wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
  3936. wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
  3937. wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
  3938. wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
  3939. wlan_cfg_ctx->int_batch_threshold_tx =
  3940. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
  3941. wlan_cfg_ctx->int_timer_threshold_tx =
  3942. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX);
  3943. wlan_cfg_ctx->int_batch_threshold_rx =
  3944. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX);
  3945. wlan_cfg_ctx->int_timer_threshold_rx =
  3946. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX);
  3947. wlan_cfg_ctx->int_batch_threshold_other =
  3948. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
  3949. wlan_cfg_ctx->int_timer_threshold_other =
  3950. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
  3951. wlan_cfg_ctx->int_batch_threshold_mon_dest =
  3952. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_MON_DEST);
  3953. wlan_cfg_ctx->int_timer_threshold_mon_dest =
  3954. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_MON_DEST);
  3955. wlan_cfg_ctx->pktlog_buffer_size =
  3956. cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
  3957. /*
  3958. * This is default mapping and can be overridden by
  3959. * HW config received from FW.
  3960. */
  3961. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0);
  3962. if (MAX_PDEV_CNT > 1)
  3963. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2);
  3964. if (MAX_PDEV_CNT > 2)
  3965. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1);
  3966. wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
  3967. wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
  3968. wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
  3969. wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
  3970. wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
  3971. gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
  3972. if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
  3973. wlan_cfg_ctx->gro_enabled = true;
  3974. if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO)
  3975. wlan_cfg_ctx->tc_based_dynamic_gro = true;
  3976. }
  3977. wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO);
  3978. wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
  3979. wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
  3980. wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
  3981. wlan_cfg_ctx->peer_flow_ctrl_enabled =
  3982. cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
  3983. wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
  3984. wlan_cfg_ctx->p2p_tcp_udp_checksumoffload =
  3985. cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD);
  3986. wlan_cfg_ctx->nan_tcp_udp_checksumoffload =
  3987. cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD);
  3988. wlan_cfg_ctx->tcp_udp_checksumoffload =
  3989. cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
  3990. wlan_cfg_ctx->legacy_mode_checksumoffload_disable =
  3991. cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE);
  3992. wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING);
  3993. wlan_cfg_ctx->defrag_timeout_check =
  3994. cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK);
  3995. wlan_cfg_ctx->rx_defrag_min_timeout =
  3996. cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT);
  3997. wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc,
  3998. CFG_DP_RXDMA_REFILL_RING);
  3999. wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc,
  4000. CFG_DP_TX_DESC_LIMIT_0);
  4001. wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc,
  4002. CFG_DP_TX_DESC_LIMIT_1);
  4003. wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc,
  4004. CFG_DP_TX_DESC_LIMIT_2);
  4005. wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
  4006. CFG_DP_TX_DEVICE_LIMIT);
  4007. wlan_cfg_ctx->tx_spl_device_limit = cfg_get(psoc,
  4008. CFG_DP_TX_SPL_DEVICE_LIMIT);
  4009. wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
  4010. CFG_DP_TX_SW_INTERNODE_QUEUE);
  4011. wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
  4012. CFG_DP_RXDMA_ERR_DST_RING);
  4013. wlan_cfg_ctx->enable_data_stall_detection =
  4014. cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
  4015. wlan_cfg_ctx->tx_flow_start_queue_offset =
  4016. cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET);
  4017. wlan_cfg_ctx->tx_flow_stop_queue_threshold =
  4018. cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH);
  4019. wlan_cfg_ctx->disable_intra_bss_fwd =
  4020. cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
  4021. wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
  4022. CFG_DP_RX_SW_DESC_WEIGHT);
  4023. wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
  4024. CFG_DP_RX_SW_DESC_NUM);
  4025. wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
  4026. wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
  4027. wlan_cfg_ctx->is_rx_flow_tag_enabled =
  4028. cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE);
  4029. wlan_cfg_ctx->is_rx_flow_search_table_per_pdev =
  4030. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV);
  4031. wlan_cfg_ctx->rx_flow_search_table_size =
  4032. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE);
  4033. wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled =
  4034. cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE);
  4035. wlan_cfg_ctx->mon_drop_thresh =
  4036. cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD);
  4037. /* TODO: add INI item for RX RINGS MAPPING in RHINE */
  4038. wlan_cfg_ctx->rx_rings_mapping = 0x7;
  4039. wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
  4040. wlan_cfg_ctx->is_rx_buff_pool_enabled =
  4041. cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
  4042. wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
  4043. cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
  4044. wlan_cfg_ctx->enable_dp_buf_page_frag_alloc =
  4045. cfg_get(psoc, CFG_DP_BUFS_PAGE_FRAG_ALLOCS);
  4046. wlan_cfg_ctx->rx_pending_high_threshold =
  4047. cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
  4048. wlan_cfg_ctx->rx_pending_low_threshold =
  4049. cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
  4050. wlan_cfg_ctx->is_poll_mode_enabled =
  4051. cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
  4052. wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
  4053. wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
  4054. wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
  4055. cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
  4056. wlan_cfg_ctx->wow_check_rx_pending_enable =
  4057. cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
  4058. wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
  4059. CFG_DP_DELAY_MON_REPLENISH);
  4060. wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
  4061. CFG_DP_RXDMA_MONITOR_BUF_RING);
  4062. wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
  4063. CFG_DP_TX_MONITOR_BUF_RING);
  4064. wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
  4065. wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
  4066. wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
  4067. wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  4068. wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4069. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  4070. wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
  4071. PKT_CAPTURE_MODE_DATA_ONLY;
  4072. #endif
  4073. #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
  4074. wlan_cfg_ctx->rx_refill_buff_pool_size = DP_RX_REFILL_BUFF_POOL_SIZE;
  4075. #endif
  4076. wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
  4077. wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
  4078. NUM_RXDMA_STATUS_RINGS_PER_PDEV;
  4079. wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
  4080. wlan_cfg_ctx->mpdu_retry_threshold_1 =
  4081. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
  4082. wlan_cfg_ctx->mpdu_retry_threshold_2 =
  4083. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
  4084. wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
  4085. CFG_DP_NAPI_SCALE_FACTOR);
  4086. wlan_soc_sawf_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4087. wlan_cfg_ctx->txmon_sw_peer_filtering =
  4088. cfg_get(psoc, CFG_DP_TXMON_SW_PEER_FILTERING);
  4089. wlan_soc_tx_packet_inspect_attach(psoc, wlan_cfg_ctx);
  4090. wlan_soc_local_pkt_capture_cfg_attach(psoc, wlan_cfg_ctx);
  4091. wlan_soc_umac_reset_cfg_attach(psoc, wlan_cfg_ctx);
  4092. wlan_cfg_ctx->rx_buffer_size = cfg_get(psoc, CFG_DP_RX_BUFFER_SIZE);
  4093. wlan_cfg_ctx->avg_rate_stats_filter_val =
  4094. cfg_get(psoc, CFG_DP_STATS_AVG_RATE_FILTER);
  4095. return wlan_cfg_ctx;
  4096. }
  4097. #else
  4098. struct wlan_cfg_dp_soc_ctxt *
  4099. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  4100. {
  4101. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
  4102. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
  4103. uint32_t gro_bit_set;
  4104. if (!wlan_cfg_ctx)
  4105. return NULL;
  4106. wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
  4107. wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS;
  4108. wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
  4109. wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
  4110. wlan_cfg_ctx->per_pdev_tx_ring = cfg_get(psoc, CFG_DP_PDEV_TX_RING);
  4111. wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS);
  4112. wlan_cfg_ctx->num_tcl_data_rings = cfg_get(psoc, CFG_DP_TCL_DATA_RINGS);
  4113. wlan_cfg_ctx->num_tx_comp_rings = cfg_get(psoc, CFG_DP_TX_COMP_RINGS);
  4114. wlan_cfg_ctx->num_nss_reo_dest_rings =
  4115. cfg_get(psoc, CFG_DP_NSS_REO_DEST_RINGS);
  4116. wlan_cfg_ctx->num_nss_tcl_data_rings =
  4117. cfg_get(psoc, CFG_DP_NSS_TCL_DATA_RINGS);
  4118. wlan_cfg_ctx->per_pdev_rx_ring = cfg_get(psoc, CFG_DP_PDEV_RX_RING);
  4119. wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
  4120. wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
  4121. wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
  4122. CFG_DP_TX_EXT_DESC_POOLS);
  4123. wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
  4124. wlan_cfg_ctx->num_tx_spl_desc = cfg_get(psoc, CFG_DP_TX_SPL_DESC);
  4125. wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
  4126. wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
  4127. wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
  4128. wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
  4129. wlan_cfg_ctx->tx_ring_size = cfg_get(psoc, CFG_DP_TX_RING_SIZE);
  4130. wlan_cfg_ctx->time_control_bp = cfg_get(psoc, CFG_DP_TIME_CONTROL_BP);
  4131. wlan_cfg_ctx->qref_control_size =
  4132. cfg_get(psoc, CFG_DP_QREF_CONTROL_SIZE);
  4133. wlan_cfg_ctx->tx_comp_ring_size = cfg_get(psoc,
  4134. CFG_DP_TX_COMPL_RING_SIZE);
  4135. wlan_cfg_ctx->tx_comp_ring_size_nss =
  4136. cfg_get(psoc, CFG_DP_NSS_COMP_RING_SIZE);
  4137. wlan_cfg_ctx->int_batch_threshold_tx =
  4138. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
  4139. wlan_cfg_ctx->int_timer_threshold_tx =
  4140. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX);
  4141. wlan_cfg_ctx->int_batch_threshold_rx =
  4142. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX);
  4143. wlan_cfg_ctx->int_timer_threshold_rx =
  4144. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX);
  4145. wlan_cfg_ctx->int_batch_threshold_other =
  4146. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
  4147. wlan_cfg_ctx->int_timer_threshold_other =
  4148. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
  4149. wlan_cfg_ctx->int_batch_threshold_mon_dest =
  4150. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_MON_DEST);
  4151. wlan_cfg_ctx->int_timer_threshold_mon_dest =
  4152. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_MON_DEST);
  4153. wlan_cfg_ctx->int_batch_threshold_ppe2tcl =
  4154. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_PPE2TCL);
  4155. wlan_cfg_ctx->int_timer_threshold_ppe2tcl =
  4156. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_PPE2TCL);
  4157. wlan_cfg_ctx->pktlog_buffer_size =
  4158. cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
  4159. /* This is default mapping and can be overridden by HW config
  4160. * received from FW */
  4161. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0);
  4162. if (MAX_PDEV_CNT > 1)
  4163. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2);
  4164. if (MAX_PDEV_CNT > 2)
  4165. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1);
  4166. wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
  4167. wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
  4168. wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
  4169. wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
  4170. wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
  4171. gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
  4172. if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
  4173. wlan_cfg_ctx->gro_enabled = true;
  4174. if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO)
  4175. wlan_cfg_ctx->tc_based_dynamic_gro = true;
  4176. }
  4177. wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO);
  4178. wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
  4179. wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
  4180. wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
  4181. wlan_cfg_ctx->peer_flow_ctrl_enabled =
  4182. cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
  4183. wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
  4184. wlan_cfg_ctx->p2p_tcp_udp_checksumoffload =
  4185. cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD);
  4186. wlan_cfg_ctx->nan_tcp_udp_checksumoffload =
  4187. cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD);
  4188. wlan_cfg_ctx->tcp_udp_checksumoffload =
  4189. cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
  4190. wlan_cfg_ctx->legacy_mode_checksumoffload_disable =
  4191. cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE);
  4192. wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING);
  4193. wlan_cfg_ctx->defrag_timeout_check =
  4194. cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK);
  4195. wlan_cfg_ctx->rx_defrag_min_timeout =
  4196. cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT);
  4197. wlan_cfg_ctx->wbm_release_ring = cfg_get(psoc,
  4198. CFG_DP_WBM_RELEASE_RING);
  4199. wlan_cfg_ctx->tcl_cmd_credit_ring = cfg_get(psoc,
  4200. CFG_DP_TCL_CMD_CREDIT_RING);
  4201. wlan_cfg_ctx->tcl_status_ring = cfg_get(psoc,
  4202. CFG_DP_TCL_STATUS_RING);
  4203. wlan_cfg_ctx->reo_dst_ring_size = cfg_get(psoc,
  4204. CFG_DP_RX_DESTINATION_RING);
  4205. wlan_cfg_ctx->reo_reinject_ring = cfg_get(psoc,
  4206. CFG_DP_REO_REINJECT_RING);
  4207. wlan_cfg_ctx->rx_release_ring = cfg_get(psoc,
  4208. CFG_DP_RX_RELEASE_RING);
  4209. wlan_cfg_ctx->reo_exception_ring = cfg_get(psoc,
  4210. CFG_DP_REO_EXCEPTION_RING);
  4211. wlan_cfg_ctx->reo_cmd_ring = cfg_get(psoc,
  4212. CFG_DP_REO_CMD_RING);
  4213. wlan_cfg_ctx->reo_status_ring = cfg_get(psoc,
  4214. CFG_DP_REO_STATUS_RING);
  4215. wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc,
  4216. CFG_DP_RXDMA_REFILL_RING);
  4217. wlan_cfg_ctx->rxdma_refill_lt_disable =
  4218. cfg_get(psoc,
  4219. CFG_DP_RXDMA_REFILL_LT_DISABLE);
  4220. wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc,
  4221. CFG_DP_TX_DESC_LIMIT_0);
  4222. wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc,
  4223. CFG_DP_TX_DESC_LIMIT_1);
  4224. wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc,
  4225. CFG_DP_TX_DESC_LIMIT_2);
  4226. wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
  4227. CFG_DP_TX_DEVICE_LIMIT);
  4228. wlan_cfg_ctx->tx_spl_device_limit = cfg_get(psoc,
  4229. CFG_DP_TX_SPL_DEVICE_LIMIT);
  4230. wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
  4231. CFG_DP_TX_SW_INTERNODE_QUEUE);
  4232. wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
  4233. CFG_DP_RXDMA_ERR_DST_RING);
  4234. wlan_cfg_ctx->enable_data_stall_detection =
  4235. cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
  4236. wlan_cfg_ctx->tx_flow_start_queue_offset =
  4237. cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET);
  4238. wlan_cfg_ctx->tx_flow_stop_queue_threshold =
  4239. cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH);
  4240. wlan_cfg_ctx->disable_intra_bss_fwd =
  4241. cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
  4242. wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
  4243. CFG_DP_RX_SW_DESC_WEIGHT);
  4244. wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
  4245. CFG_DP_RX_SW_DESC_NUM);
  4246. wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
  4247. wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
  4248. wlan_cfg_ctx->is_rx_flow_tag_enabled =
  4249. cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE);
  4250. wlan_cfg_ctx->is_rx_flow_search_table_per_pdev =
  4251. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV);
  4252. wlan_cfg_ctx->rx_flow_search_table_size =
  4253. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE);
  4254. wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled =
  4255. cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE);
  4256. wlan_cfg_ctx->mon_drop_thresh =
  4257. cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD);
  4258. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc, CFG_DP_REO_RINGS_MAP);
  4259. wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
  4260. wlan_cfg_ctx->jitter_stats_enabled =
  4261. cfg_get(psoc, CFG_DP_PEER_JITTER_STATS);
  4262. wlan_cfg_ctx->peer_link_stats_enabled =
  4263. cfg_get(psoc, CFG_DP_PEER_LINK_STATS);
  4264. wlan_cfg_ctx->is_rx_buff_pool_enabled =
  4265. cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
  4266. wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
  4267. cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
  4268. wlan_cfg_ctx->enable_dp_buf_page_frag_alloc =
  4269. cfg_get(psoc, CFG_DP_BUFS_PAGE_FRAG_ALLOCS);
  4270. #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
  4271. wlan_cfg_ctx->rx_refill_buff_pool_size =
  4272. DP_RX_REFILL_BUFF_POOL_SIZE;
  4273. #endif
  4274. wlan_cfg_ctx->rx_pending_high_threshold =
  4275. cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
  4276. wlan_cfg_ctx->rx_pending_low_threshold =
  4277. cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
  4278. wlan_cfg_ctx->is_poll_mode_enabled =
  4279. cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
  4280. wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
  4281. wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
  4282. wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
  4283. cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
  4284. wlan_cfg_ctx->radio0_rx_default_reo =
  4285. cfg_get(psoc, CFG_DP_RX_RADIO_0_DEFAULT_REO);
  4286. wlan_cfg_ctx->radio1_rx_default_reo =
  4287. cfg_get(psoc, CFG_DP_RX_RADIO_1_DEFAULT_REO);
  4288. wlan_cfg_ctx->radio2_rx_default_reo =
  4289. cfg_get(psoc, CFG_DP_RX_RADIO_2_DEFAULT_REO);
  4290. wlan_cfg_ctx->wow_check_rx_pending_enable =
  4291. cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
  4292. wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
  4293. CFG_DP_DELAY_MON_REPLENISH);
  4294. wlan_cfg_ctx->num_global_tx_desc = cfg_get(psoc,
  4295. CFG_DP_TX_DESC_GLOBAL_COUNT);
  4296. wlan_cfg_ctx->num_global_spcl_tx_desc = cfg_get(psoc,
  4297. CFG_DP_SPCL_TX_DESC_GLOBAL_COUNT);
  4298. wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
  4299. CFG_DP_RXDMA_MONITOR_BUF_RING);
  4300. wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
  4301. CFG_DP_TX_MONITOR_BUF_RING);
  4302. wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
  4303. wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
  4304. wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
  4305. wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  4306. wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4307. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  4308. wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
  4309. PKT_CAPTURE_MODE_DATA_ONLY;
  4310. #endif
  4311. wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
  4312. wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
  4313. NUM_RXDMA_STATUS_RINGS_PER_PDEV;
  4314. wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
  4315. wlan_cfg_ctx->mpdu_retry_threshold_1 =
  4316. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
  4317. wlan_cfg_ctx->mpdu_retry_threshold_2 =
  4318. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
  4319. wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
  4320. CFG_DP_NAPI_SCALE_FACTOR);
  4321. wlan_soc_sawf_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4322. wlan_cfg_ctx->is_handle_invalid_decap_type_disabled =
  4323. cfg_get(psoc, CFG_DP_HANDLE_INVALID_DECAP_TYPE_DISABLE);
  4324. wlan_cfg_ctx->txmon_sw_peer_filtering =
  4325. cfg_get(psoc, CFG_DP_TXMON_SW_PEER_FILTERING);
  4326. wlan_cfg_ctx->pointer_timer_threshold_rx =
  4327. cfg_get(psoc, CFG_DP_POINTER_TIMER_THRESHOLD_RX);
  4328. wlan_cfg_ctx->pointer_num_threshold_rx =
  4329. cfg_get(psoc, CFG_DP_POINTER_NUM_THRESHOLD_RX);
  4330. wlan_soc_tx_packet_inspect_attach(psoc, wlan_cfg_ctx);
  4331. wlan_soc_local_pkt_capture_cfg_attach(psoc, wlan_cfg_ctx);
  4332. wlan_cfg_ctx->special_frame_msk =
  4333. cfg_get(psoc, CFG_SPECIAL_FRAME_MSK);
  4334. wlan_soc_umac_reset_cfg_attach(psoc, wlan_cfg_ctx);
  4335. wlan_cfg_ctx->rx_buffer_size = cfg_get(psoc, CFG_DP_RX_BUFFER_SIZE);
  4336. wlan_cfg_ctx->avg_rate_stats_filter_val =
  4337. cfg_get(psoc, CFG_DP_STATS_AVG_RATE_FILTER);
  4338. return wlan_cfg_ctx;
  4339. }
  4340. #endif
  4341. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  4342. {
  4343. qdf_mem_free(wlan_cfg_ctx);
  4344. }
  4345. struct wlan_cfg_dp_pdev_ctxt *
  4346. wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  4347. {
  4348. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx =
  4349. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt));
  4350. if (!wlan_cfg_ctx)
  4351. return NULL;
  4352. wlan_cfg_ctx->rx_dma_buf_ring_size = cfg_get(psoc,
  4353. CFG_DP_RXDMA_BUF_RING);
  4354. wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc,
  4355. CFG_DP_RXDMA_MONITOR_BUF_RING);
  4356. wlan_cfg_ctx->dma_rx_mon_dest_ring_size = cfg_get(psoc,
  4357. CFG_DP_RXDMA_MONITOR_DST_RING);
  4358. wlan_cfg_ctx->dma_tx_mon_dest_ring_size = cfg_get(psoc,
  4359. CFG_DP_TX_MONITOR_DST_RING);
  4360. wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc,
  4361. CFG_DP_RXDMA_MONITOR_STATUS_RING);
  4362. wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc,
  4363. CFG_DP_RXDMA_MONITOR_DESC_RING);
  4364. wlan_cfg_ctx->num_mac_rings = NUM_RXDMA_RINGS_PER_PDEV;
  4365. wlan_cfg_ctx->sw2rxdma_link_ring_size = cfg_get(psoc,
  4366. CFG_DP_SW2RXDMA_LINK_RING);
  4367. return wlan_cfg_ctx;
  4368. }
  4369. void wlan_cfg_set_mon_delayed_replenish_entries(
  4370. struct wlan_cfg_dp_soc_ctxt *cfg,
  4371. uint32_t val)
  4372. {
  4373. cfg->delayed_replenish_entries = val;
  4374. }
  4375. qdf_export_symbol(wlan_cfg_set_mon_delayed_replenish_entries);
  4376. int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt *cfg)
  4377. {
  4378. return cfg->delayed_replenish_entries;
  4379. }
  4380. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx)
  4381. {
  4382. if (wlan_cfg_ctx)
  4383. qdf_mem_free(wlan_cfg_ctx);
  4384. }
  4385. int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg)
  4386. {
  4387. return cfg->mon_drop_thresh;
  4388. }
  4389. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num)
  4390. {
  4391. cfg->num_int_ctxts = num;
  4392. }
  4393. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  4394. {
  4395. cfg->max_peer_id = val;
  4396. }
  4397. void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  4398. {
  4399. cfg->max_ast_idx = val;
  4400. }
  4401. int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4402. {
  4403. return cfg->max_ast_idx;
  4404. }
  4405. qdf_export_symbol(wlan_cfg_get_max_ast_idx);
  4406. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4407. int context, int mask)
  4408. {
  4409. cfg->int_tx_ring_mask[context] = mask;
  4410. }
  4411. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4412. int context, int mask)
  4413. {
  4414. cfg->int_rx_ring_mask[context] = mask;
  4415. }
  4416. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4417. int context, int mask)
  4418. {
  4419. cfg->int_rx_mon_ring_mask[context] = mask;
  4420. }
  4421. void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4422. int context, int mask)
  4423. {
  4424. cfg->int_tx_mon_ring_mask[context] = mask;
  4425. }
  4426. int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4427. int context)
  4428. {
  4429. return cfg->int_host2rxdma_mon_ring_mask[context];
  4430. }
  4431. void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4432. int context, int mask)
  4433. {
  4434. cfg->int_host2rxdma_mon_ring_mask[context] = mask;
  4435. }
  4436. int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4437. int context)
  4438. {
  4439. return cfg->int_rxdma2host_mon_ring_mask[context];
  4440. }
  4441. void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4442. int context, int mask)
  4443. {
  4444. cfg->int_rxdma2host_mon_ring_mask[context] = mask;
  4445. }
  4446. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4447. int context, int mask)
  4448. {
  4449. cfg->int_rxdma2host_ring_mask[context] = mask;
  4450. }
  4451. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4452. int context)
  4453. {
  4454. return cfg->int_rxdma2host_ring_mask[context];
  4455. }
  4456. void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4457. int context, int mask)
  4458. {
  4459. cfg->int_host2rxdma_ring_mask[context] = mask;
  4460. }
  4461. int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4462. int context)
  4463. {
  4464. return cfg->int_host2rxdma_ring_mask[context];
  4465. }
  4466. int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4467. int context)
  4468. {
  4469. return cfg->int_rx_ring_near_full_irq_1_mask[context];
  4470. }
  4471. int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4472. int context)
  4473. {
  4474. return cfg->int_rx_ring_near_full_irq_2_mask[context];
  4475. }
  4476. int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4477. int context)
  4478. {
  4479. return cfg->int_tx_ring_near_full_irq_mask[context];
  4480. }
  4481. void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  4482. int hw_macid)
  4483. {
  4484. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  4485. cfg->hw_macid[pdev_idx] = hw_macid;
  4486. }
  4487. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx)
  4488. {
  4489. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  4490. return cfg->hw_macid[pdev_idx];
  4491. }
  4492. qdf_export_symbol(wlan_cfg_get_hw_mac_idx);
  4493. int wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  4494. int hw_macid)
  4495. {
  4496. int idx;
  4497. for (idx = 0; idx < MAX_PDEV_CNT; idx++) {
  4498. if (cfg->hw_macid[idx] == hw_macid)
  4499. return (idx + 1);
  4500. }
  4501. qdf_assert_always(idx < MAX_PDEV_CNT);
  4502. return WLAN_INVALID_PDEV_ID;
  4503. }
  4504. void wlan_cfg_set_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  4505. int hw_macid)
  4506. {
  4507. qdf_assert_always((pdev_idx < MAX_PDEV_CNT) ||
  4508. (pdev_idx == INVALID_PDEV_ID));
  4509. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  4510. cfg->hw_macid_pdev_id_map[hw_macid] = pdev_idx;
  4511. }
  4512. int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid)
  4513. {
  4514. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  4515. return cfg->hw_macid_pdev_id_map[hw_macid];
  4516. }
  4517. qdf_export_symbol(wlan_cfg_get_pdev_idx);
  4518. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4519. int context, int mask)
  4520. {
  4521. cfg->int_ce_ring_mask[context] = mask;
  4522. }
  4523. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  4524. int mask)
  4525. {
  4526. cfg->int_rx_ring_mask[context] = mask;
  4527. }
  4528. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4529. int context, int mask)
  4530. {
  4531. return cfg->int_rx_err_ring_mask[context] = mask;
  4532. }
  4533. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4534. int context, int mask)
  4535. {
  4536. return cfg->int_rx_wbm_rel_ring_mask[context] = mask;
  4537. }
  4538. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4539. int context, int mask)
  4540. {
  4541. return cfg->int_reo_status_ring_mask[context] = mask;
  4542. }
  4543. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg)
  4544. {
  4545. return cfg->num_int_ctxts;
  4546. }
  4547. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4548. {
  4549. return cfg->int_tx_ring_mask[context];
  4550. }
  4551. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4552. {
  4553. return cfg->int_rx_ring_mask[context];
  4554. }
  4555. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4556. int context)
  4557. {
  4558. return cfg->int_rx_err_ring_mask[context];
  4559. }
  4560. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4561. int context)
  4562. {
  4563. return cfg->int_rx_wbm_rel_ring_mask[context];
  4564. }
  4565. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4566. int context)
  4567. {
  4568. return cfg->int_reo_status_ring_mask[context];
  4569. }
  4570. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4571. {
  4572. return cfg->int_rx_mon_ring_mask[context];
  4573. }
  4574. #ifdef CONFIG_BERYLLIUM
  4575. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4576. {
  4577. return cfg->int_tx_mon_ring_mask[context];
  4578. }
  4579. #else
  4580. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4581. {
  4582. return 0;
  4583. }
  4584. #endif
  4585. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4586. {
  4587. return cfg->int_ce_ring_mask[context];
  4588. }
  4589. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *cfg)
  4590. {
  4591. return cfg->max_clients;
  4592. }
  4593. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4594. {
  4595. return cfg->max_alloc_size;
  4596. }
  4597. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  4598. {
  4599. return cfg->per_pdev_tx_ring;
  4600. }
  4601. int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4602. int context)
  4603. {
  4604. return cfg->int_umac_reset_intr_mask[context];
  4605. }
  4606. uint32_t
  4607. wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  4608. {
  4609. return cfg->rx_pending_high_threshold;
  4610. }
  4611. uint32_t
  4612. wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  4613. {
  4614. return cfg->rx_pending_low_threshold;
  4615. }
  4616. int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  4617. {
  4618. return cfg->per_pdev_lmac_ring;
  4619. }
  4620. qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring);
  4621. #if defined(DP_USE_SINGLE_TCL) && !defined(TX_MULTI_TCL)
  4622. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4623. {
  4624. return 1;
  4625. }
  4626. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4627. {
  4628. return 1;
  4629. }
  4630. #else
  4631. #if defined(IPA_OFFLOAD) && defined(TX_MULTI_TCL)
  4632. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4633. {
  4634. if (!cfg->ipa_enabled || ipa_config_is_opt_wifi_dp_enabled())
  4635. return cfg->num_tcl_data_rings;
  4636. return 1;
  4637. }
  4638. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4639. {
  4640. if (!cfg->ipa_enabled)
  4641. return cfg->num_nss_tcl_data_rings;
  4642. return 1;
  4643. }
  4644. #else
  4645. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4646. {
  4647. return cfg->num_tcl_data_rings;
  4648. }
  4649. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4650. {
  4651. return cfg->num_nss_tcl_data_rings;
  4652. }
  4653. #endif
  4654. #endif
  4655. int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4656. {
  4657. return cfg->num_tx_comp_rings;
  4658. }
  4659. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4660. {
  4661. return cfg->tx_ring_size;
  4662. }
  4663. void wlan_cfg_set_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4664. int ring_size)
  4665. {
  4666. cfg->tx_ring_size = ring_size;
  4667. }
  4668. int wlan_cfg_time_control_bp(struct wlan_cfg_dp_soc_ctxt *cfg)
  4669. {
  4670. return cfg->time_control_bp;
  4671. }
  4672. int wlan_cfg_rx_buffer_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4673. {
  4674. if (cfg->rx_buffer_size < RX_DATA_BUFFER_SIZE)
  4675. qdf_assert_always(0);
  4676. return cfg->rx_buffer_size;
  4677. }
  4678. qdf_export_symbol(wlan_cfg_rx_buffer_size);
  4679. int wlan_cfg_qref_control_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4680. {
  4681. return cfg->qref_control_size;
  4682. }
  4683. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4684. {
  4685. return cfg->tx_comp_ring_size;
  4686. }
  4687. void wlan_cfg_set_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4688. int ring_size)
  4689. {
  4690. cfg->tx_comp_ring_size = ring_size;
  4691. }
  4692. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  4693. {
  4694. return cfg->per_pdev_rx_ring;
  4695. }
  4696. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4697. {
  4698. return cfg->num_reo_dest_rings;
  4699. }
  4700. int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4701. {
  4702. return cfg->num_nss_reo_dest_rings;
  4703. }
  4704. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *cfg)
  4705. {
  4706. return cfg->htt_packet_type; /*htt_pkt_type_ethernet*/
  4707. }
  4708. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  4709. {
  4710. return cfg->num_tx_desc_pool;
  4711. }
  4712. void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  4713. {
  4714. cfg->num_tx_desc_pool = num_pool;
  4715. }
  4716. int wlan_cfg_get_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  4717. {
  4718. return cfg->num_tx_ext_desc_pool;
  4719. }
  4720. void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  4721. {
  4722. cfg->num_tx_ext_desc_pool = num_pool;
  4723. }
  4724. int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4725. {
  4726. return cfg->reo_dst_ring_size;
  4727. }
  4728. void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4729. int reo_dst_ring_size)
  4730. {
  4731. cfg->reo_dst_ring_size = reo_dst_ring_size;
  4732. }
  4733. void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
  4734. bool raw_mode_war)
  4735. {
  4736. cfg->raw_mode_war = raw_mode_war;
  4737. }
  4738. bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg)
  4739. {
  4740. return cfg->raw_mode_war;
  4741. }
  4742. int wlan_cfg_get_num_global_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4743. {
  4744. return cfg->num_global_tx_desc;
  4745. }
  4746. int wlan_cfg_get_num_global_spcl_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4747. {
  4748. return cfg->num_global_spcl_tx_desc;
  4749. }
  4750. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4751. {
  4752. return cfg->num_tx_desc;
  4753. }
  4754. void wlan_cfg_set_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc)
  4755. {
  4756. cfg->num_tx_spl_desc = num_desc;
  4757. }
  4758. int wlan_cfg_get_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4759. {
  4760. return cfg->num_tx_spl_desc;
  4761. }
  4762. void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc)
  4763. {
  4764. cfg->num_tx_desc = num_desc;
  4765. }
  4766. int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4767. {
  4768. return cfg->min_tx_desc;
  4769. }
  4770. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4771. {
  4772. return cfg->num_tx_ext_desc;
  4773. }
  4774. void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc)
  4775. {
  4776. cfg->num_tx_ext_desc = num_ext_desc;
  4777. }
  4778. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  4779. {
  4780. /* TODO: This should be calculated based on target capabilities */
  4781. return cfg->max_peer_id;
  4782. }
  4783. int wlan_cfg_get_dma_mon_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4784. {
  4785. return cfg->dma_mon_buf_ring_size;
  4786. }
  4787. qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size);
  4788. int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4789. {
  4790. return cfg->dma_rx_mon_dest_ring_size;
  4791. }
  4792. qdf_export_symbol(wlan_cfg_get_dma_rx_mon_dest_ring_size);
  4793. int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4794. {
  4795. return cfg->dma_tx_mon_dest_ring_size;
  4796. }
  4797. qdf_export_symbol(wlan_cfg_get_dma_tx_mon_dest_ring_size);
  4798. int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4799. {
  4800. return cfg->dma_mon_status_ring_size;
  4801. }
  4802. qdf_export_symbol(wlan_cfg_get_dma_mon_stat_ring_size);
  4803. int
  4804. wlan_cfg_get_dma_sw2rxdma_link_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4805. {
  4806. return cfg->sw2rxdma_link_ring_size;
  4807. }
  4808. qdf_export_symbol(wlan_cfg_get_dma_sw2rxdma_link_ring_size);
  4809. int
  4810. wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4811. {
  4812. return cfg->rxdma_monitor_desc_ring;
  4813. }
  4814. qdf_export_symbol(wlan_cfg_get_dma_mon_desc_ring_size);
  4815. int wlan_cfg_get_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4816. {
  4817. return cfg->rx_dma_buf_ring_size;
  4818. }
  4819. void wlan_cfg_set_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg,
  4820. int ring_size)
  4821. {
  4822. cfg->rx_dma_buf_ring_size = ring_size;
  4823. }
  4824. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4825. {
  4826. return cfg->num_mac_rings;
  4827. }
  4828. qdf_export_symbol(wlan_cfg_get_num_mac_rings);
  4829. bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4830. {
  4831. return cfg->gro_enabled;
  4832. }
  4833. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4834. {
  4835. return cfg->lro_enabled;
  4836. }
  4837. bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4838. {
  4839. return cfg->ipa_enabled;
  4840. }
  4841. void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  4842. {
  4843. cfg->rx_hash = val;
  4844. }
  4845. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4846. {
  4847. return cfg->rx_hash;
  4848. }
  4849. #ifdef WLAN_SUPPORT_RX_FLOW_TAG
  4850. void wlan_cfg_set_rx_rr(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  4851. {
  4852. cfg->rx_rr = val;
  4853. }
  4854. bool wlan_cfg_is_rx_rr_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4855. {
  4856. return cfg->rx_rr;
  4857. }
  4858. #else
  4859. void wlan_cfg_set_rx_rr(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  4860. {
  4861. }
  4862. bool wlan_cfg_is_rx_rr_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4863. {
  4864. return false;
  4865. }
  4866. #endif
  4867. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4868. {
  4869. return cfg->nss_enabled;
  4870. }
  4871. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled)
  4872. {
  4873. cfg->nss_enabled = nss_enabled;
  4874. }
  4875. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg)
  4876. {
  4877. return cfg->nss_cfg;
  4878. }
  4879. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg)
  4880. {
  4881. cfg->nss_cfg = nss_cfg;
  4882. if (cfg->nss_cfg)
  4883. cfg->tx_comp_ring_size = cfg->tx_comp_ring_size_nss;
  4884. }
  4885. int wlan_cfg_get_int_batch_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg)
  4886. {
  4887. return cfg->int_batch_threshold_ppe2tcl;
  4888. }
  4889. int wlan_cfg_get_int_timer_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg)
  4890. {
  4891. return cfg->int_timer_threshold_ppe2tcl;
  4892. }
  4893. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4894. {
  4895. return cfg->int_batch_threshold_tx;
  4896. }
  4897. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4898. {
  4899. return cfg->int_timer_threshold_tx;
  4900. }
  4901. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4902. {
  4903. return cfg->int_batch_threshold_rx;
  4904. }
  4905. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4906. {
  4907. return cfg->int_timer_threshold_rx;
  4908. }
  4909. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  4910. {
  4911. return cfg->int_batch_threshold_other;
  4912. }
  4913. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  4914. {
  4915. return cfg->int_timer_threshold_other;
  4916. }
  4917. int wlan_cfg_get_int_batch_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg)
  4918. {
  4919. return cfg->int_batch_threshold_mon_dest;
  4920. }
  4921. int wlan_cfg_get_int_timer_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg)
  4922. {
  4923. return cfg->int_timer_threshold_mon_dest;
  4924. }
  4925. int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  4926. {
  4927. return cfg->p2p_tcp_udp_checksumoffload;
  4928. }
  4929. int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  4930. {
  4931. return cfg->nan_tcp_udp_checksumoffload;
  4932. }
  4933. int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  4934. {
  4935. return cfg->tcp_udp_checksumoffload;
  4936. }
  4937. int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg)
  4938. {
  4939. return cfg->rx_defrag_min_timeout;
  4940. }
  4941. int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg)
  4942. {
  4943. return cfg->defrag_timeout_check;
  4944. }
  4945. int
  4946. wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4947. {
  4948. return cfg->wbm_release_ring;
  4949. }
  4950. int
  4951. wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4952. {
  4953. return cfg->tcl_cmd_credit_ring;
  4954. }
  4955. int
  4956. wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4957. {
  4958. return cfg->tcl_status_ring;
  4959. }
  4960. int
  4961. wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4962. {
  4963. return cfg->reo_reinject_ring;
  4964. }
  4965. int
  4966. wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4967. {
  4968. return cfg->rx_release_ring;
  4969. }
  4970. int
  4971. wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4972. {
  4973. return cfg->reo_exception_ring;
  4974. }
  4975. int
  4976. wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4977. {
  4978. return cfg->reo_cmd_ring;
  4979. }
  4980. int
  4981. wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4982. {
  4983. return cfg->reo_status_ring;
  4984. }
  4985. int
  4986. wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4987. {
  4988. return cfg->rxdma_refill_ring;
  4989. }
  4990. void
  4991. wlan_cfg_set_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4992. int ring_size)
  4993. {
  4994. cfg->rxdma_refill_ring = ring_size;
  4995. }
  4996. bool
  4997. wlan_cfg_get_dp_soc_rxdma_refill_lt_disable(struct wlan_cfg_dp_soc_ctxt *cfg)
  4998. {
  4999. return cfg->rxdma_refill_lt_disable;
  5000. }
  5001. int
  5002. wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg)
  5003. {
  5004. return cfg->tx_desc_limit_0;
  5005. }
  5006. int
  5007. wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg)
  5008. {
  5009. return cfg->tx_desc_limit_1;
  5010. }
  5011. int
  5012. wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg)
  5013. {
  5014. return cfg->tx_desc_limit_2;
  5015. }
  5016. int
  5017. wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
  5018. {
  5019. return cfg->tx_device_limit;
  5020. }
  5021. int
  5022. wlan_cfg_get_dp_soc_tx_spl_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
  5023. {
  5024. return cfg->tx_spl_device_limit;
  5025. }
  5026. int
  5027. wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg)
  5028. {
  5029. return cfg->tx_sw_internode_queue;
  5030. }
  5031. int
  5032. wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5033. {
  5034. return cfg->rxdma_err_dst_ring;
  5035. }
  5036. int
  5037. wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg)
  5038. {
  5039. return cfg->rx_sw_desc_weight;
  5040. }
  5041. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_sw_desc_weight);
  5042. int
  5043. wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg)
  5044. {
  5045. return cfg->rx_sw_desc_num;
  5046. }
  5047. void
  5048. wlan_cfg_set_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg,
  5049. int desc_num)
  5050. {
  5051. cfg->rx_sw_desc_num = desc_num;
  5052. }
  5053. uint32_t
  5054. wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
  5055. {
  5056. return cfg->reo_rings_mapping;
  5057. }
  5058. uint32_t
  5059. wlan_cfg_get_rx_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
  5060. {
  5061. return cfg->rx_rings_mapping;
  5062. }
  5063. #ifdef DP_UMAC_HW_RESET_SUPPORT
  5064. uint32_t
  5065. wlan_cfg_get_umac_reset_buffer_window_ms(struct wlan_cfg_dp_soc_ctxt *cfg)
  5066. {
  5067. return cfg->umac_reset_buffer_window;
  5068. }
  5069. #endif
  5070. bool
  5071. wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
  5072. enum cdp_capabilities dp_caps)
  5073. {
  5074. switch (dp_caps) {
  5075. case CDP_CFG_DP_TSO:
  5076. return cfg->tso_enabled;
  5077. case CDP_CFG_DP_LRO:
  5078. return cfg->lro_enabled;
  5079. case CDP_CFG_DP_SG:
  5080. return cfg->sg_enabled;
  5081. case CDP_CFG_DP_GRO:
  5082. return cfg->gro_enabled;
  5083. case CDP_CFG_DP_OL_TX_CSUM:
  5084. return cfg->ol_tx_csum_enabled;
  5085. case CDP_CFG_DP_OL_RX_CSUM:
  5086. return cfg->ol_rx_csum_enabled;
  5087. case CDP_CFG_DP_RAWMODE:
  5088. return cfg->rawmode_enabled;
  5089. case CDP_CFG_DP_PEER_FLOW_CTRL:
  5090. return cfg->peer_flow_ctrl_enabled;
  5091. case CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT:
  5092. return cfg->notify_frame_support;
  5093. default:
  5094. return false;
  5095. }
  5096. }
  5097. void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
  5098. bool val)
  5099. {
  5100. cfg->is_tso_desc_attach_defer = val;
  5101. }
  5102. bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg)
  5103. {
  5104. return cfg->is_tso_desc_attach_defer;
  5105. }
  5106. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  5107. /**
  5108. * wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold
  5109. * @cfg: config context
  5110. *
  5111. * Return: stop threshold
  5112. */
  5113. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg)
  5114. {
  5115. return cfg->tx_flow_stop_queue_threshold;
  5116. }
  5117. /**
  5118. * wlan_cfg_get_tx_flow_start_queue_offset() - Get flow control start offset
  5119. * for TX to resume
  5120. * @cfg: config context
  5121. *
  5122. * Return: stop threshold
  5123. */
  5124. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg)
  5125. {
  5126. return cfg->tx_flow_start_queue_offset;
  5127. }
  5128. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  5129. void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  5130. bool val)
  5131. {
  5132. cfg->is_rx_flow_tag_enabled = val;
  5133. }
  5134. uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg)
  5135. {
  5136. return cfg->rx_toeplitz_hash_key;
  5137. }
  5138. uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg)
  5139. {
  5140. return cfg->rx_flow_max_search;
  5141. }
  5142. bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5143. {
  5144. return cfg->is_rx_flow_tag_enabled;
  5145. }
  5146. qdf_export_symbol(wlan_cfg_is_rx_flow_tag_enabled);
  5147. bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5148. {
  5149. return (bool)(cfg->is_poll_mode_enabled);
  5150. }
  5151. void
  5152. wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
  5153. bool val)
  5154. {
  5155. cfg->is_rx_flow_search_table_per_pdev = val;
  5156. }
  5157. bool wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg)
  5158. {
  5159. return cfg->is_rx_flow_search_table_per_pdev;
  5160. }
  5161. void wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  5162. uint16_t val)
  5163. {
  5164. cfg->rx_flow_search_table_size = val;
  5165. }
  5166. uint16_t
  5167. wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5168. {
  5169. return cfg->rx_flow_search_table_size;
  5170. }
  5171. void
  5172. wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  5173. bool val)
  5174. {
  5175. cfg->is_rx_mon_protocol_flow_tag_enabled = val;
  5176. }
  5177. bool
  5178. wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5179. {
  5180. return cfg->is_rx_mon_protocol_flow_tag_enabled;
  5181. }
  5182. qdf_export_symbol(wlan_cfg_is_rx_mon_protocol_flow_tag_enabled);
  5183. void
  5184. wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
  5185. bool val)
  5186. {
  5187. cfg->tx_per_pkt_vdev_id_check = val;
  5188. }
  5189. bool
  5190. wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5191. {
  5192. return cfg->tx_per_pkt_vdev_id_check;
  5193. }
  5194. void
  5195. wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  5196. bool val)
  5197. {
  5198. cfg->pext_stats_enabled = val;
  5199. }
  5200. void
  5201. wlan_cfg_set_peer_jitter_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  5202. bool val)
  5203. {
  5204. cfg->jitter_stats_enabled = val;
  5205. }
  5206. bool
  5207. wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5208. {
  5209. return cfg->pext_stats_enabled;
  5210. }
  5211. bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5212. {
  5213. return cfg->fst_in_cmem;
  5214. }
  5215. bool wlan_cfg_is_peer_jitter_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5216. {
  5217. return cfg->jitter_stats_enabled;
  5218. }
  5219. void
  5220. wlan_cfg_set_peer_link_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  5221. bool val)
  5222. {
  5223. cfg->peer_link_stats_enabled = val;
  5224. }
  5225. qdf_export_symbol(wlan_cfg_set_peer_link_stats);
  5226. bool wlan_cfg_is_peer_link_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5227. {
  5228. return cfg->peer_link_stats_enabled;
  5229. }
  5230. qdf_export_symbol(wlan_cfg_is_peer_link_stats_enabled);
  5231. bool wlan_cfg_is_dp_buf_page_frag_alloc_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5232. {
  5233. return cfg->enable_dp_buf_page_frag_alloc;
  5234. }
  5235. #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
  5236. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5237. {
  5238. return cfg->is_rx_buff_pool_enabled;
  5239. }
  5240. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5241. {
  5242. return cfg->is_rx_refill_buff_pool_enabled;
  5243. }
  5244. int wlan_cfg_get_rx_refill_buf_pool_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5245. {
  5246. return cfg->rx_refill_buff_pool_size;
  5247. }
  5248. void
  5249. wlan_cfg_set_rx_refill_buf_pool_size(struct wlan_cfg_dp_soc_ctxt *cfg, int size)
  5250. {
  5251. cfg->rx_refill_buff_pool_size = size;
  5252. }
  5253. #else
  5254. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5255. {
  5256. return false;
  5257. }
  5258. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(
  5259. struct wlan_cfg_dp_soc_ctxt *cfg)
  5260. {
  5261. return false;
  5262. }
  5263. #endif /* WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL */
  5264. #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
  5265. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5266. {
  5267. return (bool)(cfg->is_swlm_enabled);
  5268. }
  5269. #else
  5270. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5271. {
  5272. return false;
  5273. }
  5274. #endif
  5275. uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5276. {
  5277. return cfg->radio0_rx_default_reo;
  5278. }
  5279. uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5280. {
  5281. return cfg->radio1_rx_default_reo;
  5282. }
  5283. uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5284. {
  5285. return cfg->radio2_rx_default_reo;
  5286. }
  5287. void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5288. {
  5289. cfg->rxdma1_enable = true;
  5290. }
  5291. void
  5292. wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg,
  5293. bool val)
  5294. {
  5295. cfg->delay_mon_replenish = val;
  5296. }
  5297. bool
  5298. wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg)
  5299. {
  5300. return cfg->delay_mon_replenish;
  5301. }
  5302. qdf_export_symbol(wlan_cfg_is_delay_mon_replenish);
  5303. #ifdef WLAN_SOFTUMAC_SUPPORT
  5304. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
  5305. {
  5306. dp_info("DP CFG SoC ctx: delay_mon_replenish = %d",
  5307. cfg->delay_mon_replenish);
  5308. }
  5309. #else
  5310. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
  5311. {
  5312. dp_info("DP CFG SoC ctx: delay_mon_replenish = %d",
  5313. cfg->delay_mon_replenish);
  5314. dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d",
  5315. cfg->reo_dst_ring_size, cfg->delayed_replenish_entries);
  5316. }
  5317. #endif
  5318. #ifdef IPA_OFFLOAD
  5319. uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5320. {
  5321. return cfg->ipa_tx_ring_size;
  5322. }
  5323. uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5324. {
  5325. return cfg->ipa_tx_comp_ring_size;
  5326. }
  5327. #ifdef IPA_WDI3_TX_TWO_PIPES
  5328. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5329. {
  5330. return cfg->ipa_tx_alt_ring_size;
  5331. }
  5332. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5333. {
  5334. return cfg->ipa_tx_alt_comp_ring_size;
  5335. }
  5336. #else
  5337. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5338. {
  5339. return cfg->ipa_tx_ring_size;
  5340. }
  5341. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5342. {
  5343. return cfg->ipa_tx_comp_ring_size;
  5344. }
  5345. #endif
  5346. #endif
  5347. #ifdef WLAN_SUPPORT_PPEDS
  5348. bool
  5349. wlan_cfg_get_dp_soc_ppeds_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5350. {
  5351. return cfg->ppeds_enable;
  5352. }
  5353. int
  5354. wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5355. {
  5356. return cfg->reo2ppe_ring;
  5357. }
  5358. int
  5359. wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5360. {
  5361. return cfg->ppe2tcl_ring;
  5362. }
  5363. int
  5364. wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  5365. {
  5366. return cfg->ppeds_num_tx_desc;
  5367. }
  5368. int
  5369. wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg)
  5370. {
  5371. return cfg->ppeds_tx_comp_napi_budget;
  5372. }
  5373. int
  5374. wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg)
  5375. {
  5376. return cfg->ppeds_tx_desc_hotlist_len;
  5377. }
  5378. #endif
  5379. void
  5380. wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
  5381. struct wlan_dp_prealloc_cfg *cfg)
  5382. {
  5383. if (!ctrl_psoc || !cfg)
  5384. return;
  5385. cfg->num_reo_dst_ring_entries = cfg_get(ctrl_psoc,
  5386. CFG_DP_RX_DESTINATION_RING);
  5387. cfg->num_tx_ring_entries = cfg_get(ctrl_psoc, CFG_DP_TX_RING_SIZE);
  5388. cfg->num_tx_comp_ring_entries = cfg_get(ctrl_psoc,
  5389. CFG_DP_TX_COMPL_RING_SIZE);
  5390. cfg->num_wbm_rel_ring_entries = cfg_get(ctrl_psoc,
  5391. CFG_DP_WBM_RELEASE_RING);
  5392. cfg->num_rxdma_err_dst_ring_entries = cfg_get(ctrl_psoc,
  5393. CFG_DP_RXDMA_ERR_DST_RING);
  5394. cfg->num_reo_exception_ring_entries = cfg_get(ctrl_psoc,
  5395. CFG_DP_REO_EXCEPTION_RING);
  5396. cfg->num_tx_desc = cfg_get(ctrl_psoc, CFG_DP_TX_DESC);
  5397. cfg->num_tx_ext_desc = cfg_get(ctrl_psoc, CFG_DP_TX_EXT_DESC);
  5398. cfg->num_rx_sw_desc = cfg_get(ctrl_psoc, CFG_DP_RX_SW_DESC_NUM);
  5399. cfg->num_rxdma_buf_ring_entries = cfg_get(ctrl_psoc,
  5400. CFG_DP_RXDMA_BUF_RING);
  5401. cfg->num_rxdma_refill_ring_entries = cfg_get(ctrl_psoc,
  5402. CFG_DP_RXDMA_REFILL_RING);
  5403. cfg->num_reo_status_ring_entries = cfg_get(ctrl_psoc,
  5404. CFG_DP_REO_STATUS_RING);
  5405. cfg->num_mon_status_ring_entries = cfg_get(ctrl_psoc,
  5406. CFG_DP_RXDMA_MONITOR_STATUS_RING);
  5407. cfg->num_tx_mon_buf_ring_entries = cfg_get(ctrl_psoc,
  5408. CFG_DP_TX_MONITOR_BUF_RING);
  5409. cfg->num_tx_mon_dst_ring_entries = cfg_get(ctrl_psoc,
  5410. CFG_DP_TX_MONITOR_DST_RING);
  5411. }
  5412. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  5413. uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
  5414. {
  5415. return cfg->pkt_capture_mode;
  5416. }
  5417. #endif
  5418. uint32_t
  5419. wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5420. {
  5421. return cfg->rx_mon_buf_ring_size;
  5422. }
  5423. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_mon_buf_ring_size);
  5424. uint32_t
  5425. wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5426. {
  5427. return cfg->tx_mon_buf_ring_size;
  5428. }
  5429. qdf_export_symbol(wlan_cfg_get_dp_soc_tx_mon_buf_ring_size);
  5430. uint8_t
  5431. wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  5432. {
  5433. return cfg->rx_rel_wbm2sw_ring_id;
  5434. }
  5435. void
  5436. wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  5437. uint8_t wbm2sw_ring_id)
  5438. {
  5439. cfg->rx_rel_wbm2sw_ring_id = wbm2sw_ring_id;
  5440. }
  5441. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  5442. uint8_t
  5443. wlan_cfg_mlo_rx_ring_map_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5444. {
  5445. return cfg->mlo_chip_rx_ring_map;
  5446. }
  5447. #endif
  5448. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  5449. bool
  5450. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5451. {
  5452. return cfg->vdev_stats_hw_offload_config;
  5453. }
  5454. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  5455. {
  5456. return cfg->vdev_stats_hw_offload_timer;
  5457. }
  5458. void
  5459. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  5460. bool val)
  5461. {
  5462. cfg->vdev_stats_hw_offload_config = val;
  5463. }
  5464. #else
  5465. bool
  5466. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5467. {
  5468. return false;
  5469. }
  5470. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  5471. {
  5472. return 0;
  5473. }
  5474. void
  5475. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  5476. bool val)
  5477. {}
  5478. #endif
  5479. #ifdef CONFIG_SAWF
  5480. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5481. {
  5482. return cfg->sawf_enabled;
  5483. }
  5484. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  5485. {
  5486. cfg->sawf_enabled = val;
  5487. }
  5488. #else
  5489. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5490. {
  5491. return false;
  5492. }
  5493. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  5494. {
  5495. }
  5496. #endif
  5497. #ifdef CONFIG_BERYLLIUM
  5498. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5499. int context)
  5500. {
  5501. return cfg->int_host2txmon_ring_mask[context];
  5502. }
  5503. qdf_export_symbol(wlan_cfg_get_host2txmon_ring_mask);
  5504. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5505. int context, int mask)
  5506. {
  5507. cfg->int_host2txmon_ring_mask[context] = mask;
  5508. }
  5509. #else
  5510. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5511. int context)
  5512. {
  5513. return 0;
  5514. }
  5515. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5516. int context, int mask)
  5517. {
  5518. }
  5519. #endif
  5520. qdf_export_symbol(wlan_cfg_set_host2txmon_ring_mask);
  5521. void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
  5522. bool txmon_hw_support)
  5523. {
  5524. cfg->txmon_hw_support = txmon_hw_support;
  5525. }
  5526. bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg)
  5527. {
  5528. return cfg->txmon_hw_support;
  5529. }
  5530. qdf_export_symbol(wlan_cfg_get_txmon_hw_support);
  5531. uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg)
  5532. {
  5533. return cfg->napi_scale_factor;
  5534. }
  5535. bool wlan_cfg_get_txmon_sw_peer_filtering(struct wlan_cfg_dp_soc_ctxt *cfg)
  5536. {
  5537. return cfg->txmon_sw_peer_filtering;
  5538. }
  5539. qdf_export_symbol(wlan_cfg_get_txmon_sw_peer_filtering);
  5540. uint16_t
  5541. wlan_cfg_get_pointer_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  5542. {
  5543. return cfg->pointer_timer_threshold_rx;
  5544. }
  5545. uint8_t
  5546. wlan_cfg_get_pointer_num_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  5547. {
  5548. return cfg->pointer_num_threshold_rx;
  5549. }
  5550. uint32_t wlan_cfg_get_special_frame_cfg(struct wlan_cfg_dp_soc_ctxt *cfg)
  5551. {
  5552. return cfg->special_frame_msk;
  5553. }
  5554. void wlan_cfg_set_ast_indication_disable(struct wlan_cfg_dp_soc_ctxt *cfg,
  5555. bool val)
  5556. {
  5557. cfg->fw_ast_indication_disable = val;
  5558. }
  5559. bool wlan_cfg_get_ast_indication_disable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5560. {
  5561. return cfg->fw_ast_indication_disable;
  5562. }
  5563. #ifdef WLAN_SUPPORT_DPDK
  5564. int wlan_cfg_get_dp_soc_dpdk_cfg(struct cdp_ctrl_objmgr_psoc *psoc)
  5565. {
  5566. return cfg_get(psoc, CFG_DPDK_WIFI);
  5567. }
  5568. #else
  5569. int wlan_cfg_get_dp_soc_dpdk_cfg(struct cdp_ctrl_objmgr_psoc *psoc)
  5570. {
  5571. return 0;
  5572. }
  5573. #endif