wlan_cfg.c 124 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186
  1. /*
  2. * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2022 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. struct dp_int_mask_assignment {
  82. uint8_t tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  83. uint8_t rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  84. uint8_t rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  85. uint8_t host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  86. uint8_t rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  87. uint8_t host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  88. uint8_t rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  89. uint8_t rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  90. uint8_t rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  91. uint8_t reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  92. uint8_t rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  93. uint8_t rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  94. uint8_t tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  95. uint8_t host2txmon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  96. uint8_t tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  97. uint8_t umac_reset_intr_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  98. };
  99. #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
  100. /*
  101. * For BE, there are 18 available MSI interrupts, assigned in the manner
  102. * below.
  103. * TX(5) + RX(8) + (REO ERR + WBM ERR)(1) +
  104. * (REO status + RXDMA[0] + RXDMA[1])(1) + NEAR_Full_RX(2) + NEAR_Full_TX(1)
  105. * For IPA_OFFLOAD enabled case, 2 TX/RX rings would be assigned to IPA.
  106. */
  107. #ifdef CONFIG_BERYLLIUM
  108. #ifdef IPA_OFFLOAD
  109. /*
  110. * NEAR-FULL IRQ mask should be updated, if any change is made to
  111. * the below TX mask.
  112. */
  113. static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  114. [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4,
  115. [2] = WLAN_CFG_TX_RING_MASK_2};
  116. #else /* !IPA_OFFLOAD */
  117. #ifdef QCA_WIFI_KIWI_V2
  118. static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  119. [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4,
  120. [2] = WLAN_CFG_TX_RING_MASK_2, [3] = WLAN_CFG_TX_RING_MASK_5,
  121. [4] = WLAN_CFG_TX_RING_MASK_6};
  122. #else /* !QCA_WIFI_KIWI_V2 */
  123. static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  124. [0] = WLAN_CFG_TX_RING_MASK_0, [1] = WLAN_CFG_TX_RING_MASK_4,
  125. [2] = WLAN_CFG_TX_RING_MASK_2, [3] = WLAN_CFG_TX_RING_MASK_6,
  126. [4] = WLAN_CFG_TX_RING_MASK_7};
  127. #endif /* QCA_WIFI_KIWI_V2 */
  128. #endif /* IPA_OFFLOAD */
  129. static inline const
  130. uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx)
  131. {
  132. return &tx_ring_mask_msi[0];
  133. }
  134. #else
  135. static const uint8_t tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  136. [0] = WLAN_CFG_TX_RING_MASK_0};
  137. #ifdef TX_MULTI_TCL
  138. static const uint8_t multi_tx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  139. [0] = WLAN_CFG_TX_RING_MASK_0, [4] = WLAN_CFG_TX_RING_MASK_2};
  140. #ifdef IPA_OFFLOAD
  141. static inline const
  142. uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx)
  143. {
  144. if (cfg_ctx->ipa_enabled)
  145. return &tx_ring_mask_msi[0];
  146. return &multi_tx_ring_mask_msi[0];
  147. }
  148. #else
  149. static inline const
  150. uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx)
  151. {
  152. return &multi_tx_ring_mask_msi[0];
  153. }
  154. #endif /* IPA_OFFLOAD */
  155. #else
  156. static inline const
  157. uint8_t *wlan_cfg_get_tx_ring_int_mask(struct wlan_cfg_dp_soc_ctxt *cfg_ctx)
  158. {
  159. return &tx_ring_mask_msi[0];
  160. }
  161. #endif /* TX_MULTI_TCL */
  162. #endif /* CONFIG_BERYLLIUM */
  163. #ifdef CONFIG_BERYLLIUM
  164. #ifdef IPA_OFFLOAD
  165. static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  166. [5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1,
  167. [7] = WLAN_CFG_RX_RING_MASK_2, [9] = WLAN_CFG_RX_RING_MASK_4,
  168. [10] = WLAN_CFG_RX_RING_MASK_5, [11] = WLAN_CFG_RX_RING_MASK_6};
  169. #else
  170. static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  171. [5] = WLAN_CFG_RX_RING_MASK_0, [6] = WLAN_CFG_RX_RING_MASK_1,
  172. [7] = WLAN_CFG_RX_RING_MASK_2, [8] = WLAN_CFG_RX_RING_MASK_3,
  173. [9] = WLAN_CFG_RX_RING_MASK_4, [10] = WLAN_CFG_RX_RING_MASK_5,
  174. [11] = WLAN_CFG_RX_RING_MASK_6, [12] = WLAN_CFG_RX_RING_MASK_7};
  175. #endif /* IPA_OFFLOAD */
  176. #else /* !defined(CONFIG_BERYLLIUM) */
  177. #ifdef IPA_OFFLOAD
  178. static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  179. [1] = WLAN_CFG_RX_RING_MASK_0, [2] = WLAN_CFG_RX_RING_MASK_1,
  180. [3] = WLAN_CFG_RX_RING_MASK_2};
  181. #else
  182. static const uint8_t rx_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  183. [1] = WLAN_CFG_RX_RING_MASK_0, [2] = WLAN_CFG_RX_RING_MASK_1,
  184. [3] = WLAN_CFG_RX_RING_MASK_2 | WLAN_CFG_RX_RING_MASK_3};
  185. #endif
  186. #endif /* CONFIG_BERYLLIUM */
  187. #ifdef CONFIG_BERYLLIUM
  188. static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  189. [13] = WLAN_CFG_RXDMA2HOST_RING_MASK_0};
  190. #else
  191. static const uint8_t rxdma2host_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  192. [6] = WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  193. WLAN_CFG_RXDMA2HOST_RING_MASK_1};
  194. #endif /* CONFIG_BERYLLIUM */
  195. #ifdef CONFIG_BERYLLIUM
  196. static const uint8_t rx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  197. [5] = WLAN_CFG_RX_MON_RING_MASK_0};
  198. #else
  199. static const uint8_t rx_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  200. [1] = WLAN_CFG_RX_MON_RING_MASK_0, [2] = WLAN_CFG_RX_MON_RING_MASK_1};
  201. #endif
  202. static const uint8_t host2rxdma_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
  203. static const uint8_t host2rxdma_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
  204. static const uint8_t rxdma2host_mon_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {0};
  205. #ifdef CONFIG_BERYLLIUM
  206. static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  207. [14] = WLAN_CFG_RX_ERR_RING_MASK_0};
  208. static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  209. [14] = WLAN_CFG_RX_WBM_REL_RING_MASK_0};
  210. static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  211. [13] = WLAN_CFG_REO_STATUS_RING_MASK_0};
  212. #else
  213. static const uint8_t rx_err_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  214. [6] = WLAN_CFG_RX_ERR_RING_MASK_0};
  215. static const uint8_t rx_wbm_rel_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  216. [6] = WLAN_CFG_RX_WBM_REL_RING_MASK_0};
  217. static const uint8_t reo_status_ring_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  218. [6] = WLAN_CFG_REO_STATUS_RING_MASK_0};
  219. #endif
  220. #ifdef CONFIG_BERYLLIUM
  221. #ifdef WLAN_FEATURE_NEAR_FULL_IRQ
  222. static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  223. [15] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1};
  224. static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  225. [16] = WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1};
  226. static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  227. [17] = WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK};
  228. #else
  229. static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  230. 0 };
  231. static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  232. 0 };
  233. static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  234. 0 };
  235. #endif
  236. #else
  237. static const uint8_t rx_ring_near_full_irq_1_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  238. 0 };
  239. static const uint8_t rx_ring_near_full_irq_2_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  240. 0 };
  241. static const uint8_t tx_ring_near_full_irq_mask_msi[WLAN_CFG_INT_NUM_CONTEXTS] = {
  242. 0 };
  243. #endif
  244. #else
  245. /* Integrated configuration + 16 possible MSI configurations */
  246. #define NUM_INTERRUPT_COMBINATIONS 17
  247. /*
  248. * This structure contains the best possible mask assignment for a given
  249. * number of MSIs available in the system.
  250. */
  251. #ifdef IPA_OFFLOAD
  252. static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = {
  253. /* Interrupt assignment for integrated configuration */
  254. {
  255. /* tx ring masks */
  256. { WLAN_CFG_TX_RING_MASK_0,
  257. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  258. /* rx ring masks */
  259. { 0, 0, 0, 0, 0, 0, 0,
  260. WLAN_CFG_RX_RING_MASK_0,
  261. WLAN_CFG_RX_RING_MASK_1,
  262. WLAN_CFG_RX_RING_MASK_2,
  263. 0},
  264. /* rx mon ring masks */
  265. { 0, 0, 0, 0,
  266. WLAN_CFG_RX_MON_RING_MASK_0,
  267. WLAN_CFG_RX_MON_RING_MASK_1,
  268. WLAN_CFG_RX_MON_RING_MASK_2,
  269. 0, 0, 0, 0},
  270. /* host2rxdma ring masks */
  271. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  272. /* rxdma2host ring masks */
  273. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  274. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  275. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  276. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  277. 0, 0, 0, 0, 0, 0, 0},
  278. /* host2rxdma mon ring masks */
  279. { 0, 0, 0, 0,
  280. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  281. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  282. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  283. 0, 0, 0, 0},
  284. /* rxdma2host mon ring masks */
  285. { 0, 0, 0, 0,
  286. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  287. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  288. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  289. 0, 0, 0, 0},
  290. /* rx err ring masks */
  291. { WLAN_CFG_RX_ERR_RING_MASK_0,
  292. WLAN_CFG_RX_ERR_RING_MASK_1,
  293. WLAN_CFG_RX_ERR_RING_MASK_2,
  294. WLAN_CFG_RX_ERR_RING_MASK_3,
  295. 0, 0, 0, 0, 0, 0, 0},
  296. /* rx wbm rel ring masks */
  297. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  298. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  299. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  300. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  301. 0, 0, 0, 0, 0, 0, 0},
  302. /* reo status ring masks */
  303. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  304. WLAN_CFG_REO_STATUS_RING_MASK_1,
  305. WLAN_CFG_REO_STATUS_RING_MASK_2,
  306. WLAN_CFG_REO_STATUS_RING_MASK_3,
  307. 0, 0, 0, 0, 0, 0, 0},
  308. },
  309. /* Interrupt assignment for 1 MSI combination */
  310. {
  311. /* tx ring masks */
  312. { WLAN_CFG_TX_RING_MASK_0,
  313. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  314. /* rx ring masks */
  315. { WLAN_CFG_RX_RING_MASK_0 |
  316. WLAN_CFG_RX_RING_MASK_1 |
  317. WLAN_CFG_RX_RING_MASK_2,
  318. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  319. /* rx mon ring masks */
  320. { WLAN_CFG_RX_MON_RING_MASK_0 |
  321. WLAN_CFG_RX_MON_RING_MASK_1 |
  322. WLAN_CFG_RX_MON_RING_MASK_2,
  323. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  324. /* host2rxdma ring masks */
  325. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  326. /* rxdma2host ring masks */
  327. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  328. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  329. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  330. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  331. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  332. /* host2rxdma mon ring masks */
  333. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  334. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  335. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  336. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  337. /* rxdma2host mon ring masks */
  338. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  339. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  340. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  341. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  342. /* rx err ring masks */
  343. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  344. WLAN_CFG_RX_ERR_RING_MASK_1 |
  345. WLAN_CFG_RX_ERR_RING_MASK_2 |
  346. WLAN_CFG_RX_ERR_RING_MASK_3,
  347. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  348. /* rx wbm rel ring masks */
  349. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  350. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  351. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  352. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  353. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  354. /* reo status ring masks */
  355. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  356. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  357. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  358. WLAN_CFG_REO_STATUS_RING_MASK_3,
  359. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  360. },
  361. /* Interrupt assignment for 2 MSI combination */
  362. {
  363. /* tx ring masks */
  364. { WLAN_CFG_TX_RING_MASK_0,
  365. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  366. /* rx ring masks */
  367. { WLAN_CFG_RX_RING_MASK_0 |
  368. WLAN_CFG_RX_RING_MASK_1,
  369. WLAN_CFG_RX_RING_MASK_2,
  370. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  371. /* rx mon ring masks */
  372. { WLAN_CFG_RX_MON_RING_MASK_0 |
  373. WLAN_CFG_RX_MON_RING_MASK_1,
  374. WLAN_CFG_RX_MON_RING_MASK_2,
  375. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  376. /* host2rxdma ring masks */
  377. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  378. /* rxdma2host ring masks */
  379. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  380. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  381. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  382. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  383. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  384. /* host2rxdma mon ring masks */
  385. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  386. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  387. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  388. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  389. /* rxdma2host mon ring masks */
  390. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  391. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  392. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  393. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  394. /* rx err ring masks */
  395. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  396. WLAN_CFG_RX_ERR_RING_MASK_1,
  397. WLAN_CFG_RX_ERR_RING_MASK_2 |
  398. WLAN_CFG_RX_ERR_RING_MASK_3,
  399. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  400. /* rx wbm rel ring masks */
  401. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  402. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  403. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  404. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  405. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  406. /* reo status ring masks */
  407. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  408. WLAN_CFG_REO_STATUS_RING_MASK_1,
  409. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  410. WLAN_CFG_REO_STATUS_RING_MASK_3,
  411. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  412. },
  413. /* Interrupt assignment for 3 MSI combination */
  414. {
  415. /* tx ring masks */
  416. { WLAN_CFG_TX_RING_MASK_0,
  417. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  418. /* rx ring masks */
  419. { WLAN_CFG_RX_RING_MASK_0,
  420. WLAN_CFG_RX_RING_MASK_1,
  421. WLAN_CFG_RX_RING_MASK_2,
  422. 0, 0, 0, 0, 0, 0, 0, 0},
  423. /* rx mon ring masks */
  424. { 0, 0,
  425. WLAN_CFG_RX_MON_RING_MASK_0 |
  426. WLAN_CFG_RX_MON_RING_MASK_1 |
  427. WLAN_CFG_RX_MON_RING_MASK_2,
  428. 0, 0, 0, 0, 0, 0, 0, 0},
  429. /* host2rxdma ring masks */
  430. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  431. /* rxdma2host ring masks */
  432. { 0, 0,
  433. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  434. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  435. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  436. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  437. 0, 0, 0, 0, 0, 0, 0, 0},
  438. /* host2rxdma mon ring masks */
  439. { 0, 0,
  440. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  441. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  442. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  443. 0, 0, 0, 0, 0, 0, 0, 0},
  444. /* rxdma2host mon ring masks */
  445. { 0, 0,
  446. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  447. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  448. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  449. 0, 0, 0, 0, 0, 0, 0, 0},
  450. /* rx err ring masks */
  451. { 0, 0,
  452. WLAN_CFG_RX_ERR_RING_MASK_0 |
  453. WLAN_CFG_RX_ERR_RING_MASK_1 |
  454. WLAN_CFG_RX_ERR_RING_MASK_2 |
  455. WLAN_CFG_RX_ERR_RING_MASK_3,
  456. 0, 0, 0, 0, 0, 0, 0, 0},
  457. /* rx wbm rel ring masks */
  458. { 0, 0,
  459. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  460. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  461. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  462. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  463. 0, 0, 0, 0, 0, 0, 0, 0},
  464. /* reo status ring masks */
  465. { 0, 0,
  466. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  467. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  468. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  469. WLAN_CFG_REO_STATUS_RING_MASK_3,
  470. 0, 0, 0, 0, 0, 0, 0, 0},
  471. },
  472. /* Interrupt assignment for 4 MSI combination */
  473. {
  474. /* tx ring masks */
  475. { WLAN_CFG_TX_RING_MASK_0,
  476. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  477. /* rx ring masks */
  478. { WLAN_CFG_RX_RING_MASK_0,
  479. WLAN_CFG_RX_RING_MASK_1,
  480. WLAN_CFG_RX_RING_MASK_2,
  481. 0, 0, 0, 0, 0, 0, 0, 0},
  482. /* rx mon ring masks */
  483. { WLAN_CFG_RX_MON_RING_MASK_0,
  484. WLAN_CFG_RX_MON_RING_MASK_1,
  485. WLAN_CFG_RX_MON_RING_MASK_2,
  486. 0, 0, 0, 0, 0, 0, 0, 0},
  487. /* host2rxdma ring masks */
  488. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  489. /* rxdma2host ring masks */
  490. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  491. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  492. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  493. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  494. 0, 0, 0, 0, 0, 0, 0},
  495. /* host2rxdma mon ring masks */
  496. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  497. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  498. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  499. 0, 0, 0, 0, 0, 0, 0, 0},
  500. /* rxdma2host mon ring masks */
  501. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  502. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  503. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  504. 0, 0, 0, 0, 0, 0, 0, 0},
  505. /* rx err ring masks */
  506. { WLAN_CFG_RX_ERR_RING_MASK_0,
  507. WLAN_CFG_RX_ERR_RING_MASK_1,
  508. WLAN_CFG_RX_ERR_RING_MASK_2,
  509. WLAN_CFG_RX_ERR_RING_MASK_3,
  510. 0, 0, 0, 0, 0, 0, 0},
  511. /* rx wbm rel ring masks */
  512. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  513. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  514. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  515. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  516. 0, 0, 0, 0, 0, 0, 0},
  517. /* reo status ring masks */
  518. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  519. WLAN_CFG_REO_STATUS_RING_MASK_1,
  520. WLAN_CFG_REO_STATUS_RING_MASK_2,
  521. WLAN_CFG_REO_STATUS_RING_MASK_3,
  522. 0, 0, 0, 0, 0, 0, 0},
  523. },
  524. /* Interrupt assignment for 5 MSI combination */
  525. {
  526. /* tx ring masks */
  527. { WLAN_CFG_TX_RING_MASK_0,
  528. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  529. /* rx ring masks */
  530. { WLAN_CFG_RX_RING_MASK_0,
  531. WLAN_CFG_RX_RING_MASK_1,
  532. WLAN_CFG_RX_RING_MASK_2,
  533. 0, 0, 0, 0, 0, 0, 0, 0},
  534. /* rx mon ring masks */
  535. { 0, 0, 0, 0,
  536. WLAN_CFG_RX_MON_RING_MASK_0 |
  537. WLAN_CFG_RX_MON_RING_MASK_1 |
  538. WLAN_CFG_RX_MON_RING_MASK_2,
  539. 0, 0, 0, 0, 0, 0},
  540. /* host2rxdma ring masks */
  541. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  542. /* rxdma2host ring masks */
  543. { 0, 0, 0, 0,
  544. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  545. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  546. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  547. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  548. 0, 0, 0, 0, 0, 0},
  549. /* host2rxdma mon ring masks */
  550. { 0, 0, 0, 0,
  551. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  552. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  553. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  554. 0, 0, 0, 0, 0, 0},
  555. /* rxdma2host mon ring masks */
  556. { 0, 0, 0, 0,
  557. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  558. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  559. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  560. 0, 0, 0, 0, 0, 0},
  561. /* rx err ring masks */
  562. { 0, 0, 0, 0,
  563. WLAN_CFG_RX_ERR_RING_MASK_0 |
  564. WLAN_CFG_RX_ERR_RING_MASK_1 |
  565. WLAN_CFG_RX_ERR_RING_MASK_2 |
  566. WLAN_CFG_RX_ERR_RING_MASK_3,
  567. 0, 0, 0, 0, 0, 0},
  568. /* rx wbm rel ring masks */
  569. { 0, 0, 0, 0,
  570. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  571. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  572. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  573. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  574. 0, 0, 0, 0, 0, 0},
  575. /* reo status ring masks */
  576. { 0, 0, 0, 0,
  577. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  578. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  579. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  580. WLAN_CFG_REO_STATUS_RING_MASK_3,
  581. 0, 0, 0, 0, 0, 0},
  582. },
  583. /* Interrupt assignment for 6 MSI combination */
  584. {
  585. /* tx ring masks */
  586. { WLAN_CFG_TX_RING_MASK_0,
  587. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  588. /* rx ring masks */
  589. { 0, 0,
  590. WLAN_CFG_RX_RING_MASK_0,
  591. WLAN_CFG_RX_RING_MASK_1,
  592. WLAN_CFG_RX_RING_MASK_2,
  593. 0, 0, 0, 0, 0, 0},
  594. /* rx mon ring masks */
  595. { WLAN_CFG_RX_MON_RING_MASK_0,
  596. WLAN_CFG_RX_MON_RING_MASK_1,
  597. WLAN_CFG_RX_MON_RING_MASK_2,
  598. 0, 0, 0, 0, 0, 0, 0, 0},
  599. /* host2rxdma ring masks */
  600. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  601. /* rxdma2host ring masks */
  602. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  603. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  604. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  605. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  606. 0, 0, 0, 0, 0, 0, 0},
  607. /* host2rxdma mon ring masks */
  608. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  609. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  610. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  611. 0, 0, 0, 0, 0, 0, 0, 0},
  612. /* rxdma2host mon ring masks */
  613. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  614. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  615. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  616. 0, 0, 0, 0, 0, 0, 0, 0},
  617. /* rx err ring masks */
  618. { WLAN_CFG_RX_ERR_RING_MASK_0,
  619. WLAN_CFG_RX_ERR_RING_MASK_1,
  620. WLAN_CFG_RX_ERR_RING_MASK_2,
  621. WLAN_CFG_RX_ERR_RING_MASK_3,
  622. 0, 0, 0, 0, 0, 0, 0},
  623. /* rx wbm rel ring masks */
  624. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  625. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  626. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  627. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  628. 0, 0, 0, 0, 0, 0, 0},
  629. /* reo status ring masks */
  630. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  631. WLAN_CFG_REO_STATUS_RING_MASK_1,
  632. WLAN_CFG_REO_STATUS_RING_MASK_2,
  633. WLAN_CFG_REO_STATUS_RING_MASK_3,
  634. 0, 0, 0, 0, 0, 0, 0},
  635. },
  636. /* Interrupt assignment for 7 MSI combination */
  637. {
  638. /* tx ring masks */
  639. { WLAN_CFG_TX_RING_MASK_0,
  640. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  641. /* rx ring masks */
  642. { 0, 0, 0,
  643. WLAN_CFG_RX_RING_MASK_0,
  644. WLAN_CFG_RX_RING_MASK_1,
  645. WLAN_CFG_RX_RING_MASK_2,
  646. 0, 0, 0, 0},
  647. /* rx mon ring masks */
  648. { 0, 0, 0,
  649. WLAN_CFG_RX_MON_RING_MASK_0,
  650. WLAN_CFG_RX_MON_RING_MASK_1,
  651. WLAN_CFG_RX_MON_RING_MASK_2,
  652. 0, 0, 0, 0, 0},
  653. /* host2rxdma ring masks */
  654. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  655. /* rxdma2host ring masks */
  656. { 0, 0, 0,
  657. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  658. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  659. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  660. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  661. 0, 0, 0, 0},
  662. /* host2rxdma mon ring masks */
  663. { 0, 0, 0,
  664. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  665. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  666. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  667. 0, 0, 0, 0, 0},
  668. /* rxdma2host mon ring masks */
  669. { 0, 0, 0,
  670. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  671. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  672. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  673. 0, 0, 0, 0, 0},
  674. /* rx err ring masks */
  675. { 0, 0, 0,
  676. WLAN_CFG_RX_ERR_RING_MASK_0,
  677. WLAN_CFG_RX_ERR_RING_MASK_1,
  678. WLAN_CFG_RX_ERR_RING_MASK_2,
  679. WLAN_CFG_RX_ERR_RING_MASK_3,
  680. 0, 0, 0, 0},
  681. /* rx wbm rel ring masks */
  682. { 0, 0, 0,
  683. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  684. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  685. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  686. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  687. 0, 0, 0, 0},
  688. /* reo status ring masks */
  689. { 0, 0, 0,
  690. WLAN_CFG_REO_STATUS_RING_MASK_0,
  691. WLAN_CFG_REO_STATUS_RING_MASK_1,
  692. WLAN_CFG_REO_STATUS_RING_MASK_2,
  693. WLAN_CFG_REO_STATUS_RING_MASK_3,
  694. 0, 0, 0, 0},
  695. },
  696. /* Interrupt assignment for 8 MSI combination */
  697. {
  698. /* tx ring masks */
  699. { WLAN_CFG_TX_RING_MASK_0,
  700. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  701. /* rx ring masks */
  702. { 0, 0, 0, 0,
  703. WLAN_CFG_RX_RING_MASK_0,
  704. WLAN_CFG_RX_RING_MASK_1,
  705. WLAN_CFG_RX_RING_MASK_2,
  706. 0, 0, 0, 0},
  707. /* rx mon ring masks */
  708. { 0, 0, 0,
  709. WLAN_CFG_RX_MON_RING_MASK_0,
  710. WLAN_CFG_RX_MON_RING_MASK_1,
  711. WLAN_CFG_RX_MON_RING_MASK_2,
  712. 0, 0, 0, 0, 0},
  713. /* host2rxdma ring masks */
  714. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  715. /* rxdma2host ring masks */
  716. { 0, 0, 0,
  717. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  718. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  719. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  720. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  721. 0, 0, 0, 0},
  722. /* host2rxdma mon ring masks */
  723. { 0, 0, 0,
  724. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  725. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  726. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  727. 0, 0, 0, 0, 0},
  728. /* rxdma2host mon ring masks */
  729. { 0, 0, 0,
  730. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  731. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  732. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  733. 0, 0, 0, 0, 0},
  734. /* rx err ring masks */
  735. { 0, 0, 0,
  736. WLAN_CFG_RX_ERR_RING_MASK_0,
  737. WLAN_CFG_RX_ERR_RING_MASK_1,
  738. WLAN_CFG_RX_ERR_RING_MASK_2,
  739. WLAN_CFG_RX_ERR_RING_MASK_3,
  740. 0, 0, 0, 0},
  741. /* rx wbm rel ring masks */
  742. { 0, 0, 0,
  743. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  744. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  745. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  746. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  747. 0, 0, 0, 0},
  748. /* reo status ring masks */
  749. { 0, 0, 0,
  750. WLAN_CFG_REO_STATUS_RING_MASK_0,
  751. WLAN_CFG_REO_STATUS_RING_MASK_1,
  752. WLAN_CFG_REO_STATUS_RING_MASK_2,
  753. WLAN_CFG_REO_STATUS_RING_MASK_3,
  754. 0, 0, 0, 0},
  755. },
  756. };
  757. #else
  758. static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = {
  759. /* Interrupt assignment for integrated configuration */
  760. {
  761. /* tx ring masks */
  762. { WLAN_CFG_TX_RING_MASK_0,
  763. WLAN_CFG_TX_RING_MASK_1,
  764. WLAN_CFG_TX_RING_MASK_2,
  765. WLAN_CFG_TX_RING_MASK_3,
  766. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  767. /* rx ring masks */
  768. { 0, 0, 0, 0, 0, 0, 0,
  769. WLAN_CFG_RX_RING_MASK_0,
  770. WLAN_CFG_RX_RING_MASK_1,
  771. WLAN_CFG_RX_RING_MASK_2,
  772. WLAN_CFG_RX_RING_MASK_3,
  773. 0, 0, 0, 0, 0},
  774. /* rx mon ring masks */
  775. { 0, 0, 0, 0,
  776. WLAN_CFG_RX_MON_RING_MASK_0,
  777. WLAN_CFG_RX_MON_RING_MASK_1,
  778. WLAN_CFG_RX_MON_RING_MASK_2,
  779. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  780. /* host2rxdma ring masks */
  781. { WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  782. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  783. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  784. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  785. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  786. /* rxdma2host ring masks */
  787. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  788. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  789. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  790. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  791. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  792. /* host2rxdma mon ring masks */
  793. { 0, 0, 0, 0,
  794. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  795. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  796. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  797. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  798. /* rxdma2host mon ring masks */
  799. { 0, 0, 0, 0,
  800. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  801. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  802. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  803. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  804. /* rx err ring masks */
  805. { WLAN_CFG_RX_ERR_RING_MASK_0,
  806. WLAN_CFG_RX_ERR_RING_MASK_1,
  807. WLAN_CFG_RX_ERR_RING_MASK_2,
  808. WLAN_CFG_RX_ERR_RING_MASK_3,
  809. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  810. /* rx wbm rel ring masks */
  811. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  812. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  813. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  814. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  815. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  816. /* reo status ring masks */
  817. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  818. WLAN_CFG_REO_STATUS_RING_MASK_1,
  819. WLAN_CFG_REO_STATUS_RING_MASK_2,
  820. WLAN_CFG_REO_STATUS_RING_MASK_3,
  821. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  822. /* rx_ring_near_full_irq mask */
  823. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  824. /* rx_ring_near_full_irq_2 mask */
  825. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  826. /* tx_ring_near_full_irq mask */
  827. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  828. /* host2txmon ring masks */
  829. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  830. /* tx mon ring masks */
  831. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  832. /* umac reset mask */
  833. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  834. },
  835. /* Interrupt assignment for 1 MSI combination */
  836. {
  837. /* tx ring masks */
  838. { WLAN_CFG_TX_RING_MASK_0 |
  839. WLAN_CFG_TX_RING_MASK_1 |
  840. WLAN_CFG_TX_RING_MASK_2 |
  841. WLAN_CFG_TX_RING_MASK_3,
  842. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  843. /* rx ring masks */
  844. { WLAN_CFG_RX_RING_MASK_0 |
  845. WLAN_CFG_RX_RING_MASK_1 |
  846. WLAN_CFG_RX_RING_MASK_2 |
  847. WLAN_CFG_RX_RING_MASK_3,
  848. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  849. /* rx mon ring masks */
  850. { WLAN_CFG_RX_MON_RING_MASK_0 |
  851. WLAN_CFG_RX_MON_RING_MASK_1 |
  852. WLAN_CFG_RX_MON_RING_MASK_2,
  853. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  854. /* host2rxdma ring masks */
  855. { WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  856. WLAN_CFG_HOST2RXDMA_RING_MASK_1 |
  857. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  858. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  859. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  860. /* rxdma2host ring masks */
  861. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  862. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  863. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  864. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  865. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  866. /* host2rxdma mon ring masks */
  867. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  868. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  869. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  870. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  871. /* rxdma2host mon ring masks */
  872. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  873. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  874. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  875. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  876. /* rx err ring masks */
  877. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  878. WLAN_CFG_RX_ERR_RING_MASK_1 |
  879. WLAN_CFG_RX_ERR_RING_MASK_2 |
  880. WLAN_CFG_RX_ERR_RING_MASK_3,
  881. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  882. /* rx wbm rel ring masks */
  883. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  884. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  885. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  886. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  887. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  888. /* reo status ring masks */
  889. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  890. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  891. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  892. WLAN_CFG_REO_STATUS_RING_MASK_3,
  893. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  894. /* rx_ring_near_full_irq mask */
  895. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  896. /* rx_ring_near_full_irq_2 mask */
  897. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  898. /* tx_ring_near_full_irq mask */
  899. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  900. /* host2txmon ring masks */
  901. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  902. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  903. /* tx mon ring masks */
  904. { WLAN_CFG_TX_MON_RING_MASK_0 |
  905. WLAN_CFG_TX_MON_RING_MASK_1,
  906. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  907. /* umac reset mask */
  908. {WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0,
  909. 0, 0, 0, 0, 0, 0, 0, 0},
  910. },
  911. /* Interrupt assignment for 2 MSI combination */
  912. {
  913. /* tx ring masks */
  914. { WLAN_CFG_TX_RING_MASK_0 |
  915. WLAN_CFG_TX_RING_MASK_1,
  916. WLAN_CFG_TX_RING_MASK_2 |
  917. WLAN_CFG_TX_RING_MASK_3,
  918. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  919. /* rx ring masks */
  920. { WLAN_CFG_RX_RING_MASK_0 |
  921. WLAN_CFG_RX_RING_MASK_1,
  922. WLAN_CFG_RX_RING_MASK_2 |
  923. WLAN_CFG_RX_RING_MASK_3,
  924. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  925. /* rx mon ring masks */
  926. { WLAN_CFG_RX_MON_RING_MASK_0 |
  927. WLAN_CFG_RX_MON_RING_MASK_1,
  928. WLAN_CFG_RX_MON_RING_MASK_2,
  929. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  930. /* host2rxdma ring masks */
  931. { WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  932. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  933. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  934. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  935. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  936. /* rxdma2host ring masks */
  937. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  938. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  939. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  940. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  941. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  942. /* host2rxdma mon ring masks */
  943. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  944. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  945. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  946. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  947. /* rxdma2host mon ring masks */
  948. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  949. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  950. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  951. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  952. /* rx err ring masks */
  953. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  954. WLAN_CFG_RX_ERR_RING_MASK_1,
  955. WLAN_CFG_RX_ERR_RING_MASK_2 |
  956. WLAN_CFG_RX_ERR_RING_MASK_3,
  957. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  958. /* rx wbm rel ring masks */
  959. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  960. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  961. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  962. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  963. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  964. /* reo status ring masks */
  965. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  966. WLAN_CFG_REO_STATUS_RING_MASK_1,
  967. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  968. WLAN_CFG_REO_STATUS_RING_MASK_3,
  969. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  970. /* rx_ring_near_full_irq mask */
  971. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  972. /* rx_ring_near_full_irq_2 mask */
  973. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  974. /* tx_ring_near_full_irq mask */
  975. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  976. /* host2txmon ring masks */
  977. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  978. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  979. /* tx mon ring masks */
  980. { WLAN_CFG_TX_MON_RING_MASK_0,
  981. WLAN_CFG_TX_MON_RING_MASK_1,
  982. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  983. /* umac reset mask */
  984. {0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0,
  985. 0, 0, 0, 0, 0, 0, 0, 0},
  986. },
  987. /* Interrupt assignment for 3 MSI combination */
  988. {
  989. /* tx ring masks */
  990. { WLAN_CFG_TX_RING_MASK_0 |
  991. WLAN_CFG_TX_RING_MASK_1,
  992. WLAN_CFG_TX_RING_MASK_2 |
  993. WLAN_CFG_TX_RING_MASK_3,
  994. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  995. /* rx ring masks */
  996. { WLAN_CFG_RX_RING_MASK_0 |
  997. WLAN_CFG_RX_RING_MASK_1,
  998. WLAN_CFG_RX_RING_MASK_2 |
  999. WLAN_CFG_RX_RING_MASK_3,
  1000. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1001. /* rx mon ring masks */
  1002. { 0, 0,
  1003. WLAN_CFG_RX_MON_RING_MASK_0 |
  1004. WLAN_CFG_RX_MON_RING_MASK_1 |
  1005. WLAN_CFG_RX_MON_RING_MASK_2,
  1006. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1007. /* host2rxdma ring masks */
  1008. { 0, 0,
  1009. WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1010. WLAN_CFG_HOST2RXDMA_RING_MASK_1 |
  1011. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1012. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1013. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1014. /* rxdma2host ring masks */
  1015. { 0, 0,
  1016. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1017. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  1018. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1019. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1020. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1021. /* host2rxdma mon ring masks */
  1022. { 0, 0,
  1023. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1024. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  1025. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1026. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1027. /* rxdma2host mon ring masks */
  1028. { 0, 0,
  1029. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1030. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  1031. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1032. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1033. /* rx err ring masks */
  1034. { 0, 0,
  1035. WLAN_CFG_RX_ERR_RING_MASK_0 |
  1036. WLAN_CFG_RX_ERR_RING_MASK_1 |
  1037. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1038. WLAN_CFG_RX_ERR_RING_MASK_3,
  1039. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1040. /* rx wbm rel ring masks */
  1041. { 0, 0,
  1042. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1043. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  1044. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1045. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1046. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1047. /* reo status ring masks */
  1048. { 0, 0,
  1049. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1050. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  1051. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1052. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1053. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1054. /* rx_ring_near_full_irq mask */
  1055. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1056. /* rx_ring_near_full_irq_2 mask */
  1057. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1058. /* tx_ring_near_full_irq mask */
  1059. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1060. /* host2txmon ring masks */
  1061. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1062. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1063. /* tx mon ring masks */
  1064. { WLAN_CFG_TX_MON_RING_MASK_0,
  1065. WLAN_CFG_TX_MON_RING_MASK_1,
  1066. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1067. /* umac reset mask */
  1068. {0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0,
  1069. 0, 0, 0, 0, 0, 0, 0, 0},
  1070. },
  1071. /* Interrupt assignment for 4 MSI combination */
  1072. {
  1073. /* tx ring masks */
  1074. { WLAN_CFG_TX_RING_MASK_0,
  1075. WLAN_CFG_TX_RING_MASK_1,
  1076. WLAN_CFG_TX_RING_MASK_2,
  1077. WLAN_CFG_TX_RING_MASK_3,
  1078. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1079. /* rx ring masks */
  1080. { WLAN_CFG_RX_RING_MASK_0,
  1081. WLAN_CFG_RX_RING_MASK_1,
  1082. WLAN_CFG_RX_RING_MASK_2,
  1083. WLAN_CFG_RX_RING_MASK_3,
  1084. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1085. /* rx mon ring masks */
  1086. { WLAN_CFG_RX_MON_RING_MASK_0,
  1087. WLAN_CFG_RX_MON_RING_MASK_1,
  1088. WLAN_CFG_RX_MON_RING_MASK_2,
  1089. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1090. /* host2rxdma ring masks */
  1091. { WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1092. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1093. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1094. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1095. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1096. /* rxdma2host ring masks */
  1097. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1098. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1099. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1100. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1101. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1102. /* host2rxdma mon ring masks */
  1103. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1104. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1105. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1106. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1107. /* rxdma2host mon ring masks */
  1108. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1109. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1110. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1111. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1112. /* rx err ring masks */
  1113. { WLAN_CFG_RX_ERR_RING_MASK_0,
  1114. WLAN_CFG_RX_ERR_RING_MASK_1,
  1115. WLAN_CFG_RX_ERR_RING_MASK_2,
  1116. WLAN_CFG_RX_ERR_RING_MASK_3,
  1117. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1118. /* rx wbm rel ring masks */
  1119. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1120. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1121. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1122. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1123. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1124. /* reo status ring masks */
  1125. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  1126. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1127. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1128. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1129. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1130. /* rx_ring_near_full_irq mask */
  1131. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1132. /* rx_ring_near_full_irq_2 mask */
  1133. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1134. /* tx_ring_near_full_irq mask */
  1135. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1136. /* host2txmon ring masks */
  1137. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1138. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1139. /* tx mon ring masks */
  1140. { WLAN_CFG_TX_MON_RING_MASK_0,
  1141. WLAN_CFG_TX_MON_RING_MASK_1,
  1142. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1143. /* umac reset mask */
  1144. {0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0,
  1145. 0, 0, 0, 0, 0, 0, 0, 0},
  1146. },
  1147. /* Interrupt assignment for 5 MSI combination */
  1148. {
  1149. /* tx ring masks */
  1150. { WLAN_CFG_TX_RING_MASK_0,
  1151. WLAN_CFG_TX_RING_MASK_1,
  1152. WLAN_CFG_TX_RING_MASK_2,
  1153. WLAN_CFG_TX_RING_MASK_3,
  1154. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1155. /* rx ring masks */
  1156. { WLAN_CFG_RX_RING_MASK_0,
  1157. WLAN_CFG_RX_RING_MASK_1,
  1158. WLAN_CFG_RX_RING_MASK_2,
  1159. WLAN_CFG_RX_RING_MASK_3,
  1160. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1161. /* rx mon ring masks */
  1162. { 0, 0, 0, 0,
  1163. WLAN_CFG_RX_MON_RING_MASK_0 |
  1164. WLAN_CFG_RX_MON_RING_MASK_1 |
  1165. WLAN_CFG_RX_MON_RING_MASK_2,
  1166. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1167. /* host2rxdma ring masks */
  1168. { 0, 0, 0, 0,
  1169. WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1170. WLAN_CFG_HOST2RXDMA_RING_MASK_1 |
  1171. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1172. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1173. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1174. /* rxdma2host ring masks */
  1175. { 0, 0, 0, 0,
  1176. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1177. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  1178. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1179. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1180. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1181. /* host2rxdma mon ring masks */
  1182. { 0, 0, 0, 0,
  1183. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1184. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  1185. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1186. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1187. /* rxdma2host mon ring masks */
  1188. { 0, 0, 0, 0,
  1189. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1190. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  1191. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1192. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1193. /* rx err ring masks */
  1194. { 0, 0, 0, 0,
  1195. WLAN_CFG_RX_ERR_RING_MASK_0 |
  1196. WLAN_CFG_RX_ERR_RING_MASK_1 |
  1197. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1198. WLAN_CFG_RX_ERR_RING_MASK_3,
  1199. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1200. /* rx wbm rel ring masks */
  1201. { 0, 0, 0, 0,
  1202. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1203. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  1204. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1205. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1206. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1207. /* reo status ring masks */
  1208. { 0, 0, 0, 0,
  1209. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1210. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  1211. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1212. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1213. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1214. /* rx_ring_near_full_irq mask */
  1215. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1216. /* rx_ring_near_full_irq_2 mask */
  1217. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1218. /* tx_ring_near_full_irq mask */
  1219. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1220. /* host2txmon ring masks */
  1221. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1222. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1223. /* tx mon ring masks */
  1224. { WLAN_CFG_TX_MON_RING_MASK_0,
  1225. WLAN_CFG_TX_MON_RING_MASK_1,
  1226. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1227. /* umac reset mask */
  1228. {0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0,
  1229. 0, 0, 0, 0, 0, 0, 0, 0},
  1230. },
  1231. /* Interrupt assignment for 6 MSI combination */
  1232. {
  1233. /* tx ring masks */
  1234. { WLAN_CFG_TX_RING_MASK_0,
  1235. WLAN_CFG_TX_RING_MASK_1,
  1236. WLAN_CFG_TX_RING_MASK_2,
  1237. WLAN_CFG_TX_RING_MASK_3,
  1238. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1239. /* rx ring masks */
  1240. { 0, 0,
  1241. WLAN_CFG_RX_RING_MASK_0,
  1242. WLAN_CFG_RX_RING_MASK_1,
  1243. WLAN_CFG_RX_RING_MASK_2,
  1244. WLAN_CFG_RX_RING_MASK_3,
  1245. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1246. /* rx mon ring masks */
  1247. { WLAN_CFG_RX_MON_RING_MASK_0,
  1248. WLAN_CFG_RX_MON_RING_MASK_1,
  1249. WLAN_CFG_RX_MON_RING_MASK_2,
  1250. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1251. /* host2rxdma ring masks */
  1252. { WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1253. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1254. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1255. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1256. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1257. /* rxdma2host ring masks */
  1258. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1259. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1260. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1261. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1262. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1263. /* host2rxdma mon ring masks */
  1264. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1265. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1266. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1267. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1268. /* rxdma2host mon ring masks */
  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, 0, 0, 0, 0, 0, 0, 0, 0},
  1273. /* rx err ring masks */
  1274. { WLAN_CFG_RX_ERR_RING_MASK_0,
  1275. WLAN_CFG_RX_ERR_RING_MASK_1,
  1276. WLAN_CFG_RX_ERR_RING_MASK_2,
  1277. WLAN_CFG_RX_ERR_RING_MASK_3,
  1278. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1279. /* rx wbm rel ring masks */
  1280. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1281. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1282. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1283. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1284. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1285. /* reo status ring masks */
  1286. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  1287. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1288. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1289. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1290. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1291. /* rx_ring_near_full_irq mask */
  1292. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1293. /* rx_ring_near_full_irq_2 mask */
  1294. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1295. /* tx_ring_near_full_irq mask */
  1296. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1297. /* host2txmon ring masks */
  1298. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1299. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1300. /* tx mon ring masks */
  1301. { WLAN_CFG_TX_MON_RING_MASK_0,
  1302. WLAN_CFG_TX_MON_RING_MASK_1,
  1303. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1304. /* umac reset mask */
  1305. {0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0,
  1306. 0, 0, 0, 0, 0, 0, 0, 0},
  1307. },
  1308. /* Interrupt assignment for 7 MSI combination */
  1309. {
  1310. /* tx ring masks */
  1311. { WLAN_CFG_TX_RING_MASK_0,
  1312. WLAN_CFG_TX_RING_MASK_1,
  1313. WLAN_CFG_TX_RING_MASK_2,
  1314. WLAN_CFG_TX_RING_MASK_3,
  1315. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1316. /* rx ring masks */
  1317. { 0, 0, 0,
  1318. WLAN_CFG_RX_RING_MASK_0,
  1319. WLAN_CFG_RX_RING_MASK_1,
  1320. WLAN_CFG_RX_RING_MASK_2,
  1321. WLAN_CFG_RX_RING_MASK_3,
  1322. 0, 0, 0, 0, 0, 0, 0, 0},
  1323. /* rx mon ring masks */
  1324. { 0, 0, 0,
  1325. WLAN_CFG_RX_MON_RING_MASK_0,
  1326. WLAN_CFG_RX_MON_RING_MASK_1,
  1327. WLAN_CFG_RX_MON_RING_MASK_2,
  1328. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1329. /* host2rxdma ring masks */
  1330. { 0, 0, 0,
  1331. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1332. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1333. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1334. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1335. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1336. /* rxdma2host ring masks */
  1337. { 0, 0, 0,
  1338. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1339. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1340. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1341. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1342. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1343. /* host2rxdma mon ring masks */
  1344. { 0, 0, 0,
  1345. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1346. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1347. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1348. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1349. /* rxdma2host mon ring masks */
  1350. { 0, 0, 0,
  1351. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1352. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1353. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1354. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1355. /* rx err ring masks */
  1356. { 0, 0, 0,
  1357. WLAN_CFG_RX_ERR_RING_MASK_0,
  1358. WLAN_CFG_RX_ERR_RING_MASK_1,
  1359. WLAN_CFG_RX_ERR_RING_MASK_2,
  1360. WLAN_CFG_RX_ERR_RING_MASK_3,
  1361. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1362. /* rx wbm rel ring masks */
  1363. { 0, 0, 0,
  1364. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1365. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1366. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1367. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1368. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1369. /* reo status ring masks */
  1370. { 0, 0, 0,
  1371. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1372. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1373. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1374. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1375. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1376. /* rx_ring_near_full_irq mask */
  1377. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1378. /* rx_ring_near_full_irq_2 mask */
  1379. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1380. /* tx_ring_near_full_irq mask */
  1381. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1382. /* host2txmon ring masks */
  1383. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1384. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1385. /* tx mon ring masks */
  1386. { WLAN_CFG_TX_MON_RING_MASK_0,
  1387. WLAN_CFG_TX_MON_RING_MASK_1,
  1388. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1389. /* umac reset mask */
  1390. {0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0,
  1391. 0, 0, 0, 0, 0, 0, 0, 0},
  1392. },
  1393. /* Interrupt assignment for 8 MSI combination */
  1394. {
  1395. /* tx ring masks */
  1396. { WLAN_CFG_TX_RING_MASK_0,
  1397. WLAN_CFG_TX_RING_MASK_1,
  1398. WLAN_CFG_TX_RING_MASK_2,
  1399. WLAN_CFG_TX_RING_MASK_3,
  1400. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1401. /* rx ring masks */
  1402. { 0, 0, 0, 0,
  1403. WLAN_CFG_RX_RING_MASK_0,
  1404. WLAN_CFG_RX_RING_MASK_1,
  1405. WLAN_CFG_RX_RING_MASK_2,
  1406. WLAN_CFG_RX_RING_MASK_3,
  1407. 0, 0, 0, 0, 0, 0, 0, 0},
  1408. /* rx mon ring masks */
  1409. { 0, 0, 0,
  1410. WLAN_CFG_RX_MON_RING_MASK_0,
  1411. WLAN_CFG_RX_MON_RING_MASK_1,
  1412. WLAN_CFG_RX_MON_RING_MASK_2,
  1413. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1414. /* host2rxdma ring masks */
  1415. { 0, 0, 0,
  1416. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1417. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1418. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1419. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1420. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1421. /* rxdma2host ring masks */
  1422. { 0, 0, 0,
  1423. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1424. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1425. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1426. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1427. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1428. /* host2rxdma mon ring masks */
  1429. { 0, 0, 0,
  1430. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1431. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1432. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1433. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1434. /* rxdma2host mon ring masks */
  1435. { 0, 0, 0,
  1436. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1437. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1438. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1439. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1440. /* rx err ring masks */
  1441. { 0, 0, 0,
  1442. WLAN_CFG_RX_ERR_RING_MASK_0,
  1443. WLAN_CFG_RX_ERR_RING_MASK_1,
  1444. WLAN_CFG_RX_ERR_RING_MASK_2,
  1445. WLAN_CFG_RX_ERR_RING_MASK_3,
  1446. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1447. /* rx wbm rel ring masks */
  1448. { 0, 0, 0,
  1449. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1450. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1451. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1452. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1453. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1454. /* reo status ring masks */
  1455. { 0, 0, 0,
  1456. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1457. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1458. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1459. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1460. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1461. /* rx_ring_near_full_irq mask */
  1462. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1463. /* rx_ring_near_full_irq_2 mask */
  1464. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1465. /* tx_ring_near_full_irq mask */
  1466. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1467. /* host2txmon ring masks */
  1468. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1469. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1470. /* tx mon ring masks */
  1471. { WLAN_CFG_TX_MON_RING_MASK_0,
  1472. WLAN_CFG_TX_MON_RING_MASK_1,
  1473. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1474. /* umac reset mask */
  1475. {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0,
  1476. 0, 0, 0, 0, 0, 0, 0, 0},
  1477. },
  1478. /* Interrupt assignment for 9 MSI combination */
  1479. {
  1480. /* tx ring masks */
  1481. { WLAN_CFG_TX_RING_MASK_0,
  1482. WLAN_CFG_TX_RING_MASK_1,
  1483. WLAN_CFG_TX_RING_MASK_2,
  1484. WLAN_CFG_TX_RING_MASK_3,
  1485. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1486. /* rx ring masks */
  1487. { 0, 0, 0, 0,
  1488. WLAN_CFG_RX_RING_MASK_0,
  1489. WLAN_CFG_RX_RING_MASK_1,
  1490. WLAN_CFG_RX_RING_MASK_2,
  1491. WLAN_CFG_RX_RING_MASK_3,
  1492. 0, 0, 0, 0, 0, 0, 0, 0},
  1493. /* rx mon ring masks */
  1494. { 0, 0, 0,
  1495. WLAN_CFG_RX_MON_RING_MASK_0,
  1496. WLAN_CFG_RX_MON_RING_MASK_1,
  1497. WLAN_CFG_RX_MON_RING_MASK_2,
  1498. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1499. /* host2rxdma ring masks */
  1500. { 0, 0, 0,
  1501. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1502. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1503. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1504. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1505. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1506. /* rxdma2host ring masks */
  1507. { 0, 0, 0,
  1508. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1509. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1510. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1511. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1512. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1513. /* host2rxdma mon ring masks */
  1514. { 0, 0, 0,
  1515. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1516. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1517. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1518. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1519. /* rxdma2host mon ring masks */
  1520. { 0, 0, 0,
  1521. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1522. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1523. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1524. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1525. /* rx err ring masks */
  1526. { 0, 0, 0,
  1527. WLAN_CFG_RX_ERR_RING_MASK_0,
  1528. WLAN_CFG_RX_ERR_RING_MASK_1,
  1529. WLAN_CFG_RX_ERR_RING_MASK_2,
  1530. WLAN_CFG_RX_ERR_RING_MASK_3,
  1531. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1532. /* rx wbm rel ring masks */
  1533. { 0, 0, 0,
  1534. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1535. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1536. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1537. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1538. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1539. /* reo status ring masks */
  1540. { 0, 0, 0,
  1541. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1542. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1543. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1544. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1545. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1546. /* rx_ring_near_full_irq mask */
  1547. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1548. /* rx_ring_near_full_irq_2 mask */
  1549. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1550. /* tx_ring_near_full_irq mask */
  1551. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1552. /* host2txmon ring masks */
  1553. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1554. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1555. /* tx mon ring masks */
  1556. { WLAN_CFG_TX_MON_RING_MASK_0,
  1557. WLAN_CFG_TX_MON_RING_MASK_1,
  1558. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1559. /* umac reset mask */
  1560. {0, 0, 0, 0, 0, 0, 0, 0,
  1561. WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  1562. },
  1563. /* Interrupt assignment for 10 MSI combination */
  1564. {
  1565. /* tx ring masks */
  1566. { WLAN_CFG_TX_RING_MASK_0,
  1567. WLAN_CFG_TX_RING_MASK_1,
  1568. WLAN_CFG_TX_RING_MASK_2,
  1569. WLAN_CFG_TX_RING_MASK_3,
  1570. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1571. /* rx ring masks */
  1572. { 0, 0, 0, 0,
  1573. WLAN_CFG_RX_RING_MASK_0,
  1574. WLAN_CFG_RX_RING_MASK_1,
  1575. WLAN_CFG_RX_RING_MASK_2,
  1576. WLAN_CFG_RX_RING_MASK_3,
  1577. 0, 0, 0, 0, 0, 0, 0, 0},
  1578. /* rx mon ring masks */
  1579. { 0, 0, 0,
  1580. WLAN_CFG_RX_MON_RING_MASK_0,
  1581. WLAN_CFG_RX_MON_RING_MASK_1,
  1582. WLAN_CFG_RX_MON_RING_MASK_2,
  1583. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1584. /* host2rxdma ring masks */
  1585. { 0, 0, 0,
  1586. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1587. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1588. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1589. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1590. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1591. /* rxdma2host ring masks */
  1592. { 0, 0, 0,
  1593. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1594. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1595. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1596. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1597. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1598. /* host2rxdma mon ring masks */
  1599. { 0, 0, 0,
  1600. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1601. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1602. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1603. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1604. /* rxdma2host mon ring masks */
  1605. { 0, 0, 0,
  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},
  1610. /* rx err ring masks */
  1611. { 0, 0, 0,
  1612. WLAN_CFG_RX_ERR_RING_MASK_0,
  1613. WLAN_CFG_RX_ERR_RING_MASK_1,
  1614. WLAN_CFG_RX_ERR_RING_MASK_2,
  1615. WLAN_CFG_RX_ERR_RING_MASK_3,
  1616. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1617. /* rx wbm rel ring masks */
  1618. { 0, 0, 0,
  1619. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1620. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1621. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1622. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1623. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1624. /* reo status ring masks */
  1625. { 0, 0, 0,
  1626. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1627. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1628. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1629. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1630. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1631. /* rx_ring_near_full_irq mask */
  1632. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1633. /* rx_ring_near_full_irq_2 mask */
  1634. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1635. /* tx_ring_near_full_irq mask */
  1636. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1637. /* host2txmon ring masks */
  1638. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1639. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1640. /* tx mon ring masks */
  1641. { WLAN_CFG_TX_MON_RING_MASK_0,
  1642. WLAN_CFG_TX_MON_RING_MASK_1,
  1643. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1644. /* umac reset mask */
  1645. {0, 0, 0, 0, 0, 0, 0, 0,
  1646. 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0},
  1647. },
  1648. /* Interrupt assignment for 11 MSI combination */
  1649. {
  1650. /* tx ring masks */
  1651. { WLAN_CFG_TX_RING_MASK_0,
  1652. WLAN_CFG_TX_RING_MASK_1,
  1653. WLAN_CFG_TX_RING_MASK_2,
  1654. WLAN_CFG_TX_RING_MASK_3,
  1655. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1656. /* rx ring masks */
  1657. { 0, 0, 0, 0,
  1658. WLAN_CFG_RX_RING_MASK_0,
  1659. WLAN_CFG_RX_RING_MASK_1,
  1660. WLAN_CFG_RX_RING_MASK_2,
  1661. WLAN_CFG_RX_RING_MASK_3,
  1662. 0, 0, 0, 0, 0, 0, 0, 0},
  1663. /* rx mon ring masks */
  1664. { 0, 0, 0,
  1665. WLAN_CFG_RX_MON_RING_MASK_0,
  1666. WLAN_CFG_RX_MON_RING_MASK_1,
  1667. WLAN_CFG_RX_MON_RING_MASK_2,
  1668. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1669. /* host2rxdma ring masks */
  1670. { 0, 0, 0,
  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},
  1676. /* rxdma2host ring masks */
  1677. { 0, 0, 0,
  1678. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1679. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1680. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1681. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1682. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1683. /* host2rxdma mon ring masks */
  1684. { 0, 0, 0,
  1685. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1686. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1687. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1688. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1689. /* rxdma2host mon ring masks */
  1690. { 0, 0, 0,
  1691. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1692. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1693. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1694. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1695. /* rx err ring masks */
  1696. { 0, 0, 0,
  1697. WLAN_CFG_RX_ERR_RING_MASK_0,
  1698. WLAN_CFG_RX_ERR_RING_MASK_1,
  1699. WLAN_CFG_RX_ERR_RING_MASK_2,
  1700. WLAN_CFG_RX_ERR_RING_MASK_3,
  1701. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1702. /* rx wbm rel ring masks */
  1703. { 0, 0, 0,
  1704. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1705. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1706. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1707. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1708. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1709. /* reo status ring masks */
  1710. { 0, 0, 0,
  1711. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1712. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1713. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1714. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1715. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1716. /* rx_ring_near_full_irq mask */
  1717. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1718. /* rx_ring_near_full_irq_2 mask */
  1719. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1720. /* tx_ring_near_full_irq mask */
  1721. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1722. /* host2txmon ring masks */
  1723. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1724. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1725. /* tx mon ring masks */
  1726. { WLAN_CFG_TX_MON_RING_MASK_0,
  1727. WLAN_CFG_TX_MON_RING_MASK_1,
  1728. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1729. /* umac reset mask */
  1730. {0, 0, 0, 0, 0, 0, 0, 0,
  1731. 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0},
  1732. },
  1733. /* Interrupt assignment for 12 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},
  1741. /* rx ring masks */
  1742. { 0, 0, 0, 0,
  1743. WLAN_CFG_RX_RING_MASK_0,
  1744. WLAN_CFG_RX_RING_MASK_1,
  1745. WLAN_CFG_RX_RING_MASK_2,
  1746. WLAN_CFG_RX_RING_MASK_3,
  1747. 0, 0, 0, 0, 0, 0, 0, 0},
  1748. /* rx mon ring masks */
  1749. { 0, 0, 0, 0, 0, 0, 0, 0,
  1750. WLAN_CFG_RX_MON_RING_MASK_0,
  1751. WLAN_CFG_RX_MON_RING_MASK_1,
  1752. WLAN_CFG_RX_MON_RING_MASK_2,
  1753. 0, 0, 0, 0, 0},
  1754. /* host2rxdma ring masks */
  1755. { 0, 0, 0, 0, 0, 0, 0, 0,
  1756. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1757. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1758. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1759. 0, 0, 0, 0, 0},
  1760. /* rxdma2host ring masks */
  1761. { 0, 0, 0, 0, 0, 0, 0, 0,
  1762. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1763. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1764. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1765. 0, 0, 0, 0, 0},
  1766. /* host2rxdma mon ring masks */
  1767. { 0, 0, 0, 0, 0, 0, 0, 0,
  1768. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1769. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1770. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1771. 0, 0, 0, 0, 0},
  1772. /* rxdma2host mon ring masks */
  1773. { 0, 0, 0, 0, 0, 0, 0, 0,
  1774. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1775. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1776. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1777. 0, 0, 0, 0, 0},
  1778. /* rx err ring masks */
  1779. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1780. WLAN_CFG_RX_ERR_RING_MASK_0,
  1781. 0, 0, 0, 0},
  1782. /* rx wbm rel ring masks */
  1783. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1784. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1785. 0, 0, 0, 0},
  1786. /* reo status ring masks */
  1787. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1788. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1789. 0, 0, 0, 0},
  1790. /* rx_ring_near_full_irq mask */
  1791. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1792. /* rx_ring_near_full_irq_2 mask */
  1793. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1794. /* tx_ring_near_full_irq mask */
  1795. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1796. /* host2txmon ring masks */
  1797. { 0, 0, 0, 0, 0, 0, 0, 0,
  1798. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1799. 0, 0, 0, 0, 0, 0, 0},
  1800. /* tx mon ring masks */
  1801. { 0, 0, 0, 0, 0, 0, 0, 0,
  1802. WLAN_CFG_TX_MON_RING_MASK_0,
  1803. WLAN_CFG_TX_MON_RING_MASK_1,
  1804. 0, 0, 0, 0, 0, 0},
  1805. /* umac reset mask */
  1806. {0, 0, 0, 0, 0, 0, 0, 0,
  1807. 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0},
  1808. },
  1809. /* Interrupt assignment for 13 MSI combination */
  1810. {
  1811. /* tx ring masks */
  1812. { WLAN_CFG_TX_RING_MASK_0,
  1813. WLAN_CFG_TX_RING_MASK_1,
  1814. WLAN_CFG_TX_RING_MASK_2,
  1815. WLAN_CFG_TX_RING_MASK_3,
  1816. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1817. /* rx ring masks */
  1818. { 0, 0, 0, 0,
  1819. WLAN_CFG_RX_RING_MASK_0,
  1820. WLAN_CFG_RX_RING_MASK_1,
  1821. WLAN_CFG_RX_RING_MASK_2,
  1822. WLAN_CFG_RX_RING_MASK_3,
  1823. 0, 0, 0, 0, 0, 0, 0, 0},
  1824. /* rx mon ring masks */
  1825. { 0, 0, 0, 0, 0, 0, 0, 0,
  1826. WLAN_CFG_RX_MON_RING_MASK_0,
  1827. WLAN_CFG_RX_MON_RING_MASK_1,
  1828. WLAN_CFG_RX_MON_RING_MASK_2,
  1829. 0, 0, 0, 0, 0},
  1830. /* host2rxdma ring masks */
  1831. { 0, 0, 0, 0, 0, 0, 0, 0,
  1832. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1833. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1834. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1835. 0, 0, 0, 0, 0},
  1836. /* rxdma2host ring masks */
  1837. { 0, 0, 0, 0, 0, 0, 0, 0,
  1838. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1839. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1840. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1841. 0, 0, 0, 0, 0},
  1842. /* host2rxdma mon ring masks */
  1843. { 0, 0, 0, 0, 0, 0, 0, 0,
  1844. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1845. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1846. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1847. 0, 0, 0, 0, 0},
  1848. /* rxdma2host mon ring masks */
  1849. { 0, 0, 0, 0, 0, 0, 0, 0,
  1850. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1851. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1852. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1853. 0, 0, 0, 0, 0},
  1854. /* rx err ring masks */
  1855. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1856. WLAN_CFG_RX_ERR_RING_MASK_0,
  1857. 0, 0, 0, 0},
  1858. /* rx wbm rel ring masks */
  1859. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1860. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1861. 0, 0, 0, 0},
  1862. /* reo status ring masks */
  1863. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1864. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1865. 0, 0, 0, 0},
  1866. /* rx_ring_near_full_irq mask */
  1867. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1868. /* rx_ring_near_full_irq_2 mask */
  1869. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1870. /* tx_ring_near_full_irq mask */
  1871. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1872. /* host2txmon ring masks */
  1873. { 0, 0, 0, 0, 0, 0, 0, 0,
  1874. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1875. 0, 0, 0, 0, 0, 0, 0},
  1876. /* tx mon ring masks */
  1877. { 0, 0, 0, 0, 0, 0, 0, 0,
  1878. WLAN_CFG_TX_MON_RING_MASK_0,
  1879. WLAN_CFG_TX_MON_RING_MASK_1,
  1880. 0, 0, 0, 0, 0, 0},
  1881. /* umac reset mask */
  1882. {0, 0, 0, 0, 0, 0, 0, 0,
  1883. 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0},
  1884. },
  1885. /* Interrupt assignment for 14 MSI combination */
  1886. {
  1887. /* tx ring masks */
  1888. { WLAN_CFG_TX_RING_MASK_0,
  1889. WLAN_CFG_TX_RING_MASK_1,
  1890. WLAN_CFG_TX_RING_MASK_2,
  1891. WLAN_CFG_TX_RING_MASK_3,
  1892. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1893. /* rx ring masks */
  1894. { 0, 0, 0, 0,
  1895. WLAN_CFG_RX_RING_MASK_0,
  1896. WLAN_CFG_RX_RING_MASK_1,
  1897. WLAN_CFG_RX_RING_MASK_2,
  1898. WLAN_CFG_RX_RING_MASK_3,
  1899. 0, 0, 0, 0, 0, 0, 0, 0},
  1900. /* rx mon ring masks */
  1901. { 0, 0, 0, 0, 0, 0, 0, 0,
  1902. WLAN_CFG_RX_MON_RING_MASK_0,
  1903. WLAN_CFG_RX_MON_RING_MASK_1,
  1904. WLAN_CFG_RX_MON_RING_MASK_2,
  1905. 0, 0, 0, 0, 0},
  1906. /* host2rxdma ring masks */
  1907. { 0, 0, 0, 0, 0, 0, 0, 0,
  1908. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1909. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1910. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1911. 0, 0, 0, 0, 0},
  1912. /* rxdma2host ring masks */
  1913. { 0, 0, 0, 0, 0, 0, 0, 0,
  1914. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1915. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1916. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1917. 0, 0, 0, 0, 0},
  1918. /* host2rxdma mon ring masks */
  1919. { 0, 0, 0, 0, 0, 0, 0, 0,
  1920. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1921. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1922. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1923. 0, 0, 0, 0, 0},
  1924. /* rxdma2host mon ring masks */
  1925. { 0, 0, 0, 0, 0, 0, 0, 0,
  1926. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1927. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1928. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1929. 0, 0, 0, 0, 0},
  1930. /* rx err ring masks */
  1931. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1932. WLAN_CFG_RX_ERR_RING_MASK_0,
  1933. 0, 0, 0, 0},
  1934. /* rx wbm rel ring masks */
  1935. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1936. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1937. 0, 0, 0, 0},
  1938. /* reo status ring masks */
  1939. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1940. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1941. 0, 0, 0, 0},
  1942. /* rx_ring_near_full_irq mask */
  1943. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1944. /* rx_ring_near_full_irq_2 mask */
  1945. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1946. /* tx_ring_near_full_irq mask */
  1947. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1948. /* host2txmon ring masks */
  1949. { 0, 0, 0, 0, 0, 0, 0, 0,
  1950. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1951. 0, 0, 0, 0, 0, 0, 0},
  1952. /* tx mon ring masks */
  1953. { 0, 0, 0, 0, 0, 0, 0, 0,
  1954. WLAN_CFG_TX_MON_RING_MASK_0,
  1955. WLAN_CFG_TX_MON_RING_MASK_1,
  1956. 0, 0, 0, 0, 0, 0},
  1957. /* umac reset mask */
  1958. {0, 0, 0, 0, 0, 0, 0, 0,
  1959. 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0},
  1960. },
  1961. /* Interrupt assignment for 15 MSI combination */
  1962. {
  1963. /* tx ring masks */
  1964. { WLAN_CFG_TX_RING_MASK_0,
  1965. WLAN_CFG_TX_RING_MASK_1,
  1966. WLAN_CFG_TX_RING_MASK_2,
  1967. WLAN_CFG_TX_RING_MASK_3,
  1968. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1969. /* rx ring masks */
  1970. { 0, 0, 0, 0,
  1971. WLAN_CFG_RX_RING_MASK_0,
  1972. WLAN_CFG_RX_RING_MASK_1,
  1973. WLAN_CFG_RX_RING_MASK_2,
  1974. WLAN_CFG_RX_RING_MASK_3,
  1975. 0, 0, 0, 0, 0, 0, 0, 0},
  1976. /* rx mon ring masks */
  1977. { 0, 0, 0, 0, 0, 0, 0, 0,
  1978. WLAN_CFG_RX_MON_RING_MASK_0,
  1979. WLAN_CFG_RX_MON_RING_MASK_1,
  1980. WLAN_CFG_RX_MON_RING_MASK_2,
  1981. 0, 0, 0, 0, 0},
  1982. /* host2rxdma ring masks */
  1983. { 0, 0, 0, 0, 0, 0, 0, 0,
  1984. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1985. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1986. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1987. 0, 0, 0, 0, 0},
  1988. /* rxdma2host ring masks */
  1989. { 0, 0, 0, 0, 0, 0, 0, 0,
  1990. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1991. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1992. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1993. 0, 0, 0, 0, 0},
  1994. /* host2rxdma mon ring masks */
  1995. { 0, 0, 0, 0, 0, 0, 0, 0,
  1996. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1997. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1998. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1999. 0, 0, 0, 0, 0},
  2000. /* rxdma2host mon ring masks */
  2001. { 0, 0, 0, 0, 0, 0, 0, 0,
  2002. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2003. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2004. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2005. 0, 0, 0, 0, 0},
  2006. /* rx err ring masks */
  2007. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2008. WLAN_CFG_RX_ERR_RING_MASK_0,
  2009. 0, 0, 0, 0},
  2010. /* rx wbm rel ring masks */
  2011. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2012. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2013. 0, 0, 0, 0},
  2014. /* reo status ring masks */
  2015. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2016. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2017. 0, 0, 0, 0},
  2018. /* rx_ring_near_full_irq mask */
  2019. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2020. /* rx_ring_near_full_irq_2 mask */
  2021. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2022. /* tx_ring_near_full_irq mask */
  2023. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2024. /* host2txmon ring masks */
  2025. { 0, 0, 0, 0, 0, 0, 0, 0,
  2026. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2027. 0, 0, 0, 0, 0, 0, 0},
  2028. /* tx mon ring masks */
  2029. { 0, 0, 0, 0, 0, 0, 0, 0,
  2030. WLAN_CFG_TX_MON_RING_MASK_0,
  2031. WLAN_CFG_TX_MON_RING_MASK_1,
  2032. 0, 0, 0, 0, 0, 0},
  2033. /* umac reset mask */
  2034. {0, 0, 0, 0, 0, 0, 0, 0,
  2035. 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0},
  2036. },
  2037. /* Interrupt assignment for 16 MSI combination */
  2038. {
  2039. /* tx ring masks */
  2040. { WLAN_CFG_TX_RING_MASK_0,
  2041. WLAN_CFG_TX_RING_MASK_1,
  2042. WLAN_CFG_TX_RING_MASK_2,
  2043. WLAN_CFG_TX_RING_MASK_3,
  2044. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2045. /* rx ring masks */
  2046. { 0, 0, 0, 0,
  2047. WLAN_CFG_RX_RING_MASK_0,
  2048. WLAN_CFG_RX_RING_MASK_1,
  2049. WLAN_CFG_RX_RING_MASK_2,
  2050. WLAN_CFG_RX_RING_MASK_3,
  2051. 0, 0, 0, 0, 0, 0, 0, 0},
  2052. /* rx mon ring masks */
  2053. { 0, 0, 0, 0, 0, 0, 0, 0,
  2054. WLAN_CFG_RX_MON_RING_MASK_0,
  2055. WLAN_CFG_RX_MON_RING_MASK_1,
  2056. WLAN_CFG_RX_MON_RING_MASK_2,
  2057. 0, 0, 0, 0, 0},
  2058. /* host2rxdma ring masks */
  2059. { 0, 0, 0, 0, 0, 0, 0, 0,
  2060. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2061. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2062. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2063. 0, 0, 0, 0, 0},
  2064. /* rxdma2host ring masks */
  2065. { 0, 0, 0, 0, 0, 0, 0, 0,
  2066. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2067. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2068. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2069. 0, 0, 0, 0, 0},
  2070. /* host2rxdma mon ring masks */
  2071. { 0, 0, 0, 0, 0, 0, 0, 0,
  2072. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2073. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2074. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2075. 0, 0, 0, 0, 0},
  2076. /* rxdma2host mon ring masks */
  2077. { 0, 0, 0, 0, 0, 0, 0, 0,
  2078. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2079. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2080. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2081. 0, 0, 0, 0, 0},
  2082. /* rx err ring masks */
  2083. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2084. WLAN_CFG_RX_ERR_RING_MASK_0,
  2085. 0, 0, 0, 0},
  2086. /* rx wbm rel ring masks */
  2087. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2088. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2089. 0, 0, 0, 0},
  2090. /* reo status ring masks */
  2091. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2092. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2093. 0, 0, 0, 0},
  2094. /* rx_ring_near_full_irq mask */
  2095. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2096. /* rx_ring_near_full_irq_2 mask */
  2097. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2098. /* tx_ring_near_full_irq mask */
  2099. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2100. /* host2txmon ring masks */
  2101. { 0, 0, 0, 0, 0, 0, 0, 0,
  2102. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2103. 0, 0, 0, 0, 0, 0, 0},
  2104. /* tx mon ring masks */
  2105. { 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2106. WLAN_CFG_TX_MON_RING_MASK_0,
  2107. WLAN_CFG_TX_MON_RING_MASK_1,
  2108. 0, 0, 0, 0, 0},
  2109. /* umac reset mask */
  2110. {0, 0, 0, 0, 0, 0, 0, 0,
  2111. 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0},
  2112. },
  2113. };
  2114. #endif
  2115. #endif
  2116. /**
  2117. * g_wlan_srng_cfg[] - Per ring_type specific configuration
  2118. *
  2119. */
  2120. struct wlan_srng_cfg g_wlan_srng_cfg[MAX_RING_TYPES];
  2121. /* REO_DST ring configuration */
  2122. struct wlan_srng_cfg wlan_srng_reo_cfg = {
  2123. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING,
  2124. .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_REO_RING,
  2125. .low_threshold = 0,
  2126. };
  2127. /* WBM2SW_RELEASE ring configuration */
  2128. struct wlan_srng_cfg wlan_srng_wbm_release_cfg = {
  2129. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING,
  2130. .batch_count_threshold = 0,
  2131. .low_threshold = 0,
  2132. };
  2133. /* RXDMA_BUF ring configuration */
  2134. struct wlan_srng_cfg wlan_srng_rxdma_buf_cfg = {
  2135. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  2136. .batch_count_threshold = 0,
  2137. .low_threshold = WLAN_CFG_RXDMA_REFILL_RING_SIZE >> 3,
  2138. };
  2139. /* RXDMA_MONITOR_BUF ring configuration */
  2140. struct wlan_srng_cfg wlan_srng_rxdma_monitor_buf_cfg = {
  2141. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  2142. .batch_count_threshold = 0,
  2143. .low_threshold = WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE >> 3,
  2144. };
  2145. /* RXDMA_MONITOR_STATUS ring configuration */
  2146. #ifdef DP_CON_MON_MSI_ENABLED
  2147. /*
  2148. * Configure batch count threshold as 1 to enable interrupt
  2149. * when HW updated TP (monitor status buffer DMA is done),
  2150. * then host could reap monitor status srng. timer threshold
  2151. * based interrupt is only used for low threshold interrupt which
  2152. * can not be used for monitor status buffer reaping directly
  2153. * unless configure low threshold value to a big value, perhaps
  2154. * (number of entries - 2).
  2155. */
  2156. struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = {
  2157. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  2158. .batch_count_threshold = 1,
  2159. .low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3,
  2160. };
  2161. #else
  2162. struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = {
  2163. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  2164. .batch_count_threshold = 0,
  2165. .low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3,
  2166. };
  2167. #endif
  2168. /* TX_MONITOR_BUF ring configuration */
  2169. struct wlan_srng_cfg wlan_srng_tx_monitor_buf_cfg = {
  2170. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_TX,
  2171. .batch_count_threshold = 0,
  2172. .low_threshold = WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MAX >> 3,
  2173. };
  2174. /* DEFAULT_CONFIG ring configuration */
  2175. struct wlan_srng_cfg wlan_srng_default_cfg = {
  2176. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_OTHER,
  2177. .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_OTHER,
  2178. .low_threshold = 0,
  2179. };
  2180. /* DEFAULT_CONFIG source ring configuration */
  2181. struct wlan_srng_cfg wlan_src_srng_default_cfg = {
  2182. .timer_threshold = 0,
  2183. .batch_count_threshold = 0,
  2184. .low_threshold = 0,
  2185. };
  2186. void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
  2187. {
  2188. g_wlan_srng_cfg[REO_DST] = wlan_srng_reo_cfg;
  2189. g_wlan_srng_cfg[WBM2SW_RELEASE] = wlan_srng_wbm_release_cfg;
  2190. g_wlan_srng_cfg[REO_EXCEPTION] = wlan_srng_default_cfg;
  2191. g_wlan_srng_cfg[REO_REINJECT] = wlan_src_srng_default_cfg;
  2192. g_wlan_srng_cfg[REO_CMD] = wlan_src_srng_default_cfg;
  2193. g_wlan_srng_cfg[REO_STATUS] = wlan_srng_default_cfg;
  2194. g_wlan_srng_cfg[TCL_DATA] = wlan_src_srng_default_cfg;
  2195. g_wlan_srng_cfg[TCL_CMD_CREDIT] = wlan_src_srng_default_cfg;
  2196. g_wlan_srng_cfg[TCL_STATUS] = wlan_srng_default_cfg;
  2197. g_wlan_srng_cfg[WBM_IDLE_LINK] = wlan_src_srng_default_cfg;
  2198. g_wlan_srng_cfg[SW2WBM_RELEASE] = wlan_src_srng_default_cfg;
  2199. g_wlan_srng_cfg[RXDMA_BUF] = wlan_srng_rxdma_buf_cfg;
  2200. g_wlan_srng_cfg[RXDMA_DST] = wlan_srng_default_cfg;
  2201. g_wlan_srng_cfg[RXDMA_MONITOR_BUF] =
  2202. wlan_srng_rxdma_monitor_buf_cfg;
  2203. g_wlan_srng_cfg[RXDMA_MONITOR_STATUS] =
  2204. wlan_srng_rxdma_monitor_status_cfg;
  2205. g_wlan_srng_cfg[RXDMA_MONITOR_DST] = wlan_srng_default_cfg;
  2206. g_wlan_srng_cfg[RXDMA_MONITOR_DESC] = wlan_srng_default_cfg;
  2207. g_wlan_srng_cfg[DIR_BUF_RX_DMA_SRC] = wlan_srng_default_cfg;
  2208. #ifdef WLAN_FEATURE_CIF_CFR
  2209. g_wlan_srng_cfg[WIFI_POS_SRC] = wlan_srng_default_cfg;
  2210. #endif
  2211. g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg;
  2212. *wlan_cfg = g_wlan_srng_cfg;
  2213. }
  2214. static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = {
  2215. 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,
  2216. 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0,
  2217. 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4,
  2218. 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c,
  2219. 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa
  2220. };
  2221. #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
  2222. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  2223. int num_dp_msi,
  2224. int interrupt_mode,
  2225. bool is_monitor_mode)
  2226. { int i = 0;
  2227. const uint8_t *tx_ring_intr_mask =
  2228. wlan_cfg_get_tx_ring_int_mask(wlan_cfg_ctx);
  2229. for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
  2230. wlan_cfg_ctx->int_tx_ring_mask[i] = tx_ring_intr_mask[i];
  2231. if (wlan_cfg_ctx->int_tx_ring_mask[i])
  2232. wlan_cfg_ctx->tx_rings_grp_bitmap |= BIT(i);
  2233. wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
  2234. rx_mon_ring_mask_msi[i];
  2235. wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0;
  2236. wlan_cfg_ctx->int_rx_err_ring_mask[i] =
  2237. rx_err_ring_mask_msi[i];
  2238. wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] =
  2239. rx_wbm_rel_ring_mask_msi[i];
  2240. wlan_cfg_ctx->int_reo_status_ring_mask[i] =
  2241. reo_status_ring_mask_msi[i];
  2242. if (is_monitor_mode) {
  2243. wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
  2244. if (interrupt_mode == DP_INTR_POLL)
  2245. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
  2246. else
  2247. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  2248. rxdma2host_ring_mask_msi[i];
  2249. } else {
  2250. wlan_cfg_ctx->int_rx_ring_mask[i] =
  2251. rx_ring_mask_msi[i];
  2252. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  2253. rxdma2host_ring_mask_msi[i];
  2254. }
  2255. wlan_cfg_ctx->int_host2rxdma_ring_mask[i] =
  2256. host2rxdma_ring_mask_msi[i];
  2257. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  2258. host2rxdma_mon_ring_mask_msi[i];
  2259. wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
  2260. rxdma2host_mon_ring_mask_msi[i];
  2261. wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] =
  2262. rx_ring_near_full_irq_1_mask_msi[i];
  2263. wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] =
  2264. rx_ring_near_full_irq_2_mask_msi[i];
  2265. wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] =
  2266. tx_ring_near_full_irq_mask_msi[i];
  2267. }
  2268. }
  2269. #else
  2270. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  2271. int num_dp_msi,
  2272. int interrupt_mode,
  2273. bool is_monitor_mode)
  2274. {
  2275. int i = 0;
  2276. int interrupt_index = 0;
  2277. int int_host2rxdma_mon_ring_mask;
  2278. bool host2rxmon_mask_set = false;
  2279. bool txmon_hw_support = false;
  2280. if(interrupt_mode == DP_INTR_INTEGRATED) {
  2281. interrupt_index = 0;
  2282. } else if (interrupt_mode == DP_INTR_MSI || interrupt_mode ==
  2283. DP_INTR_POLL) {
  2284. interrupt_index = num_dp_msi;
  2285. } else {
  2286. qdf_err("Interrupt mode %d", interrupt_mode);
  2287. }
  2288. for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
  2289. wlan_cfg_ctx->int_tx_ring_mask[i] =
  2290. dp_mask_assignment[interrupt_index].tx_ring_mask[i];
  2291. wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
  2292. dp_mask_assignment[interrupt_index].rx_mon_ring_mask[i];
  2293. wlan_cfg_ctx->int_rx_err_ring_mask[i] =
  2294. dp_mask_assignment[interrupt_index].rx_err_ring_mask[i];
  2295. wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] =
  2296. dp_mask_assignment[interrupt_index].rx_wbm_rel_ring_mask[i];
  2297. wlan_cfg_ctx->int_reo_status_ring_mask[i] =
  2298. dp_mask_assignment[interrupt_index].reo_status_ring_mask[i];
  2299. if (is_monitor_mode) {
  2300. wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
  2301. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
  2302. } else {
  2303. wlan_cfg_ctx->int_rx_ring_mask[i] =
  2304. dp_mask_assignment[interrupt_index].rx_ring_mask[i];
  2305. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  2306. dp_mask_assignment[interrupt_index].rxdma2host_ring_mask[i];
  2307. }
  2308. wlan_cfg_ctx->int_host2rxdma_ring_mask[i] =
  2309. dp_mask_assignment[interrupt_index].host2rxdma_ring_mask[i];
  2310. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  2311. dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i];
  2312. wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
  2313. dp_mask_assignment[interrupt_index].rxdma2host_mon_ring_mask[i];
  2314. wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] =
  2315. dp_mask_assignment[interrupt_index].rx_ring_near_full_irq_1_mask[i];
  2316. wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] =
  2317. dp_mask_assignment[interrupt_index].rx_ring_near_full_irq_2_mask[i];
  2318. wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] =
  2319. dp_mask_assignment[interrupt_index].tx_ring_near_full_irq_mask[i];
  2320. txmon_hw_support = wlan_cfg_get_txmon_hw_support(wlan_cfg_ctx);
  2321. if (txmon_hw_support) {
  2322. wlan_cfg_ctx->int_tx_mon_ring_mask[i] =
  2323. dp_mask_assignment[interrupt_index].tx_mon_ring_mask[i];
  2324. wlan_cfg_ctx->int_host2txmon_ring_mask[i] =
  2325. dp_mask_assignment[interrupt_index].host2txmon_ring_mask[i];
  2326. int_host2rxdma_mon_ring_mask =
  2327. dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i];
  2328. if (int_host2rxdma_mon_ring_mask && !host2rxmon_mask_set) {
  2329. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[interrupt_index] =
  2330. dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i];
  2331. host2rxmon_mask_set = true;
  2332. }
  2333. } else {
  2334. wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0;
  2335. wlan_cfg_ctx->int_host2txmon_ring_mask[i] = 0;
  2336. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  2337. dp_mask_assignment[interrupt_index].host2rxdma_mon_ring_mask[i];
  2338. }
  2339. wlan_cfg_ctx->int_umac_reset_intr_mask[i] =
  2340. dp_mask_assignment[interrupt_index].umac_reset_intr_mask[i];
  2341. }
  2342. }
  2343. #endif
  2344. #ifdef IPA_OFFLOAD
  2345. #define WLAN_CFG_IPA_ENABLE_MASK BIT(0)
  2346. #ifdef IPA_WDI3_TX_TWO_PIPES
  2347. /**
  2348. * wlan_soc_ipa_cfg_attach() - Update ipa tx and tx alt config
  2349. * in dp soc cfg context
  2350. * @psoc: Object manager psoc
  2351. * @wlan_cfg_ctx: dp soc cfg ctx
  2352. *
  2353. * Return: None
  2354. */
  2355. static void
  2356. wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2357. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2358. {
  2359. if (ucfg_ipa_get_pld_enable()) {
  2360. wlan_cfg_ctx->ipa_enabled =
  2361. (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) &
  2362. WLAN_CFG_IPA_ENABLE_MASK);
  2363. dp_info("is IPA enabled from ini: %d",
  2364. wlan_cfg_ctx->ipa_enabled);
  2365. } else {
  2366. wlan_cfg_ctx->ipa_enabled = false;
  2367. dp_info("IPA disabled from platform driver");
  2368. }
  2369. wlan_cfg_ctx->ipa_tx_ring_size =
  2370. cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE);
  2371. wlan_cfg_ctx->ipa_tx_comp_ring_size =
  2372. cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE);
  2373. wlan_cfg_ctx->ipa_tx_alt_ring_size =
  2374. cfg_get(psoc, CFG_DP_IPA_TX_ALT_RING_SIZE);
  2375. wlan_cfg_ctx->ipa_tx_alt_comp_ring_size =
  2376. cfg_get(psoc, CFG_DP_IPA_TX_ALT_COMP_RING_SIZE);
  2377. }
  2378. #else /* !IPA_WDI3_TX_TWO_PIPES */
  2379. /**
  2380. * wlan_soc_ipa_cfg_attach() - Update ipa config in dp soc
  2381. * cfg context
  2382. * @psoc - Object manager psoc
  2383. * @wlan_cfg_ctx - dp soc cfg ctx
  2384. *
  2385. * Return: None
  2386. */
  2387. static void
  2388. wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2389. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2390. {
  2391. if (ucfg_ipa_get_pld_enable()) {
  2392. wlan_cfg_ctx->ipa_enabled =
  2393. (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) &
  2394. WLAN_CFG_IPA_ENABLE_MASK);
  2395. dp_info("is IPA enabled from ini: %d",
  2396. wlan_cfg_ctx->ipa_enabled);
  2397. } else {
  2398. wlan_cfg_ctx->ipa_enabled = false;
  2399. dp_info("IPA disabled from platform driver");
  2400. }
  2401. wlan_cfg_ctx->ipa_tx_ring_size =
  2402. cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE);
  2403. wlan_cfg_ctx->ipa_tx_comp_ring_size =
  2404. cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE);
  2405. }
  2406. #endif /* IPA_WDI3_TX_TWO_PIPES */
  2407. #else /* !IPA_OFFLOAD */
  2408. static inline void
  2409. wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2410. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2411. {
  2412. }
  2413. #endif
  2414. #ifdef DP_HW_COOKIE_CONVERT_EXCEPTION
  2415. static void
  2416. wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2417. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2418. {
  2419. wlan_cfg_ctx->hw_cc_enabled =
  2420. cfg_get(psoc, CFG_DP_HW_CC_ENABLE);
  2421. }
  2422. #else
  2423. static void
  2424. wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2425. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2426. {
  2427. wlan_cfg_ctx->hw_cc_enabled = true;
  2428. }
  2429. #endif
  2430. #ifdef WLAN_SUPPORT_PPEDS
  2431. /**
  2432. * wlan_soc_ppe_cfg_attach() - Update ppe config in dp soc
  2433. * cfg context
  2434. * @psoc - Object manager psoc
  2435. * @wlan_cfg_ctx - dp soc cfg ctx
  2436. *
  2437. * Return: None
  2438. */
  2439. static void
  2440. wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2441. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2442. {
  2443. wlan_cfg_ctx->ppe_enable = cfg_get(psoc, CFG_DP_PPE_ENABLE);
  2444. wlan_cfg_ctx->reo2ppe_ring = cfg_get(psoc, CFG_DP_REO2PPE_RING);
  2445. wlan_cfg_ctx->ppe2tcl_ring = cfg_get(psoc, CFG_DP_PPE2TCL_RING);
  2446. wlan_cfg_ctx->ppe_release_ring = cfg_get(psoc,
  2447. CFG_DP_PPE_RELEASE_RING);
  2448. wlan_cfg_ctx->ppe_num_tx_desc = cfg_get(psoc, CFG_DP_PPEDS_TX_DESC);
  2449. }
  2450. #else
  2451. static inline void
  2452. wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2453. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2454. {
  2455. }
  2456. #endif
  2457. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  2458. /**
  2459. * wlan_cfg_get_lsb_set_pos() - returns position of LSB which is set
  2460. *
  2461. * Return: position of LSB which is set
  2462. */
  2463. static uint8_t wlan_cfg_get_lsb_set_pos(uint8_t val)
  2464. {
  2465. uint8_t pos = 0;
  2466. while (pos < 8) {
  2467. if (val & (1 << pos))
  2468. return pos;
  2469. pos++;
  2470. }
  2471. return 0;
  2472. }
  2473. /**
  2474. * wlan_multi_soc_mlo_cfg_attach() - Update multi soc mlo config in dp soc
  2475. * cfg context
  2476. * @psoc - Object manager psoc
  2477. * @wlan_cfg_ctx - dp soc cfg ctx
  2478. *
  2479. * Return: None
  2480. */
  2481. static void
  2482. wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2483. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2484. {
  2485. uint8_t rx_ring_map;
  2486. rx_ring_map =
  2487. cfg_get(psoc, CFG_DP_MLO_RX_RING_MAP);
  2488. wlan_cfg_ctx->mlo_chip_rx_ring_map = rx_ring_map;
  2489. }
  2490. #else
  2491. static inline void
  2492. wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2493. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2494. {
  2495. }
  2496. #endif
  2497. #ifdef WLAN_FEATURE_11BE_MLO
  2498. /**
  2499. * wlan_soc_mlo_cfg_attach() - Update mlo config in dp soc
  2500. * cfg context
  2501. * @psoc - Object manager psoc
  2502. * @wlan_cfg_ctx - dp soc cfg ctx
  2503. *
  2504. * Return: None
  2505. */
  2506. static void
  2507. wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2508. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2509. {
  2510. wlan_multi_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  2511. }
  2512. #else
  2513. static inline void
  2514. wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2515. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2516. {
  2517. }
  2518. #endif
  2519. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  2520. /**
  2521. * wlan_soc_vdev_hw_stats_cfg_attach() - Update hw vdev stats config in dp soc
  2522. * cfg context
  2523. * @psoc - Object manager psoc
  2524. * @wlan_cfg_ctx - dp soc cfg ctx
  2525. *
  2526. * Return: None
  2527. */
  2528. static void
  2529. wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2530. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2531. {
  2532. wlan_cfg_ctx->vdev_stats_hw_offload_config = cfg_get(psoc,
  2533. CFG_DP_VDEV_STATS_HW_OFFLOAD_CONFIG);
  2534. wlan_cfg_ctx->vdev_stats_hw_offload_timer = cfg_get(psoc,
  2535. CFG_DP_VDEV_STATS_HW_OFFLOAD_TIMER);
  2536. }
  2537. #else
  2538. static void
  2539. wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2540. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2541. {
  2542. }
  2543. #endif
  2544. #ifdef WLAN_TX_PKT_CAPTURE_ENH
  2545. static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2546. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2547. {
  2548. wlan_cfg_ctx->tx_capt_max_mem_allowed =
  2549. cfg_get(psoc, CFG_DP_TX_CAPT_MAX_MEM_MB) * 1024 * 1024;
  2550. }
  2551. #else
  2552. static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2553. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2554. {
  2555. }
  2556. #endif
  2557. void
  2558. wlan_cfg_soc_update_tgt_params(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  2559. struct cdp_ctrl_objmgr_psoc *psoc)
  2560. {
  2561. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc,
  2562. CFG_DP_REO_RINGS_MAP);
  2563. }
  2564. #ifdef CONFIG_SAWF_STATS
  2565. /**
  2566. * wlan_soc_sawf_stats_cfg_attach() - Update sawf stats config in dp soc
  2567. * cfg context
  2568. * @psoc - Object manager psoc
  2569. * @wlan_cfg_ctx - dp soc cfg ctx
  2570. *
  2571. * Return: None
  2572. */
  2573. static void
  2574. wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2575. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2576. {
  2577. wlan_cfg_ctx->sawf_stats = cfg_get(psoc, CFG_DP_SAWF_STATS);
  2578. }
  2579. uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  2580. {
  2581. return cfg->sawf_stats;
  2582. }
  2583. void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  2584. uint8_t val)
  2585. {
  2586. cfg->sawf_stats = val;
  2587. }
  2588. #else
  2589. /**
  2590. * wlan_soc_sawf_stats_cfg_attach() - Update sawf stats config in dp soc
  2591. * cfg context
  2592. * @psoc - Object manager psoc
  2593. * @wlan_cfg_ctx - dp soc cfg ctx
  2594. *
  2595. * Return: None
  2596. */
  2597. static void
  2598. wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2599. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2600. {
  2601. }
  2602. uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  2603. {
  2604. return 0;
  2605. }
  2606. void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  2607. uint8_t val)
  2608. {
  2609. }
  2610. #endif /* CONFIG_SAWF_STATS */
  2611. /**
  2612. * wlan_cfg_soc_attach() - Allocate and prepare SoC configuration
  2613. * @psoc - Object manager psoc
  2614. * Return: wlan_cfg_ctx - Handle to Configuration context
  2615. */
  2616. struct wlan_cfg_dp_soc_ctxt *
  2617. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  2618. {
  2619. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
  2620. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
  2621. uint32_t gro_bit_set;
  2622. if (!wlan_cfg_ctx)
  2623. return NULL;
  2624. wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
  2625. wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS;
  2626. wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
  2627. wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
  2628. wlan_cfg_ctx->per_pdev_tx_ring = cfg_get(psoc, CFG_DP_PDEV_TX_RING);
  2629. wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS);
  2630. wlan_cfg_ctx->num_tcl_data_rings = cfg_get(psoc, CFG_DP_TCL_DATA_RINGS);
  2631. wlan_cfg_ctx->num_tx_comp_rings = cfg_get(psoc, CFG_DP_TX_COMP_RINGS);
  2632. wlan_cfg_ctx->num_nss_reo_dest_rings =
  2633. cfg_get(psoc, CFG_DP_NSS_REO_DEST_RINGS);
  2634. wlan_cfg_ctx->num_nss_tcl_data_rings =
  2635. cfg_get(psoc, CFG_DP_NSS_TCL_DATA_RINGS);
  2636. wlan_cfg_ctx->per_pdev_rx_ring = cfg_get(psoc, CFG_DP_PDEV_RX_RING);
  2637. wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
  2638. wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
  2639. wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
  2640. CFG_DP_TX_EXT_DESC_POOLS);
  2641. wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
  2642. wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
  2643. wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
  2644. wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
  2645. wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
  2646. wlan_cfg_ctx->tx_ring_size = cfg_get(psoc, CFG_DP_TX_RING_SIZE);
  2647. wlan_cfg_ctx->time_control_bp = cfg_get(psoc, CFG_DP_TIME_CONTROL_BP);
  2648. wlan_cfg_ctx->tx_comp_ring_size = cfg_get(psoc,
  2649. CFG_DP_TX_COMPL_RING_SIZE);
  2650. wlan_cfg_ctx->tx_comp_ring_size_nss =
  2651. cfg_get(psoc, CFG_DP_NSS_COMP_RING_SIZE);
  2652. wlan_cfg_ctx->int_batch_threshold_tx =
  2653. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
  2654. wlan_cfg_ctx->int_timer_threshold_tx =
  2655. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX);
  2656. wlan_cfg_ctx->int_batch_threshold_rx =
  2657. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX);
  2658. wlan_cfg_ctx->int_timer_threshold_rx =
  2659. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX);
  2660. wlan_cfg_ctx->int_batch_threshold_other =
  2661. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
  2662. wlan_cfg_ctx->int_timer_threshold_other =
  2663. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
  2664. wlan_cfg_ctx->pktlog_buffer_size =
  2665. cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
  2666. /* This is default mapping and can be overridden by HW config
  2667. * received from FW */
  2668. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0);
  2669. if (MAX_PDEV_CNT > 1)
  2670. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2);
  2671. if (MAX_PDEV_CNT > 2)
  2672. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1);
  2673. wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
  2674. wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
  2675. wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
  2676. wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
  2677. wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
  2678. gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
  2679. if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
  2680. wlan_cfg_ctx->gro_enabled = true;
  2681. if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO)
  2682. wlan_cfg_ctx->tc_based_dynamic_gro = true;
  2683. }
  2684. wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO);
  2685. wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
  2686. wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
  2687. wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
  2688. wlan_cfg_ctx->peer_flow_ctrl_enabled =
  2689. cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
  2690. wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
  2691. wlan_cfg_ctx->p2p_tcp_udp_checksumoffload =
  2692. cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD);
  2693. wlan_cfg_ctx->nan_tcp_udp_checksumoffload =
  2694. cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD);
  2695. wlan_cfg_ctx->tcp_udp_checksumoffload =
  2696. cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
  2697. wlan_cfg_ctx->legacy_mode_checksumoffload_disable =
  2698. cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE);
  2699. wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING);
  2700. wlan_cfg_ctx->defrag_timeout_check =
  2701. cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK);
  2702. wlan_cfg_ctx->rx_defrag_min_timeout =
  2703. cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT);
  2704. wlan_cfg_ctx->wbm_release_ring = cfg_get(psoc,
  2705. CFG_DP_WBM_RELEASE_RING);
  2706. wlan_cfg_ctx->tcl_cmd_credit_ring = cfg_get(psoc,
  2707. CFG_DP_TCL_CMD_CREDIT_RING);
  2708. wlan_cfg_ctx->tcl_status_ring = cfg_get(psoc,
  2709. CFG_DP_TCL_STATUS_RING);
  2710. wlan_cfg_ctx->reo_dst_ring_size = cfg_get(psoc,
  2711. CFG_DP_RX_DESTINATION_RING);
  2712. wlan_cfg_ctx->reo_reinject_ring = cfg_get(psoc,
  2713. CFG_DP_REO_REINJECT_RING);
  2714. wlan_cfg_ctx->rx_release_ring = cfg_get(psoc,
  2715. CFG_DP_RX_RELEASE_RING);
  2716. wlan_cfg_ctx->reo_exception_ring = cfg_get(psoc,
  2717. CFG_DP_REO_EXCEPTION_RING);
  2718. wlan_cfg_ctx->reo_cmd_ring = cfg_get(psoc,
  2719. CFG_DP_REO_CMD_RING);
  2720. wlan_cfg_ctx->reo_status_ring = cfg_get(psoc,
  2721. CFG_DP_REO_STATUS_RING);
  2722. wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc,
  2723. CFG_DP_RXDMA_REFILL_RING);
  2724. wlan_cfg_ctx->rxdma_refill_lt_disable =
  2725. cfg_get(psoc,
  2726. CFG_DP_RXDMA_REFILL_LT_DISABLE);
  2727. wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc,
  2728. CFG_DP_TX_DESC_LIMIT_0);
  2729. wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc,
  2730. CFG_DP_TX_DESC_LIMIT_1);
  2731. wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc,
  2732. CFG_DP_TX_DESC_LIMIT_2);
  2733. wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
  2734. CFG_DP_TX_DEVICE_LIMIT);
  2735. wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
  2736. CFG_DP_TX_SW_INTERNODE_QUEUE);
  2737. wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
  2738. CFG_DP_RXDMA_ERR_DST_RING);
  2739. wlan_cfg_ctx->enable_data_stall_detection =
  2740. cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
  2741. wlan_cfg_ctx->tx_flow_start_queue_offset =
  2742. cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET);
  2743. wlan_cfg_ctx->tx_flow_stop_queue_threshold =
  2744. cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH);
  2745. wlan_cfg_ctx->disable_intra_bss_fwd =
  2746. cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
  2747. wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
  2748. CFG_DP_RX_SW_DESC_WEIGHT);
  2749. wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
  2750. CFG_DP_RX_SW_DESC_NUM);
  2751. wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
  2752. wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
  2753. wlan_cfg_ctx->is_rx_flow_tag_enabled =
  2754. cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE);
  2755. wlan_cfg_ctx->is_rx_flow_search_table_per_pdev =
  2756. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV);
  2757. wlan_cfg_ctx->rx_flow_search_table_size =
  2758. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE);
  2759. wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled =
  2760. cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE);
  2761. wlan_cfg_ctx->mon_drop_thresh =
  2762. cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD);
  2763. wlan_cfg_ctx->is_rx_fisa_enabled = cfg_get(psoc, CFG_DP_RX_FISA_ENABLE);
  2764. wlan_cfg_ctx->is_rx_fisa_lru_del_enabled =
  2765. cfg_get(psoc, CFG_DP_RX_FISA_LRU_DEL_ENABLE);
  2766. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc, CFG_DP_REO_RINGS_MAP);
  2767. wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
  2768. wlan_cfg_ctx->jitter_stats_enabled =
  2769. cfg_get(psoc, CFG_DP_PEER_JITTER_STATS);
  2770. wlan_cfg_ctx->is_rx_buff_pool_enabled =
  2771. cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
  2772. wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
  2773. cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
  2774. wlan_cfg_ctx->rx_pending_high_threshold =
  2775. cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
  2776. wlan_cfg_ctx->rx_pending_low_threshold =
  2777. cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
  2778. wlan_cfg_ctx->is_poll_mode_enabled =
  2779. cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
  2780. wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
  2781. wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
  2782. wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
  2783. cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
  2784. wlan_cfg_ctx->radio0_rx_default_reo =
  2785. cfg_get(psoc, CFG_DP_RX_RADIO_0_DEFAULT_REO);
  2786. wlan_cfg_ctx->radio1_rx_default_reo =
  2787. cfg_get(psoc, CFG_DP_RX_RADIO_1_DEFAULT_REO);
  2788. wlan_cfg_ctx->radio2_rx_default_reo =
  2789. cfg_get(psoc, CFG_DP_RX_RADIO_2_DEFAULT_REO);
  2790. wlan_cfg_ctx->wow_check_rx_pending_enable =
  2791. cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
  2792. wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
  2793. CFG_DP_DELAY_MON_REPLENISH);
  2794. wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
  2795. CFG_DP_RXDMA_MONITOR_BUF_RING);
  2796. wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
  2797. CFG_DP_TX_MONITOR_BUF_RING);
  2798. wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
  2799. wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
  2800. wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
  2801. wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  2802. wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx);
  2803. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  2804. wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
  2805. PKT_CAPTURE_MODE_DATA_ONLY;
  2806. #endif
  2807. wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
  2808. wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
  2809. NUM_RXDMA_RINGS_PER_PDEV;
  2810. wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
  2811. wlan_cfg_ctx->mpdu_retry_threshold_1 =
  2812. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
  2813. wlan_cfg_ctx->mpdu_retry_threshold_2 =
  2814. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
  2815. wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
  2816. CFG_DP_NAPI_SCALE_FACTOR);
  2817. wlan_soc_sawf_stats_cfg_attach(psoc, wlan_cfg_ctx);
  2818. wlan_cfg_ctx->is_handle_invalid_decap_type_disabled =
  2819. cfg_get(psoc, CFG_DP_HANDLE_INVALID_DECAP_TYPE_DISABLE);
  2820. return wlan_cfg_ctx;
  2821. }
  2822. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2823. {
  2824. qdf_mem_free(wlan_cfg_ctx);
  2825. }
  2826. struct wlan_cfg_dp_pdev_ctxt *
  2827. wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  2828. {
  2829. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx =
  2830. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt));
  2831. if (!wlan_cfg_ctx)
  2832. return NULL;
  2833. wlan_cfg_ctx->rx_dma_buf_ring_size = cfg_get(psoc,
  2834. CFG_DP_RXDMA_BUF_RING);
  2835. wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc,
  2836. CFG_DP_RXDMA_MONITOR_BUF_RING);
  2837. wlan_cfg_ctx->dma_rx_mon_dest_ring_size = cfg_get(psoc,
  2838. CFG_DP_RXDMA_MONITOR_DST_RING);
  2839. wlan_cfg_ctx->dma_tx_mon_dest_ring_size = cfg_get(psoc,
  2840. CFG_DP_TX_MONITOR_DST_RING);
  2841. wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc,
  2842. CFG_DP_RXDMA_MONITOR_STATUS_RING);
  2843. wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc,
  2844. CFG_DP_RXDMA_MONITOR_DESC_RING);
  2845. wlan_cfg_ctx->num_mac_rings = NUM_RXDMA_RINGS_PER_PDEV;
  2846. return wlan_cfg_ctx;
  2847. }
  2848. void wlan_cfg_set_mon_delayed_replenish_entries(
  2849. struct wlan_cfg_dp_soc_ctxt *cfg,
  2850. uint32_t val)
  2851. {
  2852. cfg->delayed_replenish_entries = val;
  2853. }
  2854. qdf_export_symbol(wlan_cfg_set_mon_delayed_replenish_entries);
  2855. int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt *cfg)
  2856. {
  2857. return cfg->delayed_replenish_entries;
  2858. }
  2859. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx)
  2860. {
  2861. if (wlan_cfg_ctx)
  2862. qdf_mem_free(wlan_cfg_ctx);
  2863. }
  2864. int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg)
  2865. {
  2866. return cfg->mon_drop_thresh;
  2867. }
  2868. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num)
  2869. {
  2870. cfg->num_int_ctxts = num;
  2871. }
  2872. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  2873. {
  2874. cfg->max_peer_id = val;
  2875. }
  2876. void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  2877. {
  2878. cfg->max_ast_idx = val;
  2879. }
  2880. int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg)
  2881. {
  2882. return cfg->max_ast_idx;
  2883. }
  2884. qdf_export_symbol(wlan_cfg_get_max_ast_idx);
  2885. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2886. int context, int mask)
  2887. {
  2888. cfg->int_tx_ring_mask[context] = mask;
  2889. }
  2890. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2891. int context, int mask)
  2892. {
  2893. cfg->int_rx_ring_mask[context] = mask;
  2894. }
  2895. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2896. int context, int mask)
  2897. {
  2898. cfg->int_rx_mon_ring_mask[context] = mask;
  2899. }
  2900. void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2901. int context, int mask)
  2902. {
  2903. cfg->int_tx_mon_ring_mask[context] = mask;
  2904. }
  2905. int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2906. int context)
  2907. {
  2908. return cfg->int_host2rxdma_mon_ring_mask[context];
  2909. }
  2910. void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2911. int context, int mask)
  2912. {
  2913. cfg->int_host2rxdma_mon_ring_mask[context] = mask;
  2914. }
  2915. int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2916. int context)
  2917. {
  2918. return cfg->int_rxdma2host_mon_ring_mask[context];
  2919. }
  2920. void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2921. int context, int mask)
  2922. {
  2923. cfg->int_rxdma2host_mon_ring_mask[context] = mask;
  2924. }
  2925. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2926. int context, int mask)
  2927. {
  2928. cfg->int_rxdma2host_ring_mask[context] = mask;
  2929. }
  2930. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2931. int context)
  2932. {
  2933. return cfg->int_rxdma2host_ring_mask[context];
  2934. }
  2935. void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2936. int context, int mask)
  2937. {
  2938. cfg->int_host2rxdma_ring_mask[context] = mask;
  2939. }
  2940. int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2941. int context)
  2942. {
  2943. return cfg->int_host2rxdma_ring_mask[context];
  2944. }
  2945. int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2946. int context)
  2947. {
  2948. return cfg->int_rx_ring_near_full_irq_1_mask[context];
  2949. }
  2950. int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2951. int context)
  2952. {
  2953. return cfg->int_rx_ring_near_full_irq_2_mask[context];
  2954. }
  2955. int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2956. int context)
  2957. {
  2958. return cfg->int_tx_ring_near_full_irq_mask[context];
  2959. }
  2960. void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  2961. int hw_macid)
  2962. {
  2963. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  2964. cfg->hw_macid[pdev_idx] = hw_macid;
  2965. }
  2966. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx)
  2967. {
  2968. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  2969. return cfg->hw_macid[pdev_idx];
  2970. }
  2971. qdf_export_symbol(wlan_cfg_get_hw_mac_idx);
  2972. int wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  2973. int hw_macid)
  2974. {
  2975. int idx;
  2976. for (idx = 0; idx < MAX_PDEV_CNT; idx++) {
  2977. if (cfg->hw_macid[idx] == hw_macid)
  2978. return (idx + 1);
  2979. }
  2980. qdf_assert_always(idx < MAX_PDEV_CNT);
  2981. return WLAN_INVALID_PDEV_ID;
  2982. }
  2983. void wlan_cfg_set_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  2984. int hw_macid)
  2985. {
  2986. qdf_assert_always((pdev_idx < MAX_PDEV_CNT) ||
  2987. (pdev_idx == INVALID_PDEV_ID));
  2988. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  2989. cfg->hw_macid_pdev_id_map[hw_macid] = pdev_idx;
  2990. }
  2991. int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid)
  2992. {
  2993. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  2994. return cfg->hw_macid_pdev_id_map[hw_macid];
  2995. }
  2996. qdf_export_symbol(wlan_cfg_get_pdev_idx);
  2997. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2998. int context, int mask)
  2999. {
  3000. cfg->int_ce_ring_mask[context] = mask;
  3001. }
  3002. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  3003. int mask)
  3004. {
  3005. cfg->int_rx_ring_mask[context] = mask;
  3006. }
  3007. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3008. int context, int mask)
  3009. {
  3010. return cfg->int_rx_err_ring_mask[context] = mask;
  3011. }
  3012. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3013. int context, int mask)
  3014. {
  3015. return cfg->int_rx_wbm_rel_ring_mask[context] = mask;
  3016. }
  3017. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3018. int context, int mask)
  3019. {
  3020. return cfg->int_reo_status_ring_mask[context] = mask;
  3021. }
  3022. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg)
  3023. {
  3024. return cfg->num_int_ctxts;
  3025. }
  3026. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  3027. {
  3028. return cfg->int_tx_ring_mask[context];
  3029. }
  3030. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  3031. {
  3032. return cfg->int_rx_ring_mask[context];
  3033. }
  3034. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3035. int context)
  3036. {
  3037. return cfg->int_rx_err_ring_mask[context];
  3038. }
  3039. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3040. int context)
  3041. {
  3042. return cfg->int_rx_wbm_rel_ring_mask[context];
  3043. }
  3044. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3045. int context)
  3046. {
  3047. return cfg->int_reo_status_ring_mask[context];
  3048. }
  3049. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  3050. {
  3051. return cfg->int_rx_mon_ring_mask[context];
  3052. }
  3053. #ifdef CONFIG_BERYLLIUM
  3054. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  3055. {
  3056. return cfg->int_tx_mon_ring_mask[context];
  3057. }
  3058. #else
  3059. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  3060. {
  3061. return 0;
  3062. }
  3063. #endif
  3064. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  3065. {
  3066. return cfg->int_ce_ring_mask[context];
  3067. }
  3068. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *cfg)
  3069. {
  3070. return cfg->max_clients;
  3071. }
  3072. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3073. {
  3074. return cfg->max_alloc_size;
  3075. }
  3076. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  3077. {
  3078. return cfg->per_pdev_tx_ring;
  3079. }
  3080. int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3081. int context)
  3082. {
  3083. return cfg->int_umac_reset_intr_mask[context];
  3084. }
  3085. uint32_t
  3086. wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  3087. {
  3088. return cfg->rx_pending_high_threshold;
  3089. }
  3090. uint32_t
  3091. wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  3092. {
  3093. return cfg->rx_pending_low_threshold;
  3094. }
  3095. int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  3096. {
  3097. return cfg->per_pdev_lmac_ring;
  3098. }
  3099. qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring);
  3100. #if defined(DP_USE_SINGLE_TCL) && !defined(TX_MULTI_TCL)
  3101. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3102. {
  3103. return 1;
  3104. }
  3105. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3106. {
  3107. return 1;
  3108. }
  3109. #else
  3110. #if defined(IPA_OFFLOAD) && defined(TX_MULTI_TCL)
  3111. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3112. {
  3113. if (!cfg->ipa_enabled)
  3114. return cfg->num_tcl_data_rings;
  3115. return 1;
  3116. }
  3117. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3118. {
  3119. if (!cfg->ipa_enabled)
  3120. return cfg->num_nss_tcl_data_rings;
  3121. return 1;
  3122. }
  3123. #else
  3124. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3125. {
  3126. return cfg->num_tcl_data_rings;
  3127. }
  3128. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3129. {
  3130. return cfg->num_nss_tcl_data_rings;
  3131. }
  3132. #endif
  3133. #endif
  3134. int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3135. {
  3136. return cfg->num_tx_comp_rings;
  3137. }
  3138. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3139. {
  3140. return cfg->tx_ring_size;
  3141. }
  3142. int wlan_cfg_time_control_bp(struct wlan_cfg_dp_soc_ctxt *cfg)
  3143. {
  3144. return cfg->time_control_bp;
  3145. }
  3146. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3147. {
  3148. return cfg->tx_comp_ring_size;
  3149. }
  3150. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  3151. {
  3152. return cfg->per_pdev_rx_ring;
  3153. }
  3154. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3155. {
  3156. return cfg->num_reo_dest_rings;
  3157. }
  3158. int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3159. {
  3160. return cfg->num_nss_reo_dest_rings;
  3161. }
  3162. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *cfg)
  3163. {
  3164. return cfg->htt_packet_type; /*htt_pkt_type_ethernet*/
  3165. }
  3166. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  3167. {
  3168. return cfg->num_tx_desc_pool;
  3169. }
  3170. void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  3171. {
  3172. cfg->num_tx_desc_pool = num_pool;
  3173. }
  3174. int wlan_cfg_get_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  3175. {
  3176. return cfg->num_tx_ext_desc_pool;
  3177. }
  3178. void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  3179. {
  3180. cfg->num_tx_ext_desc_pool = num_pool;
  3181. }
  3182. int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3183. {
  3184. return cfg->reo_dst_ring_size;
  3185. }
  3186. void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  3187. int reo_dst_ring_size)
  3188. {
  3189. cfg->reo_dst_ring_size = reo_dst_ring_size;
  3190. }
  3191. void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
  3192. bool raw_mode_war)
  3193. {
  3194. cfg->raw_mode_war = raw_mode_war;
  3195. }
  3196. bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg)
  3197. {
  3198. return cfg->raw_mode_war;
  3199. }
  3200. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  3201. {
  3202. return cfg->num_tx_desc;
  3203. }
  3204. void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc)
  3205. {
  3206. cfg->num_tx_desc = num_desc;
  3207. }
  3208. int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  3209. {
  3210. return cfg->min_tx_desc;
  3211. }
  3212. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  3213. {
  3214. return cfg->num_tx_ext_desc;
  3215. }
  3216. void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc)
  3217. {
  3218. cfg->num_tx_ext_desc = num_ext_desc;
  3219. }
  3220. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  3221. {
  3222. /* TODO: This should be calculated based on target capabilities */
  3223. return cfg->max_peer_id;
  3224. }
  3225. int wlan_cfg_get_dma_mon_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3226. {
  3227. return cfg->dma_mon_buf_ring_size;
  3228. }
  3229. qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size);
  3230. int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3231. {
  3232. return cfg->dma_rx_mon_dest_ring_size;
  3233. }
  3234. qdf_export_symbol(wlan_cfg_get_dma_rx_mon_dest_ring_size);
  3235. int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3236. {
  3237. return cfg->dma_tx_mon_dest_ring_size;
  3238. }
  3239. qdf_export_symbol(wlan_cfg_get_dma_tx_mon_dest_ring_size);
  3240. int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3241. {
  3242. return cfg->dma_mon_status_ring_size;
  3243. }
  3244. qdf_export_symbol(wlan_cfg_get_dma_mon_stat_ring_size);
  3245. int
  3246. wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3247. {
  3248. return cfg->rxdma_monitor_desc_ring;
  3249. }
  3250. qdf_export_symbol(wlan_cfg_get_dma_mon_desc_ring_size);
  3251. int wlan_cfg_get_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3252. {
  3253. return cfg->rx_dma_buf_ring_size;
  3254. }
  3255. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3256. {
  3257. return cfg->num_mac_rings;
  3258. }
  3259. qdf_export_symbol(wlan_cfg_get_num_mac_rings);
  3260. bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3261. {
  3262. return cfg->gro_enabled;
  3263. }
  3264. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3265. {
  3266. return cfg->lro_enabled;
  3267. }
  3268. bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3269. {
  3270. return cfg->ipa_enabled;
  3271. }
  3272. void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  3273. {
  3274. cfg->rx_hash = val;
  3275. }
  3276. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3277. {
  3278. return cfg->rx_hash;
  3279. }
  3280. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3281. {
  3282. return cfg->nss_enabled;
  3283. }
  3284. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled)
  3285. {
  3286. cfg->nss_enabled = nss_enabled;
  3287. }
  3288. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg)
  3289. {
  3290. return cfg->nss_cfg;
  3291. }
  3292. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg)
  3293. {
  3294. cfg->nss_cfg = nss_cfg;
  3295. if (cfg->nss_cfg)
  3296. cfg->tx_comp_ring_size = cfg->tx_comp_ring_size_nss;
  3297. }
  3298. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  3299. {
  3300. return cfg->int_batch_threshold_tx;
  3301. }
  3302. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  3303. {
  3304. return cfg->int_timer_threshold_tx;
  3305. }
  3306. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  3307. {
  3308. return cfg->int_batch_threshold_rx;
  3309. }
  3310. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  3311. {
  3312. return cfg->int_timer_threshold_rx;
  3313. }
  3314. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  3315. {
  3316. return cfg->int_batch_threshold_other;
  3317. }
  3318. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  3319. {
  3320. return cfg->int_timer_threshold_other;
  3321. }
  3322. int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg)
  3323. {
  3324. return cfg->int_timer_threshold_mon;
  3325. }
  3326. int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  3327. {
  3328. return cfg->p2p_tcp_udp_checksumoffload;
  3329. }
  3330. int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  3331. {
  3332. return cfg->nan_tcp_udp_checksumoffload;
  3333. }
  3334. int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  3335. {
  3336. return cfg->tcp_udp_checksumoffload;
  3337. }
  3338. int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg)
  3339. {
  3340. return cfg->rx_defrag_min_timeout;
  3341. }
  3342. int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg)
  3343. {
  3344. return cfg->defrag_timeout_check;
  3345. }
  3346. int
  3347. wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3348. {
  3349. return cfg->wbm_release_ring;
  3350. }
  3351. int
  3352. wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3353. {
  3354. return cfg->tcl_cmd_credit_ring;
  3355. }
  3356. int
  3357. wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3358. {
  3359. return cfg->tcl_status_ring;
  3360. }
  3361. int
  3362. wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3363. {
  3364. return cfg->reo_reinject_ring;
  3365. }
  3366. int
  3367. wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3368. {
  3369. return cfg->rx_release_ring;
  3370. }
  3371. int
  3372. wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3373. {
  3374. return cfg->reo_exception_ring;
  3375. }
  3376. int
  3377. wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3378. {
  3379. return cfg->reo_cmd_ring;
  3380. }
  3381. int
  3382. wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3383. {
  3384. return cfg->reo_status_ring;
  3385. }
  3386. int
  3387. wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3388. {
  3389. return cfg->rxdma_refill_ring;
  3390. }
  3391. bool
  3392. wlan_cfg_get_dp_soc_rxdma_refill_lt_disable(struct wlan_cfg_dp_soc_ctxt *cfg)
  3393. {
  3394. return cfg->rxdma_refill_lt_disable;
  3395. }
  3396. int
  3397. wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg)
  3398. {
  3399. return cfg->tx_desc_limit_0;
  3400. }
  3401. int
  3402. wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg)
  3403. {
  3404. return cfg->tx_desc_limit_1;
  3405. }
  3406. int
  3407. wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg)
  3408. {
  3409. return cfg->tx_desc_limit_2;
  3410. }
  3411. int
  3412. wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
  3413. {
  3414. return cfg->tx_device_limit;
  3415. }
  3416. int
  3417. wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg)
  3418. {
  3419. return cfg->tx_sw_internode_queue;
  3420. }
  3421. int
  3422. wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3423. {
  3424. return cfg->rxdma_err_dst_ring;
  3425. }
  3426. int
  3427. wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg)
  3428. {
  3429. return cfg->rx_sw_desc_weight;
  3430. }
  3431. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_sw_desc_weight);
  3432. int
  3433. wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg)
  3434. {
  3435. return cfg->rx_sw_desc_num;
  3436. }
  3437. uint32_t
  3438. wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
  3439. {
  3440. return cfg->reo_rings_mapping;
  3441. }
  3442. bool
  3443. wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
  3444. enum cdp_capabilities dp_caps)
  3445. {
  3446. switch (dp_caps) {
  3447. case CDP_CFG_DP_TSO:
  3448. return cfg->tso_enabled;
  3449. case CDP_CFG_DP_LRO:
  3450. return cfg->lro_enabled;
  3451. case CDP_CFG_DP_SG:
  3452. return cfg->sg_enabled;
  3453. case CDP_CFG_DP_GRO:
  3454. return cfg->gro_enabled;
  3455. case CDP_CFG_DP_OL_TX_CSUM:
  3456. return cfg->ol_tx_csum_enabled;
  3457. case CDP_CFG_DP_OL_RX_CSUM:
  3458. return cfg->ol_rx_csum_enabled;
  3459. case CDP_CFG_DP_RAWMODE:
  3460. return cfg->rawmode_enabled;
  3461. case CDP_CFG_DP_PEER_FLOW_CTRL:
  3462. return cfg->peer_flow_ctrl_enabled;
  3463. case CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT:
  3464. return cfg->notify_frame_support;
  3465. default:
  3466. return false;
  3467. }
  3468. }
  3469. void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
  3470. bool val)
  3471. {
  3472. cfg->is_tso_desc_attach_defer = val;
  3473. }
  3474. bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg)
  3475. {
  3476. return cfg->is_tso_desc_attach_defer;
  3477. }
  3478. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  3479. /**
  3480. * wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold
  3481. * @cfg: config context
  3482. *
  3483. * Return: stop threshold
  3484. */
  3485. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg)
  3486. {
  3487. return cfg->tx_flow_stop_queue_threshold;
  3488. }
  3489. /**
  3490. * wlan_cfg_get_tx_flow_start_queue_offset() - Get flow control start offset
  3491. * for TX to resume
  3492. * @cfg: config context
  3493. *
  3494. * Return: stop threshold
  3495. */
  3496. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg)
  3497. {
  3498. return cfg->tx_flow_start_queue_offset;
  3499. }
  3500. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  3501. void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  3502. bool val)
  3503. {
  3504. cfg->is_rx_flow_tag_enabled = val;
  3505. }
  3506. uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg)
  3507. {
  3508. return cfg->rx_toeplitz_hash_key;
  3509. }
  3510. uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg)
  3511. {
  3512. return cfg->rx_flow_max_search;
  3513. }
  3514. bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3515. {
  3516. return cfg->is_rx_flow_tag_enabled;
  3517. }
  3518. qdf_export_symbol(wlan_cfg_is_rx_flow_tag_enabled);
  3519. #ifdef WLAN_SUPPORT_RX_FISA
  3520. bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3521. {
  3522. return (bool)(cfg->is_rx_fisa_enabled);
  3523. }
  3524. bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3525. {
  3526. return cfg->is_rx_fisa_lru_del_enabled;
  3527. }
  3528. #else
  3529. bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3530. {
  3531. return false;
  3532. }
  3533. bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3534. {
  3535. return false;
  3536. }
  3537. #endif
  3538. bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3539. {
  3540. return (bool)(cfg->is_poll_mode_enabled);
  3541. }
  3542. void
  3543. wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
  3544. bool val)
  3545. {
  3546. cfg->is_rx_flow_search_table_per_pdev = val;
  3547. }
  3548. bool wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg)
  3549. {
  3550. return cfg->is_rx_flow_search_table_per_pdev;
  3551. }
  3552. void wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  3553. uint16_t val)
  3554. {
  3555. cfg->rx_flow_search_table_size = val;
  3556. }
  3557. uint16_t
  3558. wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3559. {
  3560. return cfg->rx_flow_search_table_size;
  3561. }
  3562. void
  3563. wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  3564. bool val)
  3565. {
  3566. cfg->is_rx_mon_protocol_flow_tag_enabled = val;
  3567. }
  3568. bool
  3569. wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3570. {
  3571. return cfg->is_rx_mon_protocol_flow_tag_enabled;
  3572. }
  3573. qdf_export_symbol(wlan_cfg_is_rx_mon_protocol_flow_tag_enabled);
  3574. void
  3575. wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
  3576. bool val)
  3577. {
  3578. cfg->tx_per_pkt_vdev_id_check = val;
  3579. }
  3580. bool
  3581. wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3582. {
  3583. return cfg->tx_per_pkt_vdev_id_check;
  3584. }
  3585. void
  3586. wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  3587. bool val)
  3588. {
  3589. cfg->pext_stats_enabled = val;
  3590. }
  3591. void
  3592. wlan_cfg_set_peer_jitter_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  3593. bool val)
  3594. {
  3595. cfg->jitter_stats_enabled = val;
  3596. }
  3597. bool
  3598. wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3599. {
  3600. return cfg->pext_stats_enabled;
  3601. }
  3602. bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3603. {
  3604. return cfg->fst_in_cmem;
  3605. }
  3606. bool wlan_cfg_is_peer_jitter_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3607. {
  3608. return cfg->jitter_stats_enabled;
  3609. }
  3610. #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
  3611. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3612. {
  3613. return cfg->is_rx_buff_pool_enabled;
  3614. }
  3615. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3616. {
  3617. return cfg->is_rx_refill_buff_pool_enabled;
  3618. }
  3619. #else
  3620. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3621. {
  3622. return false;
  3623. }
  3624. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(
  3625. struct wlan_cfg_dp_soc_ctxt *cfg)
  3626. {
  3627. return false;
  3628. }
  3629. #endif /* WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL */
  3630. #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
  3631. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3632. {
  3633. return (bool)(cfg->is_swlm_enabled);
  3634. }
  3635. #else
  3636. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3637. {
  3638. return false;
  3639. }
  3640. #endif
  3641. uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  3642. {
  3643. return cfg->radio0_rx_default_reo;
  3644. }
  3645. uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  3646. {
  3647. return cfg->radio1_rx_default_reo;
  3648. }
  3649. uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  3650. {
  3651. return cfg->radio2_rx_default_reo;
  3652. }
  3653. void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  3654. {
  3655. cfg->rxdma1_enable = true;
  3656. }
  3657. void
  3658. wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg,
  3659. bool val)
  3660. {
  3661. cfg->delay_mon_replenish = val;
  3662. }
  3663. bool
  3664. wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg)
  3665. {
  3666. return cfg->delay_mon_replenish;
  3667. }
  3668. qdf_export_symbol(wlan_cfg_is_delay_mon_replenish);
  3669. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
  3670. {
  3671. dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,",
  3672. cfg->delay_mon_replenish);
  3673. dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d",
  3674. cfg->reo_dst_ring_size, cfg->delayed_replenish_entries);
  3675. }
  3676. #ifdef IPA_OFFLOAD
  3677. uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3678. {
  3679. return cfg->ipa_tx_ring_size;
  3680. }
  3681. uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3682. {
  3683. return cfg->ipa_tx_comp_ring_size;
  3684. }
  3685. #ifdef IPA_WDI3_TX_TWO_PIPES
  3686. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3687. {
  3688. return cfg->ipa_tx_alt_ring_size;
  3689. }
  3690. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3691. {
  3692. return cfg->ipa_tx_alt_comp_ring_size;
  3693. }
  3694. #else
  3695. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3696. {
  3697. return cfg->ipa_tx_ring_size;
  3698. }
  3699. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3700. {
  3701. return cfg->ipa_tx_comp_ring_size;
  3702. }
  3703. #endif
  3704. #endif
  3705. #ifdef WLAN_SUPPORT_PPEDS
  3706. bool
  3707. wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3708. {
  3709. return cfg->ppe_enable;
  3710. }
  3711. int
  3712. wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3713. {
  3714. return cfg->reo2ppe_ring;
  3715. }
  3716. int
  3717. wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3718. {
  3719. return cfg->ppe2tcl_ring;
  3720. }
  3721. int
  3722. wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3723. {
  3724. return cfg->ppe_release_ring;
  3725. }
  3726. int
  3727. wlan_cfg_get_dp_soc_ppe_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  3728. {
  3729. return cfg->ppe_num_tx_desc;
  3730. }
  3731. #endif
  3732. void
  3733. wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
  3734. struct wlan_dp_prealloc_cfg *cfg)
  3735. {
  3736. if (!ctrl_psoc || !cfg)
  3737. return;
  3738. cfg->num_reo_dst_ring_entries = cfg_get(ctrl_psoc,
  3739. CFG_DP_RX_DESTINATION_RING);
  3740. cfg->num_tx_ring_entries = cfg_get(ctrl_psoc, CFG_DP_TX_RING_SIZE);
  3741. cfg->num_tx_comp_ring_entries = cfg_get(ctrl_psoc,
  3742. CFG_DP_TX_COMPL_RING_SIZE);
  3743. cfg->num_wbm_rel_ring_entries = cfg_get(ctrl_psoc,
  3744. CFG_DP_WBM_RELEASE_RING);
  3745. cfg->num_rxdma_err_dst_ring_entries = cfg_get(ctrl_psoc,
  3746. CFG_DP_RXDMA_ERR_DST_RING);
  3747. cfg->num_reo_exception_ring_entries = cfg_get(ctrl_psoc,
  3748. CFG_DP_REO_EXCEPTION_RING);
  3749. cfg->num_tx_desc = cfg_get(ctrl_psoc, CFG_DP_TX_DESC);
  3750. cfg->num_tx_ext_desc = cfg_get(ctrl_psoc, CFG_DP_TX_EXT_DESC);
  3751. cfg->num_rxdma_buf_ring_entries = cfg_get(ctrl_psoc,
  3752. CFG_DP_RXDMA_BUF_RING);
  3753. cfg->num_rxdma_refill_ring_entries = cfg_get(ctrl_psoc,
  3754. CFG_DP_RXDMA_REFILL_RING);
  3755. cfg->num_reo_status_ring_entries = cfg_get(ctrl_psoc,
  3756. CFG_DP_REO_STATUS_RING);
  3757. cfg->num_mon_status_ring_entries = cfg_get(ctrl_psoc,
  3758. CFG_DP_RXDMA_MONITOR_STATUS_RING);
  3759. }
  3760. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  3761. uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
  3762. {
  3763. return cfg->pkt_capture_mode;
  3764. }
  3765. #endif
  3766. uint32_t
  3767. wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3768. {
  3769. return cfg->rx_mon_buf_ring_size;
  3770. }
  3771. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_mon_buf_ring_size);
  3772. uint32_t
  3773. wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3774. {
  3775. return cfg->tx_mon_buf_ring_size;
  3776. }
  3777. qdf_export_symbol(wlan_cfg_get_dp_soc_tx_mon_buf_ring_size);
  3778. uint8_t
  3779. wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  3780. {
  3781. return cfg->rx_rel_wbm2sw_ring_id;
  3782. }
  3783. void
  3784. wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  3785. uint8_t wbm2sw_ring_id)
  3786. {
  3787. cfg->rx_rel_wbm2sw_ring_id = wbm2sw_ring_id;
  3788. }
  3789. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  3790. uint8_t
  3791. wlan_cfg_mlo_rx_ring_map_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  3792. {
  3793. return cfg->mlo_chip_rx_ring_map;
  3794. }
  3795. #endif
  3796. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  3797. bool
  3798. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3799. {
  3800. return cfg->vdev_stats_hw_offload_config;
  3801. }
  3802. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  3803. {
  3804. return cfg->vdev_stats_hw_offload_timer;
  3805. }
  3806. void
  3807. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3808. bool val)
  3809. {
  3810. cfg->vdev_stats_hw_offload_config = val;
  3811. }
  3812. #else
  3813. bool
  3814. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3815. {
  3816. return false;
  3817. }
  3818. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  3819. {
  3820. return 0;
  3821. }
  3822. void
  3823. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3824. bool val)
  3825. {}
  3826. #endif
  3827. #ifdef CONFIG_SAWF
  3828. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3829. {
  3830. return cfg->sawf_enabled;
  3831. }
  3832. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  3833. {
  3834. cfg->sawf_enabled = val;
  3835. }
  3836. #else
  3837. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3838. {
  3839. return false;
  3840. }
  3841. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  3842. {
  3843. }
  3844. #endif
  3845. #ifdef CONFIG_BERYLLIUM
  3846. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3847. int context)
  3848. {
  3849. return cfg->int_host2txmon_ring_mask[context];
  3850. }
  3851. qdf_export_symbol(wlan_cfg_get_host2txmon_ring_mask);
  3852. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3853. int context, int mask)
  3854. {
  3855. cfg->int_host2txmon_ring_mask[context] = mask;
  3856. }
  3857. #else
  3858. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3859. int context)
  3860. {
  3861. return 0;
  3862. }
  3863. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3864. int context, int mask)
  3865. {
  3866. }
  3867. #endif
  3868. qdf_export_symbol(wlan_cfg_set_host2txmon_ring_mask);
  3869. void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
  3870. bool txmon_hw_support)
  3871. {
  3872. cfg->txmon_hw_support = txmon_hw_support;
  3873. }
  3874. bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg)
  3875. {
  3876. return cfg->txmon_hw_support;
  3877. }
  3878. qdf_export_symbol(wlan_cfg_get_txmon_hw_support);
  3879. uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg)
  3880. {
  3881. return cfg->napi_scale_factor;
  3882. }