diff mbox

iwl3945: do not print RFKILL message

Message ID 20131025103751.GB16384@redhat.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Stanislaw Gruszka Oct. 25, 2013, 10:37 a.m. UTC
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>
---
 drivers/net/wireless/iwlegacy/3945-mac.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Johannes Berg Oct. 25, 2013, 11:17 a.m. UTC | #1
On Fri, 2013-10-25 at 12:37 +0200, Stanislaw Gruszka wrote:
> 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.

Are you maybe not calling wiphy_rfkill_set_hw_state() in the right
places?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index dea3b50..f7c2145 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -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);