wlan_cfg.c 130 KB

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