wlan_cfg.c 133 KB

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