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 | |
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 20 |
2 files changed, 36 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 51419444834f..22676d960d6e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -241,6 +241,22 @@ static void iwl6000g2b_send_bt_config(struct iwl_priv *priv) | |||
241 | 241 | ||
242 | if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd)) | 242 | if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd)) |
243 | IWL_ERR(priv, "failed to send BT Coex Config\n"); | 243 | IWL_ERR(priv, "failed to send BT Coex Config\n"); |
244 | |||
245 | /* | ||
246 | * When we are doing a restart, need to also reconfigure BT | ||
247 | * SCO to the device. If not doing a restart, bt_sco_active | ||
248 | * will always be false, so there's no need to have an extra | ||
249 | * variable to check for it. | ||
250 | */ | ||
251 | if (priv->bt_sco_active) { | ||
252 | struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 }; | ||
253 | |||
254 | if (priv->bt_sco_active) | ||
255 | sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE; | ||
256 | if (iwl_send_cmd_pdu(priv, REPLY_BT_COEX_SCO, | ||
257 | sizeof(sco_cmd), &sco_cmd)) | ||
258 | IWL_ERR(priv, "failed to send BT SCO command\n"); | ||
259 | } | ||
244 | } | 260 | } |
245 | 261 | ||
246 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { | 262 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { |
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); |