mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
163c87dfc2
Add a separate bit in struct ieee80211_tx_info to indicate airtime tracked
as broadcast/multicast. This avoids a race condition where airtime from
stations that were just removed wasn't getting subtracted from the total
PHY airtime.
Fixes: 95e633efbd
("mac80211: add AQL support for broadcast/multicast packets")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
35 lines
1012 B
Diff
35 lines
1012 B
Diff
From: David Bauer <mail@david-bauer.net>
|
|
Date: Thu, 30 Nov 2023 07:32:52 +0100
|
|
Subject: [PATCH] mac80211: avoid crashing on invalid band info
|
|
|
|
Frequent crashes have been observed on MT7916 based platforms. While the
|
|
root of these crashes are currently unknown, they happen when decoding
|
|
rate information of connected STAs in AP mode. The rate-information is
|
|
associated with a band which is not available on the PHY.
|
|
|
|
Check for this condition in order to avoid crashing the whole system.
|
|
This patch should be removed once the roout cause has been found and
|
|
fixed.
|
|
|
|
Link: https://github.com/freifunk-gluon/gluon/issues/2980
|
|
|
|
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
---
|
|
|
|
--- a/net/mac80211/sta_info.c
|
|
+++ b/net/mac80211/sta_info.c
|
|
@@ -2445,6 +2445,13 @@ static void sta_stats_decode_rate(struct
|
|
|
|
sband = local->hw.wiphy->bands[band];
|
|
|
|
+ if (!sband) {
|
|
+ wiphy_warn(local->hw.wiphy,
|
|
+ "Invalid band %d\n",
|
|
+ band);
|
|
+ break;
|
|
+ }
|
|
+
|
|
if (WARN_ON_ONCE(!sband->bitrates))
|
|
break;
|
|
|