wlan_cfg.c 171 KB

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