wlan_cfg.c 171 KB

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