wlan_cfg.c 174 KB

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