wlan_cfg.c 171 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637
  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. /* Interrupt assignment for 9 MSI combination */
  777. {
  778. /* tx ring masks */
  779. { WLAN_CFG_TX_RING_MASK_0,
  780. WLAN_CFG_TX_RING_MASK_1,
  781. WLAN_CFG_TX_RING_MASK_2,
  782. WLAN_CFG_TX_RING_MASK_3,
  783. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  784. /* rx ring masks */
  785. { 0, 0, 0, 0,
  786. WLAN_CFG_RX_RING_MASK_0,
  787. WLAN_CFG_RX_RING_MASK_1,
  788. WLAN_CFG_RX_RING_MASK_2,
  789. WLAN_CFG_RX_RING_MASK_3,
  790. 0, 0, 0, 0, 0, 0, 0, 0},
  791. /* rx mon ring masks */
  792. { 0, 0, 0,
  793. WLAN_CFG_RX_MON_RING_MASK_0,
  794. WLAN_CFG_RX_MON_RING_MASK_1,
  795. WLAN_CFG_RX_MON_RING_MASK_2,
  796. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  797. /* host2rxdma ring masks */
  798. { 0, 0, 0,
  799. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  800. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  801. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  802. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  803. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  804. /* rxdma2host ring masks */
  805. { 0, 0, 0,
  806. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  807. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  808. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  809. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  810. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  811. /* host2rxdma mon ring masks */
  812. { 0, 0, 0,
  813. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  814. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  815. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  816. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  817. /* rxdma2host mon ring masks */
  818. { 0, 0, 0,
  819. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  820. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  821. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  822. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  823. /* rx err ring masks */
  824. { 0, 0, 0,
  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},
  830. /* rx wbm rel ring masks */
  831. { 0, 0, 0,
  832. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  833. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  834. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  835. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  836. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  837. /* reo status ring masks */
  838. { 0, 0, 0,
  839. WLAN_CFG_REO_STATUS_RING_MASK_0,
  840. WLAN_CFG_REO_STATUS_RING_MASK_1,
  841. WLAN_CFG_REO_STATUS_RING_MASK_2,
  842. WLAN_CFG_REO_STATUS_RING_MASK_3,
  843. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  844. /* rx_ring_near_full_irq mask */
  845. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  846. /* rx_ring_near_full_irq_2 mask */
  847. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  848. /* tx_ring_near_full_irq mask */
  849. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  850. /* host2txmon ring masks */
  851. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  852. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  853. /* tx mon ring masks */
  854. { WLAN_CFG_TX_MON_RING_MASK_0,
  855. WLAN_CFG_TX_MON_RING_MASK_1,
  856. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  857. /* ppe ds wbm release ring ring mask */
  858. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  859. /* Reo2ppe ring mask */
  860. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  861. /* ppe2tcl ring mask */
  862. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  863. /* umac reset mask */
  864. {0, 0, 0, 0, 0, 0, 0, 0,
  865. WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  866. },
  867. /* Interrupt assignment for 10 MSI combination */
  868. {
  869. /* tx ring masks */
  870. { WLAN_CFG_TX_RING_MASK_0,
  871. WLAN_CFG_TX_RING_MASK_1,
  872. WLAN_CFG_TX_RING_MASK_2,
  873. WLAN_CFG_TX_RING_MASK_3,
  874. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  875. /* rx ring masks */
  876. { 0, 0, 0, 0,
  877. WLAN_CFG_RX_RING_MASK_0,
  878. WLAN_CFG_RX_RING_MASK_1,
  879. WLAN_CFG_RX_RING_MASK_2,
  880. WLAN_CFG_RX_RING_MASK_3,
  881. 0, 0, 0, 0, 0, 0, 0, 0},
  882. /* rx mon ring masks */
  883. { 0, 0, 0,
  884. WLAN_CFG_RX_MON_RING_MASK_0,
  885. WLAN_CFG_RX_MON_RING_MASK_1,
  886. WLAN_CFG_RX_MON_RING_MASK_2,
  887. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  888. /* host2rxdma ring masks */
  889. { 0, 0, 0,
  890. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  891. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  892. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  893. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  894. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  895. /* rxdma2host ring masks */
  896. { 0, 0, 0,
  897. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  898. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  899. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  900. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  901. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  902. /* host2rxdma mon ring masks */
  903. { 0, 0, 0,
  904. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  905. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  906. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  907. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  908. /* rxdma2host mon ring masks */
  909. { 0, 0, 0,
  910. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  911. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  912. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  913. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  914. /* rx err ring masks */
  915. { 0, 0, 0,
  916. WLAN_CFG_RX_ERR_RING_MASK_0,
  917. WLAN_CFG_RX_ERR_RING_MASK_1,
  918. WLAN_CFG_RX_ERR_RING_MASK_2,
  919. WLAN_CFG_RX_ERR_RING_MASK_3,
  920. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  921. /* rx wbm rel ring masks */
  922. { 0, 0, 0,
  923. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  924. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  925. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  926. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  927. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  928. /* reo status ring masks */
  929. { 0, 0, 0,
  930. WLAN_CFG_REO_STATUS_RING_MASK_0,
  931. WLAN_CFG_REO_STATUS_RING_MASK_1,
  932. WLAN_CFG_REO_STATUS_RING_MASK_2,
  933. WLAN_CFG_REO_STATUS_RING_MASK_3,
  934. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  935. /* rx_ring_near_full_irq mask */
  936. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  937. /* rx_ring_near_full_irq_2 mask */
  938. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  939. /* tx_ring_near_full_irq mask */
  940. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  941. /* host2txmon ring masks */
  942. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  943. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  944. /* tx mon ring masks */
  945. { WLAN_CFG_TX_MON_RING_MASK_0,
  946. WLAN_CFG_TX_MON_RING_MASK_1,
  947. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  948. /* ppe ds wbm release ring ring mask */
  949. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  950. /* Reo2ppe ring mask */
  951. {0, 0, 0, 0, 0, 0, 0, 0,
  952. 0, 0, 0, 0, 0, 0, 0, 0},
  953. /* ppe2tcl ring mask */
  954. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  955. /* umac reset mask */
  956. {0, 0, 0, 0, 0, 0, 0, 0,
  957. 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0},
  958. },
  959. /* Interrupt assignment for 11 MSI combination */
  960. {
  961. /* tx ring masks */
  962. { WLAN_CFG_TX_RING_MASK_0,
  963. WLAN_CFG_TX_RING_MASK_1,
  964. WLAN_CFG_TX_RING_MASK_2,
  965. WLAN_CFG_TX_RING_MASK_3,
  966. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  967. /* rx ring masks */
  968. { 0, 0, 0, 0,
  969. WLAN_CFG_RX_RING_MASK_0,
  970. WLAN_CFG_RX_RING_MASK_1,
  971. WLAN_CFG_RX_RING_MASK_2,
  972. WLAN_CFG_RX_RING_MASK_3,
  973. 0, 0, 0, 0, 0, 0, 0, 0},
  974. /* rx mon ring masks */
  975. { 0, 0, 0,
  976. WLAN_CFG_RX_MON_RING_MASK_0,
  977. WLAN_CFG_RX_MON_RING_MASK_1,
  978. WLAN_CFG_RX_MON_RING_MASK_2,
  979. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  980. /* host2rxdma ring masks */
  981. { 0, 0, 0,
  982. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  983. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  984. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  985. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  986. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  987. /* rxdma2host ring masks */
  988. { 0, 0, 0,
  989. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  990. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  991. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  992. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  993. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  994. /* host2rxdma mon ring masks */
  995. { 0, 0, 0,
  996. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  997. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  998. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  999. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1000. /* rxdma2host mon ring masks */
  1001. { 0, 0, 0,
  1002. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1003. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1004. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1005. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1006. /* rx err ring masks */
  1007. { 0, 0, 0,
  1008. WLAN_CFG_RX_ERR_RING_MASK_0,
  1009. WLAN_CFG_RX_ERR_RING_MASK_1,
  1010. WLAN_CFG_RX_ERR_RING_MASK_2,
  1011. WLAN_CFG_RX_ERR_RING_MASK_3,
  1012. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1013. /* rx wbm rel ring masks */
  1014. { 0, 0, 0,
  1015. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1016. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1017. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1018. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1019. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1020. /* reo status ring masks */
  1021. { 0, 0, 0,
  1022. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1023. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1024. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1025. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1026. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1027. /* rx_ring_near_full_irq mask */
  1028. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1029. /* rx_ring_near_full_irq_2 mask */
  1030. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1031. /* tx_ring_near_full_irq mask */
  1032. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1033. /* host2txmon ring masks */
  1034. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1035. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1036. /* tx mon ring masks */
  1037. { WLAN_CFG_TX_MON_RING_MASK_0,
  1038. WLAN_CFG_TX_MON_RING_MASK_1,
  1039. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1040. /* ppe wbm ds release ring ring mask */
  1041. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1042. /* Reo2ppe ring mask */
  1043. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1044. /* ppe2tcl ring mask */
  1045. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1046. /* umac reset mask */
  1047. {0, 0, 0, 0, 0, 0, 0, 0,
  1048. 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0},
  1049. },
  1050. /* Interrupt assignment for 12 MSI combination */
  1051. {
  1052. /* tx ring masks */
  1053. { WLAN_CFG_TX_RING_MASK_0,
  1054. WLAN_CFG_TX_RING_MASK_1,
  1055. WLAN_CFG_TX_RING_MASK_2,
  1056. WLAN_CFG_TX_RING_MASK_3,
  1057. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1058. /* rx ring masks */
  1059. { 0, 0, 0, 0,
  1060. WLAN_CFG_RX_RING_MASK_0,
  1061. WLAN_CFG_RX_RING_MASK_1,
  1062. WLAN_CFG_RX_RING_MASK_2,
  1063. WLAN_CFG_RX_RING_MASK_3,
  1064. 0, 0, 0, 0, 0, 0, 0, 0},
  1065. /* rx mon ring masks */
  1066. { 0, 0, 0, 0, 0, 0, 0, 0,
  1067. WLAN_CFG_RX_MON_RING_MASK_0,
  1068. WLAN_CFG_RX_MON_RING_MASK_1,
  1069. WLAN_CFG_RX_MON_RING_MASK_2,
  1070. 0, 0, 0, 0, 0},
  1071. /* host2rxdma ring masks */
  1072. { 0, 0, 0, 0, 0, 0, 0, 0,
  1073. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1074. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1075. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1076. 0, 0, 0, 0, 0},
  1077. /* rxdma2host ring masks */
  1078. { 0, 0, 0, 0, 0, 0, 0, 0,
  1079. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1080. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1081. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1082. 0, 0, 0, 0, 0},
  1083. /* host2rxdma mon ring masks */
  1084. { 0, 0, 0, 0, 0, 0, 0, 0,
  1085. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1086. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1087. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1088. 0, 0, 0, 0, 0},
  1089. /* rxdma2host mon ring masks */
  1090. { 0, 0, 0, 0, 0, 0, 0, 0,
  1091. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1092. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1093. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1094. 0, 0, 0, 0, 0},
  1095. /* rx err ring masks */
  1096. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1097. WLAN_CFG_RX_ERR_RING_MASK_0,
  1098. 0, 0, 0, 0},
  1099. /* rx wbm rel ring masks */
  1100. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1101. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1102. 0, 0, 0, 0},
  1103. /* reo status ring masks */
  1104. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1105. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1106. 0, 0, 0, 0},
  1107. /* rx_ring_near_full_irq mask */
  1108. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1109. /* rx_ring_near_full_irq_2 mask */
  1110. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1111. /* tx_ring_near_full_irq mask */
  1112. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1113. /* host2txmon ring masks */
  1114. { 0, 0, 0, 0, 0, 0, 0, 0,
  1115. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1116. 0, 0, 0, 0, 0, 0, 0},
  1117. /* tx mon ring masks */
  1118. { 0, 0, 0, 0, 0, 0, 0, 0,
  1119. WLAN_CFG_TX_MON_RING_MASK_0,
  1120. WLAN_CFG_TX_MON_RING_MASK_1,
  1121. 0, 0, 0, 0, 0, 0},
  1122. /* ppe ds wbm release ring ring mask */
  1123. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1124. /* Reo2ppe ring mask */
  1125. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1126. 0, 0, 0, 0, 0, 0},
  1127. /* ppe2tcl ring mask */
  1128. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1129. /* umac reset mask */
  1130. {0, 0, 0, 0, 0, 0, 0, 0,
  1131. 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0},
  1132. },
  1133. /* Interrupt assignment for 13 MSI combination */
  1134. {
  1135. /* tx ring masks */
  1136. { WLAN_CFG_TX_RING_MASK_0,
  1137. WLAN_CFG_TX_RING_MASK_1,
  1138. WLAN_CFG_TX_RING_MASK_2,
  1139. WLAN_CFG_TX_RING_MASK_3,
  1140. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1141. /* rx ring masks */
  1142. { 0, 0, 0, 0,
  1143. WLAN_CFG_RX_RING_MASK_0,
  1144. WLAN_CFG_RX_RING_MASK_1,
  1145. WLAN_CFG_RX_RING_MASK_2,
  1146. WLAN_CFG_RX_RING_MASK_3,
  1147. 0, 0, 0, 0, 0, 0, 0, 0},
  1148. /* rx mon ring masks */
  1149. { 0, 0, 0, 0, 0, 0, 0, 0,
  1150. WLAN_CFG_RX_MON_RING_MASK_0,
  1151. WLAN_CFG_RX_MON_RING_MASK_1,
  1152. WLAN_CFG_RX_MON_RING_MASK_2,
  1153. 0, 0, 0, 0, 0},
  1154. /* host2rxdma ring masks */
  1155. { 0, 0, 0, 0, 0, 0, 0, 0,
  1156. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1157. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1158. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1159. 0, 0, 0, 0, 0},
  1160. /* rxdma2host ring masks */
  1161. { 0, 0, 0, 0, 0, 0, 0, 0,
  1162. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1163. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1164. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1165. 0, 0, 0, 0, 0},
  1166. /* host2rxdma mon ring masks */
  1167. { 0, 0, 0, 0, 0, 0, 0, 0,
  1168. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1169. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1170. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1171. 0, 0, 0, 0, 0},
  1172. /* rxdma2host mon ring masks */
  1173. { 0, 0, 0, 0, 0, 0, 0, 0,
  1174. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1175. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1176. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1177. 0, 0, 0, 0, 0},
  1178. /* rx err ring masks */
  1179. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1180. WLAN_CFG_RX_ERR_RING_MASK_0,
  1181. 0, 0, 0, 0},
  1182. /* rx wbm rel ring masks */
  1183. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1184. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1185. 0, 0, 0, 0},
  1186. /* reo status ring masks */
  1187. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1188. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1189. 0, 0, 0, 0},
  1190. /* rx_ring_near_full_irq mask */
  1191. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1192. /* rx_ring_near_full_irq_2 mask */
  1193. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1194. /* tx_ring_near_full_irq mask */
  1195. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1196. /* host2txmon ring masks */
  1197. { 0, 0, 0, 0, 0, 0, 0, 0,
  1198. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1199. 0, 0, 0, 0, 0, 0, 0},
  1200. /* tx mon ring masks */
  1201. { 0, 0, 0, 0, 0, 0, 0, 0,
  1202. WLAN_CFG_TX_MON_RING_MASK_0,
  1203. WLAN_CFG_TX_MON_RING_MASK_1,
  1204. 0, 0, 0, 0, 0, 0},
  1205. /* ppe ds wbm release ring ring mask */
  1206. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1207. /* Reo2ppe ring mask */
  1208. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1209. 0, 0, 0, 0, 0},
  1210. /* ppe2tcl ring mask */
  1211. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1212. /* umac reset mask */
  1213. {0, 0, 0, 0, 0, 0, 0, 0,
  1214. 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0},
  1215. },
  1216. /* Interrupt assignment for 14 MSI combination */
  1217. {
  1218. /* tx ring masks */
  1219. { WLAN_CFG_TX_RING_MASK_0,
  1220. WLAN_CFG_TX_RING_MASK_1,
  1221. WLAN_CFG_TX_RING_MASK_2,
  1222. WLAN_CFG_TX_RING_MASK_3,
  1223. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1224. /* rx ring masks */
  1225. { 0, 0, 0, 0,
  1226. WLAN_CFG_RX_RING_MASK_0,
  1227. WLAN_CFG_RX_RING_MASK_1,
  1228. WLAN_CFG_RX_RING_MASK_2,
  1229. WLAN_CFG_RX_RING_MASK_3,
  1230. 0, 0, 0, 0, 0, 0, 0, 0},
  1231. /* rx mon ring masks */
  1232. { 0, 0, 0, 0, 0, 0, 0, 0,
  1233. WLAN_CFG_RX_MON_RING_MASK_0,
  1234. WLAN_CFG_RX_MON_RING_MASK_1,
  1235. WLAN_CFG_RX_MON_RING_MASK_2,
  1236. 0, 0, 0, 0, 0},
  1237. /* host2rxdma ring masks */
  1238. { 0, 0, 0, 0, 0, 0, 0, 0,
  1239. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1240. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1241. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1242. 0, 0, 0, 0, 0},
  1243. /* rxdma2host ring masks */
  1244. { 0, 0, 0, 0, 0, 0, 0, 0,
  1245. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1246. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1247. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1248. 0, 0, 0, 0, 0},
  1249. /* host2rxdma mon ring masks */
  1250. { 0, 0, 0, 0, 0, 0, 0, 0,
  1251. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1252. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1253. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1254. 0, 0, 0, 0, 0},
  1255. /* rxdma2host mon ring masks */
  1256. { 0, 0, 0, 0, 0, 0, 0, 0,
  1257. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1258. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1259. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1260. 0, 0, 0, 0, 0},
  1261. /* rx err ring masks */
  1262. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1263. WLAN_CFG_RX_ERR_RING_MASK_0,
  1264. 0, 0, 0, 0},
  1265. /* rx wbm rel ring masks */
  1266. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1267. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1268. 0, 0, 0, 0},
  1269. /* reo status ring masks */
  1270. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1271. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1272. 0, 0, 0, 0},
  1273. /* rx_ring_near_full_irq mask */
  1274. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1275. /* rx_ring_near_full_irq_2 mask */
  1276. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1277. /* tx_ring_near_full_irq mask */
  1278. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1279. /* host2txmon ring masks */
  1280. { 0, 0, 0, 0, 0, 0, 0, 0,
  1281. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1282. 0, 0, 0, 0, 0, 0, 0},
  1283. /* tx mon ring masks */
  1284. { 0, 0, 0, 0, 0, 0, 0, 0,
  1285. WLAN_CFG_TX_MON_RING_MASK_0,
  1286. WLAN_CFG_TX_MON_RING_MASK_1,
  1287. 0, 0, 0, 0, 0, 0},
  1288. /* ppe ds wbm release ring ring mask */
  1289. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1290. /* Reo2ppe ring mask */
  1291. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1292. /* ppe2tcl ring mask */
  1293. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1294. /* umac reset mask */
  1295. {0, 0, 0, 0, 0, 0, 0, 0,
  1296. 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0},
  1297. },
  1298. /* Interrupt assignment for 15 MSI combination */
  1299. {
  1300. /* tx ring masks */
  1301. { WLAN_CFG_TX_RING_MASK_0,
  1302. WLAN_CFG_TX_RING_MASK_1,
  1303. WLAN_CFG_TX_RING_MASK_2,
  1304. WLAN_CFG_TX_RING_MASK_3,
  1305. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1306. /* rx ring masks */
  1307. { 0, 0, 0, 0,
  1308. WLAN_CFG_RX_RING_MASK_0,
  1309. WLAN_CFG_RX_RING_MASK_1,
  1310. WLAN_CFG_RX_RING_MASK_2,
  1311. WLAN_CFG_RX_RING_MASK_3,
  1312. 0, 0, 0, 0, 0, 0, 0, 0},
  1313. /* rx mon ring masks */
  1314. { 0, 0, 0, 0, 0, 0, 0, 0,
  1315. WLAN_CFG_RX_MON_RING_MASK_0,
  1316. WLAN_CFG_RX_MON_RING_MASK_1,
  1317. WLAN_CFG_RX_MON_RING_MASK_2,
  1318. 0, 0, 0, 0, 0},
  1319. /* host2rxdma ring masks */
  1320. { 0, 0, 0, 0, 0, 0, 0, 0,
  1321. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1322. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1323. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1324. 0, 0, 0, 0, 0},
  1325. /* rxdma2host ring masks */
  1326. { 0, 0, 0, 0, 0, 0, 0, 0,
  1327. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1328. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1329. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1330. 0, 0, 0, 0, 0},
  1331. /* host2rxdma mon ring masks */
  1332. { 0, 0, 0, 0, 0, 0, 0, 0,
  1333. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1334. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1335. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1336. 0, 0, 0, 0, 0},
  1337. /* rxdma2host mon ring masks */
  1338. { 0, 0, 0, 0, 0, 0, 0, 0,
  1339. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1340. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1341. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1342. 0, 0, 0, 0, 0},
  1343. /* rx err ring masks */
  1344. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1345. WLAN_CFG_RX_ERR_RING_MASK_0,
  1346. 0, 0, 0, 0},
  1347. /* rx wbm rel ring masks */
  1348. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1349. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1350. 0, 0, 0, 0},
  1351. /* reo status ring masks */
  1352. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1353. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1354. 0, 0, 0, 0},
  1355. /* rx_ring_near_full_irq mask */
  1356. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1357. /* rx_ring_near_full_irq_2 mask */
  1358. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1359. /* tx_ring_near_full_irq mask */
  1360. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1361. /* host2txmon ring masks */
  1362. { 0, 0, 0, 0, 0, 0, 0, 0,
  1363. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1364. 0, 0, 0, 0, 0, 0, 0},
  1365. /* tx mon ring masks */
  1366. { 0, 0, 0, 0, 0, 0, 0, 0,
  1367. WLAN_CFG_TX_MON_RING_MASK_0,
  1368. WLAN_CFG_TX_MON_RING_MASK_1,
  1369. 0, 0, 0, 0, 0, 0},
  1370. /* ppe ds wbm release ring ring mask */
  1371. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1372. /* Reo2ppe ring mask */
  1373. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1374. 0, 0, 0, 0, 0},
  1375. /* ppe2tcl ring mask */
  1376. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1377. /* umac reset mask */
  1378. {0, 0, 0, 0, 0, 0, 0, 0,
  1379. 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0},
  1380. },
  1381. /* Interrupt assignment for 16 MSI combination */
  1382. {
  1383. /* tx ring masks */
  1384. { WLAN_CFG_TX_RING_MASK_0,
  1385. WLAN_CFG_TX_RING_MASK_1,
  1386. WLAN_CFG_TX_RING_MASK_2,
  1387. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1388. /* rx ring masks */
  1389. { 0, 0, 0, 0,
  1390. WLAN_CFG_RX_RING_MASK_0,
  1391. WLAN_CFG_RX_RING_MASK_1,
  1392. WLAN_CFG_RX_RING_MASK_2,
  1393. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1394. /* rx mon ring masks */
  1395. { 0, 0, 0, 0, 0, 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},
  1400. /* host2rxdma ring masks */
  1401. { 0, 0, 0, 0, 0, 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. 0, 0, 0, 0, 0},
  1406. /* rxdma2host ring masks */
  1407. { 0, 0, 0, 0, 0, 0, 0, 0,
  1408. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1409. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1410. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1411. 0, 0, 0, 0, 0},
  1412. /* host2rxdma mon ring masks */
  1413. { 0, 0, 0, 0, 0, 0, 0, 0,
  1414. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1415. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1416. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1417. 0, 0, 0, 0, 0},
  1418. /* rxdma2host mon ring masks */
  1419. { 0, 0, 0, 0, 0, 0, 0, 0,
  1420. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1421. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1422. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1423. 0, 0, 0, 0, 0},
  1424. /* rx err ring masks */
  1425. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1426. WLAN_CFG_RX_ERR_RING_MASK_0,
  1427. 0, 0, 0, 0},
  1428. /* rx wbm rel ring masks */
  1429. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1430. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1431. 0, 0, 0, 0},
  1432. /* reo status ring masks */
  1433. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1434. WLAN_CFG_REO_STATUS_RING_MASK_0,
  1435. 0, 0, 0, 0},
  1436. /* rx_ring_near_full_irq mask */
  1437. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1438. /* rx_ring_near_full_irq_2 mask */
  1439. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1440. /* tx_ring_near_full_irq mask */
  1441. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1442. /* host2txmon ring masks */
  1443. { 0, 0, 0, 0, 0, 0, 0, 0,
  1444. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1445. 0, 0, 0, 0, 0, 0, 0},
  1446. /* tx mon ring masks */
  1447. { 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1448. WLAN_CFG_TX_MON_RING_MASK_0,
  1449. WLAN_CFG_TX_MON_RING_MASK_1,
  1450. 0, 0, 0, 0, 0},
  1451. /* ppe ds wbm release ring ring mask */
  1452. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1453. /* Reo2ppe ring mask */
  1454. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1455. 0, 0, 0, 0, 0},
  1456. /* ppe2tcl ring mask */
  1457. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1458. /* umac reset mask */
  1459. {0, 0, 0, 0, 0, 0, 0, 0,
  1460. 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0},
  1461. },
  1462. };
  1463. #else
  1464. /* DS and Umac reset not supported if available MSI lines are less than 8 */
  1465. static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIONS] = {
  1466. /* Interrupt assignment for integrated configuration */
  1467. {
  1468. /* tx ring masks */
  1469. { WLAN_CFG_TX_RING_MASK_0,
  1470. WLAN_CFG_TX_RING_MASK_1,
  1471. WLAN_CFG_TX_RING_MASK_2,
  1472. WLAN_CFG_TX_RING_MASK_3,
  1473. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1474. /* rx ring masks */
  1475. { 0, 0, 0, 0, 0, 0, 0,
  1476. WLAN_CFG_RX_RING_MASK_0,
  1477. WLAN_CFG_RX_RING_MASK_1,
  1478. WLAN_CFG_RX_RING_MASK_2,
  1479. WLAN_CFG_RX_RING_MASK_3,
  1480. 0, 0, 0, 0, 0},
  1481. /* rx mon ring masks */
  1482. { 0, 0, 0, 0,
  1483. WLAN_CFG_RX_MON_RING_MASK_0,
  1484. WLAN_CFG_RX_MON_RING_MASK_1,
  1485. WLAN_CFG_RX_MON_RING_MASK_2,
  1486. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1487. /* host2rxdma ring masks */
  1488. { WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1489. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1490. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1491. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1492. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1493. /* rxdma2host ring masks */
  1494. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1495. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1496. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1497. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1498. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1499. /* host2rxdma mon ring masks */
  1500. { 0, 0, 0, 0,
  1501. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1502. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1503. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1504. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1505. /* rxdma2host mon ring masks */
  1506. { 0, 0, 0, 0,
  1507. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1508. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1509. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1510. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1511. /* rx err ring masks */
  1512. { WLAN_CFG_RX_ERR_RING_MASK_0,
  1513. WLAN_CFG_RX_ERR_RING_MASK_1,
  1514. WLAN_CFG_RX_ERR_RING_MASK_2,
  1515. WLAN_CFG_RX_ERR_RING_MASK_3,
  1516. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1517. /* rx wbm rel ring masks */
  1518. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1519. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1520. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1521. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1522. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1523. /* reo status ring masks */
  1524. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  1525. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1526. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1527. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1528. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1529. /* rx_ring_near_full_irq mask */
  1530. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1531. /* rx_ring_near_full_irq_2 mask */
  1532. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1533. /* tx_ring_near_full_irq mask */
  1534. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1535. /* host2txmon ring masks */
  1536. {WLAN_CFG_HOST2TXMON_RING_MASK_0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1537. 0, 0, 0, 0, 0, 0},
  1538. /* tx mon ring masks */
  1539. {WLAN_CFG_TX_MON_RING_MASK_0, WLAN_CFG_TX_MON_RING_MASK_1, 0,
  1540. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1541. /* ppe ds wbm release ring ring mask */
  1542. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1543. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0},
  1544. /* Reo2ppe ring mask */
  1545. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1546. WLAN_CFG_REO2PPE_RING_MASK_0, 0, 0},
  1547. /* ppe2tcl ring mask */
  1548. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1549. WLAN_CFG_PPE2TCL_RING_MASK_0, 0},
  1550. /* umac reset mask */
  1551. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1552. WLAN_CFG_UMAC_RESET_INTR_MASK_0},
  1553. },
  1554. /* Interrupt assignment for 1 MSI combination */
  1555. {
  1556. /* tx ring masks */
  1557. { WLAN_CFG_TX_RING_MASK_0 |
  1558. WLAN_CFG_TX_RING_MASK_1 |
  1559. WLAN_CFG_TX_RING_MASK_2 |
  1560. WLAN_CFG_TX_RING_MASK_3,
  1561. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1562. /* rx ring masks */
  1563. { WLAN_CFG_RX_RING_MASK_0 |
  1564. WLAN_CFG_RX_RING_MASK_1 |
  1565. WLAN_CFG_RX_RING_MASK_2 |
  1566. WLAN_CFG_RX_RING_MASK_3,
  1567. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1568. /* rx mon ring masks */
  1569. { WLAN_CFG_RX_MON_RING_MASK_0 |
  1570. WLAN_CFG_RX_MON_RING_MASK_1 |
  1571. WLAN_CFG_RX_MON_RING_MASK_2,
  1572. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1573. /* host2rxdma ring masks */
  1574. { WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1575. WLAN_CFG_HOST2RXDMA_RING_MASK_1 |
  1576. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1577. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1578. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1579. /* rxdma2host ring masks */
  1580. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1581. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  1582. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1583. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1584. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1585. /* host2rxdma mon ring masks */
  1586. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1587. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  1588. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1589. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1590. /* rxdma2host mon ring masks */
  1591. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1592. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  1593. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1594. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1595. /* rx err ring masks */
  1596. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  1597. WLAN_CFG_RX_ERR_RING_MASK_1 |
  1598. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1599. WLAN_CFG_RX_ERR_RING_MASK_3,
  1600. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1601. /* rx wbm rel ring masks */
  1602. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1603. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  1604. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1605. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1606. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1607. /* reo status ring masks */
  1608. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1609. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  1610. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1611. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1612. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1613. /* rx_ring_near_full_irq mask */
  1614. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1615. /* rx_ring_near_full_irq_2 mask */
  1616. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1617. /* tx_ring_near_full_irq mask */
  1618. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1619. /* host2txmon ring masks */
  1620. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1621. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1622. /* tx mon ring masks */
  1623. { WLAN_CFG_TX_MON_RING_MASK_0 |
  1624. WLAN_CFG_TX_MON_RING_MASK_1,
  1625. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1626. /* ppe ds wbm release ring ring mask */
  1627. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1628. /* Reo2ppe ring mask */
  1629. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1630. /* ppe2tcl ring mask */
  1631. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1632. /* umac reset mask */
  1633. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1634. },
  1635. /* Interrupt assignment for 2 MSI combination */
  1636. {
  1637. /* tx ring masks */
  1638. { WLAN_CFG_TX_RING_MASK_0 |
  1639. WLAN_CFG_TX_RING_MASK_1,
  1640. WLAN_CFG_TX_RING_MASK_2 |
  1641. WLAN_CFG_TX_RING_MASK_3,
  1642. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1643. /* rx ring masks */
  1644. { WLAN_CFG_RX_RING_MASK_0 |
  1645. WLAN_CFG_RX_RING_MASK_1,
  1646. WLAN_CFG_RX_RING_MASK_2 |
  1647. WLAN_CFG_RX_RING_MASK_3,
  1648. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1649. /* rx mon ring masks */
  1650. { WLAN_CFG_RX_MON_RING_MASK_0 |
  1651. WLAN_CFG_RX_MON_RING_MASK_1,
  1652. WLAN_CFG_RX_MON_RING_MASK_2,
  1653. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1654. /* host2rxdma ring masks */
  1655. { WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1656. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1657. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1658. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1659. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1660. /* rxdma2host ring masks */
  1661. { WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1662. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1663. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1664. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1665. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1666. /* host2rxdma mon ring masks */
  1667. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1668. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1669. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1670. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1671. /* rxdma2host mon ring masks */
  1672. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1673. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1674. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1675. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1676. /* rx err ring masks */
  1677. { WLAN_CFG_RX_ERR_RING_MASK_0 |
  1678. WLAN_CFG_RX_ERR_RING_MASK_1,
  1679. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1680. WLAN_CFG_RX_ERR_RING_MASK_3,
  1681. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1682. /* rx wbm rel ring masks */
  1683. { WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1684. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1685. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1686. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1687. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1688. /* reo status ring masks */
  1689. { WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1690. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1691. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1692. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1693. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1694. /* rx_ring_near_full_irq mask */
  1695. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1696. /* rx_ring_near_full_irq_2 mask */
  1697. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1698. /* tx_ring_near_full_irq mask */
  1699. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1700. /* host2txmon ring masks */
  1701. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1702. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1703. /* tx mon ring masks */
  1704. { WLAN_CFG_TX_MON_RING_MASK_0,
  1705. WLAN_CFG_TX_MON_RING_MASK_1,
  1706. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1707. /* ppe ds wbm release ring ring mask */
  1708. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1709. /* Reo2ppe ring mask */
  1710. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1711. /* ppe2tcl ring mask */
  1712. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1713. /* umac reset mask */
  1714. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1715. },
  1716. /* Interrupt assignment for 3 MSI combination */
  1717. {
  1718. /* tx ring masks */
  1719. { WLAN_CFG_TX_RING_MASK_0 |
  1720. WLAN_CFG_TX_RING_MASK_1,
  1721. WLAN_CFG_TX_RING_MASK_2 |
  1722. WLAN_CFG_TX_RING_MASK_3,
  1723. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1724. /* rx ring masks */
  1725. { WLAN_CFG_RX_RING_MASK_0 |
  1726. WLAN_CFG_RX_RING_MASK_1,
  1727. WLAN_CFG_RX_RING_MASK_2 |
  1728. WLAN_CFG_RX_RING_MASK_3,
  1729. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1730. /* rx mon ring masks */
  1731. { 0, 0,
  1732. WLAN_CFG_RX_MON_RING_MASK_0 |
  1733. WLAN_CFG_RX_MON_RING_MASK_1 |
  1734. WLAN_CFG_RX_MON_RING_MASK_2,
  1735. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1736. /* host2rxdma ring masks */
  1737. { 0, 0,
  1738. WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1739. WLAN_CFG_HOST2RXDMA_RING_MASK_1 |
  1740. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1741. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1742. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1743. /* rxdma2host ring masks */
  1744. { 0, 0,
  1745. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1746. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  1747. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1748. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1749. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1750. /* host2rxdma mon ring masks */
  1751. { 0, 0,
  1752. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1753. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  1754. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1755. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1756. /* rxdma2host mon ring masks */
  1757. { 0, 0,
  1758. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1759. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  1760. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1761. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1762. /* rx err ring masks */
  1763. { 0, 0,
  1764. WLAN_CFG_RX_ERR_RING_MASK_0 |
  1765. WLAN_CFG_RX_ERR_RING_MASK_1 |
  1766. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1767. WLAN_CFG_RX_ERR_RING_MASK_3,
  1768. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1769. /* rx wbm rel ring masks */
  1770. { 0, 0,
  1771. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1772. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  1773. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1774. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1775. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1776. /* reo status ring masks */
  1777. { 0, 0,
  1778. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1779. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  1780. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1781. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1782. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1783. /* rx_ring_near_full_irq mask */
  1784. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1785. /* rx_ring_near_full_irq_2 mask */
  1786. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1787. /* tx_ring_near_full_irq mask */
  1788. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1789. /* host2txmon ring masks */
  1790. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1791. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1792. /* tx mon ring masks */
  1793. { WLAN_CFG_TX_MON_RING_MASK_0,
  1794. WLAN_CFG_TX_MON_RING_MASK_1,
  1795. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1796. /* ppe ds wbm release ring ring mask */
  1797. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1798. /* Reo2ppe ring mask */
  1799. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1800. /* ppe2tcl ring mask */
  1801. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1802. /* umac reset mask */
  1803. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1804. },
  1805. /* Interrupt assignment for 4 MSI combination */
  1806. {
  1807. /* tx ring masks */
  1808. { WLAN_CFG_TX_RING_MASK_0,
  1809. WLAN_CFG_TX_RING_MASK_1,
  1810. WLAN_CFG_TX_RING_MASK_2,
  1811. WLAN_CFG_TX_RING_MASK_3,
  1812. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1813. /* rx ring masks */
  1814. { WLAN_CFG_RX_RING_MASK_0,
  1815. WLAN_CFG_RX_RING_MASK_1,
  1816. WLAN_CFG_RX_RING_MASK_2,
  1817. WLAN_CFG_RX_RING_MASK_3,
  1818. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1819. /* rx mon ring masks */
  1820. { WLAN_CFG_RX_MON_RING_MASK_0,
  1821. WLAN_CFG_RX_MON_RING_MASK_1,
  1822. WLAN_CFG_RX_MON_RING_MASK_2,
  1823. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1824. /* host2rxdma ring masks */
  1825. { WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1826. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1827. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1828. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1829. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1830. /* rxdma2host ring masks */
  1831. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  1832. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  1833. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  1834. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1835. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1836. /* host2rxdma mon ring masks */
  1837. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  1838. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  1839. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1840. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1841. /* rxdma2host mon ring masks */
  1842. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  1843. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  1844. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1845. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1846. /* rx err ring masks */
  1847. { WLAN_CFG_RX_ERR_RING_MASK_0,
  1848. WLAN_CFG_RX_ERR_RING_MASK_1,
  1849. WLAN_CFG_RX_ERR_RING_MASK_2,
  1850. WLAN_CFG_RX_ERR_RING_MASK_3,
  1851. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1852. /* rx wbm rel ring masks */
  1853. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  1854. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  1855. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  1856. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1857. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1858. /* reo status ring masks */
  1859. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  1860. WLAN_CFG_REO_STATUS_RING_MASK_1,
  1861. WLAN_CFG_REO_STATUS_RING_MASK_2,
  1862. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1863. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1864. /* rx_ring_near_full_irq mask */
  1865. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1866. /* rx_ring_near_full_irq_2 mask */
  1867. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1868. /* tx_ring_near_full_irq mask */
  1869. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1870. /* host2txmon ring masks */
  1871. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1872. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1873. /* tx mon ring masks */
  1874. { WLAN_CFG_TX_MON_RING_MASK_0,
  1875. WLAN_CFG_TX_MON_RING_MASK_1,
  1876. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1877. /* ppe ds wbm release ring ring mask */
  1878. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1879. /* Reo2ppe ring mask */
  1880. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1881. /* ppe2tcl ring mask */
  1882. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1883. /* umac reset mask */
  1884. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1885. },
  1886. /* Interrupt assignment for 5 MSI combination */
  1887. {
  1888. /* tx ring masks */
  1889. { WLAN_CFG_TX_RING_MASK_0,
  1890. WLAN_CFG_TX_RING_MASK_1,
  1891. WLAN_CFG_TX_RING_MASK_2,
  1892. WLAN_CFG_TX_RING_MASK_3,
  1893. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1894. /* rx ring masks */
  1895. { WLAN_CFG_RX_RING_MASK_0,
  1896. WLAN_CFG_RX_RING_MASK_1,
  1897. WLAN_CFG_RX_RING_MASK_2,
  1898. WLAN_CFG_RX_RING_MASK_3,
  1899. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1900. /* rx mon ring masks */
  1901. { 0, 0, 0, 0,
  1902. WLAN_CFG_RX_MON_RING_MASK_0 |
  1903. WLAN_CFG_RX_MON_RING_MASK_1 |
  1904. WLAN_CFG_RX_MON_RING_MASK_2,
  1905. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1906. /* host2rxdma ring masks */
  1907. { 0, 0, 0, 0,
  1908. WLAN_CFG_HOST2RXDMA_RING_MASK_0 |
  1909. WLAN_CFG_HOST2RXDMA_RING_MASK_1 |
  1910. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  1911. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  1912. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1913. /* rxdma2host ring masks */
  1914. { 0, 0, 0, 0,
  1915. WLAN_CFG_RXDMA2HOST_RING_MASK_0 |
  1916. WLAN_CFG_RXDMA2HOST_RING_MASK_1 |
  1917. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  1918. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  1919. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1920. /* host2rxdma mon ring masks */
  1921. { 0, 0, 0, 0,
  1922. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0 |
  1923. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1 |
  1924. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  1925. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1926. /* rxdma2host mon ring masks */
  1927. { 0, 0, 0, 0,
  1928. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0 |
  1929. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1 |
  1930. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  1931. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1932. /* rx err ring masks */
  1933. { 0, 0, 0, 0,
  1934. WLAN_CFG_RX_ERR_RING_MASK_0 |
  1935. WLAN_CFG_RX_ERR_RING_MASK_1 |
  1936. WLAN_CFG_RX_ERR_RING_MASK_2 |
  1937. WLAN_CFG_RX_ERR_RING_MASK_3,
  1938. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1939. /* rx wbm rel ring masks */
  1940. { 0, 0, 0, 0,
  1941. WLAN_CFG_RX_WBM_REL_RING_MASK_0 |
  1942. WLAN_CFG_RX_WBM_REL_RING_MASK_1 |
  1943. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  1944. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  1945. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1946. /* reo status ring masks */
  1947. { 0, 0, 0, 0,
  1948. WLAN_CFG_REO_STATUS_RING_MASK_0 |
  1949. WLAN_CFG_REO_STATUS_RING_MASK_1 |
  1950. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  1951. WLAN_CFG_REO_STATUS_RING_MASK_3,
  1952. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1953. /* rx_ring_near_full_irq mask */
  1954. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1955. /* rx_ring_near_full_irq_2 mask */
  1956. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1957. /* tx_ring_near_full_irq mask */
  1958. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1959. /* host2txmon ring masks */
  1960. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  1961. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1962. /* tx mon ring masks */
  1963. { WLAN_CFG_TX_MON_RING_MASK_0,
  1964. WLAN_CFG_TX_MON_RING_MASK_1,
  1965. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1966. /* ppe ds wbm release ring ring mask */
  1967. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1968. /* Reo2ppe ring mask */
  1969. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1970. /* ppe2tcl ring mask */
  1971. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1972. /* umac reset mask */
  1973. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1974. },
  1975. /* Interrupt assignment for 6 MSI combination */
  1976. {
  1977. /* tx ring masks */
  1978. { WLAN_CFG_TX_RING_MASK_0,
  1979. WLAN_CFG_TX_RING_MASK_1,
  1980. WLAN_CFG_TX_RING_MASK_2,
  1981. WLAN_CFG_TX_RING_MASK_3,
  1982. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1983. /* rx ring masks */
  1984. { 0, 0,
  1985. WLAN_CFG_RX_RING_MASK_0,
  1986. WLAN_CFG_RX_RING_MASK_1,
  1987. WLAN_CFG_RX_RING_MASK_2,
  1988. WLAN_CFG_RX_RING_MASK_3,
  1989. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1990. /* rx mon ring masks */
  1991. { WLAN_CFG_RX_MON_RING_MASK_0,
  1992. WLAN_CFG_RX_MON_RING_MASK_1,
  1993. WLAN_CFG_RX_MON_RING_MASK_2,
  1994. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  1995. /* host2rxdma ring masks */
  1996. { WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  1997. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  1998. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  1999. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2000. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2001. /* rxdma2host ring masks */
  2002. { WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2003. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2004. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2005. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2006. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2007. /* host2rxdma mon ring masks */
  2008. { WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2009. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2010. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2011. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2012. /* rxdma2host mon ring masks */
  2013. { WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2014. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2015. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2016. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2017. /* rx err ring masks */
  2018. { WLAN_CFG_RX_ERR_RING_MASK_0,
  2019. WLAN_CFG_RX_ERR_RING_MASK_1,
  2020. WLAN_CFG_RX_ERR_RING_MASK_2,
  2021. WLAN_CFG_RX_ERR_RING_MASK_3,
  2022. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2023. /* rx wbm rel ring masks */
  2024. { WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2025. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2026. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2027. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2028. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2029. /* reo status ring masks */
  2030. { WLAN_CFG_REO_STATUS_RING_MASK_0,
  2031. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2032. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2033. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2034. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2035. /* rx_ring_near_full_irq mask */
  2036. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2037. /* rx_ring_near_full_irq_2 mask */
  2038. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2039. /* tx_ring_near_full_irq mask */
  2040. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2041. /* host2txmon ring masks */
  2042. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2043. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2044. /* tx mon ring masks */
  2045. { WLAN_CFG_TX_MON_RING_MASK_0,
  2046. WLAN_CFG_TX_MON_RING_MASK_1,
  2047. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2048. /* ppe ds wbm release ring ring mask */
  2049. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2050. /* Reo2ppe ring mask */
  2051. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2052. /* ppe2tcl ring mask */
  2053. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2054. /* umac reset mask */
  2055. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2056. },
  2057. /* Interrupt assignment for 7 MSI combination */
  2058. {
  2059. /* tx ring masks */
  2060. { WLAN_CFG_TX_RING_MASK_0,
  2061. WLAN_CFG_TX_RING_MASK_1,
  2062. WLAN_CFG_TX_RING_MASK_2,
  2063. WLAN_CFG_TX_RING_MASK_3,
  2064. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2065. /* rx ring masks */
  2066. { 0, 0, 0,
  2067. WLAN_CFG_RX_RING_MASK_0,
  2068. WLAN_CFG_RX_RING_MASK_1,
  2069. WLAN_CFG_RX_RING_MASK_2,
  2070. WLAN_CFG_RX_RING_MASK_3,
  2071. 0, 0, 0, 0, 0, 0, 0, 0},
  2072. /* rx mon ring masks */
  2073. { 0, 0, 0,
  2074. WLAN_CFG_RX_MON_RING_MASK_0,
  2075. WLAN_CFG_RX_MON_RING_MASK_1,
  2076. WLAN_CFG_RX_MON_RING_MASK_2,
  2077. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2078. /* host2rxdma ring masks */
  2079. { 0, 0, 0,
  2080. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2081. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2082. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2083. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2084. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2085. /* rxdma2host ring masks */
  2086. { 0, 0, 0,
  2087. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2088. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2089. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2090. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2091. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2092. /* host2rxdma mon ring masks */
  2093. { 0, 0, 0,
  2094. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2095. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2096. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2097. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2098. /* rxdma2host mon ring masks */
  2099. { 0, 0, 0,
  2100. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2101. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2102. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2103. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2104. /* rx err ring masks */
  2105. { 0, 0, 0,
  2106. WLAN_CFG_RX_ERR_RING_MASK_0,
  2107. WLAN_CFG_RX_ERR_RING_MASK_1,
  2108. WLAN_CFG_RX_ERR_RING_MASK_2,
  2109. WLAN_CFG_RX_ERR_RING_MASK_3,
  2110. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2111. /* rx wbm rel ring masks */
  2112. { 0, 0, 0,
  2113. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2114. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2115. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2116. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2117. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2118. /* reo status ring masks */
  2119. { 0, 0, 0,
  2120. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2121. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2122. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2123. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2124. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2125. /* rx_ring_near_full_irq mask */
  2126. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2127. /* rx_ring_near_full_irq_2 mask */
  2128. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2129. /* tx_ring_near_full_irq mask */
  2130. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2131. /* host2txmon ring masks */
  2132. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2133. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2134. /* tx mon ring masks */
  2135. { WLAN_CFG_TX_MON_RING_MASK_0,
  2136. WLAN_CFG_TX_MON_RING_MASK_1,
  2137. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2138. /* ppe ds wbm release ring ring mask */
  2139. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2140. /* Reo2ppe ring mask */
  2141. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2142. /* ppe2tcl ring mask */
  2143. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2144. /* umac reset mask */
  2145. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2146. },
  2147. /* Interrupt assignment for 8 MSI combination */
  2148. {
  2149. /* tx ring masks */
  2150. { WLAN_CFG_TX_RING_MASK_0,
  2151. WLAN_CFG_TX_RING_MASK_1,
  2152. WLAN_CFG_TX_RING_MASK_2,
  2153. WLAN_CFG_TX_RING_MASK_3,
  2154. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2155. /* rx ring masks */
  2156. { 0, 0, 0, 0,
  2157. WLAN_CFG_RX_RING_MASK_0,
  2158. WLAN_CFG_RX_RING_MASK_1,
  2159. WLAN_CFG_RX_RING_MASK_2 |
  2160. WLAN_CFG_RX_RING_MASK_3,
  2161. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2162. /* rx mon ring masks */
  2163. { 0, 0, 0,
  2164. WLAN_CFG_RX_MON_RING_MASK_0,
  2165. WLAN_CFG_RX_MON_RING_MASK_1,
  2166. WLAN_CFG_RX_MON_RING_MASK_2,
  2167. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2168. /* host2rxdma ring masks */
  2169. { 0, 0, 0,
  2170. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2171. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2172. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2173. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2174. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2175. /* rxdma2host ring masks */
  2176. { 0, 0, 0,
  2177. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2178. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2179. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2180. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2181. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2182. /* host2rxdma mon ring masks */
  2183. { 0, 0, 0,
  2184. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2185. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2186. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2187. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2188. /* rxdma2host mon ring masks */
  2189. { 0, 0, 0,
  2190. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2191. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2192. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2193. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2194. /* rx err ring masks */
  2195. { 0, 0, 0,
  2196. WLAN_CFG_RX_ERR_RING_MASK_0,
  2197. WLAN_CFG_RX_ERR_RING_MASK_1,
  2198. WLAN_CFG_RX_ERR_RING_MASK_2,
  2199. WLAN_CFG_RX_ERR_RING_MASK_3,
  2200. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2201. /* rx wbm rel ring masks */
  2202. { 0, 0, 0,
  2203. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2204. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2205. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2206. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2207. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2208. /* reo status ring masks */
  2209. { 0, 0, 0,
  2210. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2211. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2212. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2213. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2214. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2215. /* rx_ring_near_full_irq mask */
  2216. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2217. /* rx_ring_near_full_irq_2 mask */
  2218. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2219. /* tx_ring_near_full_irq mask */
  2220. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2221. /* host2txmon ring masks */
  2222. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2223. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2224. /* tx mon ring masks */
  2225. { WLAN_CFG_TX_MON_RING_MASK_0,
  2226. WLAN_CFG_TX_MON_RING_MASK_1,
  2227. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2228. /* ppe ds wbm release ring ring mask */
  2229. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2230. /* Reo2ppe ring mask */
  2231. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2232. /* ppe2tcl ring mask */
  2233. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2234. /* umac reset mask */
  2235. {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0,
  2236. 0, 0, 0, 0, 0, 0, 0, 0},
  2237. },
  2238. /* Interrupt assignment for 9 MSI combination */
  2239. {
  2240. /* tx ring masks */
  2241. { WLAN_CFG_TX_RING_MASK_0,
  2242. WLAN_CFG_TX_RING_MASK_1,
  2243. WLAN_CFG_TX_RING_MASK_2,
  2244. WLAN_CFG_TX_RING_MASK_3,
  2245. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2246. /* rx ring masks */
  2247. { 0, 0, 0, 0,
  2248. WLAN_CFG_RX_RING_MASK_0,
  2249. WLAN_CFG_RX_RING_MASK_1,
  2250. WLAN_CFG_RX_RING_MASK_2,
  2251. WLAN_CFG_RX_RING_MASK_3,
  2252. 0, 0, 0, 0, 0, 0, 0, 0},
  2253. /* rx mon ring masks */
  2254. { 0, 0, 0,
  2255. WLAN_CFG_RX_MON_RING_MASK_0,
  2256. WLAN_CFG_RX_MON_RING_MASK_1,
  2257. WLAN_CFG_RX_MON_RING_MASK_2,
  2258. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2259. /* host2rxdma ring masks */
  2260. { 0, 0, 0,
  2261. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2262. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2263. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2264. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2265. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2266. /* rxdma2host ring masks */
  2267. { 0, 0, 0,
  2268. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2269. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2270. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2271. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2272. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2273. /* host2rxdma mon ring masks */
  2274. { 0, 0, 0,
  2275. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2276. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2277. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2278. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2279. /* rxdma2host mon ring masks */
  2280. { 0, 0, 0,
  2281. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2282. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2283. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2284. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2285. /* rx err ring masks */
  2286. { 0, 0, 0,
  2287. WLAN_CFG_RX_ERR_RING_MASK_0,
  2288. WLAN_CFG_RX_ERR_RING_MASK_1,
  2289. WLAN_CFG_RX_ERR_RING_MASK_2,
  2290. WLAN_CFG_RX_ERR_RING_MASK_3,
  2291. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2292. /* rx wbm rel ring masks */
  2293. { 0, 0, 0,
  2294. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2295. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2296. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2297. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2298. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2299. /* reo status ring masks */
  2300. { 0, 0, 0,
  2301. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2302. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2303. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2304. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2305. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2306. /* rx_ring_near_full_irq mask */
  2307. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2308. /* rx_ring_near_full_irq_2 mask */
  2309. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2310. /* tx_ring_near_full_irq mask */
  2311. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2312. /* host2txmon ring masks */
  2313. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2314. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2315. /* tx mon ring masks */
  2316. { WLAN_CFG_TX_MON_RING_MASK_0,
  2317. WLAN_CFG_TX_MON_RING_MASK_1,
  2318. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2319. /* ppe ds wbm release ring ring mask */
  2320. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2321. /* Reo2ppe ring mask */
  2322. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2323. /* ppe2tcl ring mask */
  2324. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2325. /* umac reset mask */
  2326. {0, 0, 0, 0, 0, 0, 0, 0,
  2327. WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  2328. },
  2329. /* Interrupt assignment for 10 MSI combination */
  2330. {
  2331. /* tx ring masks */
  2332. { WLAN_CFG_TX_RING_MASK_0,
  2333. WLAN_CFG_TX_RING_MASK_1,
  2334. WLAN_CFG_TX_RING_MASK_2,
  2335. WLAN_CFG_TX_RING_MASK_3,
  2336. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2337. /* rx ring masks */
  2338. { 0, 0, 0, 0,
  2339. WLAN_CFG_RX_RING_MASK_0,
  2340. WLAN_CFG_RX_RING_MASK_1,
  2341. WLAN_CFG_RX_RING_MASK_2,
  2342. WLAN_CFG_RX_RING_MASK_3,
  2343. 0, 0, 0, 0, 0, 0, 0, 0},
  2344. /* rx mon ring masks */
  2345. { 0, 0, 0,
  2346. WLAN_CFG_RX_MON_RING_MASK_0,
  2347. WLAN_CFG_RX_MON_RING_MASK_1,
  2348. WLAN_CFG_RX_MON_RING_MASK_2,
  2349. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2350. /* host2rxdma ring masks */
  2351. { 0, 0, 0,
  2352. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2353. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2354. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2355. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2356. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2357. /* rxdma2host ring masks */
  2358. { 0, 0, 0,
  2359. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2360. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2361. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2362. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2363. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2364. /* host2rxdma mon ring masks */
  2365. { 0, 0, 0,
  2366. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2367. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2368. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2369. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2370. /* rxdma2host mon ring masks */
  2371. { 0, 0, 0,
  2372. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2373. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2374. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2375. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2376. /* rx err ring masks */
  2377. { 0, 0, 0,
  2378. WLAN_CFG_RX_ERR_RING_MASK_0,
  2379. WLAN_CFG_RX_ERR_RING_MASK_1,
  2380. WLAN_CFG_RX_ERR_RING_MASK_2,
  2381. WLAN_CFG_RX_ERR_RING_MASK_3,
  2382. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2383. /* rx wbm rel ring masks */
  2384. { 0, 0, 0,
  2385. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2386. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2387. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2388. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2389. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2390. /* reo status ring masks */
  2391. { 0, 0, 0,
  2392. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2393. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2394. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2395. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2396. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2397. /* rx_ring_near_full_irq mask */
  2398. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2399. /* rx_ring_near_full_irq_2 mask */
  2400. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2401. /* tx_ring_near_full_irq mask */
  2402. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2403. /* host2txmon ring masks */
  2404. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2405. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2406. /* tx mon ring masks */
  2407. { WLAN_CFG_TX_MON_RING_MASK_0,
  2408. WLAN_CFG_TX_MON_RING_MASK_1,
  2409. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2410. /* ppe ds wbm release ring ring mask */
  2411. { 0, 0, 0, 0, 0, 0, WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0,
  2412. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2413. /* Reo2ppe ring mask */
  2414. {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  2415. 0, 0, 0, 0, 0, 0, 0, 0},
  2416. /* ppe2tcl ring mask */
  2417. {0, 0, 0, 0, 0, 0, 0, 0,
  2418. WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  2419. /* umac reset mask */
  2420. {0, 0, 0, 0, 0, 0, 0, 0,
  2421. 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0},
  2422. },
  2423. /* Interrupt assignment for 11 MSI combination */
  2424. {
  2425. /* tx ring masks */
  2426. { WLAN_CFG_TX_RING_MASK_0,
  2427. WLAN_CFG_TX_RING_MASK_1,
  2428. WLAN_CFG_TX_RING_MASK_2,
  2429. WLAN_CFG_TX_RING_MASK_3,
  2430. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2431. /* rx ring masks */
  2432. { 0, 0, 0, 0,
  2433. WLAN_CFG_RX_RING_MASK_0,
  2434. WLAN_CFG_RX_RING_MASK_1,
  2435. WLAN_CFG_RX_RING_MASK_2,
  2436. WLAN_CFG_RX_RING_MASK_3,
  2437. 0, 0, 0, 0, 0, 0, 0, 0},
  2438. /* rx mon ring masks */
  2439. { 0, 0, 0,
  2440. WLAN_CFG_RX_MON_RING_MASK_0,
  2441. WLAN_CFG_RX_MON_RING_MASK_1,
  2442. WLAN_CFG_RX_MON_RING_MASK_2,
  2443. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2444. /* host2rxdma ring masks */
  2445. { 0, 0, 0,
  2446. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2447. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2448. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2449. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2450. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2451. /* rxdma2host ring masks */
  2452. { 0, 0, 0,
  2453. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2454. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2455. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2456. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2457. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2458. /* host2rxdma mon ring masks */
  2459. { 0, 0, 0,
  2460. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2461. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2462. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2463. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2464. /* rxdma2host mon ring masks */
  2465. { 0, 0, 0,
  2466. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2467. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2468. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2469. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2470. /* rx err ring masks */
  2471. { 0, 0, 0,
  2472. WLAN_CFG_RX_ERR_RING_MASK_0,
  2473. WLAN_CFG_RX_ERR_RING_MASK_1,
  2474. WLAN_CFG_RX_ERR_RING_MASK_2,
  2475. WLAN_CFG_RX_ERR_RING_MASK_3,
  2476. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2477. /* rx wbm rel ring masks */
  2478. { 0, 0, 0,
  2479. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2480. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  2481. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  2482. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  2483. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2484. /* reo status ring masks */
  2485. { 0, 0, 0,
  2486. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2487. WLAN_CFG_REO_STATUS_RING_MASK_1,
  2488. WLAN_CFG_REO_STATUS_RING_MASK_2,
  2489. WLAN_CFG_REO_STATUS_RING_MASK_3,
  2490. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2491. /* rx_ring_near_full_irq mask */
  2492. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2493. /* rx_ring_near_full_irq_2 mask */
  2494. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2495. /* tx_ring_near_full_irq mask */
  2496. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2497. /* host2txmon ring masks */
  2498. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2499. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2500. /* tx mon ring masks */
  2501. { WLAN_CFG_TX_MON_RING_MASK_0,
  2502. WLAN_CFG_TX_MON_RING_MASK_1,
  2503. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2504. /* ppe wbm ds release ring ring mask */
  2505. { 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0,
  2506. 0, 0, 0, 0, 0, 0, 0, 0},
  2507. /* Reo2ppe ring mask */
  2508. {0, 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  2509. 0, 0, 0, 0, 0, 0, 0},
  2510. /* ppe2tcl ring mask */
  2511. {0, 0, 0, 0, 0, 0, 0, 0, 0,
  2512. WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0, 0, 0, 0},
  2513. /* umac reset mask */
  2514. {0, 0, 0, 0, 0, 0, 0, 0,
  2515. 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0},
  2516. },
  2517. /* Interrupt assignment for 12 MSI combination */
  2518. {
  2519. /* tx ring masks */
  2520. { WLAN_CFG_TX_RING_MASK_0,
  2521. WLAN_CFG_TX_RING_MASK_1,
  2522. WLAN_CFG_TX_RING_MASK_2,
  2523. WLAN_CFG_TX_RING_MASK_3,
  2524. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2525. /* rx ring masks */
  2526. { 0, 0, 0, 0,
  2527. WLAN_CFG_RX_RING_MASK_0,
  2528. WLAN_CFG_RX_RING_MASK_1,
  2529. WLAN_CFG_RX_RING_MASK_2,
  2530. WLAN_CFG_RX_RING_MASK_3,
  2531. 0, 0, 0, 0, 0, 0, 0, 0},
  2532. /* rx mon ring masks */
  2533. { 0, 0, 0, 0, 0, 0, 0, 0,
  2534. WLAN_CFG_RX_MON_RING_MASK_0,
  2535. WLAN_CFG_RX_MON_RING_MASK_1,
  2536. WLAN_CFG_RX_MON_RING_MASK_2,
  2537. 0, 0, 0, 0, 0},
  2538. /* host2rxdma ring masks */
  2539. { 0, 0, 0, 0, 0, 0, 0, 0,
  2540. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2541. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2542. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2543. 0, 0, 0, 0, 0},
  2544. /* rxdma2host ring masks */
  2545. { 0, 0, 0, 0, 0, 0, 0, 0,
  2546. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2547. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2548. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2549. 0, 0, 0, 0, 0},
  2550. /* host2rxdma mon ring masks */
  2551. { 0, 0, 0, 0, 0, 0, 0, 0,
  2552. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2553. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2554. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2555. 0, 0, 0, 0, 0},
  2556. /* rxdma2host mon ring masks */
  2557. { 0, 0, 0, 0, 0, 0, 0, 0,
  2558. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2559. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2560. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2561. 0, 0, 0, 0, 0},
  2562. /* rx err ring masks */
  2563. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2564. WLAN_CFG_RX_ERR_RING_MASK_0,
  2565. 0, 0, 0, 0},
  2566. /* rx wbm rel ring masks */
  2567. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2568. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2569. 0, 0, 0, 0},
  2570. /* reo status ring masks */
  2571. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2572. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2573. 0, 0, 0, 0},
  2574. /* rx_ring_near_full_irq mask */
  2575. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2576. /* rx_ring_near_full_irq_2 mask */
  2577. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2578. /* tx_ring_near_full_irq mask */
  2579. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2580. /* host2txmon ring masks */
  2581. { 0, 0, 0, 0, 0, 0, 0, 0,
  2582. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2583. 0, 0, 0, 0, 0, 0, 0},
  2584. /* tx mon ring masks */
  2585. { 0, 0, 0, 0, 0, 0, 0, 0,
  2586. WLAN_CFG_TX_MON_RING_MASK_0,
  2587. WLAN_CFG_TX_MON_RING_MASK_1,
  2588. 0, 0, 0, 0, 0, 0},
  2589. /* ppe ds wbm release ring ring mask */
  2590. { 0, 0, 0, 0, 0, 0, 0, 0,
  2591. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  2592. /* Reo2ppe ring mask */
  2593. {0, 0, 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  2594. 0, 0, 0, 0, 0, 0},
  2595. /* ppe2tcl ring mask */
  2596. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2597. WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0, 0, 0},
  2598. /* umac reset mask */
  2599. {0, 0, 0, 0, 0, 0, 0, 0,
  2600. 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0},
  2601. },
  2602. /* Interrupt assignment for 13 MSI combination */
  2603. {
  2604. /* tx ring masks */
  2605. { WLAN_CFG_TX_RING_MASK_0,
  2606. WLAN_CFG_TX_RING_MASK_1,
  2607. WLAN_CFG_TX_RING_MASK_2,
  2608. WLAN_CFG_TX_RING_MASK_3,
  2609. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2610. /* rx ring masks */
  2611. { 0, 0, 0, 0,
  2612. WLAN_CFG_RX_RING_MASK_0,
  2613. WLAN_CFG_RX_RING_MASK_1,
  2614. WLAN_CFG_RX_RING_MASK_2,
  2615. WLAN_CFG_RX_RING_MASK_3,
  2616. 0, 0, 0, 0, 0, 0, 0, 0},
  2617. /* rx mon ring masks */
  2618. { 0, 0, 0, 0, 0, 0, 0, 0,
  2619. WLAN_CFG_RX_MON_RING_MASK_0,
  2620. WLAN_CFG_RX_MON_RING_MASK_1,
  2621. WLAN_CFG_RX_MON_RING_MASK_2,
  2622. 0, 0, 0, 0, 0},
  2623. /* host2rxdma ring masks */
  2624. { 0, 0, 0, 0, 0, 0, 0, 0,
  2625. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2626. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2627. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2628. 0, 0, 0, 0, 0},
  2629. /* rxdma2host ring masks */
  2630. { 0, 0, 0, 0, 0, 0, 0, 0,
  2631. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2632. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2633. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2634. 0, 0, 0, 0, 0},
  2635. /* host2rxdma mon ring masks */
  2636. { 0, 0, 0, 0, 0, 0, 0, 0,
  2637. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2638. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2639. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2640. 0, 0, 0, 0, 0},
  2641. /* rxdma2host mon ring masks */
  2642. { 0, 0, 0, 0, 0, 0, 0, 0,
  2643. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2644. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2645. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2646. 0, 0, 0, 0, 0},
  2647. /* rx err ring masks */
  2648. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2649. WLAN_CFG_RX_ERR_RING_MASK_0,
  2650. 0, 0, 0, 0},
  2651. /* rx wbm rel ring masks */
  2652. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2653. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2654. 0, 0, 0, 0},
  2655. /* reo status ring masks */
  2656. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2657. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2658. 0, 0, 0, 0},
  2659. /* rx_ring_near_full_irq mask */
  2660. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2661. /* rx_ring_near_full_irq_2 mask */
  2662. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2663. /* tx_ring_near_full_irq mask */
  2664. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2665. /* host2txmon ring masks */
  2666. { 0, 0, 0, 0, 0, 0, 0, 0,
  2667. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2668. 0, 0, 0, 0, 0, 0, 0},
  2669. /* tx mon ring masks */
  2670. { 0, 0, 0, 0, 0, 0, 0, 0,
  2671. WLAN_CFG_TX_MON_RING_MASK_0,
  2672. WLAN_CFG_TX_MON_RING_MASK_1,
  2673. 0, 0, 0, 0, 0, 0},
  2674. /* ppe ds wbm release ring ring mask */
  2675. { 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2676. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0, 0, 0},
  2677. /* Reo2ppe ring mask */
  2678. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  2679. 0, 0, 0, 0, 0},
  2680. /* ppe2tcl ring mask */
  2681. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2682. WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0, 0},
  2683. /* umac reset mask */
  2684. {0, 0, 0, 0, 0, 0, 0, 0,
  2685. 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0},
  2686. },
  2687. /* Interrupt assignment for 14 MSI combination */
  2688. {
  2689. /* tx ring masks */
  2690. { WLAN_CFG_TX_RING_MASK_0,
  2691. WLAN_CFG_TX_RING_MASK_1,
  2692. WLAN_CFG_TX_RING_MASK_2,
  2693. WLAN_CFG_TX_RING_MASK_3,
  2694. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2695. /* rx ring masks */
  2696. { 0, 0, 0, 0,
  2697. WLAN_CFG_RX_RING_MASK_0,
  2698. WLAN_CFG_RX_RING_MASK_1,
  2699. WLAN_CFG_RX_RING_MASK_2,
  2700. WLAN_CFG_RX_RING_MASK_3,
  2701. 0, 0, 0, 0, 0, 0, 0, 0},
  2702. /* rx mon ring masks */
  2703. { 0, 0, 0, 0, 0, 0, 0, 0,
  2704. WLAN_CFG_RX_MON_RING_MASK_0,
  2705. WLAN_CFG_RX_MON_RING_MASK_1,
  2706. WLAN_CFG_RX_MON_RING_MASK_2,
  2707. 0, 0, 0, 0, 0},
  2708. /* host2rxdma ring masks */
  2709. { 0, 0, 0, 0, 0, 0, 0, 0,
  2710. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2711. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2712. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2713. 0, 0, 0, 0, 0},
  2714. /* rxdma2host ring masks */
  2715. { 0, 0, 0, 0, 0, 0, 0, 0,
  2716. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2717. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2718. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2719. 0, 0, 0, 0, 0},
  2720. /* host2rxdma mon ring masks */
  2721. { 0, 0, 0, 0, 0, 0, 0, 0,
  2722. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2723. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2724. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2725. 0, 0, 0, 0, 0},
  2726. /* rxdma2host mon ring masks */
  2727. { 0, 0, 0, 0, 0, 0, 0, 0,
  2728. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2729. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2730. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2731. 0, 0, 0, 0, 0},
  2732. /* rx err ring masks */
  2733. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2734. WLAN_CFG_RX_ERR_RING_MASK_0,
  2735. 0, 0, 0, 0},
  2736. /* rx wbm rel ring masks */
  2737. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2738. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2739. 0, 0, 0, 0},
  2740. /* reo status ring masks */
  2741. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2742. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2743. 0, 0, 0, 0},
  2744. /* rx_ring_near_full_irq mask */
  2745. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2746. /* rx_ring_near_full_irq_2 mask */
  2747. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2748. /* tx_ring_near_full_irq mask */
  2749. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2750. /* host2txmon ring masks */
  2751. { 0, 0, 0, 0, 0, 0, 0, 0,
  2752. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2753. 0, 0, 0, 0, 0, 0, 0},
  2754. /* tx mon ring masks */
  2755. { 0, 0, 0, 0, 0, 0, 0, 0,
  2756. WLAN_CFG_TX_MON_RING_MASK_0,
  2757. WLAN_CFG_TX_MON_RING_MASK_1,
  2758. 0, 0, 0, 0, 0, 0},
  2759. /* ppe ds wbm release ring ring mask */
  2760. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2761. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0, 0},
  2762. /* Reo2ppe ring mask */
  2763. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2764. WLAN_CFG_REO2PPE_RING_MASK_0, 0, 0, 0, 0},
  2765. /* ppe2tcl ring mask */
  2766. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2767. 0, WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0, 0},
  2768. /* umac reset mask */
  2769. {0, 0, 0, 0, 0, 0, 0, 0,
  2770. 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0},
  2771. },
  2772. /* Interrupt assignment for 15 MSI combination */
  2773. {
  2774. /* tx ring masks */
  2775. { WLAN_CFG_TX_RING_MASK_0,
  2776. WLAN_CFG_TX_RING_MASK_1,
  2777. WLAN_CFG_TX_RING_MASK_2,
  2778. WLAN_CFG_TX_RING_MASK_3,
  2779. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2780. /* rx ring masks */
  2781. { 0, 0, 0, 0,
  2782. WLAN_CFG_RX_RING_MASK_0,
  2783. WLAN_CFG_RX_RING_MASK_1,
  2784. WLAN_CFG_RX_RING_MASK_2,
  2785. WLAN_CFG_RX_RING_MASK_3,
  2786. 0, 0, 0, 0, 0, 0, 0, 0},
  2787. /* rx mon ring masks */
  2788. { 0, 0, 0, 0, 0, 0, 0, 0,
  2789. WLAN_CFG_RX_MON_RING_MASK_0,
  2790. WLAN_CFG_RX_MON_RING_MASK_1,
  2791. WLAN_CFG_RX_MON_RING_MASK_2,
  2792. 0, 0, 0, 0, 0},
  2793. /* host2rxdma ring masks */
  2794. { 0, 0, 0, 0, 0, 0, 0, 0,
  2795. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2796. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2797. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2798. 0, 0, 0, 0, 0},
  2799. /* rxdma2host ring masks */
  2800. { 0, 0, 0, 0, 0, 0, 0, 0,
  2801. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2802. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2803. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2804. 0, 0, 0, 0, 0},
  2805. /* host2rxdma mon ring masks */
  2806. { 0, 0, 0, 0, 0, 0, 0, 0,
  2807. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2808. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2809. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2810. 0, 0, 0, 0, 0},
  2811. /* rxdma2host mon ring masks */
  2812. { 0, 0, 0, 0, 0, 0, 0, 0,
  2813. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2814. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2815. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2816. 0, 0, 0, 0, 0},
  2817. /* rx err ring masks */
  2818. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2819. WLAN_CFG_RX_ERR_RING_MASK_0,
  2820. 0, 0, 0, 0},
  2821. /* rx wbm rel ring masks */
  2822. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2823. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2824. 0, 0, 0, 0},
  2825. /* reo status ring masks */
  2826. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2827. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2828. 0, 0, 0, 0},
  2829. /* rx_ring_near_full_irq mask */
  2830. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2831. /* rx_ring_near_full_irq_2 mask */
  2832. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2833. /* tx_ring_near_full_irq mask */
  2834. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2835. /* host2txmon ring masks */
  2836. { 0, 0, 0, 0, 0, 0, 0, 0,
  2837. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2838. 0, 0, 0, 0, 0, 0, 0},
  2839. /* tx mon ring masks */
  2840. { 0, 0, 0, 0, 0, 0, 0, 0,
  2841. WLAN_CFG_TX_MON_RING_MASK_0,
  2842. WLAN_CFG_TX_MON_RING_MASK_1,
  2843. 0, 0, 0, 0, 0, 0},
  2844. /* ppe ds wbm release ring ring mask */
  2845. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2846. WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0},
  2847. /* Reo2ppe ring mask */
  2848. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2849. 0, WLAN_CFG_REO2PPE_RING_MASK_0, 0, 0, 0},
  2850. /* ppe2tcl ring mask */
  2851. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2852. 0, 0, WLAN_CFG_PPE2TCL_RING_MASK_0, 0, 0},
  2853. /* umac reset mask */
  2854. {0, 0, 0, 0, 0, 0, 0, 0,
  2855. 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0},
  2856. },
  2857. /* Interrupt assignment for 16 MSI combination */
  2858. {
  2859. /* tx ring masks */
  2860. { WLAN_CFG_TX_RING_MASK_0,
  2861. WLAN_CFG_TX_RING_MASK_1,
  2862. WLAN_CFG_TX_RING_MASK_2,
  2863. WLAN_CFG_TX_RING_MASK_3,
  2864. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2865. /* rx ring masks */
  2866. { 0, 0, 0, 0,
  2867. WLAN_CFG_RX_RING_MASK_0,
  2868. WLAN_CFG_RX_RING_MASK_1,
  2869. WLAN_CFG_RX_RING_MASK_2,
  2870. WLAN_CFG_RX_RING_MASK_3,
  2871. 0, 0, 0, 0, 0, 0, 0, 0},
  2872. /* rx mon ring masks */
  2873. { 0, 0, 0, 0, 0, 0, 0, 0,
  2874. WLAN_CFG_RX_MON_RING_MASK_0,
  2875. WLAN_CFG_RX_MON_RING_MASK_1,
  2876. WLAN_CFG_RX_MON_RING_MASK_2,
  2877. 0, 0, 0, 0, 0},
  2878. /* host2rxdma ring masks */
  2879. { 0, 0, 0, 0, 0, 0, 0, 0,
  2880. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2881. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2882. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  2883. 0, 0, 0, 0, 0},
  2884. /* rxdma2host ring masks */
  2885. { 0, 0, 0, 0, 0, 0, 0, 0,
  2886. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2887. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2888. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  2889. 0, 0, 0, 0, 0},
  2890. /* host2rxdma mon ring masks */
  2891. { 0, 0, 0, 0, 0, 0, 0, 0,
  2892. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2893. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2894. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2895. 0, 0, 0, 0, 0},
  2896. /* rxdma2host mon ring masks */
  2897. { 0, 0, 0, 0, 0, 0, 0, 0,
  2898. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2899. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2900. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2901. 0, 0, 0, 0, 0},
  2902. /* rx err ring masks */
  2903. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2904. WLAN_CFG_RX_ERR_RING_MASK_0,
  2905. 0, 0, 0, 0},
  2906. /* rx wbm rel ring masks */
  2907. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2908. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  2909. 0, 0, 0, 0},
  2910. /* reo status ring masks */
  2911. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2912. WLAN_CFG_REO_STATUS_RING_MASK_0,
  2913. 0, 0, 0, 0},
  2914. /* rx_ring_near_full_irq mask */
  2915. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2916. /* rx_ring_near_full_irq_2 mask */
  2917. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2918. /* tx_ring_near_full_irq mask */
  2919. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2920. /* host2txmon ring masks */
  2921. { 0, 0, 0, 0, 0, 0, 0, 0,
  2922. WLAN_CFG_HOST2TXMON_RING_MASK_0,
  2923. 0, 0, 0, 0, 0, 0, 0},
  2924. /* tx mon ring masks */
  2925. { 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2926. WLAN_CFG_TX_MON_RING_MASK_0,
  2927. WLAN_CFG_TX_MON_RING_MASK_1,
  2928. 0, 0, 0, 0, 0},
  2929. /* ppe ds wbm release ring ring mask */
  2930. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2931. 0, WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0},
  2932. /* Reo2ppe ring mask */
  2933. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2934. 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0, 0, 0},
  2935. /* ppe2tcl ring mask */
  2936. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2937. 0, 0, 0, WLAN_CFG_PPE2TCL_RING_MASK_0, 0},
  2938. /* umac reset mask */
  2939. {0, 0, 0, 0, 0, 0, 0, 0,
  2940. 0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0},
  2941. },
  2942. };
  2943. #endif
  2944. struct dp_int_mask_assignment dp_ds_mask_assignment_8msi =
  2945. /* Interrupt assignment for 8 MSI combination */
  2946. {
  2947. /* tx ring masks */
  2948. { WLAN_CFG_TX_RING_MASK_0,
  2949. WLAN_CFG_TX_RING_MASK_1,
  2950. WLAN_CFG_TX_RING_MASK_2 |
  2951. WLAN_CFG_TX_RING_MASK_3,
  2952. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2953. /* rx ring masks */
  2954. { 0, 0, 0,
  2955. WLAN_CFG_RX_RING_MASK_0,
  2956. WLAN_CFG_RX_RING_MASK_1,
  2957. WLAN_CFG_RX_RING_MASK_2 |
  2958. WLAN_CFG_RX_RING_MASK_3,
  2959. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2960. /* rx mon ring masks */
  2961. { 0, 0,
  2962. WLAN_CFG_RX_MON_RING_MASK_0,
  2963. WLAN_CFG_RX_MON_RING_MASK_1,
  2964. WLAN_CFG_RX_MON_RING_MASK_2,
  2965. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2966. /* host2rxdma ring masks */
  2967. { 0, 0,
  2968. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  2969. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  2970. WLAN_CFG_HOST2RXDMA_RING_MASK_2 |
  2971. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  2972. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2973. /* rxdma2host ring masks */
  2974. { 0, 0,
  2975. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  2976. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  2977. WLAN_CFG_RXDMA2HOST_RING_MASK_2 |
  2978. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  2979. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2980. /* host2rxdma mon ring masks */
  2981. { 0, 0,
  2982. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  2983. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  2984. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  2985. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2986. /* rxdma2host mon ring masks */
  2987. { 0, 0,
  2988. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  2989. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  2990. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  2991. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2992. /* rx err ring masks */
  2993. { 0, 0,
  2994. WLAN_CFG_RX_ERR_RING_MASK_0,
  2995. WLAN_CFG_RX_ERR_RING_MASK_1,
  2996. WLAN_CFG_RX_ERR_RING_MASK_2 |
  2997. WLAN_CFG_RX_ERR_RING_MASK_3,
  2998. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  2999. /* rx wbm rel ring masks */
  3000. { 0, 0,
  3001. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  3002. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  3003. WLAN_CFG_RX_WBM_REL_RING_MASK_2 |
  3004. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  3005. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3006. /* reo status ring masks */
  3007. { 0, 0,
  3008. WLAN_CFG_REO_STATUS_RING_MASK_0,
  3009. WLAN_CFG_REO_STATUS_RING_MASK_1,
  3010. WLAN_CFG_REO_STATUS_RING_MASK_2 |
  3011. WLAN_CFG_REO_STATUS_RING_MASK_3,
  3012. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3013. /* rx_ring_near_full_irq mask */
  3014. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3015. /* rx_ring_near_full_irq_2 mask */
  3016. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3017. /* tx_ring_near_full_irq mask */
  3018. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3019. /* host2txmon ring masks */
  3020. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  3021. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3022. /* tx mon ring masks */
  3023. { WLAN_CFG_TX_MON_RING_MASK_0,
  3024. WLAN_CFG_TX_MON_RING_MASK_1,
  3025. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3026. /* ppe ds wbm release ring ring mask */
  3027. { WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0,
  3028. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3029. /* Reo2ppe ring mask */
  3030. {0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0, 0,
  3031. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3032. /* ppe2tcl ring mask */
  3033. {0, 0, 0, 0, 0, 0, WLAN_CFG_PPE2TCL_RING_MASK_0, 0,
  3034. 0, 0, 0, 0, 0, 0, 0, 0},
  3035. /* umac reset mask */
  3036. {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_UMAC_RESET_INTR_MASK_0,
  3037. 0, 0, 0, 0, 0, 0, 0, 0},
  3038. };
  3039. struct dp_int_mask_assignment dp_ds_mask_assignment_9msi =
  3040. /* Interrupt assignment for 9 MSI combination */
  3041. {
  3042. /* tx ring masks */
  3043. { WLAN_CFG_TX_RING_MASK_0,
  3044. WLAN_CFG_TX_RING_MASK_1,
  3045. WLAN_CFG_TX_RING_MASK_2,
  3046. WLAN_CFG_TX_RING_MASK_3,
  3047. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3048. /* rx ring masks */
  3049. { 0, 0, 0, 0,
  3050. WLAN_CFG_RX_RING_MASK_0,
  3051. WLAN_CFG_RX_RING_MASK_1,
  3052. WLAN_CFG_RX_RING_MASK_2 |
  3053. WLAN_CFG_RX_RING_MASK_3,
  3054. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3055. /* rx mon ring masks */
  3056. { 0, 0, 0,
  3057. WLAN_CFG_RX_MON_RING_MASK_0,
  3058. WLAN_CFG_RX_MON_RING_MASK_1,
  3059. WLAN_CFG_RX_MON_RING_MASK_2,
  3060. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3061. /* host2rxdma ring masks */
  3062. { 0, 0, 0,
  3063. WLAN_CFG_HOST2RXDMA_RING_MASK_0,
  3064. WLAN_CFG_HOST2RXDMA_RING_MASK_1,
  3065. WLAN_CFG_HOST2RXDMA_RING_MASK_2,
  3066. WLAN_CFG_HOST2RXDMA_RING_MASK_3,
  3067. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3068. /* rxdma2host ring masks */
  3069. { 0, 0, 0,
  3070. WLAN_CFG_RXDMA2HOST_RING_MASK_0,
  3071. WLAN_CFG_RXDMA2HOST_RING_MASK_1,
  3072. WLAN_CFG_RXDMA2HOST_RING_MASK_2,
  3073. WLAN_CFG_RXDMA2HOST_RING_MASK_3,
  3074. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3075. /* host2rxdma mon ring masks */
  3076. { 0, 0, 0,
  3077. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_0,
  3078. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_1,
  3079. WLAN_CFG_HOST2RXDMA_MON_RING_MASK_2,
  3080. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3081. /* rxdma2host mon ring masks */
  3082. { 0, 0, 0,
  3083. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_0,
  3084. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_1,
  3085. WLAN_CFG_RXDMA2HOST_MON_RING_MASK_2,
  3086. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3087. /* rx err ring masks */
  3088. { 0, 0, 0,
  3089. WLAN_CFG_RX_ERR_RING_MASK_0,
  3090. WLAN_CFG_RX_ERR_RING_MASK_1,
  3091. WLAN_CFG_RX_ERR_RING_MASK_2,
  3092. WLAN_CFG_RX_ERR_RING_MASK_3,
  3093. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3094. /* rx wbm rel ring masks */
  3095. { 0, 0, 0,
  3096. WLAN_CFG_RX_WBM_REL_RING_MASK_0,
  3097. WLAN_CFG_RX_WBM_REL_RING_MASK_1,
  3098. WLAN_CFG_RX_WBM_REL_RING_MASK_2,
  3099. WLAN_CFG_RX_WBM_REL_RING_MASK_3,
  3100. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3101. /* reo status ring masks */
  3102. { 0, 0, 0,
  3103. WLAN_CFG_REO_STATUS_RING_MASK_0,
  3104. WLAN_CFG_REO_STATUS_RING_MASK_1,
  3105. WLAN_CFG_REO_STATUS_RING_MASK_2,
  3106. WLAN_CFG_REO_STATUS_RING_MASK_3,
  3107. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3108. /* rx_ring_near_full_irq mask */
  3109. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3110. /* rx_ring_near_full_irq_2 mask */
  3111. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3112. /* tx_ring_near_full_irq mask */
  3113. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3114. /* host2txmon ring masks */
  3115. { WLAN_CFG_HOST2TXMON_RING_MASK_0,
  3116. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3117. /* tx mon ring masks */
  3118. { WLAN_CFG_TX_MON_RING_MASK_0,
  3119. WLAN_CFG_TX_MON_RING_MASK_1,
  3120. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3121. /* ppe ds wbm release ring ring mask */
  3122. { WLAN_CFG_PPEDS_WBM_RELEASE_RING_MASK_0, 0, 0, 0, 0, 0,
  3123. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3124. /* Reo2ppe ring mask */
  3125. {0, 0, 0, 0, 0, 0, WLAN_CFG_REO2PPE_RING_MASK_0,
  3126. 0, 0, 0, 0, 0, 0, 0, 0, 0},
  3127. /* ppe2tcl ring mask */
  3128. {0, 0, 0, 0, 0, 0, 0, WLAN_CFG_PPE2TCL_RING_MASK_0,
  3129. 0, 0, 0, 0, 0, 0, 0, 0},
  3130. /* umac reset mask */
  3131. {0, 0, 0, 0, 0, 0, 0, 0,
  3132. WLAN_CFG_UMAC_RESET_INTR_MASK_0, 0, 0, 0, 0, 0, 0, 0},
  3133. };
  3134. #endif
  3135. /* g_wlan_srng_cfg[] - Per ring_type specific configuration */
  3136. struct wlan_srng_cfg g_wlan_srng_cfg[MAX_RING_TYPES];
  3137. #ifndef WLAN_SOFTUMAC_SUPPORT
  3138. /* REO_DST ring configuration */
  3139. struct wlan_srng_cfg wlan_srng_reo_cfg = {
  3140. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING,
  3141. .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_REO_RING,
  3142. .low_threshold = 0,
  3143. };
  3144. /* WBM2SW_RELEASE ring configuration */
  3145. struct wlan_srng_cfg wlan_srng_wbm_release_cfg = {
  3146. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING,
  3147. .batch_count_threshold = 0,
  3148. .low_threshold = 0,
  3149. };
  3150. #endif
  3151. /* RXDMA_BUF ring configuration */
  3152. struct wlan_srng_cfg wlan_srng_rxdma_buf_cfg = {
  3153. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  3154. .batch_count_threshold = 0,
  3155. .low_threshold = WLAN_CFG_RXDMA_REFILL_RING_SIZE >> 3,
  3156. };
  3157. /* RXDMA_MONITOR_BUF ring configuration */
  3158. struct wlan_srng_cfg wlan_srng_rxdma_monitor_buf_cfg = {
  3159. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  3160. .batch_count_threshold = 0,
  3161. .low_threshold = WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE >> 3,
  3162. };
  3163. /* RXDMA_MONITOR_STATUS ring configuration */
  3164. #ifdef DP_CON_MON_MSI_ENABLED
  3165. /*
  3166. * Configure batch count threshold as 1 to enable interrupt
  3167. * when HW updated TP (monitor status buffer DMA is done),
  3168. * then host could reap monitor status srng. timer threshold
  3169. * based interrupt is only used for low threshold interrupt which
  3170. * can not be used for monitor status buffer reaping directly
  3171. * unless configure low threshold value to a big value, perhaps
  3172. * (number of entries - 2).
  3173. */
  3174. struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = {
  3175. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  3176. .batch_count_threshold = 1,
  3177. .low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3,
  3178. };
  3179. #else
  3180. struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = {
  3181. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
  3182. .batch_count_threshold = 0,
  3183. .low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3,
  3184. };
  3185. #endif
  3186. /* TX_MONITOR_BUF ring configuration */
  3187. struct wlan_srng_cfg wlan_srng_tx_monitor_buf_cfg = {
  3188. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_TX,
  3189. .batch_count_threshold = 0,
  3190. .low_threshold = WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MAX >> 3,
  3191. };
  3192. /* DEFAULT_CONFIG ring configuration */
  3193. struct wlan_srng_cfg wlan_srng_default_cfg = {
  3194. .timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_OTHER,
  3195. .batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_OTHER,
  3196. .low_threshold = 0,
  3197. };
  3198. /* DEFAULT_CONFIG source ring configuration */
  3199. struct wlan_srng_cfg wlan_src_srng_default_cfg = {
  3200. .timer_threshold = 0,
  3201. .batch_count_threshold = 0,
  3202. .low_threshold = 0,
  3203. };
  3204. #ifdef WLAN_SOFTUMAC_SUPPORT
  3205. void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
  3206. {
  3207. g_wlan_srng_cfg[RXDMA_BUF] = wlan_srng_rxdma_buf_cfg;
  3208. g_wlan_srng_cfg[RXDMA_MONITOR_BUF] =
  3209. wlan_srng_rxdma_monitor_buf_cfg;
  3210. g_wlan_srng_cfg[RXDMA_MONITOR_STATUS] =
  3211. wlan_srng_rxdma_monitor_status_cfg;
  3212. g_wlan_srng_cfg[RXDMA_MONITOR_DST] = wlan_srng_default_cfg;
  3213. g_wlan_srng_cfg[RXDMA_MONITOR_DESC] = wlan_srng_default_cfg;
  3214. g_wlan_srng_cfg[DIR_BUF_RX_DMA_SRC] = wlan_srng_default_cfg;
  3215. #ifdef WLAN_FEATURE_CIF_CFR
  3216. g_wlan_srng_cfg[WIFI_POS_SRC] = wlan_srng_default_cfg;
  3217. #endif
  3218. g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg;
  3219. *wlan_cfg = g_wlan_srng_cfg;
  3220. }
  3221. #else
  3222. void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
  3223. {
  3224. g_wlan_srng_cfg[REO_DST] = wlan_srng_reo_cfg;
  3225. g_wlan_srng_cfg[WBM2SW_RELEASE] = wlan_srng_wbm_release_cfg;
  3226. g_wlan_srng_cfg[REO_EXCEPTION] = wlan_srng_default_cfg;
  3227. g_wlan_srng_cfg[REO_REINJECT] = wlan_src_srng_default_cfg;
  3228. g_wlan_srng_cfg[REO_CMD] = wlan_src_srng_default_cfg;
  3229. g_wlan_srng_cfg[REO_STATUS] = wlan_srng_default_cfg;
  3230. g_wlan_srng_cfg[TCL_DATA] = wlan_src_srng_default_cfg;
  3231. g_wlan_srng_cfg[TCL_CMD_CREDIT] = wlan_src_srng_default_cfg;
  3232. g_wlan_srng_cfg[TCL_STATUS] = wlan_srng_default_cfg;
  3233. g_wlan_srng_cfg[WBM_IDLE_LINK] = wlan_src_srng_default_cfg;
  3234. g_wlan_srng_cfg[SW2WBM_RELEASE] = wlan_src_srng_default_cfg;
  3235. g_wlan_srng_cfg[RXDMA_BUF] = wlan_srng_rxdma_buf_cfg;
  3236. g_wlan_srng_cfg[RXDMA_DST] = wlan_srng_default_cfg;
  3237. g_wlan_srng_cfg[RXDMA_MONITOR_BUF] =
  3238. wlan_srng_rxdma_monitor_buf_cfg;
  3239. g_wlan_srng_cfg[RXDMA_MONITOR_STATUS] =
  3240. wlan_srng_rxdma_monitor_status_cfg;
  3241. g_wlan_srng_cfg[RXDMA_MONITOR_DST] = wlan_srng_default_cfg;
  3242. g_wlan_srng_cfg[REO2PPE] = wlan_srng_default_cfg;
  3243. g_wlan_srng_cfg[PPE2TCL] = wlan_srng_default_cfg;
  3244. g_wlan_srng_cfg[RXDMA_MONITOR_DESC] = wlan_srng_default_cfg;
  3245. g_wlan_srng_cfg[DIR_BUF_RX_DMA_SRC] = wlan_srng_default_cfg;
  3246. #ifdef WLAN_FEATURE_CIF_CFR
  3247. g_wlan_srng_cfg[WIFI_POS_SRC] = wlan_srng_default_cfg;
  3248. #endif
  3249. g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg;
  3250. *wlan_cfg = g_wlan_srng_cfg;
  3251. }
  3252. #endif
  3253. static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = {
  3254. 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,
  3255. 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0,
  3256. 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4,
  3257. 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c,
  3258. 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa
  3259. };
  3260. #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
  3261. #ifdef WLAN_SOFTUMAC_SUPPORT
  3262. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3263. int num_dp_msi,
  3264. int interrupt_mode,
  3265. bool is_monitor_mode,
  3266. bool ppeds_attached)
  3267. { int i = 0;
  3268. for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
  3269. wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
  3270. rx_mon_ring_mask_msi[i];
  3271. wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0;
  3272. if (is_monitor_mode) {
  3273. wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
  3274. if (interrupt_mode == DP_INTR_POLL)
  3275. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
  3276. else
  3277. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3278. rxdma2host_ring_mask_msi[i];
  3279. } else {
  3280. wlan_cfg_ctx->int_rx_ring_mask[i] =
  3281. rx_ring_mask_msi[i];
  3282. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3283. rxdma2host_ring_mask_msi[i];
  3284. }
  3285. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  3286. host2rxdma_mon_ring_mask_msi[i];
  3287. wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
  3288. rxdma2host_mon_ring_mask_msi[i];
  3289. }
  3290. }
  3291. #else
  3292. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3293. int num_dp_msi,
  3294. int interrupt_mode,
  3295. bool is_monitor_mode,
  3296. bool ppeds_attached)
  3297. { int i = 0;
  3298. const uint8_t *tx_ring_intr_mask =
  3299. wlan_cfg_get_tx_ring_int_mask(wlan_cfg_ctx);
  3300. for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
  3301. wlan_cfg_ctx->int_tx_ring_mask[i] = tx_ring_intr_mask[i];
  3302. if (wlan_cfg_ctx->int_tx_ring_mask[i])
  3303. wlan_cfg_ctx->tx_rings_grp_bitmap |= BIT(i);
  3304. wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
  3305. rx_mon_ring_mask_msi[i];
  3306. wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0;
  3307. wlan_cfg_ctx->int_rx_err_ring_mask[i] =
  3308. rx_err_ring_mask_msi[i];
  3309. wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] =
  3310. rx_wbm_rel_ring_mask_msi[i];
  3311. wlan_cfg_ctx->int_reo_status_ring_mask[i] =
  3312. reo_status_ring_mask_msi[i];
  3313. if (is_monitor_mode) {
  3314. wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
  3315. if (interrupt_mode == DP_INTR_POLL)
  3316. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
  3317. else
  3318. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3319. rxdma2host_ring_mask_msi[i];
  3320. } else {
  3321. wlan_cfg_ctx->int_rx_ring_mask[i] =
  3322. rx_ring_mask_msi[i];
  3323. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3324. rxdma2host_ring_mask_msi[i];
  3325. }
  3326. wlan_cfg_ctx->int_host2rxdma_ring_mask[i] =
  3327. host2rxdma_ring_mask_msi[i];
  3328. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  3329. host2rxdma_mon_ring_mask_msi[i];
  3330. wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
  3331. rxdma2host_mon_ring_mask_msi[i];
  3332. wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] =
  3333. rx_ring_near_full_irq_1_mask_msi[i];
  3334. wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] =
  3335. rx_ring_near_full_irq_2_mask_msi[i];
  3336. wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] =
  3337. tx_ring_near_full_irq_mask_msi[i];
  3338. }
  3339. }
  3340. #endif
  3341. #else
  3342. static void
  3343. wlan_cfg_mask_assignment(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3344. struct dp_int_mask_assignment *mask_assignment,
  3345. int interrupt_index, int i, bool is_monitor_mode)
  3346. {
  3347. int int_host2rxdma_mon_ring_mask;
  3348. bool host2rxmon_mask_set = false;
  3349. bool txmon_hw_support = false;
  3350. wlan_cfg_ctx->int_tx_ring_mask[i] =
  3351. mask_assignment->tx_ring_mask[i];
  3352. wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
  3353. mask_assignment->rx_mon_ring_mask[i];
  3354. wlan_cfg_ctx->int_rx_err_ring_mask[i] =
  3355. mask_assignment->rx_err_ring_mask[i];
  3356. wlan_cfg_ctx->int_rx_wbm_rel_ring_mask[i] =
  3357. mask_assignment->rx_wbm_rel_ring_mask[i];
  3358. wlan_cfg_ctx->int_reo_status_ring_mask[i] =
  3359. mask_assignment->reo_status_ring_mask[i];
  3360. wlan_cfg_ctx->int_ppeds_wbm_release_ring_mask[i] =
  3361. mask_assignment->ppeds_wbm_release_ring_mask[i];
  3362. wlan_cfg_ctx->int_ppe2tcl_ring_mask[i] =
  3363. mask_assignment->ppe2tcl_ring_mask[i];
  3364. wlan_cfg_ctx->int_reo2ppe_ring_mask[i] =
  3365. mask_assignment->reo2ppe_ring_mask[i];
  3366. if (is_monitor_mode) {
  3367. wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
  3368. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
  3369. } else {
  3370. wlan_cfg_ctx->int_rx_ring_mask[i] =
  3371. mask_assignment->rx_ring_mask[i];
  3372. wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
  3373. mask_assignment->rxdma2host_ring_mask[i];
  3374. }
  3375. wlan_cfg_ctx->int_host2rxdma_ring_mask[i] =
  3376. mask_assignment->host2rxdma_ring_mask[i];
  3377. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  3378. mask_assignment->host2rxdma_mon_ring_mask[i];
  3379. wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
  3380. mask_assignment->rxdma2host_mon_ring_mask[i];
  3381. wlan_cfg_ctx->int_rx_ring_near_full_irq_1_mask[i] =
  3382. mask_assignment->rx_ring_near_full_irq_1_mask[i];
  3383. wlan_cfg_ctx->int_rx_ring_near_full_irq_2_mask[i] =
  3384. mask_assignment->rx_ring_near_full_irq_2_mask[i];
  3385. wlan_cfg_ctx->int_tx_ring_near_full_irq_mask[i] =
  3386. mask_assignment->tx_ring_near_full_irq_mask[i];
  3387. txmon_hw_support = wlan_cfg_get_txmon_hw_support(wlan_cfg_ctx);
  3388. if (txmon_hw_support) {
  3389. wlan_cfg_ctx->int_tx_mon_ring_mask[i] =
  3390. mask_assignment->tx_mon_ring_mask[i];
  3391. wlan_cfg_ctx->int_host2txmon_ring_mask[i] =
  3392. mask_assignment->host2txmon_ring_mask[i];
  3393. int_host2rxdma_mon_ring_mask =
  3394. mask_assignment->host2rxdma_mon_ring_mask[i];
  3395. if (int_host2rxdma_mon_ring_mask && !host2rxmon_mask_set) {
  3396. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[interrupt_index] =
  3397. mask_assignment->host2rxdma_mon_ring_mask[i];
  3398. host2rxmon_mask_set = true;
  3399. }
  3400. } else {
  3401. wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0;
  3402. wlan_cfg_ctx->int_host2txmon_ring_mask[i] = 0;
  3403. wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
  3404. mask_assignment->host2rxdma_mon_ring_mask[i];
  3405. }
  3406. wlan_cfg_ctx->int_umac_reset_intr_mask[i] =
  3407. mask_assignment->umac_reset_intr_mask[i];
  3408. }
  3409. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3410. int num_dp_msi,
  3411. int interrupt_mode,
  3412. bool is_monitor_mode,
  3413. bool ppeds_attached)
  3414. {
  3415. int i = 0;
  3416. int interrupt_index = 0;
  3417. struct dp_int_mask_assignment *mask_assignment;
  3418. if(interrupt_mode == DP_INTR_INTEGRATED) {
  3419. interrupt_index = 0;
  3420. } else if (interrupt_mode == DP_INTR_MSI || interrupt_mode ==
  3421. DP_INTR_POLL) {
  3422. interrupt_index = num_dp_msi;
  3423. } else {
  3424. qdf_err("Interrupt mode %d", interrupt_mode);
  3425. }
  3426. for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
  3427. if (!ppeds_attached)
  3428. mask_assignment = &dp_mask_assignment[interrupt_index];
  3429. else if (interrupt_index == 8)
  3430. mask_assignment = &dp_ds_mask_assignment_8msi;
  3431. else if (interrupt_index == 9)
  3432. mask_assignment = &dp_ds_mask_assignment_9msi;
  3433. else
  3434. mask_assignment = &dp_mask_assignment[interrupt_index];
  3435. wlan_cfg_mask_assignment(wlan_cfg_ctx, mask_assignment,
  3436. interrupt_index, i, is_monitor_mode);
  3437. }
  3438. }
  3439. #endif
  3440. #ifdef IPA_OFFLOAD
  3441. #define WLAN_CFG_IPA_ENABLE_MASK BIT(0)
  3442. #ifdef IPA_WDI3_TX_TWO_PIPES
  3443. /**
  3444. * wlan_soc_ipa_cfg_attach() - Update ipa tx and tx alt config
  3445. * in dp soc cfg context
  3446. * @psoc: Object manager psoc
  3447. * @wlan_cfg_ctx: dp soc cfg ctx
  3448. *
  3449. * Return: None
  3450. */
  3451. static void
  3452. wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3453. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3454. {
  3455. if (ucfg_ipa_get_pld_enable()) {
  3456. wlan_cfg_ctx->ipa_enabled =
  3457. (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) &
  3458. WLAN_CFG_IPA_ENABLE_MASK);
  3459. dp_info("is IPA enabled from ini: %d",
  3460. wlan_cfg_ctx->ipa_enabled);
  3461. } else {
  3462. wlan_cfg_ctx->ipa_enabled = false;
  3463. dp_info("IPA disabled from platform driver");
  3464. }
  3465. wlan_cfg_ctx->ipa_tx_ring_size =
  3466. cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE);
  3467. wlan_cfg_ctx->ipa_tx_comp_ring_size =
  3468. cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE);
  3469. wlan_cfg_ctx->ipa_tx_alt_ring_size =
  3470. cfg_get(psoc, CFG_DP_IPA_TX_ALT_RING_SIZE);
  3471. wlan_cfg_ctx->ipa_tx_alt_comp_ring_size =
  3472. cfg_get(psoc, CFG_DP_IPA_TX_ALT_COMP_RING_SIZE);
  3473. }
  3474. #else /* !IPA_WDI3_TX_TWO_PIPES */
  3475. /**
  3476. * wlan_soc_ipa_cfg_attach() - Update ipa config in dp soc
  3477. * cfg context
  3478. * @psoc: Object manager psoc
  3479. * @wlan_cfg_ctx: dp soc cfg ctx
  3480. *
  3481. * Return: None
  3482. */
  3483. static void
  3484. wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3485. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3486. {
  3487. if (ucfg_ipa_get_pld_enable()) {
  3488. wlan_cfg_ctx->ipa_enabled =
  3489. (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) &
  3490. WLAN_CFG_IPA_ENABLE_MASK);
  3491. dp_info("is IPA enabled from ini: %d",
  3492. wlan_cfg_ctx->ipa_enabled);
  3493. } else {
  3494. wlan_cfg_ctx->ipa_enabled = false;
  3495. dp_info("IPA disabled from platform driver");
  3496. }
  3497. wlan_cfg_ctx->ipa_tx_ring_size =
  3498. cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE);
  3499. wlan_cfg_ctx->ipa_tx_comp_ring_size =
  3500. cfg_get(psoc, CFG_DP_IPA_TX_COMP_RING_SIZE);
  3501. }
  3502. #endif /* IPA_WDI3_TX_TWO_PIPES */
  3503. #else /* !IPA_OFFLOAD */
  3504. static inline void
  3505. wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3506. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3507. {
  3508. }
  3509. #endif
  3510. #ifdef DP_HW_COOKIE_CONVERT_EXCEPTION
  3511. static void
  3512. wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3513. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3514. {
  3515. wlan_cfg_ctx->hw_cc_enabled =
  3516. cfg_get(psoc, CFG_DP_HW_CC_ENABLE);
  3517. }
  3518. #else
  3519. static void
  3520. wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3521. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3522. {
  3523. wlan_cfg_ctx->hw_cc_enabled = true;
  3524. }
  3525. #endif
  3526. #ifdef WLAN_SUPPORT_PPEDS
  3527. /**
  3528. * wlan_soc_ppe_cfg_attach() - Update ppe config in dp soc
  3529. * cfg context
  3530. * @psoc: Object manager psoc
  3531. * @wlan_cfg_ctx: dp soc cfg ctx
  3532. *
  3533. * Return: None
  3534. */
  3535. static void
  3536. wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3537. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3538. {
  3539. uint32_t ppeds_cfg;
  3540. uint8_t psoc_id;
  3541. /*
  3542. * The CFG_DP_PPEDS_WIFI_SOC_CFG provides WLAN SoC level PPEDS
  3543. * enable/disable support. The bit map position corresponds to
  3544. * WLAN SoC position in config/wireless file. With this we can
  3545. * configure PPEDS for multiple WLAN SoC having same device ID.
  3546. */
  3547. psoc_id = wlan_psoc_get_id((struct wlan_objmgr_psoc *)psoc);
  3548. ppeds_cfg = cfg_get(psoc, CFG_DP_PPEDS_WIFI_SOC_CFG);
  3549. if (!(ppeds_cfg & (1 << psoc_id))) {
  3550. dp_info("ppeds_cfg is disabled for psoc_id %d", psoc_id);
  3551. return;
  3552. }
  3553. /*
  3554. * The CFG_DP_PPEDS_ENABLE provides ppeds enable/disable support
  3555. * based on device ID in corresponding INI file.
  3556. */
  3557. wlan_cfg_ctx->ppeds_enable = cfg_get(psoc, CFG_DP_PPEDS_ENABLE);
  3558. if (!wlan_cfg_ctx->ppeds_enable)
  3559. return;
  3560. wlan_cfg_ctx->reo2ppe_ring = cfg_get(psoc, CFG_DP_REO2PPE_RING);
  3561. wlan_cfg_ctx->ppe2tcl_ring = cfg_get(psoc, CFG_DP_PPE2TCL_RING);
  3562. wlan_cfg_ctx->ppeds_num_tx_desc = cfg_get(psoc, CFG_DP_PPEDS_TX_DESC);
  3563. wlan_cfg_ctx->ppeds_tx_desc_hotlist_len =
  3564. cfg_get(psoc, CFG_DP_PPEDS_TX_DESC_HOTLIST_LEN);
  3565. wlan_cfg_ctx->ppeds_tx_comp_napi_budget =
  3566. cfg_get(psoc, CFG_DP_PPEDS_TX_CMP_NAPI_BUDGET);
  3567. }
  3568. #else
  3569. static inline void
  3570. wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3571. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3572. {
  3573. }
  3574. #endif
  3575. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  3576. /**
  3577. * wlan_cfg_get_lsb_set_pos() - returns position of LSB which is set
  3578. * @val: value to test
  3579. *
  3580. * Return: position of LSB which is set
  3581. */
  3582. static uint8_t wlan_cfg_get_lsb_set_pos(uint8_t val)
  3583. {
  3584. uint8_t pos = 0;
  3585. while (pos < 8) {
  3586. if (val & (1 << pos))
  3587. return pos;
  3588. pos++;
  3589. }
  3590. return 0;
  3591. }
  3592. /**
  3593. * wlan_multi_soc_mlo_cfg_attach() - Update multi soc mlo config in dp soc
  3594. * cfg context
  3595. * @psoc: Object manager psoc
  3596. * @wlan_cfg_ctx: dp soc cfg ctx
  3597. *
  3598. * Return: None
  3599. */
  3600. static void
  3601. wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3602. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3603. {
  3604. uint8_t rx_ring_map;
  3605. rx_ring_map =
  3606. cfg_get(psoc, CFG_DP_MLO_RX_RING_MAP);
  3607. wlan_cfg_ctx->mlo_chip_rx_ring_map = rx_ring_map;
  3608. }
  3609. #else
  3610. static inline void
  3611. wlan_multi_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3612. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3613. {
  3614. }
  3615. #endif
  3616. #ifdef WLAN_FEATURE_11BE_MLO
  3617. /**
  3618. * wlan_soc_mlo_cfg_attach() - Update mlo config in dp soc
  3619. * cfg context
  3620. * @psoc: Object manager psoc
  3621. * @wlan_cfg_ctx: dp soc cfg ctx
  3622. *
  3623. * Return: None
  3624. */
  3625. static void
  3626. wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3627. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3628. {
  3629. wlan_multi_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  3630. }
  3631. #else
  3632. static inline void
  3633. wlan_soc_mlo_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3634. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3635. {
  3636. }
  3637. #endif
  3638. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  3639. /**
  3640. * wlan_soc_vdev_hw_stats_cfg_attach() - Update hw vdev stats config in dp soc
  3641. * cfg context
  3642. * @psoc: Object manager psoc
  3643. * @wlan_cfg_ctx: dp soc cfg ctx
  3644. *
  3645. * Return: None
  3646. */
  3647. static void
  3648. wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3649. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3650. {
  3651. wlan_cfg_ctx->vdev_stats_hw_offload_config = cfg_get(psoc,
  3652. CFG_DP_VDEV_STATS_HW_OFFLOAD_CONFIG);
  3653. wlan_cfg_ctx->vdev_stats_hw_offload_timer = cfg_get(psoc,
  3654. CFG_DP_VDEV_STATS_HW_OFFLOAD_TIMER);
  3655. }
  3656. #else
  3657. static void
  3658. wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3659. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3660. {
  3661. }
  3662. #endif
  3663. #ifdef WLAN_TX_PKT_CAPTURE_ENH
  3664. static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3665. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3666. {
  3667. wlan_cfg_ctx->tx_capt_max_mem_allowed =
  3668. cfg_get(psoc, CFG_DP_TX_CAPT_MAX_MEM_MB) * 1024 * 1024;
  3669. }
  3670. #else
  3671. static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3672. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3673. {
  3674. }
  3675. #endif
  3676. #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
  3677. static void
  3678. wlan_soc_local_pkt_capture_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3679. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3680. {
  3681. wlan_cfg_ctx->local_pkt_capture =
  3682. cfg_get(psoc, CFG_DP_LOCAL_PKT_CAPTURE);
  3683. }
  3684. #else
  3685. static void
  3686. wlan_soc_local_pkt_capture_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3687. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3688. {
  3689. }
  3690. #endif
  3691. void
  3692. wlan_cfg_soc_update_tgt_params(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3693. struct cdp_ctrl_objmgr_psoc *psoc)
  3694. {
  3695. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc,
  3696. CFG_DP_REO_RINGS_MAP);
  3697. }
  3698. #ifdef CONFIG_SAWF_STATS
  3699. /**
  3700. * wlan_soc_sawf_stats_cfg_attach() - Update sawf stats config in dp soc
  3701. * cfg context
  3702. * @psoc: Object manager psoc
  3703. * @wlan_cfg_ctx: dp soc cfg ctx
  3704. *
  3705. * Return: None
  3706. */
  3707. static void
  3708. wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3709. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3710. {
  3711. wlan_cfg_ctx->sawf_stats = cfg_get(psoc, CFG_DP_SAWF_STATS);
  3712. }
  3713. uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3714. {
  3715. return cfg->sawf_stats;
  3716. }
  3717. void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3718. uint8_t val)
  3719. {
  3720. cfg->sawf_stats = val;
  3721. }
  3722. #else
  3723. static void
  3724. wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3725. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3726. {
  3727. }
  3728. uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3729. {
  3730. return 0;
  3731. }
  3732. void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3733. uint8_t val)
  3734. {
  3735. }
  3736. #endif /* CONFIG_SAWF_STATS */
  3737. #ifdef DP_TX_PACKET_INSPECT_FOR_ILP
  3738. /**
  3739. * wlan_soc_tx_packet_inspect_attach() - Update TX packet inspection config
  3740. * @psoc: object manager psoc
  3741. * @wlan_cfg_ctx: dp soc cfg ctx
  3742. *
  3743. * Return: None
  3744. */
  3745. static void
  3746. wlan_soc_tx_packet_inspect_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3747. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3748. {
  3749. wlan_cfg_ctx->tx_pkt_inspect_for_ilp =
  3750. cfg_get(psoc, CFG_TX_PKT_INSPECT_FOR_ILP);
  3751. }
  3752. #else
  3753. static void
  3754. wlan_soc_tx_packet_inspect_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3755. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3756. {
  3757. }
  3758. #endif
  3759. #ifdef WLAN_SOFTUMAC_SUPPORT
  3760. struct wlan_cfg_dp_soc_ctxt *
  3761. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  3762. {
  3763. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
  3764. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
  3765. uint32_t gro_bit_set;
  3766. if (!wlan_cfg_ctx)
  3767. return NULL;
  3768. wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
  3769. wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS;
  3770. wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
  3771. wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
  3772. wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
  3773. wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
  3774. wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
  3775. CFG_DP_TX_EXT_DESC_POOLS);
  3776. wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
  3777. wlan_cfg_ctx->num_tx_spl_desc = cfg_get(psoc, CFG_DP_TX_SPL_DESC);
  3778. wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
  3779. wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
  3780. wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
  3781. wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
  3782. wlan_cfg_ctx->int_batch_threshold_tx =
  3783. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
  3784. wlan_cfg_ctx->int_timer_threshold_tx =
  3785. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX);
  3786. wlan_cfg_ctx->int_batch_threshold_rx =
  3787. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX);
  3788. wlan_cfg_ctx->int_timer_threshold_rx =
  3789. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX);
  3790. wlan_cfg_ctx->int_batch_threshold_other =
  3791. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
  3792. wlan_cfg_ctx->int_timer_threshold_other =
  3793. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
  3794. wlan_cfg_ctx->pktlog_buffer_size =
  3795. cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
  3796. /*
  3797. * This is default mapping and can be overridden by
  3798. * HW config received from FW.
  3799. */
  3800. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0);
  3801. if (MAX_PDEV_CNT > 1)
  3802. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2);
  3803. if (MAX_PDEV_CNT > 2)
  3804. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1);
  3805. wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
  3806. wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
  3807. wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
  3808. wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
  3809. wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
  3810. gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
  3811. if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
  3812. wlan_cfg_ctx->gro_enabled = true;
  3813. if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO)
  3814. wlan_cfg_ctx->tc_based_dynamic_gro = true;
  3815. }
  3816. wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO);
  3817. wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
  3818. wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
  3819. wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
  3820. wlan_cfg_ctx->peer_flow_ctrl_enabled =
  3821. cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
  3822. wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
  3823. wlan_cfg_ctx->p2p_tcp_udp_checksumoffload =
  3824. cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD);
  3825. wlan_cfg_ctx->nan_tcp_udp_checksumoffload =
  3826. cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD);
  3827. wlan_cfg_ctx->tcp_udp_checksumoffload =
  3828. cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
  3829. wlan_cfg_ctx->legacy_mode_checksumoffload_disable =
  3830. cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE);
  3831. wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING);
  3832. wlan_cfg_ctx->defrag_timeout_check =
  3833. cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK);
  3834. wlan_cfg_ctx->rx_defrag_min_timeout =
  3835. cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT);
  3836. wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc,
  3837. CFG_DP_RXDMA_REFILL_RING);
  3838. wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc,
  3839. CFG_DP_TX_DESC_LIMIT_0);
  3840. wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc,
  3841. CFG_DP_TX_DESC_LIMIT_1);
  3842. wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc,
  3843. CFG_DP_TX_DESC_LIMIT_2);
  3844. wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
  3845. CFG_DP_TX_DEVICE_LIMIT);
  3846. wlan_cfg_ctx->tx_spl_device_limit = cfg_get(psoc,
  3847. CFG_DP_TX_SPL_DEVICE_LIMIT);
  3848. wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
  3849. CFG_DP_TX_SW_INTERNODE_QUEUE);
  3850. wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
  3851. CFG_DP_RXDMA_ERR_DST_RING);
  3852. wlan_cfg_ctx->enable_data_stall_detection =
  3853. cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
  3854. wlan_cfg_ctx->tx_flow_start_queue_offset =
  3855. cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET);
  3856. wlan_cfg_ctx->tx_flow_stop_queue_threshold =
  3857. cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH);
  3858. wlan_cfg_ctx->disable_intra_bss_fwd =
  3859. cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
  3860. wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
  3861. CFG_DP_RX_SW_DESC_WEIGHT);
  3862. wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
  3863. CFG_DP_RX_SW_DESC_NUM);
  3864. wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
  3865. wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
  3866. wlan_cfg_ctx->is_rx_flow_tag_enabled =
  3867. cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE);
  3868. wlan_cfg_ctx->is_rx_flow_search_table_per_pdev =
  3869. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV);
  3870. wlan_cfg_ctx->rx_flow_search_table_size =
  3871. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE);
  3872. wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled =
  3873. cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE);
  3874. wlan_cfg_ctx->mon_drop_thresh =
  3875. cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD);
  3876. wlan_cfg_ctx->is_rx_fisa_enabled = cfg_get(psoc, CFG_DP_RX_FISA_ENABLE);
  3877. wlan_cfg_ctx->is_rx_fisa_lru_del_enabled =
  3878. cfg_get(psoc, CFG_DP_RX_FISA_LRU_DEL_ENABLE);
  3879. /* TODO: add INI item for RX RINGS MAPPING in RHINE */
  3880. wlan_cfg_ctx->rx_rings_mapping = 0x7;
  3881. wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
  3882. wlan_cfg_ctx->is_rx_buff_pool_enabled =
  3883. cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
  3884. wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
  3885. cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
  3886. wlan_cfg_ctx->rx_pending_high_threshold =
  3887. cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
  3888. wlan_cfg_ctx->rx_pending_low_threshold =
  3889. cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
  3890. wlan_cfg_ctx->is_poll_mode_enabled =
  3891. cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
  3892. wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
  3893. wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
  3894. wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
  3895. cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
  3896. wlan_cfg_ctx->wow_check_rx_pending_enable =
  3897. cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
  3898. wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
  3899. CFG_DP_DELAY_MON_REPLENISH);
  3900. wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
  3901. CFG_DP_RXDMA_MONITOR_BUF_RING);
  3902. wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
  3903. CFG_DP_TX_MONITOR_BUF_RING);
  3904. wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
  3905. wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
  3906. wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
  3907. wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  3908. wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx);
  3909. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  3910. wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
  3911. PKT_CAPTURE_MODE_DATA_ONLY;
  3912. #endif
  3913. wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
  3914. wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
  3915. NUM_RXDMA_RINGS_PER_PDEV;
  3916. wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
  3917. wlan_cfg_ctx->mpdu_retry_threshold_1 =
  3918. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
  3919. wlan_cfg_ctx->mpdu_retry_threshold_2 =
  3920. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
  3921. wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
  3922. CFG_DP_NAPI_SCALE_FACTOR);
  3923. wlan_soc_sawf_stats_cfg_attach(psoc, wlan_cfg_ctx);
  3924. wlan_cfg_ctx->txmon_sw_peer_filtering =
  3925. cfg_get(psoc, CFG_DP_TXMON_SW_PEER_FILTERING);
  3926. wlan_soc_tx_packet_inspect_attach(psoc, wlan_cfg_ctx);
  3927. return wlan_cfg_ctx;
  3928. }
  3929. #else
  3930. struct wlan_cfg_dp_soc_ctxt *
  3931. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  3932. {
  3933. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
  3934. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
  3935. uint32_t gro_bit_set;
  3936. if (!wlan_cfg_ctx)
  3937. return NULL;
  3938. wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
  3939. wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS;
  3940. wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
  3941. wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
  3942. wlan_cfg_ctx->per_pdev_tx_ring = cfg_get(psoc, CFG_DP_PDEV_TX_RING);
  3943. wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS);
  3944. wlan_cfg_ctx->num_tcl_data_rings = cfg_get(psoc, CFG_DP_TCL_DATA_RINGS);
  3945. wlan_cfg_ctx->num_tx_comp_rings = cfg_get(psoc, CFG_DP_TX_COMP_RINGS);
  3946. wlan_cfg_ctx->num_nss_reo_dest_rings =
  3947. cfg_get(psoc, CFG_DP_NSS_REO_DEST_RINGS);
  3948. wlan_cfg_ctx->num_nss_tcl_data_rings =
  3949. cfg_get(psoc, CFG_DP_NSS_TCL_DATA_RINGS);
  3950. wlan_cfg_ctx->per_pdev_rx_ring = cfg_get(psoc, CFG_DP_PDEV_RX_RING);
  3951. wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
  3952. wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
  3953. wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
  3954. CFG_DP_TX_EXT_DESC_POOLS);
  3955. wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
  3956. wlan_cfg_ctx->num_tx_spl_desc = cfg_get(psoc, CFG_DP_TX_SPL_DESC);
  3957. wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
  3958. wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
  3959. wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
  3960. wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
  3961. wlan_cfg_ctx->tx_ring_size = cfg_get(psoc, CFG_DP_TX_RING_SIZE);
  3962. wlan_cfg_ctx->time_control_bp = cfg_get(psoc, CFG_DP_TIME_CONTROL_BP);
  3963. wlan_cfg_ctx->tx_comp_ring_size = cfg_get(psoc,
  3964. CFG_DP_TX_COMPL_RING_SIZE);
  3965. wlan_cfg_ctx->tx_comp_ring_size_nss =
  3966. cfg_get(psoc, CFG_DP_NSS_COMP_RING_SIZE);
  3967. wlan_cfg_ctx->int_batch_threshold_tx =
  3968. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
  3969. wlan_cfg_ctx->int_timer_threshold_tx =
  3970. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX);
  3971. wlan_cfg_ctx->int_batch_threshold_rx =
  3972. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX);
  3973. wlan_cfg_ctx->int_timer_threshold_rx =
  3974. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX);
  3975. wlan_cfg_ctx->int_batch_threshold_other =
  3976. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
  3977. wlan_cfg_ctx->int_timer_threshold_other =
  3978. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
  3979. wlan_cfg_ctx->int_batch_threshold_ppe2tcl =
  3980. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_PPE2TCL);
  3981. wlan_cfg_ctx->int_timer_threshold_ppe2tcl =
  3982. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_PPE2TCL);
  3983. wlan_cfg_ctx->pktlog_buffer_size =
  3984. cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
  3985. /* This is default mapping and can be overridden by HW config
  3986. * received from FW */
  3987. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0);
  3988. if (MAX_PDEV_CNT > 1)
  3989. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2);
  3990. if (MAX_PDEV_CNT > 2)
  3991. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1);
  3992. wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
  3993. wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
  3994. wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
  3995. wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
  3996. wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
  3997. gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
  3998. if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
  3999. wlan_cfg_ctx->gro_enabled = true;
  4000. if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO)
  4001. wlan_cfg_ctx->tc_based_dynamic_gro = true;
  4002. }
  4003. wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO);
  4004. wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
  4005. wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
  4006. wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
  4007. wlan_cfg_ctx->peer_flow_ctrl_enabled =
  4008. cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
  4009. wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
  4010. wlan_cfg_ctx->p2p_tcp_udp_checksumoffload =
  4011. cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD);
  4012. wlan_cfg_ctx->nan_tcp_udp_checksumoffload =
  4013. cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD);
  4014. wlan_cfg_ctx->tcp_udp_checksumoffload =
  4015. cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
  4016. wlan_cfg_ctx->legacy_mode_checksumoffload_disable =
  4017. cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE);
  4018. wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING);
  4019. wlan_cfg_ctx->defrag_timeout_check =
  4020. cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK);
  4021. wlan_cfg_ctx->rx_defrag_min_timeout =
  4022. cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT);
  4023. wlan_cfg_ctx->wbm_release_ring = cfg_get(psoc,
  4024. CFG_DP_WBM_RELEASE_RING);
  4025. wlan_cfg_ctx->tcl_cmd_credit_ring = cfg_get(psoc,
  4026. CFG_DP_TCL_CMD_CREDIT_RING);
  4027. wlan_cfg_ctx->tcl_status_ring = cfg_get(psoc,
  4028. CFG_DP_TCL_STATUS_RING);
  4029. wlan_cfg_ctx->reo_dst_ring_size = cfg_get(psoc,
  4030. CFG_DP_RX_DESTINATION_RING);
  4031. wlan_cfg_ctx->reo_reinject_ring = cfg_get(psoc,
  4032. CFG_DP_REO_REINJECT_RING);
  4033. wlan_cfg_ctx->rx_release_ring = cfg_get(psoc,
  4034. CFG_DP_RX_RELEASE_RING);
  4035. wlan_cfg_ctx->reo_exception_ring = cfg_get(psoc,
  4036. CFG_DP_REO_EXCEPTION_RING);
  4037. wlan_cfg_ctx->reo_cmd_ring = cfg_get(psoc,
  4038. CFG_DP_REO_CMD_RING);
  4039. wlan_cfg_ctx->reo_status_ring = cfg_get(psoc,
  4040. CFG_DP_REO_STATUS_RING);
  4041. wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc,
  4042. CFG_DP_RXDMA_REFILL_RING);
  4043. wlan_cfg_ctx->rxdma_refill_lt_disable =
  4044. cfg_get(psoc,
  4045. CFG_DP_RXDMA_REFILL_LT_DISABLE);
  4046. wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc,
  4047. CFG_DP_TX_DESC_LIMIT_0);
  4048. wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc,
  4049. CFG_DP_TX_DESC_LIMIT_1);
  4050. wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc,
  4051. CFG_DP_TX_DESC_LIMIT_2);
  4052. wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
  4053. CFG_DP_TX_DEVICE_LIMIT);
  4054. wlan_cfg_ctx->tx_spl_device_limit = cfg_get(psoc,
  4055. CFG_DP_TX_SPL_DEVICE_LIMIT);
  4056. wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
  4057. CFG_DP_TX_SW_INTERNODE_QUEUE);
  4058. wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
  4059. CFG_DP_RXDMA_ERR_DST_RING);
  4060. wlan_cfg_ctx->enable_data_stall_detection =
  4061. cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
  4062. wlan_cfg_ctx->tx_flow_start_queue_offset =
  4063. cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET);
  4064. wlan_cfg_ctx->tx_flow_stop_queue_threshold =
  4065. cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH);
  4066. wlan_cfg_ctx->disable_intra_bss_fwd =
  4067. cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
  4068. wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
  4069. CFG_DP_RX_SW_DESC_WEIGHT);
  4070. wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
  4071. CFG_DP_RX_SW_DESC_NUM);
  4072. wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
  4073. wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
  4074. wlan_cfg_ctx->is_rx_flow_tag_enabled =
  4075. cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE);
  4076. wlan_cfg_ctx->is_rx_flow_search_table_per_pdev =
  4077. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV);
  4078. wlan_cfg_ctx->rx_flow_search_table_size =
  4079. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE);
  4080. wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled =
  4081. cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE);
  4082. wlan_cfg_ctx->mon_drop_thresh =
  4083. cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD);
  4084. wlan_cfg_ctx->is_rx_fisa_enabled = cfg_get(psoc, CFG_DP_RX_FISA_ENABLE);
  4085. wlan_cfg_ctx->is_rx_fisa_lru_del_enabled =
  4086. cfg_get(psoc, CFG_DP_RX_FISA_LRU_DEL_ENABLE);
  4087. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc, CFG_DP_REO_RINGS_MAP);
  4088. wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
  4089. wlan_cfg_ctx->jitter_stats_enabled =
  4090. cfg_get(psoc, CFG_DP_PEER_JITTER_STATS);
  4091. wlan_cfg_ctx->peer_link_stats_enabled =
  4092. cfg_get(psoc, CFG_DP_PEER_LINK_STATS);
  4093. wlan_cfg_ctx->is_rx_buff_pool_enabled =
  4094. cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
  4095. wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
  4096. cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
  4097. wlan_cfg_ctx->rx_pending_high_threshold =
  4098. cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
  4099. wlan_cfg_ctx->rx_pending_low_threshold =
  4100. cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
  4101. wlan_cfg_ctx->is_poll_mode_enabled =
  4102. cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
  4103. wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
  4104. wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
  4105. wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
  4106. cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
  4107. wlan_cfg_ctx->radio0_rx_default_reo =
  4108. cfg_get(psoc, CFG_DP_RX_RADIO_0_DEFAULT_REO);
  4109. wlan_cfg_ctx->radio1_rx_default_reo =
  4110. cfg_get(psoc, CFG_DP_RX_RADIO_1_DEFAULT_REO);
  4111. wlan_cfg_ctx->radio2_rx_default_reo =
  4112. cfg_get(psoc, CFG_DP_RX_RADIO_2_DEFAULT_REO);
  4113. wlan_cfg_ctx->wow_check_rx_pending_enable =
  4114. cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
  4115. wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
  4116. CFG_DP_DELAY_MON_REPLENISH);
  4117. wlan_cfg_ctx->num_global_tx_desc = cfg_get(psoc,
  4118. CFG_DP_TX_DESC_GLOBAL_COUNT);
  4119. wlan_cfg_ctx->num_global_spcl_tx_desc = cfg_get(psoc,
  4120. CFG_DP_SPCL_TX_DESC_GLOBAL_COUNT);
  4121. wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
  4122. CFG_DP_RXDMA_MONITOR_BUF_RING);
  4123. wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
  4124. CFG_DP_TX_MONITOR_BUF_RING);
  4125. wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
  4126. wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
  4127. wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
  4128. wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  4129. wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4130. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  4131. wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
  4132. PKT_CAPTURE_MODE_DATA_ONLY;
  4133. #endif
  4134. wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
  4135. wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
  4136. NUM_RXDMA_RINGS_PER_PDEV;
  4137. wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
  4138. wlan_cfg_ctx->mpdu_retry_threshold_1 =
  4139. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
  4140. wlan_cfg_ctx->mpdu_retry_threshold_2 =
  4141. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
  4142. wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
  4143. CFG_DP_NAPI_SCALE_FACTOR);
  4144. wlan_soc_sawf_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4145. wlan_cfg_ctx->is_handle_invalid_decap_type_disabled =
  4146. cfg_get(psoc, CFG_DP_HANDLE_INVALID_DECAP_TYPE_DISABLE);
  4147. wlan_cfg_ctx->txmon_sw_peer_filtering =
  4148. cfg_get(psoc, CFG_DP_TXMON_SW_PEER_FILTERING);
  4149. wlan_cfg_ctx->pointer_timer_threshold_rx =
  4150. cfg_get(psoc, CFG_DP_POINTER_TIMER_THRESHOLD_RX);
  4151. wlan_cfg_ctx->pointer_num_threshold_rx =
  4152. cfg_get(psoc, CFG_DP_POINTER_NUM_THRESHOLD_RX);
  4153. wlan_soc_tx_packet_inspect_attach(psoc, wlan_cfg_ctx);
  4154. wlan_soc_local_pkt_capture_cfg_attach(psoc, wlan_cfg_ctx);
  4155. return wlan_cfg_ctx;
  4156. }
  4157. #endif
  4158. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  4159. {
  4160. qdf_mem_free(wlan_cfg_ctx);
  4161. }
  4162. struct wlan_cfg_dp_pdev_ctxt *
  4163. wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  4164. {
  4165. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx =
  4166. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt));
  4167. if (!wlan_cfg_ctx)
  4168. return NULL;
  4169. wlan_cfg_ctx->rx_dma_buf_ring_size = cfg_get(psoc,
  4170. CFG_DP_RXDMA_BUF_RING);
  4171. wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc,
  4172. CFG_DP_RXDMA_MONITOR_BUF_RING);
  4173. wlan_cfg_ctx->dma_rx_mon_dest_ring_size = cfg_get(psoc,
  4174. CFG_DP_RXDMA_MONITOR_DST_RING);
  4175. wlan_cfg_ctx->dma_tx_mon_dest_ring_size = cfg_get(psoc,
  4176. CFG_DP_TX_MONITOR_DST_RING);
  4177. wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc,
  4178. CFG_DP_RXDMA_MONITOR_STATUS_RING);
  4179. wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc,
  4180. CFG_DP_RXDMA_MONITOR_DESC_RING);
  4181. wlan_cfg_ctx->num_mac_rings = NUM_RXDMA_RINGS_PER_PDEV;
  4182. return wlan_cfg_ctx;
  4183. }
  4184. void wlan_cfg_set_mon_delayed_replenish_entries(
  4185. struct wlan_cfg_dp_soc_ctxt *cfg,
  4186. uint32_t val)
  4187. {
  4188. cfg->delayed_replenish_entries = val;
  4189. }
  4190. qdf_export_symbol(wlan_cfg_set_mon_delayed_replenish_entries);
  4191. int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt *cfg)
  4192. {
  4193. return cfg->delayed_replenish_entries;
  4194. }
  4195. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx)
  4196. {
  4197. if (wlan_cfg_ctx)
  4198. qdf_mem_free(wlan_cfg_ctx);
  4199. }
  4200. int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg)
  4201. {
  4202. return cfg->mon_drop_thresh;
  4203. }
  4204. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num)
  4205. {
  4206. cfg->num_int_ctxts = num;
  4207. }
  4208. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  4209. {
  4210. cfg->max_peer_id = val;
  4211. }
  4212. void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  4213. {
  4214. cfg->max_ast_idx = val;
  4215. }
  4216. int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4217. {
  4218. return cfg->max_ast_idx;
  4219. }
  4220. qdf_export_symbol(wlan_cfg_get_max_ast_idx);
  4221. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4222. int context, int mask)
  4223. {
  4224. cfg->int_tx_ring_mask[context] = mask;
  4225. }
  4226. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4227. int context, int mask)
  4228. {
  4229. cfg->int_rx_ring_mask[context] = mask;
  4230. }
  4231. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4232. int context, int mask)
  4233. {
  4234. cfg->int_rx_mon_ring_mask[context] = mask;
  4235. }
  4236. void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4237. int context, int mask)
  4238. {
  4239. cfg->int_tx_mon_ring_mask[context] = mask;
  4240. }
  4241. int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4242. int context)
  4243. {
  4244. return cfg->int_host2rxdma_mon_ring_mask[context];
  4245. }
  4246. void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4247. int context, int mask)
  4248. {
  4249. cfg->int_host2rxdma_mon_ring_mask[context] = mask;
  4250. }
  4251. int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4252. int context)
  4253. {
  4254. return cfg->int_rxdma2host_mon_ring_mask[context];
  4255. }
  4256. void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4257. int context, int mask)
  4258. {
  4259. cfg->int_rxdma2host_mon_ring_mask[context] = mask;
  4260. }
  4261. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4262. int context, int mask)
  4263. {
  4264. cfg->int_rxdma2host_ring_mask[context] = mask;
  4265. }
  4266. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4267. int context)
  4268. {
  4269. return cfg->int_rxdma2host_ring_mask[context];
  4270. }
  4271. void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4272. int context, int mask)
  4273. {
  4274. cfg->int_host2rxdma_ring_mask[context] = mask;
  4275. }
  4276. int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4277. int context)
  4278. {
  4279. return cfg->int_host2rxdma_ring_mask[context];
  4280. }
  4281. int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4282. int context)
  4283. {
  4284. return cfg->int_rx_ring_near_full_irq_1_mask[context];
  4285. }
  4286. int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4287. int context)
  4288. {
  4289. return cfg->int_rx_ring_near_full_irq_2_mask[context];
  4290. }
  4291. int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4292. int context)
  4293. {
  4294. return cfg->int_tx_ring_near_full_irq_mask[context];
  4295. }
  4296. void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  4297. int hw_macid)
  4298. {
  4299. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  4300. cfg->hw_macid[pdev_idx] = hw_macid;
  4301. }
  4302. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx)
  4303. {
  4304. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  4305. return cfg->hw_macid[pdev_idx];
  4306. }
  4307. qdf_export_symbol(wlan_cfg_get_hw_mac_idx);
  4308. int wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  4309. int hw_macid)
  4310. {
  4311. int idx;
  4312. for (idx = 0; idx < MAX_PDEV_CNT; idx++) {
  4313. if (cfg->hw_macid[idx] == hw_macid)
  4314. return (idx + 1);
  4315. }
  4316. qdf_assert_always(idx < MAX_PDEV_CNT);
  4317. return WLAN_INVALID_PDEV_ID;
  4318. }
  4319. void wlan_cfg_set_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  4320. int hw_macid)
  4321. {
  4322. qdf_assert_always((pdev_idx < MAX_PDEV_CNT) ||
  4323. (pdev_idx == INVALID_PDEV_ID));
  4324. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  4325. cfg->hw_macid_pdev_id_map[hw_macid] = pdev_idx;
  4326. }
  4327. int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid)
  4328. {
  4329. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  4330. return cfg->hw_macid_pdev_id_map[hw_macid];
  4331. }
  4332. qdf_export_symbol(wlan_cfg_get_pdev_idx);
  4333. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4334. int context, int mask)
  4335. {
  4336. cfg->int_ce_ring_mask[context] = mask;
  4337. }
  4338. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  4339. int mask)
  4340. {
  4341. cfg->int_rx_ring_mask[context] = mask;
  4342. }
  4343. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4344. int context, int mask)
  4345. {
  4346. return cfg->int_rx_err_ring_mask[context] = mask;
  4347. }
  4348. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4349. int context, int mask)
  4350. {
  4351. return cfg->int_rx_wbm_rel_ring_mask[context] = mask;
  4352. }
  4353. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4354. int context, int mask)
  4355. {
  4356. return cfg->int_reo_status_ring_mask[context] = mask;
  4357. }
  4358. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg)
  4359. {
  4360. return cfg->num_int_ctxts;
  4361. }
  4362. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4363. {
  4364. return cfg->int_tx_ring_mask[context];
  4365. }
  4366. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4367. {
  4368. return cfg->int_rx_ring_mask[context];
  4369. }
  4370. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4371. int context)
  4372. {
  4373. return cfg->int_rx_err_ring_mask[context];
  4374. }
  4375. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4376. int context)
  4377. {
  4378. return cfg->int_rx_wbm_rel_ring_mask[context];
  4379. }
  4380. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4381. int context)
  4382. {
  4383. return cfg->int_reo_status_ring_mask[context];
  4384. }
  4385. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4386. {
  4387. return cfg->int_rx_mon_ring_mask[context];
  4388. }
  4389. #ifdef CONFIG_BERYLLIUM
  4390. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4391. {
  4392. return cfg->int_tx_mon_ring_mask[context];
  4393. }
  4394. #else
  4395. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4396. {
  4397. return 0;
  4398. }
  4399. #endif
  4400. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4401. {
  4402. return cfg->int_ce_ring_mask[context];
  4403. }
  4404. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *cfg)
  4405. {
  4406. return cfg->max_clients;
  4407. }
  4408. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4409. {
  4410. return cfg->max_alloc_size;
  4411. }
  4412. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  4413. {
  4414. return cfg->per_pdev_tx_ring;
  4415. }
  4416. int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4417. int context)
  4418. {
  4419. return cfg->int_umac_reset_intr_mask[context];
  4420. }
  4421. uint32_t
  4422. wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  4423. {
  4424. return cfg->rx_pending_high_threshold;
  4425. }
  4426. uint32_t
  4427. wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  4428. {
  4429. return cfg->rx_pending_low_threshold;
  4430. }
  4431. int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  4432. {
  4433. return cfg->per_pdev_lmac_ring;
  4434. }
  4435. qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring);
  4436. #if defined(DP_USE_SINGLE_TCL) && !defined(TX_MULTI_TCL)
  4437. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4438. {
  4439. return 1;
  4440. }
  4441. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4442. {
  4443. return 1;
  4444. }
  4445. #else
  4446. #if defined(IPA_OFFLOAD) && defined(TX_MULTI_TCL)
  4447. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4448. {
  4449. if (!cfg->ipa_enabled)
  4450. return cfg->num_tcl_data_rings;
  4451. return 1;
  4452. }
  4453. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4454. {
  4455. if (!cfg->ipa_enabled)
  4456. return cfg->num_nss_tcl_data_rings;
  4457. return 1;
  4458. }
  4459. #else
  4460. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4461. {
  4462. return cfg->num_tcl_data_rings;
  4463. }
  4464. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4465. {
  4466. return cfg->num_nss_tcl_data_rings;
  4467. }
  4468. #endif
  4469. #endif
  4470. int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4471. {
  4472. return cfg->num_tx_comp_rings;
  4473. }
  4474. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4475. {
  4476. return cfg->tx_ring_size;
  4477. }
  4478. int wlan_cfg_time_control_bp(struct wlan_cfg_dp_soc_ctxt *cfg)
  4479. {
  4480. return cfg->time_control_bp;
  4481. }
  4482. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4483. {
  4484. return cfg->tx_comp_ring_size;
  4485. }
  4486. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  4487. {
  4488. return cfg->per_pdev_rx_ring;
  4489. }
  4490. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4491. {
  4492. return cfg->num_reo_dest_rings;
  4493. }
  4494. int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4495. {
  4496. return cfg->num_nss_reo_dest_rings;
  4497. }
  4498. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *cfg)
  4499. {
  4500. return cfg->htt_packet_type; /*htt_pkt_type_ethernet*/
  4501. }
  4502. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  4503. {
  4504. return cfg->num_tx_desc_pool;
  4505. }
  4506. void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  4507. {
  4508. cfg->num_tx_desc_pool = num_pool;
  4509. }
  4510. int wlan_cfg_get_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  4511. {
  4512. return cfg->num_tx_ext_desc_pool;
  4513. }
  4514. void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  4515. {
  4516. cfg->num_tx_ext_desc_pool = num_pool;
  4517. }
  4518. int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4519. {
  4520. return cfg->reo_dst_ring_size;
  4521. }
  4522. void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4523. int reo_dst_ring_size)
  4524. {
  4525. cfg->reo_dst_ring_size = reo_dst_ring_size;
  4526. }
  4527. void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
  4528. bool raw_mode_war)
  4529. {
  4530. cfg->raw_mode_war = raw_mode_war;
  4531. }
  4532. bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg)
  4533. {
  4534. return cfg->raw_mode_war;
  4535. }
  4536. int wlan_cfg_get_num_global_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4537. {
  4538. return cfg->num_global_tx_desc;
  4539. }
  4540. int wlan_cfg_get_num_global_spcl_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4541. {
  4542. return cfg->num_global_spcl_tx_desc;
  4543. }
  4544. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4545. {
  4546. return cfg->num_tx_desc;
  4547. }
  4548. int wlan_cfg_get_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4549. {
  4550. return cfg->num_tx_spl_desc;
  4551. }
  4552. void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc)
  4553. {
  4554. cfg->num_tx_desc = num_desc;
  4555. }
  4556. int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4557. {
  4558. return cfg->min_tx_desc;
  4559. }
  4560. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4561. {
  4562. return cfg->num_tx_ext_desc;
  4563. }
  4564. void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc)
  4565. {
  4566. cfg->num_tx_ext_desc = num_ext_desc;
  4567. }
  4568. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  4569. {
  4570. /* TODO: This should be calculated based on target capabilities */
  4571. return cfg->max_peer_id;
  4572. }
  4573. int wlan_cfg_get_dma_mon_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4574. {
  4575. return cfg->dma_mon_buf_ring_size;
  4576. }
  4577. qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size);
  4578. int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4579. {
  4580. return cfg->dma_rx_mon_dest_ring_size;
  4581. }
  4582. qdf_export_symbol(wlan_cfg_get_dma_rx_mon_dest_ring_size);
  4583. int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4584. {
  4585. return cfg->dma_tx_mon_dest_ring_size;
  4586. }
  4587. qdf_export_symbol(wlan_cfg_get_dma_tx_mon_dest_ring_size);
  4588. int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4589. {
  4590. return cfg->dma_mon_status_ring_size;
  4591. }
  4592. qdf_export_symbol(wlan_cfg_get_dma_mon_stat_ring_size);
  4593. int
  4594. wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4595. {
  4596. return cfg->rxdma_monitor_desc_ring;
  4597. }
  4598. qdf_export_symbol(wlan_cfg_get_dma_mon_desc_ring_size);
  4599. int wlan_cfg_get_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4600. {
  4601. return cfg->rx_dma_buf_ring_size;
  4602. }
  4603. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4604. {
  4605. return cfg->num_mac_rings;
  4606. }
  4607. qdf_export_symbol(wlan_cfg_get_num_mac_rings);
  4608. bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4609. {
  4610. return cfg->gro_enabled;
  4611. }
  4612. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4613. {
  4614. return cfg->lro_enabled;
  4615. }
  4616. bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4617. {
  4618. return cfg->ipa_enabled;
  4619. }
  4620. void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  4621. {
  4622. cfg->rx_hash = val;
  4623. }
  4624. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4625. {
  4626. return cfg->rx_hash;
  4627. }
  4628. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4629. {
  4630. return cfg->nss_enabled;
  4631. }
  4632. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled)
  4633. {
  4634. cfg->nss_enabled = nss_enabled;
  4635. }
  4636. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg)
  4637. {
  4638. return cfg->nss_cfg;
  4639. }
  4640. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg)
  4641. {
  4642. cfg->nss_cfg = nss_cfg;
  4643. if (cfg->nss_cfg)
  4644. cfg->tx_comp_ring_size = cfg->tx_comp_ring_size_nss;
  4645. }
  4646. int wlan_cfg_get_int_batch_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg)
  4647. {
  4648. return cfg->int_batch_threshold_ppe2tcl;
  4649. }
  4650. int wlan_cfg_get_int_timer_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg)
  4651. {
  4652. return cfg->int_timer_threshold_ppe2tcl;
  4653. }
  4654. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4655. {
  4656. return cfg->int_batch_threshold_tx;
  4657. }
  4658. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4659. {
  4660. return cfg->int_timer_threshold_tx;
  4661. }
  4662. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4663. {
  4664. return cfg->int_batch_threshold_rx;
  4665. }
  4666. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4667. {
  4668. return cfg->int_timer_threshold_rx;
  4669. }
  4670. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  4671. {
  4672. return cfg->int_batch_threshold_other;
  4673. }
  4674. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  4675. {
  4676. return cfg->int_timer_threshold_other;
  4677. }
  4678. int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg)
  4679. {
  4680. return cfg->int_timer_threshold_mon;
  4681. }
  4682. int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  4683. {
  4684. return cfg->p2p_tcp_udp_checksumoffload;
  4685. }
  4686. int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  4687. {
  4688. return cfg->nan_tcp_udp_checksumoffload;
  4689. }
  4690. int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  4691. {
  4692. return cfg->tcp_udp_checksumoffload;
  4693. }
  4694. int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg)
  4695. {
  4696. return cfg->rx_defrag_min_timeout;
  4697. }
  4698. int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg)
  4699. {
  4700. return cfg->defrag_timeout_check;
  4701. }
  4702. int
  4703. wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4704. {
  4705. return cfg->wbm_release_ring;
  4706. }
  4707. int
  4708. wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4709. {
  4710. return cfg->tcl_cmd_credit_ring;
  4711. }
  4712. int
  4713. wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4714. {
  4715. return cfg->tcl_status_ring;
  4716. }
  4717. int
  4718. wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4719. {
  4720. return cfg->reo_reinject_ring;
  4721. }
  4722. int
  4723. wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4724. {
  4725. return cfg->rx_release_ring;
  4726. }
  4727. int
  4728. wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4729. {
  4730. return cfg->reo_exception_ring;
  4731. }
  4732. int
  4733. wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4734. {
  4735. return cfg->reo_cmd_ring;
  4736. }
  4737. int
  4738. wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4739. {
  4740. return cfg->reo_status_ring;
  4741. }
  4742. int
  4743. wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4744. {
  4745. return cfg->rxdma_refill_ring;
  4746. }
  4747. bool
  4748. wlan_cfg_get_dp_soc_rxdma_refill_lt_disable(struct wlan_cfg_dp_soc_ctxt *cfg)
  4749. {
  4750. return cfg->rxdma_refill_lt_disable;
  4751. }
  4752. int
  4753. wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg)
  4754. {
  4755. return cfg->tx_desc_limit_0;
  4756. }
  4757. int
  4758. wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg)
  4759. {
  4760. return cfg->tx_desc_limit_1;
  4761. }
  4762. int
  4763. wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg)
  4764. {
  4765. return cfg->tx_desc_limit_2;
  4766. }
  4767. int
  4768. wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
  4769. {
  4770. return cfg->tx_device_limit;
  4771. }
  4772. int
  4773. wlan_cfg_get_dp_soc_tx_spl_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
  4774. {
  4775. return cfg->tx_spl_device_limit;
  4776. }
  4777. int
  4778. wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg)
  4779. {
  4780. return cfg->tx_sw_internode_queue;
  4781. }
  4782. int
  4783. wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4784. {
  4785. return cfg->rxdma_err_dst_ring;
  4786. }
  4787. int
  4788. wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg)
  4789. {
  4790. return cfg->rx_sw_desc_weight;
  4791. }
  4792. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_sw_desc_weight);
  4793. int
  4794. wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg)
  4795. {
  4796. return cfg->rx_sw_desc_num;
  4797. }
  4798. uint32_t
  4799. wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
  4800. {
  4801. return cfg->reo_rings_mapping;
  4802. }
  4803. uint32_t
  4804. wlan_cfg_get_rx_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
  4805. {
  4806. return cfg->rx_rings_mapping;
  4807. }
  4808. bool
  4809. wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
  4810. enum cdp_capabilities dp_caps)
  4811. {
  4812. switch (dp_caps) {
  4813. case CDP_CFG_DP_TSO:
  4814. return cfg->tso_enabled;
  4815. case CDP_CFG_DP_LRO:
  4816. return cfg->lro_enabled;
  4817. case CDP_CFG_DP_SG:
  4818. return cfg->sg_enabled;
  4819. case CDP_CFG_DP_GRO:
  4820. return cfg->gro_enabled;
  4821. case CDP_CFG_DP_OL_TX_CSUM:
  4822. return cfg->ol_tx_csum_enabled;
  4823. case CDP_CFG_DP_OL_RX_CSUM:
  4824. return cfg->ol_rx_csum_enabled;
  4825. case CDP_CFG_DP_RAWMODE:
  4826. return cfg->rawmode_enabled;
  4827. case CDP_CFG_DP_PEER_FLOW_CTRL:
  4828. return cfg->peer_flow_ctrl_enabled;
  4829. case CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT:
  4830. return cfg->notify_frame_support;
  4831. default:
  4832. return false;
  4833. }
  4834. }
  4835. void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
  4836. bool val)
  4837. {
  4838. cfg->is_tso_desc_attach_defer = val;
  4839. }
  4840. bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg)
  4841. {
  4842. return cfg->is_tso_desc_attach_defer;
  4843. }
  4844. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  4845. /**
  4846. * wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold
  4847. * @cfg: config context
  4848. *
  4849. * Return: stop threshold
  4850. */
  4851. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg)
  4852. {
  4853. return cfg->tx_flow_stop_queue_threshold;
  4854. }
  4855. /**
  4856. * wlan_cfg_get_tx_flow_start_queue_offset() - Get flow control start offset
  4857. * for TX to resume
  4858. * @cfg: config context
  4859. *
  4860. * Return: stop threshold
  4861. */
  4862. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg)
  4863. {
  4864. return cfg->tx_flow_start_queue_offset;
  4865. }
  4866. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  4867. void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  4868. bool val)
  4869. {
  4870. cfg->is_rx_flow_tag_enabled = val;
  4871. }
  4872. uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg)
  4873. {
  4874. return cfg->rx_toeplitz_hash_key;
  4875. }
  4876. uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg)
  4877. {
  4878. return cfg->rx_flow_max_search;
  4879. }
  4880. bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4881. {
  4882. return cfg->is_rx_flow_tag_enabled;
  4883. }
  4884. qdf_export_symbol(wlan_cfg_is_rx_flow_tag_enabled);
  4885. #ifdef WLAN_SUPPORT_RX_FISA
  4886. bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4887. {
  4888. return (bool)(cfg->is_rx_fisa_enabled);
  4889. }
  4890. bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4891. {
  4892. return cfg->is_rx_fisa_lru_del_enabled;
  4893. }
  4894. #else
  4895. bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4896. {
  4897. return false;
  4898. }
  4899. bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4900. {
  4901. return false;
  4902. }
  4903. #endif
  4904. bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4905. {
  4906. return (bool)(cfg->is_poll_mode_enabled);
  4907. }
  4908. void
  4909. wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
  4910. bool val)
  4911. {
  4912. cfg->is_rx_flow_search_table_per_pdev = val;
  4913. }
  4914. bool wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg)
  4915. {
  4916. return cfg->is_rx_flow_search_table_per_pdev;
  4917. }
  4918. void wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4919. uint16_t val)
  4920. {
  4921. cfg->rx_flow_search_table_size = val;
  4922. }
  4923. uint16_t
  4924. wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4925. {
  4926. return cfg->rx_flow_search_table_size;
  4927. }
  4928. void
  4929. wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  4930. bool val)
  4931. {
  4932. cfg->is_rx_mon_protocol_flow_tag_enabled = val;
  4933. }
  4934. bool
  4935. wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4936. {
  4937. return cfg->is_rx_mon_protocol_flow_tag_enabled;
  4938. }
  4939. qdf_export_symbol(wlan_cfg_is_rx_mon_protocol_flow_tag_enabled);
  4940. void
  4941. wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
  4942. bool val)
  4943. {
  4944. cfg->tx_per_pkt_vdev_id_check = val;
  4945. }
  4946. bool
  4947. wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4948. {
  4949. return cfg->tx_per_pkt_vdev_id_check;
  4950. }
  4951. void
  4952. wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  4953. bool val)
  4954. {
  4955. cfg->pext_stats_enabled = val;
  4956. }
  4957. void
  4958. wlan_cfg_set_peer_jitter_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  4959. bool val)
  4960. {
  4961. cfg->jitter_stats_enabled = val;
  4962. }
  4963. bool
  4964. wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4965. {
  4966. return cfg->pext_stats_enabled;
  4967. }
  4968. bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4969. {
  4970. return cfg->fst_in_cmem;
  4971. }
  4972. bool wlan_cfg_is_peer_jitter_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4973. {
  4974. return cfg->jitter_stats_enabled;
  4975. }
  4976. void
  4977. wlan_cfg_set_peer_link_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  4978. bool val)
  4979. {
  4980. cfg->peer_link_stats_enabled = val;
  4981. }
  4982. qdf_export_symbol(wlan_cfg_set_peer_link_stats);
  4983. bool wlan_cfg_is_peer_link_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4984. {
  4985. return cfg->peer_link_stats_enabled;
  4986. }
  4987. qdf_export_symbol(wlan_cfg_is_peer_link_stats_enabled);
  4988. #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
  4989. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4990. {
  4991. return cfg->is_rx_buff_pool_enabled;
  4992. }
  4993. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4994. {
  4995. return cfg->is_rx_refill_buff_pool_enabled;
  4996. }
  4997. #else
  4998. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4999. {
  5000. return false;
  5001. }
  5002. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(
  5003. struct wlan_cfg_dp_soc_ctxt *cfg)
  5004. {
  5005. return false;
  5006. }
  5007. #endif /* WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL */
  5008. #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
  5009. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5010. {
  5011. return (bool)(cfg->is_swlm_enabled);
  5012. }
  5013. #else
  5014. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5015. {
  5016. return false;
  5017. }
  5018. #endif
  5019. uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5020. {
  5021. return cfg->radio0_rx_default_reo;
  5022. }
  5023. uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5024. {
  5025. return cfg->radio1_rx_default_reo;
  5026. }
  5027. uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5028. {
  5029. return cfg->radio2_rx_default_reo;
  5030. }
  5031. void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5032. {
  5033. cfg->rxdma1_enable = true;
  5034. }
  5035. void
  5036. wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg,
  5037. bool val)
  5038. {
  5039. cfg->delay_mon_replenish = val;
  5040. }
  5041. bool
  5042. wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg)
  5043. {
  5044. return cfg->delay_mon_replenish;
  5045. }
  5046. qdf_export_symbol(wlan_cfg_is_delay_mon_replenish);
  5047. #ifdef WLAN_SOFTUMAC_SUPPORT
  5048. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
  5049. {
  5050. dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,",
  5051. cfg->delay_mon_replenish);
  5052. }
  5053. #else
  5054. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
  5055. {
  5056. dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,",
  5057. cfg->delay_mon_replenish);
  5058. dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d",
  5059. cfg->reo_dst_ring_size, cfg->delayed_replenish_entries);
  5060. }
  5061. #endif
  5062. #ifdef IPA_OFFLOAD
  5063. uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5064. {
  5065. return cfg->ipa_tx_ring_size;
  5066. }
  5067. uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5068. {
  5069. return cfg->ipa_tx_comp_ring_size;
  5070. }
  5071. #ifdef IPA_WDI3_TX_TWO_PIPES
  5072. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5073. {
  5074. return cfg->ipa_tx_alt_ring_size;
  5075. }
  5076. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5077. {
  5078. return cfg->ipa_tx_alt_comp_ring_size;
  5079. }
  5080. #else
  5081. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5082. {
  5083. return cfg->ipa_tx_ring_size;
  5084. }
  5085. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5086. {
  5087. return cfg->ipa_tx_comp_ring_size;
  5088. }
  5089. #endif
  5090. #endif
  5091. #ifdef WLAN_SUPPORT_PPEDS
  5092. bool
  5093. wlan_cfg_get_dp_soc_ppeds_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5094. {
  5095. return cfg->ppeds_enable;
  5096. }
  5097. int
  5098. wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5099. {
  5100. return cfg->reo2ppe_ring;
  5101. }
  5102. int
  5103. wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5104. {
  5105. return cfg->ppe2tcl_ring;
  5106. }
  5107. int
  5108. wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  5109. {
  5110. return cfg->ppeds_num_tx_desc;
  5111. }
  5112. int
  5113. wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg)
  5114. {
  5115. return cfg->ppeds_tx_comp_napi_budget;
  5116. }
  5117. int
  5118. wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg)
  5119. {
  5120. return cfg->ppeds_tx_desc_hotlist_len;
  5121. }
  5122. #endif
  5123. void
  5124. wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
  5125. struct wlan_dp_prealloc_cfg *cfg)
  5126. {
  5127. if (!ctrl_psoc || !cfg)
  5128. return;
  5129. cfg->num_reo_dst_ring_entries = cfg_get(ctrl_psoc,
  5130. CFG_DP_RX_DESTINATION_RING);
  5131. cfg->num_tx_ring_entries = cfg_get(ctrl_psoc, CFG_DP_TX_RING_SIZE);
  5132. cfg->num_tx_comp_ring_entries = cfg_get(ctrl_psoc,
  5133. CFG_DP_TX_COMPL_RING_SIZE);
  5134. cfg->num_wbm_rel_ring_entries = cfg_get(ctrl_psoc,
  5135. CFG_DP_WBM_RELEASE_RING);
  5136. cfg->num_rxdma_err_dst_ring_entries = cfg_get(ctrl_psoc,
  5137. CFG_DP_RXDMA_ERR_DST_RING);
  5138. cfg->num_reo_exception_ring_entries = cfg_get(ctrl_psoc,
  5139. CFG_DP_REO_EXCEPTION_RING);
  5140. cfg->num_tx_desc = cfg_get(ctrl_psoc, CFG_DP_TX_DESC);
  5141. cfg->num_tx_ext_desc = cfg_get(ctrl_psoc, CFG_DP_TX_EXT_DESC);
  5142. cfg->num_rxdma_buf_ring_entries = cfg_get(ctrl_psoc,
  5143. CFG_DP_RXDMA_BUF_RING);
  5144. cfg->num_rxdma_refill_ring_entries = cfg_get(ctrl_psoc,
  5145. CFG_DP_RXDMA_REFILL_RING);
  5146. cfg->num_reo_status_ring_entries = cfg_get(ctrl_psoc,
  5147. CFG_DP_REO_STATUS_RING);
  5148. cfg->num_mon_status_ring_entries = cfg_get(ctrl_psoc,
  5149. CFG_DP_RXDMA_MONITOR_STATUS_RING);
  5150. cfg->num_tx_mon_buf_ring_entries = cfg_get(ctrl_psoc,
  5151. CFG_DP_TX_MONITOR_BUF_RING);
  5152. cfg->num_tx_mon_dst_ring_entries = cfg_get(ctrl_psoc,
  5153. CFG_DP_TX_MONITOR_DST_RING);
  5154. }
  5155. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  5156. uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
  5157. {
  5158. return cfg->pkt_capture_mode;
  5159. }
  5160. #endif
  5161. uint32_t
  5162. wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5163. {
  5164. return cfg->rx_mon_buf_ring_size;
  5165. }
  5166. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_mon_buf_ring_size);
  5167. uint32_t
  5168. wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5169. {
  5170. return cfg->tx_mon_buf_ring_size;
  5171. }
  5172. qdf_export_symbol(wlan_cfg_get_dp_soc_tx_mon_buf_ring_size);
  5173. uint8_t
  5174. wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  5175. {
  5176. return cfg->rx_rel_wbm2sw_ring_id;
  5177. }
  5178. void
  5179. wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  5180. uint8_t wbm2sw_ring_id)
  5181. {
  5182. cfg->rx_rel_wbm2sw_ring_id = wbm2sw_ring_id;
  5183. }
  5184. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  5185. uint8_t
  5186. wlan_cfg_mlo_rx_ring_map_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5187. {
  5188. return cfg->mlo_chip_rx_ring_map;
  5189. }
  5190. #endif
  5191. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  5192. bool
  5193. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5194. {
  5195. return cfg->vdev_stats_hw_offload_config;
  5196. }
  5197. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  5198. {
  5199. return cfg->vdev_stats_hw_offload_timer;
  5200. }
  5201. void
  5202. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  5203. bool val)
  5204. {
  5205. cfg->vdev_stats_hw_offload_config = val;
  5206. }
  5207. #else
  5208. bool
  5209. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5210. {
  5211. return false;
  5212. }
  5213. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  5214. {
  5215. return 0;
  5216. }
  5217. void
  5218. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  5219. bool val)
  5220. {}
  5221. #endif
  5222. #ifdef CONFIG_SAWF
  5223. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5224. {
  5225. return cfg->sawf_enabled;
  5226. }
  5227. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  5228. {
  5229. cfg->sawf_enabled = val;
  5230. }
  5231. #else
  5232. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5233. {
  5234. return false;
  5235. }
  5236. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  5237. {
  5238. }
  5239. #endif
  5240. #ifdef CONFIG_BERYLLIUM
  5241. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5242. int context)
  5243. {
  5244. return cfg->int_host2txmon_ring_mask[context];
  5245. }
  5246. qdf_export_symbol(wlan_cfg_get_host2txmon_ring_mask);
  5247. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5248. int context, int mask)
  5249. {
  5250. cfg->int_host2txmon_ring_mask[context] = mask;
  5251. }
  5252. #else
  5253. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5254. int context)
  5255. {
  5256. return 0;
  5257. }
  5258. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5259. int context, int mask)
  5260. {
  5261. }
  5262. #endif
  5263. qdf_export_symbol(wlan_cfg_set_host2txmon_ring_mask);
  5264. void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
  5265. bool txmon_hw_support)
  5266. {
  5267. cfg->txmon_hw_support = txmon_hw_support;
  5268. }
  5269. bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg)
  5270. {
  5271. return cfg->txmon_hw_support;
  5272. }
  5273. qdf_export_symbol(wlan_cfg_get_txmon_hw_support);
  5274. uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg)
  5275. {
  5276. return cfg->napi_scale_factor;
  5277. }
  5278. bool wlan_cfg_get_txmon_sw_peer_filtering(struct wlan_cfg_dp_soc_ctxt *cfg)
  5279. {
  5280. return cfg->txmon_sw_peer_filtering;
  5281. }
  5282. qdf_export_symbol(wlan_cfg_get_txmon_sw_peer_filtering);
  5283. uint16_t
  5284. wlan_cfg_get_pointer_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  5285. {
  5286. return cfg->pointer_timer_threshold_rx;
  5287. }
  5288. uint8_t
  5289. wlan_cfg_get_pointer_num_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  5290. {
  5291. return cfg->pointer_num_threshold_rx;
  5292. }