Search Linux Wireless

[PATCH] wifi: mac80211: clear vif drv_priv after calling remove_interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 net/mac80211/driver-ops.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c
index fe868b521622..afdf0a19a88e 100644
--- a/net/mac80211/driver-ops.c
+++ b/net/mac80211/driver-ops.c
@@ -121,6 +121,9 @@ void drv_remove_interface(struct ieee80211_local *local,
 	trace_drv_remove_interface(local, sdata);
 	local->ops->remove_interface(&local->hw, &sdata->vif);
 	trace_drv_return_void(local);
+
+	/* Clear private driver data in case of reuse */
+	memset(sdata->vif.drv_priv, 0, local->hw.vif_data_size);
 }
 
 __must_check
-- 
2.44.0





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux