summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/etheriwl.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-10-05 22:42:13 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2020-10-05 22:42:13 +0200
commitd49b9e1b845f0f815a87b2404bc351c1fdd8cd1b (patch)
tree07eac3280d177526e89b03602349a7e7a8ceae0d /sys/src/9/pc/etheriwl.c
parent2aff96f17c4127617a48f75032c13e19cd3eb4a9 (diff)
etheriwl: remove stations *after* disabling binding quotas, drain all queues in rxoff7000()
Diffstat (limited to 'sys/src/9/pc/etheriwl.c')
-rw-r--r--sys/src/9/pc/etheriwl.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/src/9/pc/etheriwl.c b/sys/src/9/pc/etheriwl.c
index 96f356392..6aba5023e 100644
--- a/sys/src/9/pc/etheriwl.c
+++ b/sys/src/9/pc/etheriwl.c
@@ -3540,11 +3540,24 @@ static char*
rxoff7000(Ether *edev, Ctlr *ctlr)
{
char *err;
+ int i;
+
+ for(i = 0; i < nelem(ctlr->tx); i++)
+ flushq(ctlr, i);
+ settimeevent(ctlr, CmdRemove, 0);
if((err = setbindingquotas(ctlr, -1)) != nil){
print("can't disable quotas: %s\n", err);
return err;
}
+ if((err = delstation(ctlr, &ctlr->bss)) != nil){
+ print("can't remove bss station: %s\n", err);
+ return err;
+ }
+ if((err = delstation(ctlr, &ctlr->bcast)) != nil){
+ print("can't remove bcast station: %s\n", err);
+ return err;
+ }
if((err = setbindingcontext(ctlr, CmdRemove)) != nil){
print("removing bindingcontext: %s\n", err);
return err;
@@ -3638,14 +3651,9 @@ rxon(Ether *edev, Wnode *bss)
Ctlr *ctlr = edev->ctlr;
char *err;
- if(ctlr->family >= 7000){
- flushq(ctlr, 0);
- delstation(ctlr, &ctlr->bss);
- delstation(ctlr, &ctlr->bcast);
- settimeevent(ctlr, CmdRemove, 0);
+ if(ctlr->family >= 7000)
if((err = rxoff7000(edev, ctlr)) != nil)
goto Out;
- }
ctlr->rxfilter = FilterNoDecrypt | FilterMulticast | FilterBeacon;
if(ctlr->family >= 7000)