diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-12-15 11:48:12 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-12-19 13:51:21 +0100 |
commit | 00bc7f0357d082e73699fb561776088e48e53101 (patch) | |
tree | 92396001e5678f24e207464bd83fe63e8b5caaca /package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch | |
parent | 6f77b8d510e2308f85344cd46de96dadc07a6cb9 (diff) | |
download | upstream-00bc7f0357d082e73699fb561776088e48e53101.tar.gz upstream-00bc7f0357d082e73699fb561776088e48e53101.tar.bz2 upstream-00bc7f0357d082e73699fb561776088e48e53101.zip |
mac80211: merge a number of minstrel/minstrel_ht performance and memory usage improvements
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch')
-rw-r--r-- | package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch b/package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch new file mode 100644 index 0000000000..066e1d1445 --- /dev/null +++ b/package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch @@ -0,0 +1,34 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Wed, 14 Dec 2016 20:12:25 +0100 +Subject: [PATCH] mac80211: check for MCS in ieee80211_duration before fetching + chanctx + +Makes the code a bit more efficient + +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -63,6 +63,10 @@ static __le16 ieee80211_duration(struct + struct ieee80211_chanctx_conf *chanctx_conf; + u32 rate_flags = 0; + ++ /* assume HW handles this */ ++ if (tx->rate.flags & (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_VHT_MCS)) ++ return 0; ++ + rcu_read_lock(); + chanctx_conf = rcu_dereference(tx->sdata->vif.chanctx_conf); + if (chanctx_conf) { +@@ -71,10 +75,6 @@ static __le16 ieee80211_duration(struct + } + rcu_read_unlock(); + +- /* assume HW handles this */ +- if (tx->rate.flags & (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_VHT_MCS)) +- return 0; +- + /* uh huh? */ + if (WARN_ON_ONCE(tx->rate.idx < 0)) + return 0; |