diff options
author | Mohamed Abbas <mohamed.abbas@intel.com> | 2008-12-11 13:33:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-12 14:45:35 -0500 |
commit | edb342286e18c5bec6d3ac325851a9cba28061b9 (patch) | |
tree | 9bfcdae9b2cff7cc0ba8b8b16febcde573e08ca4 /drivers | |
parent | 3d5717ade01ce22511f2992f150bf6644b21c377 (diff) |
iwlwifi: fix resume while txpower off
This patch take care of coming out rfkill when the driver is up while
rfkill is on by restarting interface.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 06e268245077..cc4b6eba8a11 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1402,8 +1402,11 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1402 | * the driver as well won't allow loading if RFKILL is set | 1402 | * the driver as well won't allow loading if RFKILL is set |
1403 | * therefore no need to restart the driver from this handler | 1403 | * therefore no need to restart the driver from this handler |
1404 | */ | 1404 | */ |
1405 | if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) | 1405 | if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) { |
1406 | clear_bit(STATUS_RF_KILL_HW, &priv->status); | 1406 | clear_bit(STATUS_RF_KILL_HW, &priv->status); |
1407 | if (priv->is_open && !iwl_is_rfkill(priv)) | ||
1408 | queue_work(priv->workqueue, &priv->up); | ||
1409 | } | ||
1407 | 1410 | ||
1408 | handled |= CSR_INT_BIT_RF_KILL; | 1411 | handled |= CSR_INT_BIT_RF_KILL; |
1409 | } | 1412 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 6fc395092dfe..ced79112ed01 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1446,6 +1446,16 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) | |||
1446 | return 0; | 1446 | return 0; |
1447 | } | 1447 | } |
1448 | 1448 | ||
1449 | /* when driver is up while rfkill is on, it wont receive | ||
1450 | * any CARD_STATE_NOTIFICATION notifications so we have to | ||
1451 | * restart it in here | ||
1452 | */ | ||
1453 | if (priv->is_open && !test_bit(STATUS_ALIVE, &priv->status)) { | ||
1454 | clear_bit(STATUS_RF_KILL_SW, &priv->status); | ||
1455 | if (!iwl_is_rfkill(priv)) | ||
1456 | queue_work(priv->workqueue, &priv->up); | ||
1457 | } | ||
1458 | |||
1449 | /* If the driver is already loaded, it will receive | 1459 | /* If the driver is already loaded, it will receive |
1450 | * CARD_STATE_NOTIFICATION notifications and the handler will | 1460 | * CARD_STATE_NOTIFICATION notifications and the handler will |
1451 | * call restart to reload the driver. | 1461 | * call restart to reload the driver. |