iwl3945: do not print RFKILL message
PATCH 1/1 iwl3945: do not print RFKILL message
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.
--- drivers/net/wireless/iwlegacy/3945-mac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/iwlegacy/3945-mac.c +1 -2
@@ -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 );
Signature · 1 line
1.8.3.1
Johannes Berg
maintainerQuoted 3 lines · Stanislaw Gruszka
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
Quoted 7 lines · Johannes Berg
Quoted 3 lines · Stanislaw Gruszka
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?
This is done from work scheduled every 2 second if rfkill state change, but is possible that initial state is not provided to upper layer.
Dietmar or Pedro, could you test attached patch (my old laptop with 3945 does not work any longer). It is alternative to previous patch posted before, does rfkill work ok with it?
Stanislaw
drivers/net/wireless/iwlegacy/3945-mac.c +8 -1
@@ -2202,6 +2202,9 @@ il3945_alive_start(struct il_priv *il) }else set_bit (S_RFKILL , &il->status); +wiphy_rfkill_set_hw_state (il->hw->wiphy, +test_bit (S_RFKILL , &il->status)); +/* After the ALIVE response, we can send commands to 3945 uCode */ set_bit (S_ALIVE , &il->status);
@@ -2397,7 +2400,7 @@ __il3945_up(struct il_priv *il)else {set_bit (S_RFKILL , &il->status);IL_WARN ("Radio disabled by HW RF Kill switch\n" ); -return -ENODEV ; +return 0 ; }_il_wr (il,CSR_INT ,0xFFFFFFFF );
@@ -2825,6 +2828,9 @@ il3945_mac_start(struct ieee80211_hw *hw)if (ret) goto out_release_irq; +if (il_is_rfkill (il)) + goto out; +D_INFO ("Start UP work.\n" );/* Wait for START_ALIVE from ucode. Otherwise callbacks from
@@ -2845,6 +2851,7 @@ il3945_mac_start(struct ieee80211_hw *hw)* no need to poll the killswitch state anymore */ cancel_delayed_work (&il->_3945.rfkill_poll); +out: il->is_open =1 ;D_MAC80211 ("leave\n" );return 0 ;
Quoted 3 lines
Dietmar or Pedro, could you test attached patch (my old laptop with 3945 does not work any longer). It is alternative to previous patch posted before, does rfkill work ok with it?
Stanislaw,
I'm sorry a cannot be any help here as I don't have the time nor the environment to compile and test your patch.
In regard to this, I'm just a plain end user who installed Ubuntu out of the box. I had nticed the problem of the ever growing kernel log and found this mailing list to be the right spot to post a bug report. And I noticed your immediate reaction. Keep up the great work.
Kind regards
Dietmar
Signature · 10 lines
Dietmar Rudolph Geschäftsführer/President CR/LF GmbH Obere Fuhr 27, 45136 Essen, Germany phone: ++49 201 254566 mailto: [email protected], http://www.crlf.de CR/LF Beratungsgesellschaft für EDV-Anwendungen mbH Essen HRB 7016 - GF: Dipl.-Math. Dietmar Rudolph
Quoted 3 lines · Stanislaw Gruszka
Dietmar or Pedro, could you test attached patch (my old laptop with 3945 does not work any longer). It is alternative to previous patch posted before, does rfkill work ok with it?
My main laptop is no longer the one with the 3945. That being said, I still intend to test the other patches (powersave) and I can add this one to the mix, I just don't know when :)
Signature · 1 line
Pedro