ref: f783587f05a9839b92d986eb7268981f7894e054
parent: 84d5bbc6340856d85cfc498ffce91e90be90bf18
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Mar 17 14:21:01 EDT 2014
etheriwl: provide shutdown function
--- a/sys/src/9/pc/etheriwl.c
+++ b/sys/src/9/pc/etheriwl.c
@@ -2240,6 +2240,17 @@
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 @@
edev->attach = iwlattach;
edev->ifstat = iwlifstat;
edev->ctl = iwlctl;
+ edev->shutdown = iwlshutdown;
edev->promiscuous = iwlpromiscuous;
edev->multicast = nil;
edev->mbps = 10;