iwl3945: do not print RFKILL message
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 25 Oct 2013 10:37:54 +0000 (12:37 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Dec 2013 19:54:44 +0000 (14:54 -0500)
We can mess logs if user space try to open device again and again if
RFKILL switch is on. Do not print message and return ERFKILL error
instead to indicate where the problem is.

Note that iwl4965 handle this problem differently, it allows to open
device when radio is disabled.

Reported-by: Dietmar Rudolph <dietmar@crlf.de>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/3945-mac.c

index 5c3bcedd679ba06b122e1ef5e05c18973980485b..0487461ae4da22053607bb49178e296787e18dc3 100644 (file)
@@ -2396,8 +2396,7 @@ __il3945_up(struct il_priv *il)
                clear_bit(S_RFKILL, &il->status);
        else {
                set_bit(S_RFKILL, &il->status);
-               IL_WARN("Radio disabled by HW RF Kill switch\n");
-               return -ENODEV;
+               return -ERFKILL;
        }
 
        _il_wr(il, CSR_INT, 0xFFFFFFFF);