etheriwl: check RF-Kill switch on attach
This commit is contained in:
parent
4204572000
commit
6ffe4e58b3
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue