etheriwl: provide shutdown function
This commit is contained in:
parent
84d5bbc634
commit
f783587f05
1 changed files with 12 additions and 0 deletions
|
@ -2240,6 +2240,17 @@ done:
|
||||||
iunlock(ctlr);
|
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 Ctlr *iwlhead, *iwltail;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2345,6 +2356,7 @@ again:
|
||||||
edev->attach = iwlattach;
|
edev->attach = iwlattach;
|
||||||
edev->ifstat = iwlifstat;
|
edev->ifstat = iwlifstat;
|
||||||
edev->ctl = iwlctl;
|
edev->ctl = iwlctl;
|
||||||
|
edev->shutdown = iwlshutdown;
|
||||||
edev->promiscuous = iwlpromiscuous;
|
edev->promiscuous = iwlpromiscuous;
|
||||||
edev->multicast = nil;
|
edev->multicast = nil;
|
||||||
edev->mbps = 10;
|
edev->mbps = 10;
|
||||||
|
|
Loading…
Reference in a new issue