Prechádzať zdrojové kódy

mac80211: minstrel: avoid port control frames for sampling

Makes connections more reliable

Signed-off-by: Thomas Huehn <thomas.huehn@evernet-eg.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Thomas Huehn 8 rokov pred
rodič
commit
38252e9ef6
1 zmenil súbory, kde vykonal 5 pridanie a 0 odobranie
  1. 5 0
      net/mac80211/rc80211_minstrel.c

+ 5 - 0
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);