iwlwifi: mvm: limit the length of the AMPDU when BT is running
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 28 May 2013 18:31:50 +0000 (21:31 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 4 Jun 2013 11:13:11 +0000 (13:13 +0200)
This holds for existing BA agreements.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/mvm/rs.c

index 6a050c69e7d071b8ef33179fb6cad3efdcb2f645..7dfc212c4f0eafbc7c089394b53255c5f77b574a 100644 (file)
@@ -2782,6 +2782,13 @@ static void rs_fill_link_cmd(struct iwl_mvm *mvm,
 
        lq_cmd->agg_time_limit =
                cpu_to_le16(LINK_QUAL_AGG_TIME_LIMIT_DEF);
+
+       /*
+        * overwrite if needed, pass aggregation time limit
+        * to uCode in uSec - This is racy - but heh, at least it helps...
+        */
+       if (mvm && BT_MBOX_MSG(&mvm->last_bt_notif, 3, TRAFFIC_LOAD) >= 2)
+               lq_cmd->agg_time_limit = cpu_to_le16(1200);
 }
 
 static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)