From 012273f39d239fa3b65ff17e699db5f91eb701c6 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 16 Feb 2013 21:37:36 +0100 Subject: [PATCH] etheriwl: simplify --- sys/src/9/pc/etheriwl.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/src/9/pc/etheriwl.c b/sys/src/9/pc/etheriwl.c index ffc5a4b1f..7bd25dcaa 100644 --- a/sys/src/9/pc/etheriwl.c +++ b/sys/src/9/pc/etheriwl.c @@ -1209,7 +1209,7 @@ reset(Ctlr *ctlr) static char* postboot(Ctlr *ctlr) { - uint ctxoff, ctxlen, dramaddr, txfact; + uint ctxoff, ctxlen, dramaddr; char *err; int i, q; @@ -1220,12 +1220,10 @@ postboot(Ctlr *ctlr) dramaddr = SchedDramAddr5000; ctxoff = SchedCtxOff5000; ctxlen = SchedCtxLen5000; - txfact = SchedTxFact5000; } else { dramaddr = SchedDramAddr4965; ctxoff = SchedCtxOff4965; ctxlen = SchedCtxLen4965; - txfact = SchedTxFact4965; } ctlr->sched.base = prphread(ctlr, SchedSramAddr); @@ -1251,6 +1249,9 @@ postboot(Ctlr *ctlr) } /* Enable interrupts for all our 20 queues. */ prphwrite(ctlr, SchedIntrMask5000, 0xfffff); + + /* Identify TX FIFO rings (0-7). */ + prphwrite(ctlr, SchedTxFact5000, 0xff); } else { /* Disable chain mode for all our 16 queues. */ prphwrite(ctlr, SchedQChainSel4965, 0); @@ -1266,10 +1267,10 @@ postboot(Ctlr *ctlr) } /* Enable interrupts for all our 16 queues. */ prphwrite(ctlr, SchedIntrMask4965, 0xffff); - } - /* Identify TX FIFO rings (0-7). */ - prphwrite(ctlr, txfact, 0xff); + /* Identify TX FIFO rings (0-7). */ + prphwrite(ctlr, SchedTxFact4965, 0xff); + } /* Mark TX rings (4 EDCA + cmd + 2 HCCA) as active. */ for(q=0; q<7; q++){