diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-23 10:57:01 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-25 14:33:22 -0400 |
commit | 511b082d29bc68c722abd34c1f0219b5754c1163 (patch) | |
tree | 1a16af8ebcee18a43cec8498e485b7cd63d6b617 /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | 59079949faed96cc2756d5a59c185b304f1bc840 (diff) |
iwlagn: keep BT settings across restart
The BT SCO needs to be re-applied to the device,
while the traffic load just needs to be correct
in software.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index a8a5a5b79f39..ecf7cf012679 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3079,10 +3079,30 @@ static void iwl_bg_restart(struct work_struct *data) | |||
3079 | return; | 3079 | return; |
3080 | 3080 | ||
3081 | if (test_and_clear_bit(STATUS_FW_ERROR, &priv->status)) { | 3081 | if (test_and_clear_bit(STATUS_FW_ERROR, &priv->status)) { |
3082 | bool bt_sco; | ||
3083 | u8 bt_load; | ||
3084 | |||
3082 | mutex_lock(&priv->mutex); | 3085 | mutex_lock(&priv->mutex); |
3083 | priv->vif = NULL; | 3086 | priv->vif = NULL; |
3084 | priv->is_open = 0; | 3087 | priv->is_open = 0; |
3088 | |||
3089 | /* | ||
3090 | * __iwl_down() will clear the BT status variables, | ||
3091 | * which is correct, but when we restart we really | ||
3092 | * want to keep them so restore them afterwards. | ||
3093 | * | ||
3094 | * The restart process will later pick them up and | ||
3095 | * re-configure the hw when we reconfigure the BT | ||
3096 | * command. | ||
3097 | */ | ||
3098 | bt_sco = priv->bt_sco_active; | ||
3099 | bt_load = priv->bt_traffic_load; | ||
3100 | |||
3085 | __iwl_down(priv); | 3101 | __iwl_down(priv); |
3102 | |||
3103 | priv->bt_sco_active = bt_sco; | ||
3104 | priv->bt_traffic_load = bt_load; | ||
3105 | |||
3086 | mutex_unlock(&priv->mutex); | 3106 | mutex_unlock(&priv->mutex); |
3087 | iwl_cancel_deferred_work(priv); | 3107 | iwl_cancel_deferred_work(priv); |
3088 | ieee80211_restart_hw(priv->hw); | 3108 | ieee80211_restart_hw(priv->hw); |