aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-11-08 17:54:37 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-11-16 10:44:00 -0500
commit66e863a527f9ed3a871797862aaf0d62b0954813 (patch)
treebaae6698d42d87b121557cd06414e254252f3f2a /drivers/net/wireless
parent95a5ede3ee9269e175bfe0e6f5a4a5fd2914ed6a (diff)
iwlagn: support dynamic aggregation for BT coex
Use dynamic aggregation threshold if bt traffic load is high to reduce the impact on aggregated frame. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c32
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h3
7 files changed, 23 insertions, 24 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index c7ff1bdf42c..d8f9df699d8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -546,6 +546,7 @@ static struct iwl_bt_params iwl6000_bt_params = {
546 .bt_statistics = true, 546 .bt_statistics = true,
547 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 547 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
548 .advanced_bt_coexist = true, 548 .advanced_bt_coexist = true,
549 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
549 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, 550 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
550 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, 551 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
551}; 552};
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index ca3530c4295..c6f65fd7675 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -2025,7 +2025,6 @@ void iwlagn_bt_coex_profile_notif(struct iwl_priv *priv,
2025 struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif; 2025 struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif;
2026 struct iwlagn_bt_sco_cmd sco_cmd = { .flags = 0 }; 2026 struct iwlagn_bt_sco_cmd sco_cmd = { .flags = 0 };
2027 struct iwl_bt_uart_msg *uart_msg = &coex->last_bt_uart_msg; 2027 struct iwl_bt_uart_msg *uart_msg = &coex->last_bt_uart_msg;
2028 u8 last_traffic_load;
2029 2028
2030 IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n"); 2029 IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n");
2031 IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status); 2030 IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status);
@@ -2034,11 +2033,10 @@ void iwlagn_bt_coex_profile_notif(struct iwl_priv *priv,
2034 coex->bt_ci_compliance); 2033 coex->bt_ci_compliance);
2035 iwlagn_print_uartmsg(priv, uart_msg); 2034 iwlagn_print_uartmsg(priv, uart_msg);
2036 2035
2037 last_traffic_load = priv->notif_bt_traffic_load; 2036 priv->last_bt_traffic_load = priv->bt_traffic_load;
2038 priv->notif_bt_traffic_load = coex->bt_traffic_load;
2039 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) { 2037 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
2040 if (priv->bt_status != coex->bt_status || 2038 if (priv->bt_status != coex->bt_status ||
2041 last_traffic_load != coex->bt_traffic_load) { 2039 priv->last_bt_traffic_load != coex->bt_traffic_load) {
2042 if (coex->bt_status) { 2040 if (coex->bt_status) {
2043 /* BT on */ 2041 /* BT on */
2044 if (!priv->bt_ch_announce) 2042 if (!priv->bt_ch_announce)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 065553629de..f450adc7236 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -833,17 +833,23 @@ static void rs_bt_update_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
833 struct iwl_lq_sta *lq_sta) 833 struct iwl_lq_sta *lq_sta)
834{ 834{
835 struct iwl_scale_tbl_info *tbl; 835 struct iwl_scale_tbl_info *tbl;
836 bool full_concurrent; 836 bool full_concurrent = priv->bt_full_concurrent;
837 unsigned long flags; 837 unsigned long flags;
838 838
839 spin_lock_irqsave(&priv->lock, flags); 839 if (priv->bt_ant_couple_ok) {
840 if (priv->bt_ci_compliance && priv->bt_ant_couple_ok) 840 /*
841 full_concurrent = true; 841 * Is there a need to switch between
842 else 842 * full concurrency and 3-wire?
843 full_concurrent = false; 843 */
844 spin_unlock_irqrestore(&priv->lock, flags); 844 spin_lock_irqsave(&priv->lock, flags);
845 845 if (priv->bt_ci_compliance && priv->bt_ant_couple_ok)
846 if (priv->bt_full_concurrent != full_concurrent) { 846 full_concurrent = true;
847 else
848 full_concurrent = false;
849 spin_unlock_irqrestore(&priv->lock, flags);
850 }
851 if ((priv->bt_traffic_load != priv->last_bt_traffic_load) ||
852 (priv->bt_full_concurrent != full_concurrent)) {
847 priv->bt_full_concurrent = full_concurrent; 853 priv->bt_full_concurrent = full_concurrent;
848 854
849 /* Update uCode's rate table. */ 855 /* Update uCode's rate table. */
@@ -1040,8 +1046,7 @@ done:
1040 if (sta && sta->supp_rates[sband->band]) 1046 if (sta && sta->supp_rates[sband->band])
1041 rs_rate_scale_perform(priv, skb, sta, lq_sta); 1047 rs_rate_scale_perform(priv, skb, sta, lq_sta);
1042 1048
1043 /* Is there a need to switch between full concurrency and 3-wire? */ 1049 if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist)
1044 if (priv->bt_ant_couple_ok)
1045 rs_bt_update_lq(priv, ctx, lq_sta); 1050 rs_bt_update_lq(priv, ctx, lq_sta);
1046} 1051}
1047 1052
@@ -3010,10 +3015,7 @@ static void rs_fill_link_cmd(struct iwl_priv *priv,
3010 */ 3015 */
3011 if (priv && priv->cfg->bt_params && 3016 if (priv && priv->cfg->bt_params &&
3012 priv->cfg->bt_params->agg_time_limit && 3017 priv->cfg->bt_params->agg_time_limit &&
3013 priv->cfg->bt_params->agg_time_limit >= 3018 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)
3014 LINK_QUAL_AGG_TIME_LIMIT_MIN &&
3015 priv->cfg->bt_params->agg_time_limit <=
3016 LINK_QUAL_AGG_TIME_LIMIT_MAX)
3017 lq_cmd->agg_params.agg_time_limit = 3019 lq_cmd->agg_params.agg_time_limit =
3018 cpu_to_le16(priv->cfg->bt_params->agg_time_limit); 3020 cpu_to_le16(priv->cfg->bt_params->agg_time_limit);
3019} 3021}
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 007fb20d78a..d97691261ac 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3837,7 +3837,6 @@ static int iwl_init_drv(struct iwl_priv *priv)
3837 priv->bt_on_thresh = BT_ON_THRESHOLD_DEF; 3837 priv->bt_on_thresh = BT_ON_THRESHOLD_DEF;
3838 priv->bt_duration = BT_DURATION_LIMIT_DEF; 3838 priv->bt_duration = BT_DURATION_LIMIT_DEF;
3839 priv->dynamic_frag_thresh = BT_FRAG_THRESHOLD_DEF; 3839 priv->dynamic_frag_thresh = BT_FRAG_THRESHOLD_DEF;
3840 priv->dynamic_agg_thresh = BT_AGG_THRESHOLD_DEF;
3841 } 3840 }
3842 3841
3843 /* Set the tx_power_user_lmt to the lowest power level 3842 /* Set the tx_power_user_lmt to the lowest power level
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index c884ed385fc..c41f5a87821 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1469,7 +1469,7 @@ static void iwl_teardown_interface(struct iwl_priv *priv,
1469 * both values are the same and zero. 1469 * both values are the same and zero.
1470 */ 1470 */
1471 if (vif->type == NL80211_IFTYPE_ADHOC) 1471 if (vif->type == NL80211_IFTYPE_ADHOC)
1472 priv->bt_traffic_load = priv->notif_bt_traffic_load; 1472 priv->bt_traffic_load = priv->last_bt_traffic_load;
1473} 1473}
1474 1474
1475void iwl_mac_remove_interface(struct ieee80211_hw *hw, 1475void iwl_mac_remove_interface(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 8fdd4efdb1d..4876e26e054 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -1580,7 +1580,7 @@ static ssize_t iwl_dbgfs_bt_traffic_read(struct file *file,
1580 priv->bt_full_concurrent ? "full concurrency" : "3-wire"); 1580 priv->bt_full_concurrent ? "full concurrency" : "3-wire");
1581 pos += scnprintf(buf + pos, bufsz - pos, "BT status: %s, " 1581 pos += scnprintf(buf + pos, bufsz - pos, "BT status: %s, "
1582 "last traffic notif: %d\n", 1582 "last traffic notif: %d\n",
1583 priv->bt_status ? "On" : "Off", priv->notif_bt_traffic_load); 1583 priv->bt_status ? "On" : "Off", priv->last_bt_traffic_load);
1584 pos += scnprintf(buf + pos, bufsz - pos, "ch_announcement: %d, " 1584 pos += scnprintf(buf + pos, bufsz - pos, "ch_announcement: %d, "
1585 "sco_active: %d, kill_ack_mask: %x, " 1585 "sco_active: %d, kill_ack_mask: %x, "
1586 "kill_cts_mask: %x\n", 1586 "kill_cts_mask: %x\n",
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 9fcaaf0cfe9..ea81ced1375 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1471,7 +1471,7 @@ struct iwl_priv {
1471 1471
1472 /* bt coex */ 1472 /* bt coex */
1473 u8 bt_status; 1473 u8 bt_status;
1474 u8 bt_traffic_load, notif_bt_traffic_load; 1474 u8 bt_traffic_load, last_bt_traffic_load;
1475 bool bt_ch_announce; 1475 bool bt_ch_announce;
1476 bool bt_sco_active; 1476 bool bt_sco_active;
1477 bool bt_full_concurrent; 1477 bool bt_full_concurrent;
@@ -1482,7 +1482,6 @@ struct iwl_priv {
1482 u16 bt_on_thresh; 1482 u16 bt_on_thresh;
1483 u16 bt_duration; 1483 u16 bt_duration;
1484 u16 dynamic_frag_thresh; 1484 u16 dynamic_frag_thresh;
1485 u16 dynamic_agg_thresh;
1486 u8 bt_ci_compliance; 1485 u8 bt_ci_compliance;
1487 struct work_struct bt_traffic_change_work; 1486 struct work_struct bt_traffic_change_work;
1488 1487