Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: clear lower drv private data on iface removal
@ 2012-11-08 12:37 Arik Nemtsov
  2012-11-08 12:43 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Arik Nemtsov @ 2012-11-08 12:37 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Arik Nemtsov

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@wizery.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-08 12:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 12:37 [PATCH] mac80211: clear lower drv private data on iface removal Arik Nemtsov
2012-11-08 12:43 ` Johannes Berg
2012-11-08 12:43   ` Arik Nemtsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox