diff options
author | Adel Gadllah <adel.gadllah@gmail.com> | 2008-07-01 11:49:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-07-08 10:21:35 -0400 |
commit | 80fcc9e28cf3a209fbfb39a7bbddc313c59c7424 (patch) | |
tree | fe77fdd591652db82a87bff12d4b1528a1ecdfe4 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | ebd74487d4b7a48ab8513ecfe3d321346d7c602e (diff) |
iwlwifi: remove input device and fix rfkill state
This patch fixes the iwlwifi rfkill. It removes the input device from iwl3945,
adds support for RFKILL_STATE_HARD_BLOCKED and calls rfkill_force_state() to
update the state rather than accessing it directly.
The calls to iwl|iwl3945_rfkill_set_hw_state() had to be moved because
rfkill_force_state() cannot be called from an atomic context.
Tested on iwl3945 and seems to work fine.
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Ivo van Doorn <ivdoorn@gmail.com>
Cc: Fabien Crespel <fcrespel@gmail.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 60b7a6498fe8..7f65d9123b2a 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -2187,13 +2187,11 @@ static int __iwl4965_up(struct iwl_priv *priv) | |||
2187 | 2187 | ||
2188 | if (!test_bit(STATUS_IN_SUSPEND, &priv->status) && | 2188 | if (!test_bit(STATUS_IN_SUSPEND, &priv->status) && |
2189 | iwl_is_rfkill(priv)) { | 2189 | iwl_is_rfkill(priv)) { |
2190 | iwl_rfkill_set_hw_state(priv); | ||
2191 | IWL_WARNING("Radio disabled by %s RF Kill switch\n", | 2190 | IWL_WARNING("Radio disabled by %s RF Kill switch\n", |
2192 | test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW"); | 2191 | test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW"); |
2193 | return -ENODEV; | 2192 | return -ENODEV; |
2194 | } | 2193 | } |
2195 | 2194 | ||
2196 | iwl_rfkill_set_hw_state(priv); | ||
2197 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); | 2195 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); |
2198 | 2196 | ||
2199 | ret = priv->cfg->ops->lib->alloc_shared_mem(priv); | 2197 | ret = priv->cfg->ops->lib->alloc_shared_mem(priv); |
@@ -2330,9 +2328,8 @@ static void iwl4965_bg_rf_kill(struct work_struct *work) | |||
2330 | "Kill switch must be turned off for " | 2328 | "Kill switch must be turned off for " |
2331 | "wireless networking to work.\n"); | 2329 | "wireless networking to work.\n"); |
2332 | } | 2330 | } |
2333 | iwl_rfkill_set_hw_state(priv); | ||
2334 | |||
2335 | mutex_unlock(&priv->mutex); | 2331 | mutex_unlock(&priv->mutex); |
2332 | iwl_rfkill_set_hw_state(priv); | ||
2336 | } | 2333 | } |
2337 | 2334 | ||
2338 | static void iwl4965_bg_set_monitor(struct work_struct *work) | 2335 | static void iwl4965_bg_set_monitor(struct work_struct *work) |
@@ -2390,6 +2387,7 @@ static void iwl4965_bg_up(struct work_struct *data) | |||
2390 | mutex_lock(&priv->mutex); | 2387 | mutex_lock(&priv->mutex); |
2391 | __iwl4965_up(priv); | 2388 | __iwl4965_up(priv); |
2392 | mutex_unlock(&priv->mutex); | 2389 | mutex_unlock(&priv->mutex); |
2390 | iwl_rfkill_set_hw_state(priv); | ||
2393 | } | 2391 | } |
2394 | 2392 | ||
2395 | static void iwl4965_bg_restart(struct work_struct *data) | 2393 | static void iwl4965_bg_restart(struct work_struct *data) |
@@ -2604,6 +2602,8 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw) | |||
2604 | 2602 | ||
2605 | mutex_unlock(&priv->mutex); | 2603 | mutex_unlock(&priv->mutex); |
2606 | 2604 | ||
2605 | iwl_rfkill_set_hw_state(priv); | ||
2606 | |||
2607 | if (ret) | 2607 | if (ret) |
2608 | goto out_release_irq; | 2608 | goto out_release_irq; |
2609 | 2609 | ||