iwlagn: set traffic load based on multiple factors

Current BT traffic load should based on the following conditions:

1. BT On/Off status
2. Channel announcement enable/disable
3. Curren traffic load report from uCode

Need to modify rate scale to down-grade from MIMO to SISO if detected
high BT traffic load. Also need to make sure not using chain "B" with high
BT traffic or if it is in "full concurrency" mode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 989e4a7..4410f82 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2823,6 +2823,7 @@
 	iwl_clear_driver_stations(priv);
 
 	/* reset BT coex data */
+	priv->bt_status = 0;
 	priv->bt_traffic_load = priv->cfg->bt_init_traffic_load;
 	priv->bt_sco_active = false;
 	priv->bt_full_concurrent = false;
@@ -3133,6 +3134,7 @@
 		bool bt_sco, bt_full_concurrent;
 		u8 bt_ci_compliance;
 		u8 bt_load;
+		u8 bt_status;
 
 		mutex_lock(&priv->mutex);
 		priv->vif = NULL;
@@ -3151,6 +3153,7 @@
 		bt_full_concurrent = priv->bt_full_concurrent;
 		bt_ci_compliance = priv->bt_ci_compliance;
 		bt_load = priv->bt_traffic_load;
+		bt_status = priv->bt_status;
 
 		__iwl_down(priv);
 
@@ -3158,6 +3161,7 @@
 		priv->bt_full_concurrent = bt_full_concurrent;
 		priv->bt_ci_compliance = bt_ci_compliance;
 		priv->bt_traffic_load = bt_load;
+		priv->bt_status = bt_status;
 
 		mutex_unlock(&priv->mutex);
 		iwl_cancel_deferred_work(priv);