wlan_cfg.c 179 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912
  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. int i = 0;
  3782. uint8_t rbm_id = 0;
  3783. wlan_cfg_ctx->tx_capt_max_mem_allowed =
  3784. cfg_get(psoc, CFG_DP_TX_CAPT_MAX_MEM_MB) * 1024 * 1024;
  3785. for (i = 0; i < MAX_PDEV_CNT; i++) {
  3786. switch (i) {
  3787. case 0:
  3788. rbm_id = cfg_get(psoc, CFG_DP_TX_CAPT_RADIO_0_RBM_ID);
  3789. break;
  3790. case 1:
  3791. rbm_id = cfg_get(psoc, CFG_DP_TX_CAPT_RADIO_1_RBM_ID);
  3792. break;
  3793. case 2:
  3794. rbm_id = cfg_get(psoc, CFG_DP_TX_CAPT_RADIO_2_RBM_ID);
  3795. break;
  3796. default:
  3797. rbm_id = cfg_get(psoc, CFG_DP_TX_CAPT_RADIO_3_RBM_ID);
  3798. break;
  3799. }
  3800. wlan_cfg_ctx->tx_capt_rbm_id[i] = rbm_id;
  3801. }
  3802. }
  3803. #else
  3804. static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3805. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3806. {
  3807. }
  3808. #endif
  3809. #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
  3810. static void
  3811. wlan_soc_local_pkt_capture_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3812. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3813. {
  3814. wlan_cfg_ctx->local_pkt_capture =
  3815. cfg_get(psoc, CFG_DP_LOCAL_PKT_CAPTURE);
  3816. }
  3817. #else
  3818. static void
  3819. wlan_soc_local_pkt_capture_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3820. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3821. {
  3822. }
  3823. #endif
  3824. void
  3825. wlan_cfg_soc_update_tgt_params(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  3826. struct cdp_ctrl_objmgr_psoc *psoc)
  3827. {
  3828. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc,
  3829. CFG_DP_REO_RINGS_MAP);
  3830. }
  3831. #ifdef CONFIG_SAWF_STATS
  3832. /**
  3833. * wlan_soc_sawf_stats_cfg_attach() - Update sawf stats config in dp soc
  3834. * cfg context
  3835. * @psoc: Object manager psoc
  3836. * @wlan_cfg_ctx: dp soc cfg ctx
  3837. *
  3838. * Return: None
  3839. */
  3840. static void
  3841. wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3842. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3843. {
  3844. wlan_cfg_ctx->sawf_stats = cfg_get(psoc, CFG_DP_SAWF_STATS);
  3845. }
  3846. uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3847. {
  3848. return cfg->sawf_stats;
  3849. }
  3850. qdf_export_symbol(wlan_cfg_get_sawf_stats_config);
  3851. void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3852. uint8_t val)
  3853. {
  3854. cfg->sawf_stats = val;
  3855. }
  3856. #else
  3857. static void
  3858. wlan_soc_sawf_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3859. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3860. {
  3861. }
  3862. uint8_t wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  3863. {
  3864. return 0;
  3865. }
  3866. qdf_export_symbol(wlan_cfg_get_sawf_stats_config);
  3867. void wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  3868. uint8_t val)
  3869. {
  3870. }
  3871. #endif /* CONFIG_SAWF_STATS */
  3872. #ifdef DP_TX_PACKET_INSPECT_FOR_ILP
  3873. /**
  3874. * wlan_soc_tx_packet_inspect_attach() - Update TX packet inspection config
  3875. * @psoc: object manager psoc
  3876. * @wlan_cfg_ctx: dp soc cfg ctx
  3877. *
  3878. * Return: None
  3879. */
  3880. static void
  3881. wlan_soc_tx_packet_inspect_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3882. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3883. {
  3884. wlan_cfg_ctx->tx_pkt_inspect_for_ilp =
  3885. cfg_get(psoc, CFG_TX_PKT_INSPECT_FOR_ILP);
  3886. }
  3887. #else
  3888. static void
  3889. wlan_soc_tx_packet_inspect_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3890. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3891. {
  3892. }
  3893. #endif
  3894. #ifdef DP_UMAC_HW_RESET_SUPPORT
  3895. /**
  3896. * wlan_soc_umac_reset_cfg_attach() - Update umac reset buffer window config
  3897. * @psoc: object manager psoc
  3898. * @wlan_cfg_ctx: dp soc cfg ctx
  3899. *
  3900. * Return: None
  3901. */
  3902. static void
  3903. wlan_soc_umac_reset_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3904. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3905. {
  3906. wlan_cfg_ctx->umac_reset_buffer_window =
  3907. cfg_get(psoc, CFG_DP_UMAC_RESET_BUFFER_WINDOW);
  3908. }
  3909. #else
  3910. static void
  3911. wlan_soc_umac_reset_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
  3912. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  3913. {
  3914. }
  3915. #endif /* DP_UMAC_HW_RESET_SUPPORT */
  3916. #ifdef WLAN_SOFTUMAC_SUPPORT
  3917. struct wlan_cfg_dp_soc_ctxt *
  3918. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  3919. {
  3920. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
  3921. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
  3922. uint32_t gro_bit_set;
  3923. if (!wlan_cfg_ctx)
  3924. return NULL;
  3925. wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
  3926. wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS;
  3927. wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
  3928. wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
  3929. wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
  3930. wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
  3931. wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
  3932. CFG_DP_TX_EXT_DESC_POOLS);
  3933. wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
  3934. wlan_cfg_ctx->num_tx_spl_desc = cfg_get(psoc, CFG_DP_TX_SPL_DESC);
  3935. wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
  3936. wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
  3937. wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
  3938. wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
  3939. wlan_cfg_ctx->int_batch_threshold_tx =
  3940. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
  3941. wlan_cfg_ctx->int_timer_threshold_tx =
  3942. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX);
  3943. wlan_cfg_ctx->int_batch_threshold_rx =
  3944. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX);
  3945. wlan_cfg_ctx->int_timer_threshold_rx =
  3946. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX);
  3947. wlan_cfg_ctx->int_batch_threshold_other =
  3948. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
  3949. wlan_cfg_ctx->int_timer_threshold_other =
  3950. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
  3951. wlan_cfg_ctx->int_batch_threshold_mon_dest =
  3952. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_MON_DEST);
  3953. wlan_cfg_ctx->int_timer_threshold_mon_dest =
  3954. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_MON_DEST);
  3955. wlan_cfg_ctx->pktlog_buffer_size =
  3956. cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
  3957. /*
  3958. * This is default mapping and can be overridden by
  3959. * HW config received from FW.
  3960. */
  3961. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0);
  3962. if (MAX_PDEV_CNT > 1)
  3963. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2);
  3964. if (MAX_PDEV_CNT > 2)
  3965. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1);
  3966. wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
  3967. wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
  3968. wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
  3969. wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
  3970. wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
  3971. gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
  3972. if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
  3973. wlan_cfg_ctx->gro_enabled = true;
  3974. if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO)
  3975. wlan_cfg_ctx->tc_based_dynamic_gro = true;
  3976. }
  3977. wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO);
  3978. wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
  3979. wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
  3980. wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
  3981. wlan_cfg_ctx->peer_flow_ctrl_enabled =
  3982. cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
  3983. wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
  3984. wlan_cfg_ctx->p2p_tcp_udp_checksumoffload =
  3985. cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD);
  3986. wlan_cfg_ctx->nan_tcp_udp_checksumoffload =
  3987. cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD);
  3988. wlan_cfg_ctx->tcp_udp_checksumoffload =
  3989. cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
  3990. wlan_cfg_ctx->legacy_mode_checksumoffload_disable =
  3991. cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE);
  3992. wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING);
  3993. wlan_cfg_ctx->defrag_timeout_check =
  3994. cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK);
  3995. wlan_cfg_ctx->rx_defrag_min_timeout =
  3996. cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT);
  3997. wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc,
  3998. CFG_DP_RXDMA_REFILL_RING);
  3999. wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc,
  4000. CFG_DP_TX_DESC_LIMIT_0);
  4001. wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc,
  4002. CFG_DP_TX_DESC_LIMIT_1);
  4003. wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc,
  4004. CFG_DP_TX_DESC_LIMIT_2);
  4005. wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
  4006. CFG_DP_TX_DEVICE_LIMIT);
  4007. wlan_cfg_ctx->tx_spl_device_limit = cfg_get(psoc,
  4008. CFG_DP_TX_SPL_DEVICE_LIMIT);
  4009. wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
  4010. CFG_DP_TX_SW_INTERNODE_QUEUE);
  4011. wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
  4012. CFG_DP_RXDMA_ERR_DST_RING);
  4013. wlan_cfg_ctx->enable_data_stall_detection =
  4014. cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
  4015. wlan_cfg_ctx->tx_flow_start_queue_offset =
  4016. cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET);
  4017. wlan_cfg_ctx->tx_flow_stop_queue_threshold =
  4018. cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH);
  4019. wlan_cfg_ctx->disable_intra_bss_fwd =
  4020. cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
  4021. wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
  4022. CFG_DP_RX_SW_DESC_WEIGHT);
  4023. wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
  4024. CFG_DP_RX_SW_DESC_NUM);
  4025. wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
  4026. wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
  4027. wlan_cfg_ctx->is_rx_flow_tag_enabled =
  4028. cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE);
  4029. wlan_cfg_ctx->is_rx_flow_search_table_per_pdev =
  4030. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV);
  4031. wlan_cfg_ctx->rx_flow_search_table_size =
  4032. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE);
  4033. wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled =
  4034. cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE);
  4035. wlan_cfg_ctx->mon_drop_thresh =
  4036. cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD);
  4037. /* TODO: add INI item for RX RINGS MAPPING in RHINE */
  4038. wlan_cfg_ctx->rx_rings_mapping = 0x7;
  4039. wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
  4040. wlan_cfg_ctx->is_rx_buff_pool_enabled =
  4041. cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
  4042. wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
  4043. cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
  4044. wlan_cfg_ctx->enable_dp_buf_page_frag_alloc =
  4045. cfg_get(psoc, CFG_DP_BUFS_PAGE_FRAG_ALLOCS);
  4046. wlan_cfg_ctx->rx_pending_high_threshold =
  4047. cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
  4048. wlan_cfg_ctx->rx_pending_low_threshold =
  4049. cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
  4050. wlan_cfg_ctx->is_poll_mode_enabled =
  4051. cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
  4052. wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
  4053. wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
  4054. wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
  4055. cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
  4056. wlan_cfg_ctx->wow_check_rx_pending_enable =
  4057. cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
  4058. wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
  4059. CFG_DP_DELAY_MON_REPLENISH);
  4060. wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
  4061. CFG_DP_RXDMA_MONITOR_BUF_RING);
  4062. wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
  4063. CFG_DP_TX_MONITOR_BUF_RING);
  4064. wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
  4065. wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
  4066. wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
  4067. wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  4068. wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4069. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  4070. wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
  4071. PKT_CAPTURE_MODE_DATA_ONLY;
  4072. #endif
  4073. wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
  4074. wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
  4075. NUM_RXDMA_RINGS_PER_PDEV;
  4076. wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
  4077. wlan_cfg_ctx->mpdu_retry_threshold_1 =
  4078. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
  4079. wlan_cfg_ctx->mpdu_retry_threshold_2 =
  4080. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
  4081. wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
  4082. CFG_DP_NAPI_SCALE_FACTOR);
  4083. wlan_soc_sawf_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4084. wlan_cfg_ctx->txmon_sw_peer_filtering =
  4085. cfg_get(psoc, CFG_DP_TXMON_SW_PEER_FILTERING);
  4086. wlan_soc_tx_packet_inspect_attach(psoc, wlan_cfg_ctx);
  4087. wlan_soc_local_pkt_capture_cfg_attach(psoc, wlan_cfg_ctx);
  4088. wlan_soc_umac_reset_cfg_attach(psoc, wlan_cfg_ctx);
  4089. return wlan_cfg_ctx;
  4090. }
  4091. #else
  4092. struct wlan_cfg_dp_soc_ctxt *
  4093. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  4094. {
  4095. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
  4096. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
  4097. uint32_t gro_bit_set;
  4098. if (!wlan_cfg_ctx)
  4099. return NULL;
  4100. wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
  4101. wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS;
  4102. wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
  4103. wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
  4104. wlan_cfg_ctx->per_pdev_tx_ring = cfg_get(psoc, CFG_DP_PDEV_TX_RING);
  4105. wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS);
  4106. wlan_cfg_ctx->num_tcl_data_rings = cfg_get(psoc, CFG_DP_TCL_DATA_RINGS);
  4107. wlan_cfg_ctx->num_tx_comp_rings = cfg_get(psoc, CFG_DP_TX_COMP_RINGS);
  4108. wlan_cfg_ctx->num_nss_reo_dest_rings =
  4109. cfg_get(psoc, CFG_DP_NSS_REO_DEST_RINGS);
  4110. wlan_cfg_ctx->num_nss_tcl_data_rings =
  4111. cfg_get(psoc, CFG_DP_NSS_TCL_DATA_RINGS);
  4112. wlan_cfg_ctx->per_pdev_rx_ring = cfg_get(psoc, CFG_DP_PDEV_RX_RING);
  4113. wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
  4114. wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
  4115. wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
  4116. CFG_DP_TX_EXT_DESC_POOLS);
  4117. wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
  4118. wlan_cfg_ctx->num_tx_spl_desc = cfg_get(psoc, CFG_DP_TX_SPL_DESC);
  4119. wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
  4120. wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
  4121. wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
  4122. wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
  4123. wlan_cfg_ctx->tx_ring_size = cfg_get(psoc, CFG_DP_TX_RING_SIZE);
  4124. wlan_cfg_ctx->time_control_bp = cfg_get(psoc, CFG_DP_TIME_CONTROL_BP);
  4125. wlan_cfg_ctx->qref_control_size =
  4126. cfg_get(psoc, CFG_DP_QREF_CONTROL_SIZE);
  4127. wlan_cfg_ctx->tx_comp_ring_size = cfg_get(psoc,
  4128. CFG_DP_TX_COMPL_RING_SIZE);
  4129. wlan_cfg_ctx->tx_comp_ring_size_nss =
  4130. cfg_get(psoc, CFG_DP_NSS_COMP_RING_SIZE);
  4131. wlan_cfg_ctx->int_batch_threshold_tx =
  4132. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
  4133. wlan_cfg_ctx->int_timer_threshold_tx =
  4134. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX);
  4135. wlan_cfg_ctx->int_batch_threshold_rx =
  4136. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX);
  4137. wlan_cfg_ctx->int_timer_threshold_rx =
  4138. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX);
  4139. wlan_cfg_ctx->int_batch_threshold_other =
  4140. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
  4141. wlan_cfg_ctx->int_timer_threshold_other =
  4142. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
  4143. wlan_cfg_ctx->int_batch_threshold_mon_dest =
  4144. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_MON_DEST);
  4145. wlan_cfg_ctx->int_timer_threshold_mon_dest =
  4146. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_MON_DEST);
  4147. wlan_cfg_ctx->int_batch_threshold_ppe2tcl =
  4148. cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_PPE2TCL);
  4149. wlan_cfg_ctx->int_timer_threshold_ppe2tcl =
  4150. cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_PPE2TCL);
  4151. wlan_cfg_ctx->pktlog_buffer_size =
  4152. cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
  4153. /* This is default mapping and can be overridden by HW config
  4154. * received from FW */
  4155. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0);
  4156. if (MAX_PDEV_CNT > 1)
  4157. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2);
  4158. if (MAX_PDEV_CNT > 2)
  4159. wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1);
  4160. wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
  4161. wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
  4162. wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
  4163. wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
  4164. wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
  4165. gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
  4166. if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
  4167. wlan_cfg_ctx->gro_enabled = true;
  4168. if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO)
  4169. wlan_cfg_ctx->tc_based_dynamic_gro = true;
  4170. }
  4171. wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO);
  4172. wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
  4173. wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
  4174. wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
  4175. wlan_cfg_ctx->peer_flow_ctrl_enabled =
  4176. cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
  4177. wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
  4178. wlan_cfg_ctx->p2p_tcp_udp_checksumoffload =
  4179. cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD);
  4180. wlan_cfg_ctx->nan_tcp_udp_checksumoffload =
  4181. cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD);
  4182. wlan_cfg_ctx->tcp_udp_checksumoffload =
  4183. cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
  4184. wlan_cfg_ctx->legacy_mode_checksumoffload_disable =
  4185. cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE);
  4186. wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING);
  4187. wlan_cfg_ctx->defrag_timeout_check =
  4188. cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK);
  4189. wlan_cfg_ctx->rx_defrag_min_timeout =
  4190. cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT);
  4191. wlan_cfg_ctx->wbm_release_ring = cfg_get(psoc,
  4192. CFG_DP_WBM_RELEASE_RING);
  4193. wlan_cfg_ctx->tcl_cmd_credit_ring = cfg_get(psoc,
  4194. CFG_DP_TCL_CMD_CREDIT_RING);
  4195. wlan_cfg_ctx->tcl_status_ring = cfg_get(psoc,
  4196. CFG_DP_TCL_STATUS_RING);
  4197. wlan_cfg_ctx->reo_dst_ring_size = cfg_get(psoc,
  4198. CFG_DP_RX_DESTINATION_RING);
  4199. wlan_cfg_ctx->reo_reinject_ring = cfg_get(psoc,
  4200. CFG_DP_REO_REINJECT_RING);
  4201. wlan_cfg_ctx->rx_release_ring = cfg_get(psoc,
  4202. CFG_DP_RX_RELEASE_RING);
  4203. wlan_cfg_ctx->reo_exception_ring = cfg_get(psoc,
  4204. CFG_DP_REO_EXCEPTION_RING);
  4205. wlan_cfg_ctx->reo_cmd_ring = cfg_get(psoc,
  4206. CFG_DP_REO_CMD_RING);
  4207. wlan_cfg_ctx->reo_status_ring = cfg_get(psoc,
  4208. CFG_DP_REO_STATUS_RING);
  4209. wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc,
  4210. CFG_DP_RXDMA_REFILL_RING);
  4211. wlan_cfg_ctx->rxdma_refill_lt_disable =
  4212. cfg_get(psoc,
  4213. CFG_DP_RXDMA_REFILL_LT_DISABLE);
  4214. wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc,
  4215. CFG_DP_TX_DESC_LIMIT_0);
  4216. wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc,
  4217. CFG_DP_TX_DESC_LIMIT_1);
  4218. wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc,
  4219. CFG_DP_TX_DESC_LIMIT_2);
  4220. wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
  4221. CFG_DP_TX_DEVICE_LIMIT);
  4222. wlan_cfg_ctx->tx_spl_device_limit = cfg_get(psoc,
  4223. CFG_DP_TX_SPL_DEVICE_LIMIT);
  4224. wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
  4225. CFG_DP_TX_SW_INTERNODE_QUEUE);
  4226. wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
  4227. CFG_DP_RXDMA_ERR_DST_RING);
  4228. wlan_cfg_ctx->enable_data_stall_detection =
  4229. cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
  4230. wlan_cfg_ctx->tx_flow_start_queue_offset =
  4231. cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET);
  4232. wlan_cfg_ctx->tx_flow_stop_queue_threshold =
  4233. cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH);
  4234. wlan_cfg_ctx->disable_intra_bss_fwd =
  4235. cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
  4236. wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
  4237. CFG_DP_RX_SW_DESC_WEIGHT);
  4238. wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
  4239. CFG_DP_RX_SW_DESC_NUM);
  4240. wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
  4241. wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
  4242. wlan_cfg_ctx->is_rx_flow_tag_enabled =
  4243. cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE);
  4244. wlan_cfg_ctx->is_rx_flow_search_table_per_pdev =
  4245. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV);
  4246. wlan_cfg_ctx->rx_flow_search_table_size =
  4247. cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE);
  4248. wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled =
  4249. cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE);
  4250. wlan_cfg_ctx->mon_drop_thresh =
  4251. cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD);
  4252. wlan_cfg_ctx->reo_rings_mapping = cfg_get(psoc, CFG_DP_REO_RINGS_MAP);
  4253. wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
  4254. wlan_cfg_ctx->jitter_stats_enabled =
  4255. cfg_get(psoc, CFG_DP_PEER_JITTER_STATS);
  4256. wlan_cfg_ctx->peer_link_stats_enabled =
  4257. cfg_get(psoc, CFG_DP_PEER_LINK_STATS);
  4258. wlan_cfg_ctx->is_rx_buff_pool_enabled =
  4259. cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
  4260. wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
  4261. cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
  4262. wlan_cfg_ctx->enable_dp_buf_page_frag_alloc =
  4263. cfg_get(psoc, CFG_DP_BUFS_PAGE_FRAG_ALLOCS);
  4264. #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
  4265. wlan_cfg_ctx->rx_refill_buff_pool_size =
  4266. DP_RX_REFILL_BUFF_POOL_SIZE;
  4267. #endif
  4268. wlan_cfg_ctx->rx_pending_high_threshold =
  4269. cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
  4270. wlan_cfg_ctx->rx_pending_low_threshold =
  4271. cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
  4272. wlan_cfg_ctx->is_poll_mode_enabled =
  4273. cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
  4274. wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
  4275. wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
  4276. wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
  4277. cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
  4278. wlan_cfg_ctx->radio0_rx_default_reo =
  4279. cfg_get(psoc, CFG_DP_RX_RADIO_0_DEFAULT_REO);
  4280. wlan_cfg_ctx->radio1_rx_default_reo =
  4281. cfg_get(psoc, CFG_DP_RX_RADIO_1_DEFAULT_REO);
  4282. wlan_cfg_ctx->radio2_rx_default_reo =
  4283. cfg_get(psoc, CFG_DP_RX_RADIO_2_DEFAULT_REO);
  4284. wlan_cfg_ctx->wow_check_rx_pending_enable =
  4285. cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
  4286. wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
  4287. CFG_DP_DELAY_MON_REPLENISH);
  4288. wlan_cfg_ctx->num_global_tx_desc = cfg_get(psoc,
  4289. CFG_DP_TX_DESC_GLOBAL_COUNT);
  4290. wlan_cfg_ctx->num_global_spcl_tx_desc = cfg_get(psoc,
  4291. CFG_DP_SPCL_TX_DESC_GLOBAL_COUNT);
  4292. wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
  4293. CFG_DP_RXDMA_MONITOR_BUF_RING);
  4294. wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
  4295. CFG_DP_TX_MONITOR_BUF_RING);
  4296. wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
  4297. wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
  4298. wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
  4299. wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
  4300. wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4301. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  4302. wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
  4303. PKT_CAPTURE_MODE_DATA_ONLY;
  4304. #endif
  4305. wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
  4306. wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
  4307. NUM_RXDMA_RINGS_PER_PDEV;
  4308. wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
  4309. wlan_cfg_ctx->mpdu_retry_threshold_1 =
  4310. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
  4311. wlan_cfg_ctx->mpdu_retry_threshold_2 =
  4312. cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
  4313. wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
  4314. CFG_DP_NAPI_SCALE_FACTOR);
  4315. wlan_soc_sawf_stats_cfg_attach(psoc, wlan_cfg_ctx);
  4316. wlan_cfg_ctx->is_handle_invalid_decap_type_disabled =
  4317. cfg_get(psoc, CFG_DP_HANDLE_INVALID_DECAP_TYPE_DISABLE);
  4318. wlan_cfg_ctx->txmon_sw_peer_filtering =
  4319. cfg_get(psoc, CFG_DP_TXMON_SW_PEER_FILTERING);
  4320. wlan_cfg_ctx->pointer_timer_threshold_rx =
  4321. cfg_get(psoc, CFG_DP_POINTER_TIMER_THRESHOLD_RX);
  4322. wlan_cfg_ctx->pointer_num_threshold_rx =
  4323. cfg_get(psoc, CFG_DP_POINTER_NUM_THRESHOLD_RX);
  4324. wlan_soc_tx_packet_inspect_attach(psoc, wlan_cfg_ctx);
  4325. wlan_soc_local_pkt_capture_cfg_attach(psoc, wlan_cfg_ctx);
  4326. wlan_cfg_ctx->special_frame_msk =
  4327. cfg_get(psoc, CFG_SPECIAL_FRAME_MSK);
  4328. wlan_soc_umac_reset_cfg_attach(psoc, wlan_cfg_ctx);
  4329. return wlan_cfg_ctx;
  4330. }
  4331. #endif
  4332. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
  4333. {
  4334. qdf_mem_free(wlan_cfg_ctx);
  4335. }
  4336. struct wlan_cfg_dp_pdev_ctxt *
  4337. wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc)
  4338. {
  4339. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx =
  4340. qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt));
  4341. if (!wlan_cfg_ctx)
  4342. return NULL;
  4343. wlan_cfg_ctx->rx_dma_buf_ring_size = cfg_get(psoc,
  4344. CFG_DP_RXDMA_BUF_RING);
  4345. wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc,
  4346. CFG_DP_RXDMA_MONITOR_BUF_RING);
  4347. wlan_cfg_ctx->dma_rx_mon_dest_ring_size = cfg_get(psoc,
  4348. CFG_DP_RXDMA_MONITOR_DST_RING);
  4349. wlan_cfg_ctx->dma_tx_mon_dest_ring_size = cfg_get(psoc,
  4350. CFG_DP_TX_MONITOR_DST_RING);
  4351. wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc,
  4352. CFG_DP_RXDMA_MONITOR_STATUS_RING);
  4353. wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc,
  4354. CFG_DP_RXDMA_MONITOR_DESC_RING);
  4355. wlan_cfg_ctx->num_mac_rings = NUM_RXDMA_RINGS_PER_PDEV;
  4356. wlan_cfg_ctx->sw2rxdma_link_ring_size = cfg_get(psoc,
  4357. CFG_DP_SW2RXDMA_LINK_RING);
  4358. return wlan_cfg_ctx;
  4359. }
  4360. void wlan_cfg_set_mon_delayed_replenish_entries(
  4361. struct wlan_cfg_dp_soc_ctxt *cfg,
  4362. uint32_t val)
  4363. {
  4364. cfg->delayed_replenish_entries = val;
  4365. }
  4366. qdf_export_symbol(wlan_cfg_set_mon_delayed_replenish_entries);
  4367. int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt *cfg)
  4368. {
  4369. return cfg->delayed_replenish_entries;
  4370. }
  4371. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx)
  4372. {
  4373. if (wlan_cfg_ctx)
  4374. qdf_mem_free(wlan_cfg_ctx);
  4375. }
  4376. int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg)
  4377. {
  4378. return cfg->mon_drop_thresh;
  4379. }
  4380. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num)
  4381. {
  4382. cfg->num_int_ctxts = num;
  4383. }
  4384. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  4385. {
  4386. cfg->max_peer_id = val;
  4387. }
  4388. void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val)
  4389. {
  4390. cfg->max_ast_idx = val;
  4391. }
  4392. int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4393. {
  4394. return cfg->max_ast_idx;
  4395. }
  4396. qdf_export_symbol(wlan_cfg_get_max_ast_idx);
  4397. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4398. int context, int mask)
  4399. {
  4400. cfg->int_tx_ring_mask[context] = mask;
  4401. }
  4402. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4403. int context, int mask)
  4404. {
  4405. cfg->int_rx_ring_mask[context] = mask;
  4406. }
  4407. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4408. int context, int mask)
  4409. {
  4410. cfg->int_rx_mon_ring_mask[context] = mask;
  4411. }
  4412. void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4413. int context, int mask)
  4414. {
  4415. cfg->int_tx_mon_ring_mask[context] = mask;
  4416. }
  4417. int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4418. int context)
  4419. {
  4420. return cfg->int_host2rxdma_mon_ring_mask[context];
  4421. }
  4422. void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4423. int context, int mask)
  4424. {
  4425. cfg->int_host2rxdma_mon_ring_mask[context] = mask;
  4426. }
  4427. int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4428. int context)
  4429. {
  4430. return cfg->int_rxdma2host_mon_ring_mask[context];
  4431. }
  4432. void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4433. int context, int mask)
  4434. {
  4435. cfg->int_rxdma2host_mon_ring_mask[context] = mask;
  4436. }
  4437. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4438. int context, int mask)
  4439. {
  4440. cfg->int_rxdma2host_ring_mask[context] = mask;
  4441. }
  4442. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4443. int context)
  4444. {
  4445. return cfg->int_rxdma2host_ring_mask[context];
  4446. }
  4447. void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4448. int context, int mask)
  4449. {
  4450. cfg->int_host2rxdma_ring_mask[context] = mask;
  4451. }
  4452. int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4453. int context)
  4454. {
  4455. return cfg->int_host2rxdma_ring_mask[context];
  4456. }
  4457. int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4458. int context)
  4459. {
  4460. return cfg->int_rx_ring_near_full_irq_1_mask[context];
  4461. }
  4462. int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4463. int context)
  4464. {
  4465. return cfg->int_rx_ring_near_full_irq_2_mask[context];
  4466. }
  4467. int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4468. int context)
  4469. {
  4470. return cfg->int_tx_ring_near_full_irq_mask[context];
  4471. }
  4472. void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  4473. int hw_macid)
  4474. {
  4475. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  4476. cfg->hw_macid[pdev_idx] = hw_macid;
  4477. }
  4478. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx)
  4479. {
  4480. qdf_assert_always(pdev_idx < MAX_PDEV_CNT);
  4481. return cfg->hw_macid[pdev_idx];
  4482. }
  4483. qdf_export_symbol(wlan_cfg_get_hw_mac_idx);
  4484. int wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  4485. int hw_macid)
  4486. {
  4487. int idx;
  4488. for (idx = 0; idx < MAX_PDEV_CNT; idx++) {
  4489. if (cfg->hw_macid[idx] == hw_macid)
  4490. return (idx + 1);
  4491. }
  4492. qdf_assert_always(idx < MAX_PDEV_CNT);
  4493. return WLAN_INVALID_PDEV_ID;
  4494. }
  4495. void wlan_cfg_set_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  4496. int hw_macid)
  4497. {
  4498. qdf_assert_always((pdev_idx < MAX_PDEV_CNT) ||
  4499. (pdev_idx == INVALID_PDEV_ID));
  4500. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  4501. cfg->hw_macid_pdev_id_map[hw_macid] = pdev_idx;
  4502. }
  4503. int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid)
  4504. {
  4505. qdf_assert_always(hw_macid < MAX_NUM_LMAC_HW);
  4506. return cfg->hw_macid_pdev_id_map[hw_macid];
  4507. }
  4508. qdf_export_symbol(wlan_cfg_get_pdev_idx);
  4509. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4510. int context, int mask)
  4511. {
  4512. cfg->int_ce_ring_mask[context] = mask;
  4513. }
  4514. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  4515. int mask)
  4516. {
  4517. cfg->int_rx_ring_mask[context] = mask;
  4518. }
  4519. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4520. int context, int mask)
  4521. {
  4522. return cfg->int_rx_err_ring_mask[context] = mask;
  4523. }
  4524. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4525. int context, int mask)
  4526. {
  4527. return cfg->int_rx_wbm_rel_ring_mask[context] = mask;
  4528. }
  4529. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4530. int context, int mask)
  4531. {
  4532. return cfg->int_reo_status_ring_mask[context] = mask;
  4533. }
  4534. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg)
  4535. {
  4536. return cfg->num_int_ctxts;
  4537. }
  4538. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4539. {
  4540. return cfg->int_tx_ring_mask[context];
  4541. }
  4542. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4543. {
  4544. return cfg->int_rx_ring_mask[context];
  4545. }
  4546. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4547. int context)
  4548. {
  4549. return cfg->int_rx_err_ring_mask[context];
  4550. }
  4551. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4552. int context)
  4553. {
  4554. return cfg->int_rx_wbm_rel_ring_mask[context];
  4555. }
  4556. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4557. int context)
  4558. {
  4559. return cfg->int_reo_status_ring_mask[context];
  4560. }
  4561. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4562. {
  4563. return cfg->int_rx_mon_ring_mask[context];
  4564. }
  4565. #ifdef CONFIG_BERYLLIUM
  4566. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4567. {
  4568. return cfg->int_tx_mon_ring_mask[context];
  4569. }
  4570. #else
  4571. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4572. {
  4573. return 0;
  4574. }
  4575. #endif
  4576. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context)
  4577. {
  4578. return cfg->int_ce_ring_mask[context];
  4579. }
  4580. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *cfg)
  4581. {
  4582. return cfg->max_clients;
  4583. }
  4584. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4585. {
  4586. return cfg->max_alloc_size;
  4587. }
  4588. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  4589. {
  4590. return cfg->per_pdev_tx_ring;
  4591. }
  4592. int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  4593. int context)
  4594. {
  4595. return cfg->int_umac_reset_intr_mask[context];
  4596. }
  4597. uint32_t
  4598. wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  4599. {
  4600. return cfg->rx_pending_high_threshold;
  4601. }
  4602. uint32_t
  4603. wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg)
  4604. {
  4605. return cfg->rx_pending_low_threshold;
  4606. }
  4607. int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  4608. {
  4609. return cfg->per_pdev_lmac_ring;
  4610. }
  4611. qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring);
  4612. #if defined(DP_USE_SINGLE_TCL) && !defined(TX_MULTI_TCL)
  4613. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4614. {
  4615. return 1;
  4616. }
  4617. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4618. {
  4619. return 1;
  4620. }
  4621. #else
  4622. #if defined(IPA_OFFLOAD) && defined(TX_MULTI_TCL)
  4623. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4624. {
  4625. if (!cfg->ipa_enabled || ipa_config_is_opt_wifi_dp_enabled())
  4626. return cfg->num_tcl_data_rings;
  4627. return 1;
  4628. }
  4629. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4630. {
  4631. if (!cfg->ipa_enabled)
  4632. return cfg->num_nss_tcl_data_rings;
  4633. return 1;
  4634. }
  4635. #else
  4636. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4637. {
  4638. return cfg->num_tcl_data_rings;
  4639. }
  4640. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4641. {
  4642. return cfg->num_nss_tcl_data_rings;
  4643. }
  4644. #endif
  4645. #endif
  4646. int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4647. {
  4648. return cfg->num_tx_comp_rings;
  4649. }
  4650. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4651. {
  4652. return cfg->tx_ring_size;
  4653. }
  4654. void wlan_cfg_set_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4655. int ring_size)
  4656. {
  4657. cfg->tx_ring_size = ring_size;
  4658. }
  4659. int wlan_cfg_time_control_bp(struct wlan_cfg_dp_soc_ctxt *cfg)
  4660. {
  4661. return cfg->time_control_bp;
  4662. }
  4663. int wlan_cfg_qref_control_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4664. {
  4665. return cfg->qref_control_size;
  4666. }
  4667. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4668. {
  4669. return cfg->tx_comp_ring_size;
  4670. }
  4671. void wlan_cfg_set_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4672. int ring_size)
  4673. {
  4674. cfg->tx_comp_ring_size = ring_size;
  4675. }
  4676. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
  4677. {
  4678. return cfg->per_pdev_rx_ring;
  4679. }
  4680. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4681. {
  4682. return cfg->num_reo_dest_rings;
  4683. }
  4684. int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
  4685. {
  4686. return cfg->num_nss_reo_dest_rings;
  4687. }
  4688. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *cfg)
  4689. {
  4690. return cfg->htt_packet_type; /*htt_pkt_type_ethernet*/
  4691. }
  4692. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  4693. {
  4694. return cfg->num_tx_desc_pool;
  4695. }
  4696. void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  4697. {
  4698. cfg->num_tx_desc_pool = num_pool;
  4699. }
  4700. int wlan_cfg_get_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg)
  4701. {
  4702. return cfg->num_tx_ext_desc_pool;
  4703. }
  4704. void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool)
  4705. {
  4706. cfg->num_tx_ext_desc_pool = num_pool;
  4707. }
  4708. int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4709. {
  4710. return cfg->reo_dst_ring_size;
  4711. }
  4712. void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4713. int reo_dst_ring_size)
  4714. {
  4715. cfg->reo_dst_ring_size = reo_dst_ring_size;
  4716. }
  4717. void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
  4718. bool raw_mode_war)
  4719. {
  4720. cfg->raw_mode_war = raw_mode_war;
  4721. }
  4722. bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg)
  4723. {
  4724. return cfg->raw_mode_war;
  4725. }
  4726. int wlan_cfg_get_num_global_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4727. {
  4728. return cfg->num_global_tx_desc;
  4729. }
  4730. int wlan_cfg_get_num_global_spcl_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4731. {
  4732. return cfg->num_global_spcl_tx_desc;
  4733. }
  4734. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4735. {
  4736. return cfg->num_tx_desc;
  4737. }
  4738. int wlan_cfg_get_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4739. {
  4740. return cfg->num_tx_spl_desc;
  4741. }
  4742. void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc)
  4743. {
  4744. cfg->num_tx_desc = num_desc;
  4745. }
  4746. int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4747. {
  4748. return cfg->min_tx_desc;
  4749. }
  4750. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  4751. {
  4752. return cfg->num_tx_ext_desc;
  4753. }
  4754. void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc)
  4755. {
  4756. cfg->num_tx_ext_desc = num_ext_desc;
  4757. }
  4758. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  4759. {
  4760. /* TODO: This should be calculated based on target capabilities */
  4761. return cfg->max_peer_id;
  4762. }
  4763. int wlan_cfg_get_dma_mon_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4764. {
  4765. return cfg->dma_mon_buf_ring_size;
  4766. }
  4767. qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size);
  4768. int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4769. {
  4770. return cfg->dma_rx_mon_dest_ring_size;
  4771. }
  4772. qdf_export_symbol(wlan_cfg_get_dma_rx_mon_dest_ring_size);
  4773. int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4774. {
  4775. return cfg->dma_tx_mon_dest_ring_size;
  4776. }
  4777. qdf_export_symbol(wlan_cfg_get_dma_tx_mon_dest_ring_size);
  4778. int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4779. {
  4780. return cfg->dma_mon_status_ring_size;
  4781. }
  4782. qdf_export_symbol(wlan_cfg_get_dma_mon_stat_ring_size);
  4783. int
  4784. wlan_cfg_get_dma_sw2rxdma_link_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4785. {
  4786. return cfg->sw2rxdma_link_ring_size;
  4787. }
  4788. qdf_export_symbol(wlan_cfg_get_dma_sw2rxdma_link_ring_size);
  4789. int
  4790. wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4791. {
  4792. return cfg->rxdma_monitor_desc_ring;
  4793. }
  4794. qdf_export_symbol(wlan_cfg_get_dma_mon_desc_ring_size);
  4795. int wlan_cfg_get_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4796. {
  4797. return cfg->rx_dma_buf_ring_size;
  4798. }
  4799. void wlan_cfg_set_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg,
  4800. int ring_size)
  4801. {
  4802. cfg->rx_dma_buf_ring_size = ring_size;
  4803. }
  4804. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4805. {
  4806. return cfg->num_mac_rings;
  4807. }
  4808. qdf_export_symbol(wlan_cfg_get_num_mac_rings);
  4809. bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4810. {
  4811. return cfg->gro_enabled;
  4812. }
  4813. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4814. {
  4815. return cfg->lro_enabled;
  4816. }
  4817. bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4818. {
  4819. return cfg->ipa_enabled;
  4820. }
  4821. void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  4822. {
  4823. cfg->rx_hash = val;
  4824. }
  4825. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4826. {
  4827. return cfg->rx_hash;
  4828. }
  4829. #ifdef WLAN_SUPPORT_RX_FLOW_TAG
  4830. void wlan_cfg_set_rx_rr(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  4831. {
  4832. cfg->rx_rr = val;
  4833. }
  4834. bool wlan_cfg_is_rx_rr_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4835. {
  4836. return cfg->rx_rr;
  4837. }
  4838. #else
  4839. void wlan_cfg_set_rx_rr(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  4840. {
  4841. }
  4842. bool wlan_cfg_is_rx_rr_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  4843. {
  4844. return false;
  4845. }
  4846. #endif
  4847. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg)
  4848. {
  4849. return cfg->nss_enabled;
  4850. }
  4851. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled)
  4852. {
  4853. cfg->nss_enabled = nss_enabled;
  4854. }
  4855. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg)
  4856. {
  4857. return cfg->nss_cfg;
  4858. }
  4859. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg)
  4860. {
  4861. cfg->nss_cfg = nss_cfg;
  4862. if (cfg->nss_cfg)
  4863. cfg->tx_comp_ring_size = cfg->tx_comp_ring_size_nss;
  4864. }
  4865. int wlan_cfg_get_int_batch_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg)
  4866. {
  4867. return cfg->int_batch_threshold_ppe2tcl;
  4868. }
  4869. int wlan_cfg_get_int_timer_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg)
  4870. {
  4871. return cfg->int_timer_threshold_ppe2tcl;
  4872. }
  4873. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4874. {
  4875. return cfg->int_batch_threshold_tx;
  4876. }
  4877. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4878. {
  4879. return cfg->int_timer_threshold_tx;
  4880. }
  4881. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4882. {
  4883. return cfg->int_batch_threshold_rx;
  4884. }
  4885. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  4886. {
  4887. return cfg->int_timer_threshold_rx;
  4888. }
  4889. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  4890. {
  4891. return cfg->int_batch_threshold_other;
  4892. }
  4893. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  4894. {
  4895. return cfg->int_timer_threshold_other;
  4896. }
  4897. int wlan_cfg_get_int_batch_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg)
  4898. {
  4899. return cfg->int_batch_threshold_mon_dest;
  4900. }
  4901. int wlan_cfg_get_int_timer_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg)
  4902. {
  4903. return cfg->int_timer_threshold_mon_dest;
  4904. }
  4905. int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  4906. {
  4907. return cfg->p2p_tcp_udp_checksumoffload;
  4908. }
  4909. int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  4910. {
  4911. return cfg->nan_tcp_udp_checksumoffload;
  4912. }
  4913. int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
  4914. {
  4915. return cfg->tcp_udp_checksumoffload;
  4916. }
  4917. int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg)
  4918. {
  4919. return cfg->rx_defrag_min_timeout;
  4920. }
  4921. int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg)
  4922. {
  4923. return cfg->defrag_timeout_check;
  4924. }
  4925. int
  4926. wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4927. {
  4928. return cfg->wbm_release_ring;
  4929. }
  4930. int
  4931. wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4932. {
  4933. return cfg->tcl_cmd_credit_ring;
  4934. }
  4935. int
  4936. wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4937. {
  4938. return cfg->tcl_status_ring;
  4939. }
  4940. int
  4941. wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4942. {
  4943. return cfg->reo_reinject_ring;
  4944. }
  4945. int
  4946. wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4947. {
  4948. return cfg->rx_release_ring;
  4949. }
  4950. int
  4951. wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4952. {
  4953. return cfg->reo_exception_ring;
  4954. }
  4955. int
  4956. wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4957. {
  4958. return cfg->reo_cmd_ring;
  4959. }
  4960. int
  4961. wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4962. {
  4963. return cfg->reo_status_ring;
  4964. }
  4965. int
  4966. wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  4967. {
  4968. return cfg->rxdma_refill_ring;
  4969. }
  4970. void
  4971. wlan_cfg_set_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  4972. int ring_size)
  4973. {
  4974. cfg->rxdma_refill_ring = ring_size;
  4975. }
  4976. bool
  4977. wlan_cfg_get_dp_soc_rxdma_refill_lt_disable(struct wlan_cfg_dp_soc_ctxt *cfg)
  4978. {
  4979. return cfg->rxdma_refill_lt_disable;
  4980. }
  4981. int
  4982. wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg)
  4983. {
  4984. return cfg->tx_desc_limit_0;
  4985. }
  4986. int
  4987. wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg)
  4988. {
  4989. return cfg->tx_desc_limit_1;
  4990. }
  4991. int
  4992. wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg)
  4993. {
  4994. return cfg->tx_desc_limit_2;
  4995. }
  4996. int
  4997. wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
  4998. {
  4999. return cfg->tx_device_limit;
  5000. }
  5001. int
  5002. wlan_cfg_get_dp_soc_tx_spl_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg)
  5003. {
  5004. return cfg->tx_spl_device_limit;
  5005. }
  5006. int
  5007. wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg)
  5008. {
  5009. return cfg->tx_sw_internode_queue;
  5010. }
  5011. int
  5012. wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5013. {
  5014. return cfg->rxdma_err_dst_ring;
  5015. }
  5016. int
  5017. wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg)
  5018. {
  5019. return cfg->rx_sw_desc_weight;
  5020. }
  5021. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_sw_desc_weight);
  5022. int
  5023. wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg)
  5024. {
  5025. return cfg->rx_sw_desc_num;
  5026. }
  5027. void
  5028. wlan_cfg_set_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg,
  5029. int desc_num)
  5030. {
  5031. cfg->rx_sw_desc_num = desc_num;
  5032. }
  5033. uint32_t
  5034. wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
  5035. {
  5036. return cfg->reo_rings_mapping;
  5037. }
  5038. uint32_t
  5039. wlan_cfg_get_rx_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
  5040. {
  5041. return cfg->rx_rings_mapping;
  5042. }
  5043. #ifdef DP_UMAC_HW_RESET_SUPPORT
  5044. uint32_t
  5045. wlan_cfg_get_umac_reset_buffer_window_ms(struct wlan_cfg_dp_soc_ctxt *cfg)
  5046. {
  5047. return cfg->umac_reset_buffer_window;
  5048. }
  5049. #endif
  5050. bool
  5051. wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
  5052. enum cdp_capabilities dp_caps)
  5053. {
  5054. switch (dp_caps) {
  5055. case CDP_CFG_DP_TSO:
  5056. return cfg->tso_enabled;
  5057. case CDP_CFG_DP_LRO:
  5058. return cfg->lro_enabled;
  5059. case CDP_CFG_DP_SG:
  5060. return cfg->sg_enabled;
  5061. case CDP_CFG_DP_GRO:
  5062. return cfg->gro_enabled;
  5063. case CDP_CFG_DP_OL_TX_CSUM:
  5064. return cfg->ol_tx_csum_enabled;
  5065. case CDP_CFG_DP_OL_RX_CSUM:
  5066. return cfg->ol_rx_csum_enabled;
  5067. case CDP_CFG_DP_RAWMODE:
  5068. return cfg->rawmode_enabled;
  5069. case CDP_CFG_DP_PEER_FLOW_CTRL:
  5070. return cfg->peer_flow_ctrl_enabled;
  5071. case CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT:
  5072. return cfg->notify_frame_support;
  5073. default:
  5074. return false;
  5075. }
  5076. }
  5077. void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
  5078. bool val)
  5079. {
  5080. cfg->is_tso_desc_attach_defer = val;
  5081. }
  5082. bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg)
  5083. {
  5084. return cfg->is_tso_desc_attach_defer;
  5085. }
  5086. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  5087. /**
  5088. * wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold
  5089. * @cfg: config context
  5090. *
  5091. * Return: stop threshold
  5092. */
  5093. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg)
  5094. {
  5095. return cfg->tx_flow_stop_queue_threshold;
  5096. }
  5097. /**
  5098. * wlan_cfg_get_tx_flow_start_queue_offset() - Get flow control start offset
  5099. * for TX to resume
  5100. * @cfg: config context
  5101. *
  5102. * Return: stop threshold
  5103. */
  5104. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg)
  5105. {
  5106. return cfg->tx_flow_start_queue_offset;
  5107. }
  5108. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  5109. void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  5110. bool val)
  5111. {
  5112. cfg->is_rx_flow_tag_enabled = val;
  5113. }
  5114. uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg)
  5115. {
  5116. return cfg->rx_toeplitz_hash_key;
  5117. }
  5118. uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg)
  5119. {
  5120. return cfg->rx_flow_max_search;
  5121. }
  5122. bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5123. {
  5124. return cfg->is_rx_flow_tag_enabled;
  5125. }
  5126. qdf_export_symbol(wlan_cfg_is_rx_flow_tag_enabled);
  5127. bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5128. {
  5129. return (bool)(cfg->is_poll_mode_enabled);
  5130. }
  5131. void
  5132. wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
  5133. bool val)
  5134. {
  5135. cfg->is_rx_flow_search_table_per_pdev = val;
  5136. }
  5137. bool wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg)
  5138. {
  5139. return cfg->is_rx_flow_search_table_per_pdev;
  5140. }
  5141. void wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  5142. uint16_t val)
  5143. {
  5144. cfg->rx_flow_search_table_size = val;
  5145. }
  5146. uint16_t
  5147. wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5148. {
  5149. return cfg->rx_flow_search_table_size;
  5150. }
  5151. void
  5152. wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  5153. bool val)
  5154. {
  5155. cfg->is_rx_mon_protocol_flow_tag_enabled = val;
  5156. }
  5157. bool
  5158. wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5159. {
  5160. return cfg->is_rx_mon_protocol_flow_tag_enabled;
  5161. }
  5162. qdf_export_symbol(wlan_cfg_is_rx_mon_protocol_flow_tag_enabled);
  5163. void
  5164. wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
  5165. bool val)
  5166. {
  5167. cfg->tx_per_pkt_vdev_id_check = val;
  5168. }
  5169. bool
  5170. wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5171. {
  5172. return cfg->tx_per_pkt_vdev_id_check;
  5173. }
  5174. void
  5175. wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  5176. bool val)
  5177. {
  5178. cfg->pext_stats_enabled = val;
  5179. }
  5180. void
  5181. wlan_cfg_set_peer_jitter_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  5182. bool val)
  5183. {
  5184. cfg->jitter_stats_enabled = val;
  5185. }
  5186. bool
  5187. wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5188. {
  5189. return cfg->pext_stats_enabled;
  5190. }
  5191. bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5192. {
  5193. return cfg->fst_in_cmem;
  5194. }
  5195. bool wlan_cfg_is_peer_jitter_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5196. {
  5197. return cfg->jitter_stats_enabled;
  5198. }
  5199. void
  5200. wlan_cfg_set_peer_link_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  5201. bool val)
  5202. {
  5203. cfg->peer_link_stats_enabled = val;
  5204. }
  5205. qdf_export_symbol(wlan_cfg_set_peer_link_stats);
  5206. bool wlan_cfg_is_peer_link_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5207. {
  5208. return cfg->peer_link_stats_enabled;
  5209. }
  5210. qdf_export_symbol(wlan_cfg_is_peer_link_stats_enabled);
  5211. bool wlan_cfg_is_dp_buf_page_frag_alloc_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5212. {
  5213. return cfg->enable_dp_buf_page_frag_alloc;
  5214. }
  5215. #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
  5216. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5217. {
  5218. return cfg->is_rx_buff_pool_enabled;
  5219. }
  5220. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5221. {
  5222. return cfg->is_rx_refill_buff_pool_enabled;
  5223. }
  5224. int wlan_cfg_get_rx_refill_buf_pool_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5225. {
  5226. return cfg->rx_refill_buff_pool_size;
  5227. }
  5228. void
  5229. wlan_cfg_set_rx_refill_buf_pool_size(struct wlan_cfg_dp_soc_ctxt *cfg, int size)
  5230. {
  5231. cfg->rx_refill_buff_pool_size = size;
  5232. }
  5233. #else
  5234. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5235. {
  5236. return false;
  5237. }
  5238. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(
  5239. struct wlan_cfg_dp_soc_ctxt *cfg)
  5240. {
  5241. return false;
  5242. }
  5243. #endif /* WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL */
  5244. #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
  5245. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5246. {
  5247. return (bool)(cfg->is_swlm_enabled);
  5248. }
  5249. #else
  5250. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  5251. {
  5252. return false;
  5253. }
  5254. #endif
  5255. uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5256. {
  5257. return cfg->radio0_rx_default_reo;
  5258. }
  5259. uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5260. {
  5261. return cfg->radio1_rx_default_reo;
  5262. }
  5263. uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5264. {
  5265. return cfg->radio2_rx_default_reo;
  5266. }
  5267. void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5268. {
  5269. cfg->rxdma1_enable = true;
  5270. }
  5271. void
  5272. wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg,
  5273. bool val)
  5274. {
  5275. cfg->delay_mon_replenish = val;
  5276. }
  5277. bool
  5278. wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg)
  5279. {
  5280. return cfg->delay_mon_replenish;
  5281. }
  5282. qdf_export_symbol(wlan_cfg_is_delay_mon_replenish);
  5283. #ifdef WLAN_SOFTUMAC_SUPPORT
  5284. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
  5285. {
  5286. dp_info("DP CFG SoC ctx: delay_mon_replenish = %d",
  5287. cfg->delay_mon_replenish);
  5288. }
  5289. #else
  5290. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
  5291. {
  5292. dp_info("DP CFG SoC ctx: delay_mon_replenish = %d",
  5293. cfg->delay_mon_replenish);
  5294. dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d",
  5295. cfg->reo_dst_ring_size, cfg->delayed_replenish_entries);
  5296. }
  5297. #endif
  5298. #ifdef IPA_OFFLOAD
  5299. uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5300. {
  5301. return cfg->ipa_tx_ring_size;
  5302. }
  5303. uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5304. {
  5305. return cfg->ipa_tx_comp_ring_size;
  5306. }
  5307. #ifdef IPA_WDI3_TX_TWO_PIPES
  5308. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5309. {
  5310. return cfg->ipa_tx_alt_ring_size;
  5311. }
  5312. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5313. {
  5314. return cfg->ipa_tx_alt_comp_ring_size;
  5315. }
  5316. #else
  5317. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5318. {
  5319. return cfg->ipa_tx_ring_size;
  5320. }
  5321. int wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5322. {
  5323. return cfg->ipa_tx_comp_ring_size;
  5324. }
  5325. #endif
  5326. #endif
  5327. #ifdef WLAN_SUPPORT_PPEDS
  5328. bool
  5329. wlan_cfg_get_dp_soc_ppeds_enable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5330. {
  5331. return cfg->ppeds_enable;
  5332. }
  5333. int
  5334. wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5335. {
  5336. return cfg->reo2ppe_ring;
  5337. }
  5338. int
  5339. wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5340. {
  5341. return cfg->ppe2tcl_ring;
  5342. }
  5343. int
  5344. wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  5345. {
  5346. return cfg->ppeds_num_tx_desc;
  5347. }
  5348. int
  5349. wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg)
  5350. {
  5351. return cfg->ppeds_tx_comp_napi_budget;
  5352. }
  5353. int
  5354. wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg)
  5355. {
  5356. return cfg->ppeds_tx_desc_hotlist_len;
  5357. }
  5358. #endif
  5359. void
  5360. wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
  5361. struct wlan_dp_prealloc_cfg *cfg)
  5362. {
  5363. if (!ctrl_psoc || !cfg)
  5364. return;
  5365. cfg->num_reo_dst_ring_entries = cfg_get(ctrl_psoc,
  5366. CFG_DP_RX_DESTINATION_RING);
  5367. cfg->num_tx_ring_entries = cfg_get(ctrl_psoc, CFG_DP_TX_RING_SIZE);
  5368. cfg->num_tx_comp_ring_entries = cfg_get(ctrl_psoc,
  5369. CFG_DP_TX_COMPL_RING_SIZE);
  5370. cfg->num_wbm_rel_ring_entries = cfg_get(ctrl_psoc,
  5371. CFG_DP_WBM_RELEASE_RING);
  5372. cfg->num_rxdma_err_dst_ring_entries = cfg_get(ctrl_psoc,
  5373. CFG_DP_RXDMA_ERR_DST_RING);
  5374. cfg->num_reo_exception_ring_entries = cfg_get(ctrl_psoc,
  5375. CFG_DP_REO_EXCEPTION_RING);
  5376. cfg->num_tx_desc = cfg_get(ctrl_psoc, CFG_DP_TX_DESC);
  5377. cfg->num_tx_ext_desc = cfg_get(ctrl_psoc, CFG_DP_TX_EXT_DESC);
  5378. cfg->num_rx_sw_desc = cfg_get(ctrl_psoc, CFG_DP_RX_SW_DESC_NUM);
  5379. cfg->num_rxdma_buf_ring_entries = cfg_get(ctrl_psoc,
  5380. CFG_DP_RXDMA_BUF_RING);
  5381. cfg->num_rxdma_refill_ring_entries = cfg_get(ctrl_psoc,
  5382. CFG_DP_RXDMA_REFILL_RING);
  5383. cfg->num_reo_status_ring_entries = cfg_get(ctrl_psoc,
  5384. CFG_DP_REO_STATUS_RING);
  5385. cfg->num_mon_status_ring_entries = cfg_get(ctrl_psoc,
  5386. CFG_DP_RXDMA_MONITOR_STATUS_RING);
  5387. cfg->num_tx_mon_buf_ring_entries = cfg_get(ctrl_psoc,
  5388. CFG_DP_TX_MONITOR_BUF_RING);
  5389. cfg->num_tx_mon_dst_ring_entries = cfg_get(ctrl_psoc,
  5390. CFG_DP_TX_MONITOR_DST_RING);
  5391. }
  5392. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  5393. uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
  5394. {
  5395. return cfg->pkt_capture_mode;
  5396. }
  5397. #endif
  5398. uint32_t
  5399. wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5400. {
  5401. return cfg->rx_mon_buf_ring_size;
  5402. }
  5403. qdf_export_symbol(wlan_cfg_get_dp_soc_rx_mon_buf_ring_size);
  5404. uint32_t
  5405. wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  5406. {
  5407. return cfg->tx_mon_buf_ring_size;
  5408. }
  5409. qdf_export_symbol(wlan_cfg_get_dp_soc_tx_mon_buf_ring_size);
  5410. uint8_t
  5411. wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg)
  5412. {
  5413. return cfg->rx_rel_wbm2sw_ring_id;
  5414. }
  5415. void
  5416. wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  5417. uint8_t wbm2sw_ring_id)
  5418. {
  5419. cfg->rx_rel_wbm2sw_ring_id = wbm2sw_ring_id;
  5420. }
  5421. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  5422. uint8_t
  5423. wlan_cfg_mlo_rx_ring_map_get(struct wlan_cfg_dp_soc_ctxt *cfg)
  5424. {
  5425. return cfg->mlo_chip_rx_ring_map;
  5426. }
  5427. #endif
  5428. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  5429. bool
  5430. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5431. {
  5432. return cfg->vdev_stats_hw_offload_config;
  5433. }
  5434. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  5435. {
  5436. return cfg->vdev_stats_hw_offload_timer;
  5437. }
  5438. void
  5439. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  5440. bool val)
  5441. {
  5442. cfg->vdev_stats_hw_offload_config = val;
  5443. }
  5444. #else
  5445. bool
  5446. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5447. {
  5448. return false;
  5449. }
  5450. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg)
  5451. {
  5452. return 0;
  5453. }
  5454. void
  5455. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  5456. bool val)
  5457. {}
  5458. #endif
  5459. #ifdef CONFIG_SAWF
  5460. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5461. {
  5462. return cfg->sawf_enabled;
  5463. }
  5464. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  5465. {
  5466. cfg->sawf_enabled = val;
  5467. }
  5468. #else
  5469. bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg)
  5470. {
  5471. return false;
  5472. }
  5473. void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
  5474. {
  5475. }
  5476. #endif
  5477. #ifdef CONFIG_BERYLLIUM
  5478. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5479. int context)
  5480. {
  5481. return cfg->int_host2txmon_ring_mask[context];
  5482. }
  5483. qdf_export_symbol(wlan_cfg_get_host2txmon_ring_mask);
  5484. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5485. int context, int mask)
  5486. {
  5487. cfg->int_host2txmon_ring_mask[context] = mask;
  5488. }
  5489. #else
  5490. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5491. int context)
  5492. {
  5493. return 0;
  5494. }
  5495. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  5496. int context, int mask)
  5497. {
  5498. }
  5499. #endif
  5500. qdf_export_symbol(wlan_cfg_set_host2txmon_ring_mask);
  5501. void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
  5502. bool txmon_hw_support)
  5503. {
  5504. cfg->txmon_hw_support = txmon_hw_support;
  5505. }
  5506. bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg)
  5507. {
  5508. return cfg->txmon_hw_support;
  5509. }
  5510. qdf_export_symbol(wlan_cfg_get_txmon_hw_support);
  5511. uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg)
  5512. {
  5513. return cfg->napi_scale_factor;
  5514. }
  5515. bool wlan_cfg_get_txmon_sw_peer_filtering(struct wlan_cfg_dp_soc_ctxt *cfg)
  5516. {
  5517. return cfg->txmon_sw_peer_filtering;
  5518. }
  5519. qdf_export_symbol(wlan_cfg_get_txmon_sw_peer_filtering);
  5520. uint16_t
  5521. wlan_cfg_get_pointer_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  5522. {
  5523. return cfg->pointer_timer_threshold_rx;
  5524. }
  5525. uint8_t
  5526. wlan_cfg_get_pointer_num_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg)
  5527. {
  5528. return cfg->pointer_num_threshold_rx;
  5529. }
  5530. uint32_t wlan_cfg_get_special_frame_cfg(struct wlan_cfg_dp_soc_ctxt *cfg)
  5531. {
  5532. return cfg->special_frame_msk;
  5533. }
  5534. void wlan_cfg_set_ast_indication_disable(struct wlan_cfg_dp_soc_ctxt *cfg,
  5535. bool val)
  5536. {
  5537. cfg->fw_ast_indication_disable = val;
  5538. }
  5539. bool wlan_cfg_get_ast_indication_disable(struct wlan_cfg_dp_soc_ctxt *cfg)
  5540. {
  5541. return cfg->fw_ast_indication_disable;
  5542. }