mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
1bfcc1ea8a
Brings lots of driver updates and API changes needed for mt76 updates. Disable iwlwifi and ath11k on 5.15, since backport is too difficult, and the only remaining targets won't need those drivers. Signed-off-by: Felix Fietkau <nbd@nbd.name>
30 lines
796 B
Diff
30 lines
796 B
Diff
From: Felix Fietkau <nbd@nbd.name>
|
|
Date: Wed, 3 Jul 2024 12:10:01 +0200
|
|
Subject: [PATCH] wifi: mac80211: clear vif drv_priv after calling
|
|
remove_interface
|
|
|
|
Avoid reusing stale driver data when an interface is brought down and up
|
|
again. In order to avoid having to duplicate the memset in every single
|
|
driver, do it here.
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
---
|
|
|
|
--- a/net/mac80211/iface.c
|
|
+++ b/net/mac80211/iface.c
|
|
@@ -693,8 +693,12 @@ static void ieee80211_do_stop(struct iee
|
|
|
|
fallthrough;
|
|
default:
|
|
- if (going_down)
|
|
- drv_remove_interface(local, sdata);
|
|
+ if (!going_down)
|
|
+ break;
|
|
+ drv_remove_interface(local, sdata);
|
|
+
|
|
+ /* Clear private driver data to prevent reuse */
|
|
+ memset(sdata->vif.drv_priv, 0, local->hw.vif_data_size);
|
|
}
|
|
|
|
ieee80211_recalc_ps(local);
|