[openwrt/openwrt] mac80211: fix a regression in processing rx stats

LEDE Commits lede-commits at lists.infradead.org
Sun Feb 14 13:42:11 EST 2021


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9cb63f53609b77958ff069091f2ad8fc884ceaeb

commit 9cb63f53609b77958ff069091f2ad8fc884ceaeb
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Feb 14 19:39:02 2021 +0100

    mac80211: fix a regression in processing rx stats
    
    A logic error caused rx rate update to be missed for any driver not using
    fast-rx
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...1-fix-a-mistake-check-for-rx_stats-update.patch | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch b/package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch
new file mode 100644
index 0000000000..91a602bd27
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch
@@ -0,0 +1,28 @@
+From: Wen Gong <wgong at codeaurora.org>
+Date: Wed, 9 Dec 2020 11:06:29 +0800
+Subject: [PATCH] mac80211: fix a mistake check for rx_stats update
+
+It should be !is_multicast_ether_addr() in ieee80211_rx_h_sta_process()
+for the rx_stats update, below commit remove the !, this patch is to
+change it back.
+
+It lead the rx rate "iw wlan0 station dump" become invalid for some
+scenario when IEEE80211_HW_USES_RSS is set.
+
+Fixes: 09a740ce352e ("mac80211: receive and process S1G beacons")
+Signed-off-by: Wen Gong <wgong at codeaurora.org>
+Link: https://lore.kernel.org/r/1607483189-3891-1-git-send-email-wgong@codeaurora.org
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -1758,7 +1758,7 @@ ieee80211_rx_h_sta_process(struct ieee80
+ 	} else if (rx->sdata->vif.type == NL80211_IFTYPE_OCB) {
+ 		sta->rx_stats.last_rx = jiffies;
+ 	} else if (!ieee80211_is_s1g_beacon(hdr->frame_control) &&
+-		   is_multicast_ether_addr(hdr->addr1)) {
++		   !is_multicast_ether_addr(hdr->addr1)) {
+ 		/*
+ 		 * Mesh beacons will update last_rx when if they are found to
+ 		 * match the current local configuration when processed.



More information about the lede-commits mailing list