wlan_cfg.c 177 KB

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