diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-06-30 05:23:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-30 17:37:44 -0400 |
commit | a9efa652cbfead13bbe200878f8a2d74f3543e1b (patch) | |
tree | d8f42b1a09053750c0f74710232669a95da33134 /drivers/net/wireless/iwlwifi/iwl-core.c | |
parent | 154b25ce9218fbe6eebacef7907fabf6d663e639 (diff) |
iwlwifi: clean up HW RF-kill state machine and restarts
This patch cleans up HW RF-kill state machine.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 08a42a70962e..eee220cf52a2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1407,7 +1407,14 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) | |||
1407 | spin_lock_irqsave(&priv->lock, flags); | 1407 | spin_lock_irqsave(&priv->lock, flags); |
1408 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); | 1408 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); |
1409 | 1409 | ||
1410 | clear_bit(STATUS_RF_KILL_SW, &priv->status); | 1410 | /* If the driver is up it will receive CARD_STATE_NOTIFICATION |
1411 | * notification where it will clear SW rfkill status. | ||
1412 | * Setting it here would break the handler. Only if the | ||
1413 | * interface is down we can set here since we don't | ||
1414 | * receive any further notification. | ||
1415 | */ | ||
1416 | if (!priv->is_open) | ||
1417 | clear_bit(STATUS_RF_KILL_SW, &priv->status); | ||
1411 | spin_unlock_irqrestore(&priv->lock, flags); | 1418 | spin_unlock_irqrestore(&priv->lock, flags); |
1412 | 1419 | ||
1413 | /* wake up ucode */ | 1420 | /* wake up ucode */ |
@@ -1425,8 +1432,10 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) | |||
1425 | return 0; | 1432 | return 0; |
1426 | } | 1433 | } |
1427 | 1434 | ||
1428 | if (priv->is_open) | 1435 | /* If the driver is already loaded, it will receive |
1429 | queue_work(priv->workqueue, &priv->restart); | 1436 | * CARD_STATE_NOTIFICATION notifications and the handler will |
1437 | * call restart to reload the driver. | ||
1438 | */ | ||
1430 | return 1; | 1439 | return 1; |
1431 | } | 1440 | } |
1432 | EXPORT_SYMBOL(iwl_radio_kill_sw_enable_radio); | 1441 | EXPORT_SYMBOL(iwl_radio_kill_sw_enable_radio); |