[Make-wifi-fast] Fwd: [PATCH 10/10] mac80211: minstrel: avoid port control frames for sampling

Dave Taht dave.taht at gmail.com
Wed Dec 14 17:35:59 EST 2016


I was delighted to see this patch series go by today.

What's the best way to get at minstrel stats from userspace nowadays?


---------- Forwarded message ----------
From: Felix Fietkau <nbd at nbd.name>
Date: Wed, Dec 14, 2016 at 11:47 AM
Subject: [PATCH 10/10] mac80211: minstrel: avoid port control frames
for sampling
To: linux-wireless at vger.kernel.org
Cc: johannes at sipsolutions.net, thomas.huehn at evernet-eg.de


From: Thomas Huehn <thomas.huehn at evernet-eg.de>

Makes connections more reliable

Signed-off-by: Thomas Huehn <thomas.huehn at evernet-eg.de>
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 net/mac80211/rc80211_minstrel.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 11a4cc3..3ebe440 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -367,6 +367,11 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
                return;
 #endif

+       /* Don't use EAPOL frames for sampling on non-mrr hw */
+       if (mp->hw->max_rates == 1 &&
+           (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO))
+               return;
+
        delta = (mi->total_packets * sampling_ratio / 100) -
                        (mi->sample_packets + mi->sample_deferred / 2);

--
2.10.1



-- 
Dave Täht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


More information about the Make-wifi-fast mailing list