wlan_cfg.c 156 KB

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