wlan_cfg.c 172 KB

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