wlan_cfg.c 123 KB

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