diff options
Diffstat (limited to 'net/mac80211/rc80211_minstrel.c')
| -rw-r--r-- | net/mac80211/rc80211_minstrel.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 79633ae06fd6..8c5acdc06226 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c | |||
| @@ -154,6 +154,7 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
| 154 | struct ieee80211_sta *sta, void *priv_sta, | 154 | struct ieee80211_sta *sta, void *priv_sta, |
| 155 | struct sk_buff *skb) | 155 | struct sk_buff *skb) |
| 156 | { | 156 | { |
| 157 | struct minstrel_priv *mp = priv; | ||
| 157 | struct minstrel_sta_info *mi = priv_sta; | 158 | struct minstrel_sta_info *mi = priv_sta; |
| 158 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 159 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
| 159 | struct ieee80211_tx_rate *ar = info->status.rates; | 160 | struct ieee80211_tx_rate *ar = info->status.rates; |
| @@ -181,6 +182,10 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
| 181 | 182 | ||
| 182 | if (mi->sample_deferred > 0) | 183 | if (mi->sample_deferred > 0) |
| 183 | mi->sample_deferred--; | 184 | mi->sample_deferred--; |
| 185 | |||
| 186 | if (time_after(jiffies, mi->stats_update + | ||
| 187 | (mp->update_interval * HZ) / 1000)) | ||
| 188 | minstrel_update_stats(mp, mi); | ||
| 184 | } | 189 | } |
| 185 | 190 | ||
| 186 | 191 | ||
| @@ -235,10 +240,6 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta, | |||
| 235 | 240 | ||
| 236 | mrr = mp->has_mrr && !txrc->rts && !txrc->bss_conf->use_cts_prot; | 241 | mrr = mp->has_mrr && !txrc->rts && !txrc->bss_conf->use_cts_prot; |
| 237 | 242 | ||
| 238 | if (time_after(jiffies, mi->stats_update + (mp->update_interval * | ||
| 239 | HZ) / 1000)) | ||
| 240 | minstrel_update_stats(mp, mi); | ||
| 241 | |||
| 242 | ndx = mi->max_tp_rate; | 243 | ndx = mi->max_tp_rate; |
| 243 | 244 | ||
| 244 | if (mrr) | 245 | if (mrr) |
