iwlwifi: mvm: support aggs of 64 frames in A000 family
authorLiad Kaufman <liad.kaufman@intel.com>
Sun, 28 May 2017 11:20:04 +0000 (14:20 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 29 Jun 2017 10:26:25 +0000 (13:26 +0300)
A SCD bug was fixed in the A000 family, allowing to
support aggregations of 64 frames (rather than 63).

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/rs.c
drivers/net/wireless/intel/iwlwifi/mvm/rs.h
drivers/net/wireless/intel/iwlwifi/mvm/sta.c

index a02dda8d9ea3e2a110bfd162e7a2b33dfadac6e4..65beca3a457a19d2dcd804d01a590f7404e04f65 100644 (file)
@@ -3233,7 +3233,11 @@ static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm,
        if (num_of_ant(ant) == 1)
                lq_cmd->single_stream_ant_msk = ant;
 
-       lq_cmd->agg_frame_cnt_limit = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
+       if (!mvm->trans->cfg->gen2)
+               lq_cmd->agg_frame_cnt_limit = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
+       else
+               lq_cmd->agg_frame_cnt_limit =
+                       LINK_QUAL_AGG_FRAME_LIMIT_GEN2_DEF;
 }
 #endif /* CONFIG_MAC80211_DEBUGFS */
 
index 3abde1cb03034f9068230420072961371a187262..32b4d66debea224c0ae88c0ff8b7f1a48b120118 100644 (file)
@@ -145,6 +145,8 @@ enum {
 
 #define LINK_QUAL_AGG_FRAME_LIMIT_DEF  (63)
 #define LINK_QUAL_AGG_FRAME_LIMIT_MAX  (63)
+#define LINK_QUAL_AGG_FRAME_LIMIT_GEN2_DEF     (64)
+#define LINK_QUAL_AGG_FRAME_LIMIT_GEN2_MAX     (64)
 #define LINK_QUAL_AGG_FRAME_LIMIT_MIN  (0)
 
 #define LQ_SIZE                2       /* 2 mode tables:  "Active" and "Search" */
index 9ec4279665330d86ec900e3df12c4de53e813570..ee7c978fe5abdb1f9bf3921bcae0a6d81eba54f0 100644 (file)
@@ -1354,7 +1354,10 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,
        mvm_sta->mac_id_n_color = FW_CMD_ID_AND_COLOR(mvmvif->id,
                                                      mvmvif->color);
        mvm_sta->vif = vif;
-       mvm_sta->max_agg_bufsize = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
+       if (!mvm->trans->cfg->gen2)
+               mvm_sta->max_agg_bufsize = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
+       else
+               mvm_sta->max_agg_bufsize = LINK_QUAL_AGG_FRAME_LIMIT_GEN2_DEF;
        mvm_sta->tx_protection = 0;
        mvm_sta->tt_tx_protection = false;
        mvm_sta->sta_type = sta->tdls ? IWL_STA_TDLS_LINK : IWL_STA_LINK;
@@ -2677,7 +2680,11 @@ int iwl_mvm_sta_tx_agg_oper(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        BUILD_BUG_ON((sizeof(mvmsta->agg_tids) * BITS_PER_BYTE)
                     != IWL_MAX_TID_COUNT);
 
-       buf_size = min_t(int, buf_size, LINK_QUAL_AGG_FRAME_LIMIT_DEF);
+       if (!mvm->trans->cfg->gen2)
+               buf_size = min_t(int, buf_size, LINK_QUAL_AGG_FRAME_LIMIT_DEF);
+       else
+               buf_size = min_t(int, buf_size,
+                                LINK_QUAL_AGG_FRAME_LIMIT_GEN2_DEF);
 
        spin_lock_bh(&mvmsta->lock);
        ssn = tid_data->ssn;