]> git.lizzy.rs Git - plan9front.git/commitdiff
etheriwl: provide shutdown function
authorcinap_lenrek <cinap_lenrek@felloff.net>
Mon, 17 Mar 2014 17:21:01 +0000 (18:21 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Mon, 17 Mar 2014 17:21:01 +0000 (18:21 +0100)
sys/src/9/pc/etheriwl.c

index 03f9f7b5415056b981128175c0ca73af1deba405..50c134c85eb13554cf4380f7de188f7f4024a699 100644 (file)
@@ -2240,6 +2240,17 @@ done:
        iunlock(ctlr);
 }
 
+static void
+iwlshutdown(Ether *edev)
+{
+       Ctlr *ctlr;
+
+       ctlr = edev->ctlr;
+       if(ctlr->power)
+               poweroff(ctlr);
+       ctlr->broken = 0;
+}
+
 static Ctlr *iwlhead, *iwltail;
 
 static void
@@ -2345,6 +2356,7 @@ again:
        edev->attach = iwlattach;
        edev->ifstat = iwlifstat;
        edev->ctl = iwlctl;
+       edev->shutdown = iwlshutdown;
        edev->promiscuous = iwlpromiscuous;
        edev->multicast = nil;
        edev->mbps = 10;