aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rc80211_minstrel.c')
-rw-r--r--net/mac80211/rc80211_minstrel.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 5bdce0c951dd..7c5142988bbb 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -70,19 +70,6 @@ rix_to_ndx(struct minstrel_sta_info *mi, int rix)
70 return i; 70 return i;
71} 71}
72 72
73static inline bool
74use_low_rate(struct sk_buff *skb)
75{
76 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
77 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
78 __le16 fc;
79
80 fc = hdr->frame_control;
81
82 return ((info->flags & IEEE80211_TX_CTL_NO_ACK) || !ieee80211_is_data(fc));
83}
84
85
86static void 73static void
87minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi) 74minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
88{ 75{
@@ -231,7 +218,6 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
231 void *priv_sta, struct ieee80211_tx_rate_control *txrc) 218 void *priv_sta, struct ieee80211_tx_rate_control *txrc)
232{ 219{
233 struct sk_buff *skb = txrc->skb; 220 struct sk_buff *skb = txrc->skb;
234 struct ieee80211_supported_band *sband = txrc->sband;
235 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 221 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
236 struct minstrel_sta_info *mi = priv_sta; 222 struct minstrel_sta_info *mi = priv_sta;
237 struct minstrel_priv *mp = priv; 223 struct minstrel_priv *mp = priv;
@@ -244,14 +230,8 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
244 int mrr_ndx[3]; 230 int mrr_ndx[3];
245 int sample_rate; 231 int sample_rate;
246 232
247 if (!sta || !mi || use_low_rate(skb)) { 233 if (rate_control_send_low(sta, priv_sta, txrc))
248 ar[0].idx = rate_lowest_index(sband, sta);
249 if (info->flags & IEEE80211_TX_CTL_NO_ACK)
250 ar[0].count = 1;
251 else
252 ar[0].count = mp->max_retry;
253 return; 234 return;
254 }
255 235
256 mrr = mp->has_mrr && !txrc->rts && !txrc->bss_conf->use_cts_prot; 236 mrr = mp->has_mrr && !txrc->rts && !txrc->bss_conf->use_cts_prot;
257 237