etheriwl: check RF-Kill switch on attach

This commit is contained in:
cinap_lenrek 2013-02-10 00:14:17 +01:00
parent 4204572000
commit 6ffe4e58b3

View file

@ -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);