wlan_cfg.c 131 KB

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