Search Linux Wireless

[PATCH] mac80211: clear lower drv private data on iface removal

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

 



The lower driver might rely on getting zeroed per-vif private memory
when an interface is added. Resetting the memory on removal avoids
adverse affects during recovery, where the interface is added without
being removed.

Signed-off-by: Arik Nemtsov <arik@xxxxxxxxxx>
---
 net/mac80211/driver-ops.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index d3d9fda..4620117 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -183,6 +183,10 @@ static inline void drv_remove_interface(struct ieee80211_local *local,
 	trace_drv_remove_interface(local, sdata);
 	local->ops->remove_interface(&local->hw, &sdata->vif);
 	sdata->flags &= ~IEEE80211_SDATA_IN_DRIVER;
+
+	/* clear driver specific private data */
+	memset(sdata->vif.drv_priv, 0, sdata->local->hw.vif_data_size);
+
 	trace_drv_return_void(local);
 }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux