mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 01:52:51 +00:00
mediatek-sdk: fix mt76 crash
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
John Crispin
parent
9569b46398
commit
0a758ca5fc
27
feeds/mediatek-sdk/mt76/mt76/patches/a00-crash_fix.patch
Normal file
27
feeds/mediatek-sdk/mt76/mt76/patches/a00-crash_fix.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
--- a/mt7915/mcu.c
|
||||
+++ b/mt7915/mcu.c
|
||||
@@ -4887,7 +4887,7 @@ int mt7915_mcu_wed_wa_tx_stats(struct mt
|
||||
rcu_read_lock();
|
||||
|
||||
wcid = rcu_dereference(dev->mt76.wcid[wlan_idx]);
|
||||
- if (wcid) {
|
||||
+ if (wcid && wcid->sta) {
|
||||
struct ieee80211_vif *vif;
|
||||
struct wireless_dev *wdev;
|
||||
|
||||
@@ -4898,12 +4898,12 @@ int mt7915_mcu_wed_wa_tx_stats(struct mt
|
||||
!sta)
|
||||
goto unlock;
|
||||
|
||||
+ if (!sta->vif)
|
||||
+ goto unlock;
|
||||
+
|
||||
vif = container_of((void *)sta->vif,
|
||||
struct ieee80211_vif,
|
||||
drv_priv);
|
||||
- if (!vif)
|
||||
- goto unlock;
|
||||
-
|
||||
wdev = ieee80211_vif_to_wdev(vif);
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_MONITOR)
|
||||
Reference in New Issue
Block a user