mac80211: fix a regression in processing rx stats
[openwrt/staging/rmilecki.git] / package / kernel / mac80211 / patches / subsys / 316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch
1 From: Wen Gong <wgong@codeaurora.org>
2 Date: Wed, 9 Dec 2020 11:06:29 +0800
3 Subject: [PATCH] mac80211: fix a mistake check for rx_stats update
4
5 It should be !is_multicast_ether_addr() in ieee80211_rx_h_sta_process()
6 for the rx_stats update, below commit remove the !, this patch is to
7 change it back.
8
9 It lead the rx rate "iw wlan0 station dump" become invalid for some
10 scenario when IEEE80211_HW_USES_RSS is set.
11
12 Fixes: 09a740ce352e ("mac80211: receive and process S1G beacons")
13 Signed-off-by: Wen Gong <wgong@codeaurora.org>
14 Link: https://lore.kernel.org/r/1607483189-3891-1-git-send-email-wgong@codeaurora.org
15 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
16 ---
17
18 --- a/net/mac80211/rx.c
19 +++ b/net/mac80211/rx.c
20 @@ -1758,7 +1758,7 @@ ieee80211_rx_h_sta_process(struct ieee80
21 } else if (rx->sdata->vif.type == NL80211_IFTYPE_OCB) {
22 sta->rx_stats.last_rx = jiffies;
23 } else if (!ieee80211_is_s1g_beacon(hdr->frame_control) &&
24 - is_multicast_ether_addr(hdr->addr1)) {
25 + !is_multicast_ether_addr(hdr->addr1)) {
26 /*
27 * Mesh beacons will update last_rx when if they are found to
28 * match the current local configuration when processed.