diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-10-08 19:11:37 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-10-11 10:31:15 +0200 |
commit | 8f2f495ca93e01b383dc0944689e7595027ca6ec (patch) | |
tree | 15a2fa7542b78ec447508c40a9c79633199ac8d9 /net/mac80211/rc80211_minstrel.c | |
parent | 2fd351a8772d6eae4800925b17228c9f2d276193 (diff) |
mac80211: minstrel: remove divisions in tx status path
Use a slightly different threshold for downgrading spatial streams to
make it easier to calculate without divisions.
Slightly reduces CPU overhead.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20191008171139.96476-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel.c')
-rw-r--r-- | net/mac80211/rc80211_minstrel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index ee86c3333999..f73017e08111 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c @@ -289,8 +289,7 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband, if (mi->sample_deferred > 0) mi->sample_deferred--; - if (time_after(jiffies, mi->last_stats_update + - (mp->update_interval * HZ) / 1000)) + if (time_after(jiffies, mi->last_stats_update + mp->update_interval)) minstrel_update_stats(mp, mi); } |