diff mbox

help with ath5k --- wlan0 no private ioctls

Message ID 20101126193754.GB5815@hash.localnet (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Bob Copeland Nov. 26, 2010, 7:37 p.m. UTC
None
diff mbox

Patch

diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 778c604..cf5393d 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -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;
 
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h
index 0f5a833..5079b88 100644
--- a/net/mac80211/rc80211_minstrel.h
+++ b/net/mac80211/rc80211_minstrel.h
@@ -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;