From f783587f05a9839b92d986eb7268981f7894e054 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 17 Mar 2014 18:21:01 +0100 Subject: [PATCH] etheriwl: provide shutdown function --- sys/src/9/pc/etheriwl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/src/9/pc/etheriwl.c b/sys/src/9/pc/etheriwl.c index 03f9f7b54..50c134c85 100644 --- a/sys/src/9/pc/etheriwl.c +++ b/sys/src/9/pc/etheriwl.c @@ -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;