diff options
| author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-02-10 00:14:17 +0100 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-02-10 00:14:17 +0100 |
| commit | 6ffe4e58b3829a982d37e293f5510103f587bae8 (patch) | |
| tree | 5c44c483a0455f73557ab591b3a3ba70d1ada1bd | |
| parent | 42045720006a174506eb7187df0d0449270cad0e (diff) | |
| download | plan9front-6ffe4e58b3829a982d37e293f5510103f587bae8.tar.xz | |
etheriwl: check RF-Kill switch on attach
| -rw-r--r-- | sys/src/9/pc/etheriwl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/src/9/pc/etheriwl.c b/sys/src/9/pc/etheriwl.c index ccb211647..66bfdd22f 100644 --- a/sys/src/9/pc/etheriwl.c +++ b/sys/src/9/pc/etheriwl.c @@ -1309,6 +1309,11 @@ iwlattach(Ether *edev) nexterror(); } if(ctlr->attached == 0){ + if((csr32r(ctlr, Gpc) & RfKill) == 0){ + print("#l%d: wifi disabled by switch\n", edev->ctlrno); + error("wifi disabled by switch"); + } + if(ctlr->wifi == nil) ctlr->wifi = wifiattach(edev, transmit); |
