forked from freifunk-gluon/gluon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request freifunk-gluon#3084 from blocktrron/mt798x-wireles…
…s-crash-war mac80211: avoid crashing on invalid band info
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
patches/openwrt/0007-mac80211-avoid-crashing-on-invalid-band-info.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From: David Bauer <[email protected]> | ||
Date: Thu, 30 Nov 2023 07:32:52 +0100 | ||
Subject: 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 <[email protected]> | ||
|
||
diff --git a/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch b/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch | ||
new file mode 100644 | ||
index 0000000000000000000000000000000000000000..1847b2fe8defd67ec17a1b760ce03c0db1065f8c | ||
--- /dev/null | ||
+++ b/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch | ||
@@ -0,0 +1,16 @@ | ||
+--- a/net/mac80211/sta_info.c | ||
++++ b/net/mac80211/sta_info.c | ||
+@@ -2422,6 +2422,13 @@ static void sta_stats_decode_rate(struct | ||
+ | ||
+ sband = local->hw.wiphy->bands[band]; | ||
+ | ||
++ if (!sband) { | ||
++ wiphy_debug(local->hw.wiphy, | ||
++ "Invalid band %d\n", | ||
++ band); | ||
++ break; | ||
++ } | ||
++ | ||
+ if (WARN_ON_ONCE(!sband->bitrates)) | ||
+ break; | ||
+ |