wlan_cfg.c 121 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085
  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. }
  2449. #else
  2450. static inline void
  2451. wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2452. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2453. {
  2454. }
  2455. #endif
  2456. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  2457. /**
  2458. * wlan_cfg_get_lsb_set_pos() - returns position of LSB which is set
  2459. *
  2460. * Return: position of LSB which is set
  2461. */
  2462. static uint8_t wlan_cfg_get_lsb_set_pos(uint8_t val)
  2463. {
  2464. uint8_t pos = 0;
  2465. while (pos < 8) {
  2466. if (val & (1 << pos))
  2467. return pos;
  2468. pos++;
  2469. }
  2470. return 0;
  2471. }
  2472. /**
  2473. * wlan_multi_soc_mlo_cfg_attach() - Update multi soc mlo config in dp soc
  2474. * cfg context
  2475. * @psoc - Object manager psoc
  2476. * @wlan_cfg_ctx - dp soc cfg ctx
  2477. *
  2478. * Return: None
  2479. */
  2480. static void
  2481. wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2482. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2483. {
  2484. uint8_t rx_ring_map;
  2485. rx_ring_map =
  2486. cfg_get(psoc, CFG_DP_MLO_RX_RING_MAP);
  2487. wlan_cfg_ctx->mlo_chip_rx_ring_map = rx_ring_map;
  2488. }
  2489. #else
  2490. static inline void
  2491. wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2492. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2493. {
  2494. }
  2495. #endif
  2496. #ifdef WLAN_FEATURE_11BE_MLO
  2497. /**
  2498. * wlan_soc_mlo_cfg_attach() - Update mlo config in dp soc
  2499. * cfg context
  2500. * @psoc - Object manager psoc
  2501. * @wlan_cfg_ctx - dp soc cfg ctx
  2502. *
  2503. * Return: None
  2504. */
  2505. static void
  2506. wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2507. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2508. {
  2509. wlan_multi_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  2510. }
  2511. #else
  2512. static inline void
  2513. wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2514. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2515. {
  2516. }
  2517. #endif
  2518. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  2519. /**
  2520. * wlan_soc_vdev_hw_stats_cfg_attach() - Update hw vdev stats config in dp soc
  2521. * cfg context
  2522. * @psoc - Object manager psoc
  2523. * @wlan_cfg_ctx - dp soc cfg ctx
  2524. *
  2525. * Return: None
  2526. */
  2527. static void
  2528. wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2529. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2530. {
  2531. wlan_cfg_ctx->vdev_stats_hw_offload_config = cfg_get(psoc,
  2532. CFG_DP_VDEV_STATS_HW_OFFLOAD_CONFIG);
  2533. wlan_cfg_ctx->vdev_stats_hw_offload_timer = cfg_get(psoc,
  2534. CFG_DP_VDEV_STATS_HW_OFFLOAD_TIMER);
  2535. }
  2536. #else
  2537. static void
  2538. wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2539. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2540. {
  2541. }
  2542. #endif
  2543. #ifdef WLAN_TX_PKT_CAPTURE_ENH
  2544. static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2545. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2546. {
  2547. wlan_cfg_ctx->tx_capt_max_mem_allowed =
  2548. cfg_get(psoc, CFG_DP_TX_CAPT_MAX_MEM_MB) * 1024 * 1024;
  2549. }
  2550. #else
  2551. static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  2552. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2553. {
  2554. }
  2555. #endif
  2556. void
  2557. wlan_cfg_soc_update_tgt_params(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  2558. struct cdp_ctrl_objmgr_psoc *psoc)
  2559. {
  2560. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc,
  2561. CFG_DP_REO_RINGS_MAP);
  2562. }
  2563. /**
  2564. * wlan_cfg_soc_attach() - Allocate and prepare SoC configuration
  2565. * @psoc - Object manager psoc
  2566. * Return: wlan_cfg_ctx - Handle to Configuration context
  2567. */
  2568. struct wlan_cfg_dp_soc_ctxt *
  2569. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  2570. {
  2571. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
  2572. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
  2573. uint32_t gro_bit_set;
  2574. if (!wlan_cfg_ctx)
  2575. return NULL;
  2576. wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
  2577. wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS;
  2578. wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
  2579. wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
  2580. wlan_cfg_ctx->per_pdev_tx_ring = cfg_get(psoc, CFG_DP_PDEV_TX_RING);
  2581. wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS);
  2582. wlan_cfg_ctx->num_tcl_data_rings = cfg_get(psoc, CFG_DP_TCL_DATA_RINGS);
  2583. wlan_cfg_ctx->num_tx_comp_rings = cfg_get(psoc, CFG_DP_TX_COMP_RINGS);
  2584. wlan_cfg_ctx->num_nss_reo_dest_rings =
  2585. cfg_get(psoc, CFG_DP_NSS_REO_DEST_RINGS);
  2586. wlan_cfg_ctx->num_nss_tcl_data_rings =
  2587. cfg_get(psoc, CFG_DP_NSS_TCL_DATA_RINGS);
  2588. wlan_cfg_ctx->per_pdev_rx_ring = cfg_get(psoc, CFG_DP_PDEV_RX_RING);
  2589. wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
  2590. wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
  2591. wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
  2592. CFG_DP_TX_EXT_DESC_POOLS);
  2593. wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
  2594. wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
  2595. wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
  2596. wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
  2597. wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
  2598. wlan_cfg_ctx->tx_ring_size = cfg_get(psoc, CFG_DP_TX_RING_SIZE);
  2599. wlan_cfg_ctx->tx_comp_ring_size = cfg_get(psoc,
  2600. CFG_DP_TX_COMPL_RING_SIZE);
  2601. wlan_cfg_ctx->tx_comp_ring_size_nss =
  2602. cfg_get(psoc, CFG_DP_NSS_COMP_RING_SIZE);
  2603. wlan_cfg_ctx->int_batch_threshold_tx =
  2604. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
  2605. wlan_cfg_ctx->int_timer_threshold_tx =
  2606. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX);
  2607. wlan_cfg_ctx->int_batch_threshold_rx =
  2608. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX);
  2609. wlan_cfg_ctx->int_timer_threshold_rx =
  2610. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX);
  2611. wlan_cfg_ctx->int_batch_threshold_other =
  2612. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
  2613. wlan_cfg_ctx->int_timer_threshold_other =
  2614. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
  2615. wlan_cfg_ctx->pktlog_buffer_size =
  2616. cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
  2617. /* This is default mapping and can be overridden by HW config
  2618. * received from FW */
  2619. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0);
  2620. if (MAX_PDEV_CNT > 1)
  2621. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2);
  2622. if (MAX_PDEV_CNT > 2)
  2623. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1);
  2624. wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
  2625. wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
  2626. wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
  2627. wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
  2628. wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
  2629. gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
  2630. if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
  2631. wlan_cfg_ctx->gro_enabled = true;
  2632. if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO)
  2633. wlan_cfg_ctx->tc_based_dynamic_gro = true;
  2634. }
  2635. wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO);
  2636. wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
  2637. wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
  2638. wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
  2639. wlan_cfg_ctx->peer_flow_ctrl_enabled =
  2640. cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
  2641. wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
  2642. wlan_cfg_ctx->p2p_tcp_udp_checksumoffload =
  2643. cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD);
  2644. wlan_cfg_ctx->nan_tcp_udp_checksumoffload =
  2645. cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD);
  2646. wlan_cfg_ctx->tcp_udp_checksumoffload =
  2647. cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
  2648. wlan_cfg_ctx->legacy_mode_checksumoffload_disable =
  2649. cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE);
  2650. wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING);
  2651. wlan_cfg_ctx->defrag_timeout_check =
  2652. cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK);
  2653. wlan_cfg_ctx->rx_defrag_min_timeout =
  2654. cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT);
  2655. wlan_cfg_ctx->wbm_release_ring = cfg_get(psoc,
  2656. CFG_DP_WBM_RELEASE_RING);
  2657. wlan_cfg_ctx->tcl_cmd_credit_ring = cfg_get(psoc,
  2658. CFG_DP_TCL_CMD_CREDIT_RING);
  2659. wlan_cfg_ctx->tcl_status_ring = cfg_get(psoc,
  2660. CFG_DP_TCL_STATUS_RING);
  2661. wlan_cfg_ctx->reo_dst_ring_size = cfg_get(psoc,
  2662. CFG_DP_RX_DESTINATION_RING);
  2663. wlan_cfg_ctx->reo_reinject_ring = cfg_get(psoc,
  2664. CFG_DP_REO_REINJECT_RING);
  2665. wlan_cfg_ctx->rx_release_ring = cfg_get(psoc,
  2666. CFG_DP_RX_RELEASE_RING);
  2667. wlan_cfg_ctx->reo_exception_ring = cfg_get(psoc,
  2668. CFG_DP_REO_EXCEPTION_RING);
  2669. wlan_cfg_ctx->reo_cmd_ring = cfg_get(psoc,
  2670. CFG_DP_REO_CMD_RING);
  2671. wlan_cfg_ctx->reo_status_ring = cfg_get(psoc,
  2672. CFG_DP_REO_STATUS_RING);
  2673. wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc,
  2674. CFG_DP_RXDMA_REFILL_RING);
  2675. wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc,
  2676. CFG_DP_TX_DESC_LIMIT_0);
  2677. wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc,
  2678. CFG_DP_TX_DESC_LIMIT_1);
  2679. wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc,
  2680. CFG_DP_TX_DESC_LIMIT_2);
  2681. wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
  2682. CFG_DP_TX_DEVICE_LIMIT);
  2683. wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
  2684. CFG_DP_TX_SW_INTERNODE_QUEUE);
  2685. wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
  2686. CFG_DP_RXDMA_ERR_DST_RING);
  2687. wlan_cfg_ctx->enable_data_stall_detection =
  2688. cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
  2689. wlan_cfg_ctx->tx_flow_start_queue_offset =
  2690. cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET);
  2691. wlan_cfg_ctx->tx_flow_stop_queue_threshold =
  2692. cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH);
  2693. wlan_cfg_ctx->disable_intra_bss_fwd =
  2694. cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
  2695. wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
  2696. CFG_DP_RX_SW_DESC_WEIGHT);
  2697. wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
  2698. CFG_DP_RX_SW_DESC_NUM);
  2699. wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
  2700. wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
  2701. wlan_cfg_ctx->is_rx_flow_tag_enabled =
  2702. cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE);
  2703. wlan_cfg_ctx->is_rx_flow_search_table_per_pdev =
  2704. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV);
  2705. wlan_cfg_ctx->rx_flow_search_table_size =
  2706. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE);
  2707. wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled =
  2708. cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE);
  2709. wlan_cfg_ctx->mon_drop_thresh =
  2710. cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD);
  2711. wlan_cfg_ctx->is_rx_fisa_enabled = cfg_get(psoc, CFG_DP_RX_FISA_ENABLE);
  2712. wlan_cfg_ctx->is_rx_fisa_lru_del_enabled =
  2713. cfg_get(psoc, CFG_DP_RX_FISA_LRU_DEL_ENABLE);
  2714. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc, CFG_DP_REO_RINGS_MAP);
  2715. wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
  2716. wlan_cfg_ctx->is_rx_buff_pool_enabled =
  2717. cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
  2718. wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
  2719. cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
  2720. wlan_cfg_ctx->rx_pending_high_threshold =
  2721. cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
  2722. wlan_cfg_ctx->rx_pending_low_threshold =
  2723. cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
  2724. wlan_cfg_ctx->is_poll_mode_enabled =
  2725. cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
  2726. wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
  2727. wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
  2728. wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
  2729. cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
  2730. wlan_cfg_ctx->radio0_rx_default_reo =
  2731. cfg_get(psoc, CFG_DP_RX_RADIO_0_DEFAULT_REO);
  2732. wlan_cfg_ctx->radio1_rx_default_reo =
  2733. cfg_get(psoc, CFG_DP_RX_RADIO_1_DEFAULT_REO);
  2734. wlan_cfg_ctx->radio2_rx_default_reo =
  2735. cfg_get(psoc, CFG_DP_RX_RADIO_2_DEFAULT_REO);
  2736. wlan_cfg_ctx->wow_check_rx_pending_enable =
  2737. cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
  2738. wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
  2739. CFG_DP_DELAY_MON_REPLENISH);
  2740. wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
  2741. CFG_DP_RXDMA_MONITOR_BUF_RING);
  2742. wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
  2743. CFG_DP_TX_MONITOR_BUF_RING);
  2744. wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
  2745. wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
  2746. wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
  2747. wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  2748. wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx);
  2749. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  2750. wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
  2751. PKT_CAPTURE_MODE_DATA_ONLY;
  2752. #endif
  2753. wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
  2754. wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
  2755. NUM_RXDMA_RINGS_PER_PDEV;
  2756. wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
  2757. wlan_cfg_ctx->mpdu_retry_threshold_1 =
  2758. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
  2759. wlan_cfg_ctx->mpdu_retry_threshold_2 =
  2760. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
  2761. wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
  2762. CFG_DP_NAPI_SCALE_FACTOR);
  2763. return wlan_cfg_ctx;
  2764. }
  2765. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  2766. {
  2767. qdf_mem_free(wlan_cfg_ctx);
  2768. }
  2769. struct wlan_cfg_dp_pdev_ctxt *
  2770. wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  2771. {
  2772. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx =
  2773. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt));
  2774. if (!wlan_cfg_ctx)
  2775. return NULL;
  2776. wlan_cfg_ctx->rx_dma_buf_ring_size = cfg_get(psoc,
  2777. CFG_DP_RXDMA_BUF_RING);
  2778. wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc,
  2779. CFG_DP_RXDMA_MONITOR_BUF_RING);
  2780. wlan_cfg_ctx->dma_rx_mon_dest_ring_size = cfg_get(psoc,
  2781. CFG_DP_RXDMA_MONITOR_DST_RING);
  2782. wlan_cfg_ctx->dma_tx_mon_dest_ring_size = cfg_get(psoc,
  2783. CFG_DP_TX_MONITOR_DST_RING);
  2784. wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc,
  2785. CFG_DP_RXDMA_MONITOR_STATUS_RING);
  2786. wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc,
  2787. CFG_DP_RXDMA_MONITOR_DESC_RING);
  2788. wlan_cfg_ctx->num_mac_rings = NUM_RXDMA_RINGS_PER_PDEV;
  2789. return wlan_cfg_ctx;
  2790. }
  2791. void wlan_cfg_set_mon_delayed_replenish_entries(
  2792. struct wlan_cfg_dp_soc_ctxt *cfg,
  2793. uint32_t val)
  2794. {
  2795. cfg->delayed_replenish_entries = val;
  2796. }
  2797. qdf_export_symbol(wlan_cfg_set_mon_delayed_replenish_entries);
  2798. int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt *cfg)
  2799. {
  2800. return cfg->delayed_replenish_entries;
  2801. }
  2802. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx)
  2803. {
  2804. if (wlan_cfg_ctx)
  2805. qdf_mem_free(wlan_cfg_ctx);
  2806. }
  2807. int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg)
  2808. {
  2809. return cfg->mon_drop_thresh;
  2810. }
  2811. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num)
  2812. {
  2813. cfg->num_int_ctxts = num;
  2814. }
  2815. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  2816. {
  2817. cfg->max_peer_id = val;
  2818. }
  2819. void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  2820. {
  2821. cfg->max_ast_idx = val;
  2822. }
  2823. int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg)
  2824. {
  2825. return cfg->max_ast_idx;
  2826. }
  2827. qdf_export_symbol(wlan_cfg_get_max_ast_idx);
  2828. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2829. int context, int mask)
  2830. {
  2831. cfg->int_tx_ring_mask[context] = mask;
  2832. }
  2833. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2834. int context, int mask)
  2835. {
  2836. cfg->int_rx_ring_mask[context] = mask;
  2837. }
  2838. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2839. int context, int mask)
  2840. {
  2841. cfg->int_rx_mon_ring_mask[context] = mask;
  2842. }
  2843. void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2844. int context, int mask)
  2845. {
  2846. cfg->int_tx_mon_ring_mask[context] = mask;
  2847. }
  2848. int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2849. int context)
  2850. {
  2851. return cfg->int_host2rxdma_mon_ring_mask[context];
  2852. }
  2853. void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2854. int context, int mask)
  2855. {
  2856. cfg->int_host2rxdma_mon_ring_mask[context] = mask;
  2857. }
  2858. int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2859. int context)
  2860. {
  2861. return cfg->int_rxdma2host_mon_ring_mask[context];
  2862. }
  2863. void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2864. int context, int mask)
  2865. {
  2866. cfg->int_rxdma2host_mon_ring_mask[context] = mask;
  2867. }
  2868. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2869. int context, int mask)
  2870. {
  2871. cfg->int_rxdma2host_ring_mask[context] = mask;
  2872. }
  2873. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2874. int context)
  2875. {
  2876. return cfg->int_rxdma2host_ring_mask[context];
  2877. }
  2878. void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2879. int context, int mask)
  2880. {
  2881. cfg->int_host2rxdma_ring_mask[context] = mask;
  2882. }
  2883. int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2884. int context)
  2885. {
  2886. return cfg->int_host2rxdma_ring_mask[context];
  2887. }
  2888. int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2889. int context)
  2890. {
  2891. return cfg->int_rx_ring_near_full_irq_1_mask[context];
  2892. }
  2893. int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2894. int context)
  2895. {
  2896. return cfg->int_rx_ring_near_full_irq_2_mask[context];
  2897. }
  2898. int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2899. int context)
  2900. {
  2901. return cfg->int_tx_ring_near_full_irq_mask[context];
  2902. }
  2903. void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  2904. int hw_macid)
  2905. {
  2906. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  2907. cfg->hw_macid[pdev_idx] = hw_macid;
  2908. }
  2909. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx)
  2910. {
  2911. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  2912. return cfg->hw_macid[pdev_idx];
  2913. }
  2914. qdf_export_symbol(wlan_cfg_get_hw_mac_idx);
  2915. int wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  2916. int hw_macid)
  2917. {
  2918. int idx;
  2919. for (idx = 0; idx < MAX_PDEV_CNT; idx++) {
  2920. if (cfg->hw_macid[idx] == hw_macid)
  2921. return (idx + 1);
  2922. }
  2923. qdf_assert_always(idx < MAX_PDEV_CNT);
  2924. return WLAN_INVALID_PDEV_ID;
  2925. }
  2926. void wlan_cfg_set_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  2927. int hw_macid)
  2928. {
  2929. qdf_assert_always((pdev_idx < MAX_PDEV_CNT) ||
  2930. (pdev_idx == INVALID_PDEV_ID));
  2931. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  2932. cfg->hw_macid_pdev_id_map[hw_macid] = pdev_idx;
  2933. }
  2934. int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid)
  2935. {
  2936. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  2937. return cfg->hw_macid_pdev_id_map[hw_macid];
  2938. }
  2939. qdf_export_symbol(wlan_cfg_get_pdev_idx);
  2940. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2941. int context, int mask)
  2942. {
  2943. cfg->int_ce_ring_mask[context] = mask;
  2944. }
  2945. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  2946. int mask)
  2947. {
  2948. cfg->int_rx_ring_mask[context] = mask;
  2949. }
  2950. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2951. int context, int mask)
  2952. {
  2953. return cfg->int_rx_err_ring_mask[context] = mask;
  2954. }
  2955. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2956. int context, int mask)
  2957. {
  2958. return cfg->int_rx_wbm_rel_ring_mask[context] = mask;
  2959. }
  2960. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2961. int context, int mask)
  2962. {
  2963. return cfg->int_reo_status_ring_mask[context] = mask;
  2964. }
  2965. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg)
  2966. {
  2967. return cfg->num_int_ctxts;
  2968. }
  2969. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  2970. {
  2971. return cfg->int_tx_ring_mask[context];
  2972. }
  2973. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  2974. {
  2975. return cfg->int_rx_ring_mask[context];
  2976. }
  2977. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2978. int context)
  2979. {
  2980. return cfg->int_rx_err_ring_mask[context];
  2981. }
  2982. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2983. int context)
  2984. {
  2985. return cfg->int_rx_wbm_rel_ring_mask[context];
  2986. }
  2987. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2988. int context)
  2989. {
  2990. return cfg->int_reo_status_ring_mask[context];
  2991. }
  2992. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  2993. {
  2994. return cfg->int_rx_mon_ring_mask[context];
  2995. }
  2996. #ifdef CONFIG_BERYLLIUM
  2997. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  2998. {
  2999. return cfg->int_tx_mon_ring_mask[context];
  3000. }
  3001. #else
  3002. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  3003. {
  3004. return 0;
  3005. }
  3006. #endif
  3007. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  3008. {
  3009. return cfg->int_ce_ring_mask[context];
  3010. }
  3011. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *cfg)
  3012. {
  3013. return cfg->max_clients;
  3014. }
  3015. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3016. {
  3017. return cfg->max_alloc_size;
  3018. }
  3019. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  3020. {
  3021. return cfg->per_pdev_tx_ring;
  3022. }
  3023. int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3024. int context)
  3025. {
  3026. return cfg->int_umac_reset_intr_mask[context];
  3027. }
  3028. uint32_t
  3029. wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  3030. {
  3031. return cfg->rx_pending_high_threshold;
  3032. }
  3033. uint32_t
  3034. wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  3035. {
  3036. return cfg->rx_pending_low_threshold;
  3037. }
  3038. int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  3039. {
  3040. return cfg->per_pdev_lmac_ring;
  3041. }
  3042. qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring);
  3043. #if defined(DP_USE_SINGLE_TCL) && !defined(TX_MULTI_TCL)
  3044. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3045. {
  3046. return 1;
  3047. }
  3048. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3049. {
  3050. return 1;
  3051. }
  3052. #else
  3053. #if defined(IPA_OFFLOAD) && defined(TX_MULTI_TCL)
  3054. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3055. {
  3056. if (!cfg->ipa_enabled)
  3057. return cfg->num_tcl_data_rings;
  3058. return 1;
  3059. }
  3060. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3061. {
  3062. if (!cfg->ipa_enabled)
  3063. return cfg->num_nss_tcl_data_rings;
  3064. return 1;
  3065. }
  3066. #else
  3067. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3068. {
  3069. return cfg->num_tcl_data_rings;
  3070. }
  3071. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3072. {
  3073. return cfg->num_nss_tcl_data_rings;
  3074. }
  3075. #endif
  3076. #endif
  3077. int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3078. {
  3079. return cfg->num_tx_comp_rings;
  3080. }
  3081. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3082. {
  3083. return cfg->tx_ring_size;
  3084. }
  3085. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3086. {
  3087. return cfg->tx_comp_ring_size;
  3088. }
  3089. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  3090. {
  3091. return cfg->per_pdev_rx_ring;
  3092. }
  3093. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3094. {
  3095. return cfg->num_reo_dest_rings;
  3096. }
  3097. int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  3098. {
  3099. return cfg->num_nss_reo_dest_rings;
  3100. }
  3101. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *cfg)
  3102. {
  3103. return cfg->htt_packet_type; /*htt_pkt_type_ethernet*/
  3104. }
  3105. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  3106. {
  3107. return cfg->num_tx_desc_pool;
  3108. }
  3109. void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  3110. {
  3111. cfg->num_tx_desc_pool = num_pool;
  3112. }
  3113. int wlan_cfg_get_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  3114. {
  3115. return cfg->num_tx_ext_desc_pool;
  3116. }
  3117. void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  3118. {
  3119. cfg->num_tx_ext_desc_pool = num_pool;
  3120. }
  3121. int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3122. {
  3123. return cfg->reo_dst_ring_size;
  3124. }
  3125. void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  3126. int reo_dst_ring_size)
  3127. {
  3128. cfg->reo_dst_ring_size = reo_dst_ring_size;
  3129. }
  3130. void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
  3131. bool raw_mode_war)
  3132. {
  3133. cfg->raw_mode_war = raw_mode_war;
  3134. }
  3135. bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg)
  3136. {
  3137. return cfg->raw_mode_war;
  3138. }
  3139. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  3140. {
  3141. return cfg->num_tx_desc;
  3142. }
  3143. void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc)
  3144. {
  3145. cfg->num_tx_desc = num_desc;
  3146. }
  3147. int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  3148. {
  3149. return cfg->min_tx_desc;
  3150. }
  3151. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  3152. {
  3153. return cfg->num_tx_ext_desc;
  3154. }
  3155. void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc)
  3156. {
  3157. cfg->num_tx_ext_desc = num_ext_desc;
  3158. }
  3159. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  3160. {
  3161. /* TODO: This should be calculated based on target capabilities */
  3162. return cfg->max_peer_id;
  3163. }
  3164. int wlan_cfg_get_dma_mon_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3165. {
  3166. return cfg->dma_mon_buf_ring_size;
  3167. }
  3168. qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size);
  3169. int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3170. {
  3171. return cfg->dma_rx_mon_dest_ring_size;
  3172. }
  3173. qdf_export_symbol(wlan_cfg_get_dma_rx_mon_dest_ring_size);
  3174. int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3175. {
  3176. return cfg->dma_tx_mon_dest_ring_size;
  3177. }
  3178. qdf_export_symbol(wlan_cfg_get_dma_tx_mon_dest_ring_size);
  3179. int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3180. {
  3181. return cfg->dma_mon_status_ring_size;
  3182. }
  3183. qdf_export_symbol(wlan_cfg_get_dma_mon_stat_ring_size);
  3184. int
  3185. wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3186. {
  3187. return cfg->rxdma_monitor_desc_ring;
  3188. }
  3189. qdf_export_symbol(wlan_cfg_get_dma_mon_desc_ring_size);
  3190. int wlan_cfg_get_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3191. {
  3192. return cfg->rx_dma_buf_ring_size;
  3193. }
  3194. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3195. {
  3196. return cfg->num_mac_rings;
  3197. }
  3198. qdf_export_symbol(wlan_cfg_get_num_mac_rings);
  3199. bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3200. {
  3201. return cfg->gro_enabled;
  3202. }
  3203. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3204. {
  3205. return cfg->lro_enabled;
  3206. }
  3207. bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3208. {
  3209. return cfg->ipa_enabled;
  3210. }
  3211. void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  3212. {
  3213. cfg->rx_hash = val;
  3214. }
  3215. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3216. {
  3217. return cfg->rx_hash;
  3218. }
  3219. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg)
  3220. {
  3221. return cfg->nss_enabled;
  3222. }
  3223. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled)
  3224. {
  3225. cfg->nss_enabled = nss_enabled;
  3226. }
  3227. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg)
  3228. {
  3229. return cfg->nss_cfg;
  3230. }
  3231. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg)
  3232. {
  3233. cfg->nss_cfg = nss_cfg;
  3234. if (cfg->nss_cfg)
  3235. cfg->tx_comp_ring_size = cfg->tx_comp_ring_size_nss;
  3236. }
  3237. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  3238. {
  3239. return cfg->int_batch_threshold_tx;
  3240. }
  3241. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  3242. {
  3243. return cfg->int_timer_threshold_tx;
  3244. }
  3245. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  3246. {
  3247. return cfg->int_batch_threshold_rx;
  3248. }
  3249. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  3250. {
  3251. return cfg->int_timer_threshold_rx;
  3252. }
  3253. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  3254. {
  3255. return cfg->int_batch_threshold_other;
  3256. }
  3257. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  3258. {
  3259. return cfg->int_timer_threshold_other;
  3260. }
  3261. int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg)
  3262. {
  3263. return cfg->int_timer_threshold_mon;
  3264. }
  3265. int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  3266. {
  3267. return cfg->p2p_tcp_udp_checksumoffload;
  3268. }
  3269. int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  3270. {
  3271. return cfg->nan_tcp_udp_checksumoffload;
  3272. }
  3273. int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  3274. {
  3275. return cfg->tcp_udp_checksumoffload;
  3276. }
  3277. int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg)
  3278. {
  3279. return cfg->rx_defrag_min_timeout;
  3280. }
  3281. int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg)
  3282. {
  3283. return cfg->defrag_timeout_check;
  3284. }
  3285. int
  3286. wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3287. {
  3288. return cfg->wbm_release_ring;
  3289. }
  3290. int
  3291. wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3292. {
  3293. return cfg->tcl_cmd_credit_ring;
  3294. }
  3295. int
  3296. wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3297. {
  3298. return cfg->tcl_status_ring;
  3299. }
  3300. int
  3301. wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3302. {
  3303. return cfg->reo_reinject_ring;
  3304. }
  3305. int
  3306. wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3307. {
  3308. return cfg->rx_release_ring;
  3309. }
  3310. int
  3311. wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3312. {
  3313. return cfg->reo_exception_ring;
  3314. }
  3315. int
  3316. wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3317. {
  3318. return cfg->reo_cmd_ring;
  3319. }
  3320. int
  3321. wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3322. {
  3323. return cfg->reo_status_ring;
  3324. }
  3325. int
  3326. wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3327. {
  3328. return cfg->rxdma_refill_ring;
  3329. }
  3330. int
  3331. wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg)
  3332. {
  3333. return cfg->tx_desc_limit_0;
  3334. }
  3335. int
  3336. wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg)
  3337. {
  3338. return cfg->tx_desc_limit_1;
  3339. }
  3340. int
  3341. wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg)
  3342. {
  3343. return cfg->tx_desc_limit_2;
  3344. }
  3345. int
  3346. wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
  3347. {
  3348. return cfg->tx_device_limit;
  3349. }
  3350. int
  3351. wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg)
  3352. {
  3353. return cfg->tx_sw_internode_queue;
  3354. }
  3355. int
  3356. wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3357. {
  3358. return cfg->rxdma_err_dst_ring;
  3359. }
  3360. int
  3361. wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg)
  3362. {
  3363. return cfg->rx_sw_desc_weight;
  3364. }
  3365. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_sw_desc_weight);
  3366. int
  3367. wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg)
  3368. {
  3369. return cfg->rx_sw_desc_num;
  3370. }
  3371. uint32_t
  3372. wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
  3373. {
  3374. return cfg->reo_rings_mapping;
  3375. }
  3376. bool
  3377. wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
  3378. enum cdp_capabilities dp_caps)
  3379. {
  3380. switch (dp_caps) {
  3381. case CDP_CFG_DP_TSO:
  3382. return cfg->tso_enabled;
  3383. case CDP_CFG_DP_LRO:
  3384. return cfg->lro_enabled;
  3385. case CDP_CFG_DP_SG:
  3386. return cfg->sg_enabled;
  3387. case CDP_CFG_DP_GRO:
  3388. return cfg->gro_enabled;
  3389. case CDP_CFG_DP_OL_TX_CSUM:
  3390. return cfg->ol_tx_csum_enabled;
  3391. case CDP_CFG_DP_OL_RX_CSUM:
  3392. return cfg->ol_rx_csum_enabled;
  3393. case CDP_CFG_DP_RAWMODE:
  3394. return cfg->rawmode_enabled;
  3395. case CDP_CFG_DP_PEER_FLOW_CTRL:
  3396. return cfg->peer_flow_ctrl_enabled;
  3397. case CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT:
  3398. return cfg->notify_frame_support;
  3399. default:
  3400. return false;
  3401. }
  3402. }
  3403. void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
  3404. bool val)
  3405. {
  3406. cfg->is_tso_desc_attach_defer = val;
  3407. }
  3408. bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg)
  3409. {
  3410. return cfg->is_tso_desc_attach_defer;
  3411. }
  3412. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  3413. /**
  3414. * wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold
  3415. * @cfg: config context
  3416. *
  3417. * Return: stop threshold
  3418. */
  3419. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg)
  3420. {
  3421. return cfg->tx_flow_stop_queue_threshold;
  3422. }
  3423. /**
  3424. * wlan_cfg_get_tx_flow_start_queue_offset() - Get flow control start offset
  3425. * for TX to resume
  3426. * @cfg: config context
  3427. *
  3428. * Return: stop threshold
  3429. */
  3430. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg)
  3431. {
  3432. return cfg->tx_flow_start_queue_offset;
  3433. }
  3434. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  3435. void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  3436. bool val)
  3437. {
  3438. cfg->is_rx_flow_tag_enabled = val;
  3439. }
  3440. uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg)
  3441. {
  3442. return cfg->rx_toeplitz_hash_key;
  3443. }
  3444. uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg)
  3445. {
  3446. return cfg->rx_flow_max_search;
  3447. }
  3448. bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3449. {
  3450. return cfg->is_rx_flow_tag_enabled;
  3451. }
  3452. qdf_export_symbol(wlan_cfg_is_rx_flow_tag_enabled);
  3453. #ifdef WLAN_SUPPORT_RX_FISA
  3454. bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3455. {
  3456. return (bool)(cfg->is_rx_fisa_enabled);
  3457. }
  3458. bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3459. {
  3460. return cfg->is_rx_fisa_lru_del_enabled;
  3461. }
  3462. #else
  3463. bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3464. {
  3465. return false;
  3466. }
  3467. bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3468. {
  3469. return false;
  3470. }
  3471. #endif
  3472. bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3473. {
  3474. return (bool)(cfg->is_poll_mode_enabled);
  3475. }
  3476. void
  3477. wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
  3478. bool val)
  3479. {
  3480. cfg->is_rx_flow_search_table_per_pdev = val;
  3481. }
  3482. bool wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg)
  3483. {
  3484. return cfg->is_rx_flow_search_table_per_pdev;
  3485. }
  3486. void wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  3487. uint16_t val)
  3488. {
  3489. cfg->rx_flow_search_table_size = val;
  3490. }
  3491. uint16_t
  3492. wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3493. {
  3494. return cfg->rx_flow_search_table_size;
  3495. }
  3496. void
  3497. wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  3498. bool val)
  3499. {
  3500. cfg->is_rx_mon_protocol_flow_tag_enabled = val;
  3501. }
  3502. bool
  3503. wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3504. {
  3505. return cfg->is_rx_mon_protocol_flow_tag_enabled;
  3506. }
  3507. qdf_export_symbol(wlan_cfg_is_rx_mon_protocol_flow_tag_enabled);
  3508. void
  3509. wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
  3510. bool val)
  3511. {
  3512. cfg->tx_per_pkt_vdev_id_check = val;
  3513. }
  3514. bool
  3515. wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3516. {
  3517. return cfg->tx_per_pkt_vdev_id_check;
  3518. }
  3519. void
  3520. wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  3521. bool val)
  3522. {
  3523. cfg->pext_stats_enabled = val;
  3524. }
  3525. bool
  3526. wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3527. {
  3528. return cfg->pext_stats_enabled;
  3529. }
  3530. bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3531. {
  3532. return cfg->fst_in_cmem;
  3533. }
  3534. #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
  3535. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3536. {
  3537. return cfg->is_rx_buff_pool_enabled;
  3538. }
  3539. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3540. {
  3541. return cfg->is_rx_refill_buff_pool_enabled;
  3542. }
  3543. #else
  3544. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3545. {
  3546. return false;
  3547. }
  3548. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(
  3549. struct wlan_cfg_dp_soc_ctxt *cfg)
  3550. {
  3551. return false;
  3552. }
  3553. #endif /* WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL */
  3554. #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
  3555. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3556. {
  3557. return (bool)(cfg->is_swlm_enabled);
  3558. }
  3559. #else
  3560. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3561. {
  3562. return false;
  3563. }
  3564. #endif
  3565. uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  3566. {
  3567. return cfg->radio0_rx_default_reo;
  3568. }
  3569. uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  3570. {
  3571. return cfg->radio1_rx_default_reo;
  3572. }
  3573. uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  3574. {
  3575. return cfg->radio2_rx_default_reo;
  3576. }
  3577. void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  3578. {
  3579. cfg->rxdma1_enable = true;
  3580. }
  3581. void
  3582. wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg,
  3583. bool val)
  3584. {
  3585. cfg->delay_mon_replenish = val;
  3586. }
  3587. bool
  3588. wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg)
  3589. {
  3590. return cfg->delay_mon_replenish;
  3591. }
  3592. qdf_export_symbol(wlan_cfg_is_delay_mon_replenish);
  3593. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
  3594. {
  3595. dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,",
  3596. cfg->delay_mon_replenish);
  3597. dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d",
  3598. cfg->reo_dst_ring_size, cfg->delayed_replenish_entries);
  3599. }
  3600. #ifdef IPA_OFFLOAD
  3601. uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3602. {
  3603. return cfg->ipa_tx_ring_size;
  3604. }
  3605. uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3606. {
  3607. return cfg->ipa_tx_comp_ring_size;
  3608. }
  3609. #ifdef IPA_WDI3_TX_TWO_PIPES
  3610. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3611. {
  3612. return cfg->ipa_tx_alt_ring_size;
  3613. }
  3614. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3615. {
  3616. return cfg->ipa_tx_alt_comp_ring_size;
  3617. }
  3618. #else
  3619. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3620. {
  3621. return cfg->ipa_tx_ring_size;
  3622. }
  3623. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3624. {
  3625. return cfg->ipa_tx_comp_ring_size;
  3626. }
  3627. #endif
  3628. #endif
  3629. #ifdef WLAN_SUPPORT_PPEDS
  3630. bool
  3631. wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  3632. {
  3633. return cfg->ppe_enable;
  3634. }
  3635. int
  3636. wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3637. {
  3638. return cfg->reo2ppe_ring;
  3639. }
  3640. int
  3641. wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3642. {
  3643. return cfg->ppe2tcl_ring;
  3644. }
  3645. int
  3646. wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3647. {
  3648. return cfg->ppe_release_ring;
  3649. }
  3650. #endif
  3651. void
  3652. wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
  3653. struct wlan_dp_prealloc_cfg *cfg)
  3654. {
  3655. if (!ctrl_psoc || !cfg)
  3656. return;
  3657. cfg->num_tx_ring_entries = cfg_get(ctrl_psoc, CFG_DP_TX_RING_SIZE);
  3658. cfg->num_tx_comp_ring_entries = cfg_get(ctrl_psoc,
  3659. CFG_DP_TX_COMPL_RING_SIZE);
  3660. cfg->num_wbm_rel_ring_entries = cfg_get(ctrl_psoc,
  3661. CFG_DP_WBM_RELEASE_RING);
  3662. cfg->num_rxdma_err_dst_ring_entries = cfg_get(ctrl_psoc,
  3663. CFG_DP_RXDMA_ERR_DST_RING);
  3664. cfg->num_reo_exception_ring_entries = cfg_get(ctrl_psoc,
  3665. CFG_DP_REO_EXCEPTION_RING);
  3666. cfg->num_tx_desc = cfg_get(ctrl_psoc, CFG_DP_TX_DESC);
  3667. cfg->num_tx_ext_desc = cfg_get(ctrl_psoc, CFG_DP_TX_EXT_DESC);
  3668. }
  3669. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  3670. uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
  3671. {
  3672. return cfg->pkt_capture_mode;
  3673. }
  3674. #endif
  3675. uint32_t
  3676. wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3677. {
  3678. return cfg->rx_mon_buf_ring_size;
  3679. }
  3680. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_mon_buf_ring_size);
  3681. uint32_t
  3682. wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  3683. {
  3684. return cfg->tx_mon_buf_ring_size;
  3685. }
  3686. qdf_export_symbol(wlan_cfg_get_dp_soc_tx_mon_buf_ring_size);
  3687. uint8_t
  3688. wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  3689. {
  3690. return cfg->rx_rel_wbm2sw_ring_id;
  3691. }
  3692. void
  3693. wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  3694. uint8_t wbm2sw_ring_id)
  3695. {
  3696. cfg->rx_rel_wbm2sw_ring_id = wbm2sw_ring_id;
  3697. }
  3698. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  3699. uint8_t
  3700. wlan_cfg_mlo_rx_ring_map_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  3701. {
  3702. return cfg->mlo_chip_rx_ring_map;
  3703. }
  3704. #endif
  3705. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  3706. bool
  3707. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3708. {
  3709. return cfg->vdev_stats_hw_offload_config;
  3710. }
  3711. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  3712. {
  3713. return cfg->vdev_stats_hw_offload_timer;
  3714. }
  3715. void
  3716. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3717. bool val)
  3718. {
  3719. cfg->vdev_stats_hw_offload_config = val;
  3720. }
  3721. #else
  3722. bool
  3723. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3724. {
  3725. return false;
  3726. }
  3727. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  3728. {
  3729. return 0;
  3730. }
  3731. void
  3732. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3733. bool val)
  3734. {}
  3735. #endif
  3736. #ifdef CONFIG_SAWF
  3737. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3738. {
  3739. return cfg->sawf_enabled;
  3740. }
  3741. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  3742. {
  3743. cfg->sawf_enabled = val;
  3744. }
  3745. #else
  3746. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3747. {
  3748. return false;
  3749. }
  3750. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  3751. {
  3752. }
  3753. #endif
  3754. #ifdef CONFIG_BERYLLIUM
  3755. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3756. int context)
  3757. {
  3758. return cfg->int_host2txmon_ring_mask[context];
  3759. }
  3760. qdf_export_symbol(wlan_cfg_get_host2txmon_ring_mask);
  3761. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3762. int context, int mask)
  3763. {
  3764. cfg->int_host2txmon_ring_mask[context] = mask;
  3765. }
  3766. #else
  3767. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3768. int context)
  3769. {
  3770. return 0;
  3771. }
  3772. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  3773. int context, int mask)
  3774. {
  3775. }
  3776. #endif
  3777. qdf_export_symbol(wlan_cfg_set_host2txmon_ring_mask);
  3778. void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
  3779. bool txmon_hw_support)
  3780. {
  3781. cfg->txmon_hw_support = txmon_hw_support;
  3782. }
  3783. bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg)
  3784. {
  3785. return cfg->txmon_hw_support;
  3786. }
  3787. qdf_export_symbol(wlan_cfg_get_txmon_hw_support);
  3788. uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg)
  3789. {
  3790. return cfg->napi_scale_factor;
  3791. }