iwlwifi: mvm: disable tx aggregation on low latency vifs
authorEyal Shapira <eyal@wizery.com>
Wed, 27 Aug 2014 23:21:05 +0000 (02:21 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 3 Sep 2014 19:33:17 +0000 (22:33 +0300)
Aggregations hit latency so disable it by default on
low latency vifs for now. Enable control over this behavior and
allow control over the max frames in an AMPDU in low latency
vifs via debugfs.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/debugfs.c
drivers/net/wireless/iwlwifi/mvm/mvm.h
drivers/net/wireless/iwlwifi/mvm/ops.c
drivers/net/wireless/iwlwifi/mvm/rs.c

index 1fcbc23678c434dc220f8449074f79785bef22c8..f85d4f4519f6ac2408f09e8bd296ca0b5fbb26fe 100644 (file)
@@ -1447,6 +1447,10 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
                goto err;
 #endif
 
+       if (!debugfs_create_u8("low_latency_agg_frame_limit", S_IRUSR | S_IWUSR,
+                              mvm->debugfs_dir,
+                              &mvm->low_latency_agg_frame_limit))
+               goto err;
        if (!debugfs_create_u8("ps_disabled", S_IRUSR,
                               mvm->debugfs_dir, &mvm->ps_disabled))
                goto err;
index d6b00b97ae66bd054f62d66198eb7b8e1209a7c7..08cb26d86be2651bb72e5275c7d0540eed43e978 100644 (file)
@@ -727,6 +727,8 @@ struct iwl_mvm {
 
        /* system time of last beacon (for AP/GO interface) */
        u32 ap_last_beacon_gp2;
+
+       u8 low_latency_agg_frame_limit;
 };
 
 /* Extract MVM priv from op_mode and _hw */
index 610dbcb0dc279d97dda32ded4df2b387a4577333..e3be34f6aa4154528f2ec0c9ee2fff1755c2dc8c 100644 (file)
@@ -415,6 +415,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
                mvm->first_agg_queue = 12;
        }
        mvm->sf_state = SF_UNINIT;
+       mvm->low_latency_agg_frame_limit = 1;
 
        mutex_init(&mvm->mutex);
        mutex_init(&mvm->d0i3_suspend_mutex);
index b7a1efcac48054495cb2f958b615d900fb1b953c..940e0d02501268f7aa20388d78a93b5a185660c0 100644 (file)
@@ -2855,9 +2855,15 @@ static void rs_fill_lq_cmd(struct iwl_mvm *mvm,
         * Tx Fifo so that it can start a transaction in the same TxOP. This
         * basically allows the firmware to send bursts.
         */
-       if (iwl_mvm_vif_low_latency(mvmvif))
+       if (iwl_mvm_vif_low_latency(mvmvif)) {
                lq_cmd->agg_frame_cnt_limit--;
 
+               if (mvm->low_latency_agg_frame_limit)
+                       lq_cmd->agg_frame_cnt_limit =
+                               min(lq_cmd->agg_frame_cnt_limit,
+                                   mvm->low_latency_agg_frame_limit);
+       }
+
        if (mvmsta->vif->p2p)
                lq_cmd->flags |= LQ_FLAG_USE_RTS_MSK;