@@ -424,10 +424,10 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
tx_time_cts += tx_time_single + mi->sp_ack_dur;
tx_time_rtscts += tx_time_single + 2 * mi->sp_ack_dur;
if ((tx_time_cts < mp->segment_size) &&
- (mr->retry_count_cts < mp->max_retry))
+ (mr->retry_count_cts < mp->max_long_retry))
mr->retry_count_cts++;
if ((tx_time_rtscts < mp->segment_size) &&
- (mr->retry_count_rtscts < mp->max_retry))
+ (mr->retry_count_rtscts < mp->max_long_retry))
mr->retry_count_rtscts++;
} while ((tx_time < mp->segment_size) &&
(++mr->retry_count < mp->max_retry));
@@ -526,6 +526,11 @@ minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
/* safe default, does not necessarily have to match hw properties */
mp->max_retry = 7;
+ mp->max_long_retry = min(mp->max_retry,
+ (unsigned int) hw->conf.long_frame_max_tx_count);
+ mp->max_retry = min(mp->max_retry,
+ (unsigned int) hw->conf.short_frame_max_tx_count);
+
if (hw->max_rates >= 4)
mp->has_mrr = true;
@@ -73,6 +73,7 @@ struct minstrel_priv {
unsigned int cw_min;
unsigned int cw_max;
unsigned int max_retry;
+ unsigned int max_long_retry;
unsigned int ewma_level;
unsigned int segment_size;
unsigned int update_interval;