wlan_cfg.c 121 KB

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