aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-07-14 20:14:06 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:16 -0400
commite8986436580caf50ebbd3bf8371074aadf95aba5 (patch)
tree504a61daf5013ffe81e67f5cbffd71bf87cbae25
parent7682a76df8f4e875e4029d95b799c712ee740ddc (diff)
mac80211: make minstrel/pid RC use ieee80211_is_data(fc)
Cc: Felix Fietkau <nbd@openwrt.org> Cc: Derek Smithies <derek@indranet.co.nz> Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/rc80211_minstrel.c7
-rw-r--r--net/mac80211/rc80211_pid_algo.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 37771abd8f5a..5bdce0c951dd 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -75,12 +75,11 @@ use_low_rate(struct sk_buff *skb)
75{ 75{
76 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 76 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
77 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 77 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
78 u16 fc; 78 __le16 fc;
79 79
80 fc = le16_to_cpu(hdr->frame_control); 80 fc = hdr->frame_control;
81 81
82 return ((info->flags & IEEE80211_TX_CTL_NO_ACK) || 82 return ((info->flags & IEEE80211_TX_CTL_NO_ACK) || !ieee80211_is_data(fc));
83 (fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA);
84} 83}
85 84
86 85
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c
index a0bef767ceb5..549607703bd8 100644
--- a/net/mac80211/rc80211_pid_algo.c
+++ b/net/mac80211/rc80211_pid_algo.c
@@ -280,7 +280,7 @@ rate_control_pid_get_rate(void *priv, struct ieee80211_sta *sta,
280 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 280 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
281 struct rc_pid_sta_info *spinfo = priv_sta; 281 struct rc_pid_sta_info *spinfo = priv_sta;
282 int rateidx; 282 int rateidx;
283 u16 fc; 283 __le16 fc;
284 284
285 if (txrc->rts) 285 if (txrc->rts)
286 info->control.rates[0].count = 286 info->control.rates[0].count =
@@ -290,9 +290,8 @@ rate_control_pid_get_rate(void *priv, struct ieee80211_sta *sta,
290 txrc->hw->conf.short_frame_max_tx_count; 290 txrc->hw->conf.short_frame_max_tx_count;
291 291
292 /* Send management frames and NO_ACK data using lowest rate. */ 292 /* Send management frames and NO_ACK data using lowest rate. */
293 fc = le16_to_cpu(hdr->frame_control); 293 fc = hdr->frame_control;
294 if (!sta || !spinfo || 294 if (!sta || !spinfo || !ieee80211_is_data(fc) ||
295 (fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA ||
296 info->flags & IEEE80211_TX_CTL_NO_ACK) { 295 info->flags & IEEE80211_TX_CTL_NO_ACK) {
297 info->control.rates[0].idx = rate_lowest_index(sband, sta); 296 info->control.rates[0].idx = rate_lowest_index(sband, sta);
298 if (info->flags & IEEE80211_TX_CTL_NO_ACK) 297 if (info->flags & IEEE80211_TX_CTL_NO_ACK)