diff options
author | John W. Linville <linville@tuxdriver.com> | 2008-06-27 10:27:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-27 10:27:47 -0400 |
commit | ff28bd94e307c67abb1bccda5d3a9018bd798e08 (patch) | |
tree | 20788c3b91820fa7763a479aee27d27276ce4e9c /drivers/net/wireless/iwlwifi/iwl-rfkill.c | |
parent | d195a2ca46ec50e3b5c045a36d1defb6e04cc6b7 (diff) |
wireless: remove RFKILL_STATE_HARD_BLOCKED warnings
CC [M] drivers/net/wireless/b43/rfkill.o
drivers/net/wireless/b43/rfkill.c: In function ‘b43_rfkill_soft_toggle’:
drivers/net/wireless/b43/rfkill.c:90: warning: enumeration value ‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch
CC [M] drivers/net/wireless/b43legacy/rfkill.o
drivers/net/wireless/b43legacy/rfkill.c: In function ‘b43legacy_rfkill_soft_toggle’:
drivers/net/wireless/b43legacy/rfkill.c:92: warning: enumeration value ‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch
CC [M] drivers/net/wireless/iwlwifi/iwl-rfkill.o
drivers/net/wireless/iwlwifi/iwl-rfkill.c: In function ‘iwl_rfkill_soft_rf_kill’:
drivers/net/wireless/iwlwifi/iwl-rfkill.c:56: warning: enumeration value ‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch
Also handle RFKILL_STATE_{ON,OFF} -> RFKILL_STATE_{UNBLOCKED,SOFT_BLOCKED}
conversion since I'm already here...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rfkill.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rfkill.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rfkill.c b/drivers/net/wireless/iwlwifi/iwl-rfkill.c index 4624ac7b4980..ffefbb487e12 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rfkill.c +++ b/drivers/net/wireless/iwlwifi/iwl-rfkill.c | |||
@@ -54,17 +54,20 @@ static int iwl_rfkill_soft_rf_kill(void *data, enum rfkill_state state) | |||
54 | mutex_lock(&priv->mutex); | 54 | mutex_lock(&priv->mutex); |
55 | 55 | ||
56 | switch (state) { | 56 | switch (state) { |
57 | case RFKILL_STATE_ON: | 57 | case RFKILL_STATE_UNBLOCKED: |
58 | iwl_radio_kill_sw_enable_radio(priv); | 58 | iwl_radio_kill_sw_enable_radio(priv); |
59 | /* if HW rf-kill is set dont allow ON state */ | 59 | /* if HW rf-kill is set dont allow ON state */ |
60 | if (iwl_is_rfkill(priv)) | 60 | if (iwl_is_rfkill(priv)) |
61 | err = -EBUSY; | 61 | err = -EBUSY; |
62 | break; | 62 | break; |
63 | case RFKILL_STATE_OFF: | 63 | case RFKILL_STATE_SOFT_BLOCKED: |
64 | iwl_radio_kill_sw_disable_radio(priv); | 64 | iwl_radio_kill_sw_disable_radio(priv); |
65 | if (!iwl_is_rfkill(priv)) | 65 | if (!iwl_is_rfkill(priv)) |
66 | err = -EBUSY; | 66 | err = -EBUSY; |
67 | break; | 67 | break; |
68 | default: | ||
69 | IWL_WARNING("we recieved unexpected RFKILL state %d\n", state); | ||
70 | break; | ||
68 | } | 71 | } |
69 | mutex_unlock(&priv->mutex); | 72 | mutex_unlock(&priv->mutex); |
70 | 73 | ||