All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: Fix TX after monitor interface is converted to managed
@ 2007-10-04 11:33 Daniel Drake
  2007-10-04 14:34 ` Michael Wu
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Daniel Drake @ 2007-10-04 11:33 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: johannes-cdvu00un1VgdHxzADdlk8Q, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

This sequence of events causes loss of connectivity:

<plug in>
<associate as normal in managed mode>
ifconfig eth7 down
iwconfig eth7 mode monitor
ifconfig eth7 up
ifconfig eth7 down
iwconfig eth7 mode managed
<associate as normal>

At this point you are associated but TX does not work. This is because
the eth7 hard_start_xmit is still ieee80211_monitor_start_xmit.

Fix this by unsetting the hard_start_xmit handler in ieee80211_if_reinit. It
will then be reinitialised to the default (ieee80211_subif_start_xmit) in
ieee80211_if_set_type.

Signed-off-by: Daniel Drake <dsd-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
---
 net/mac80211/ieee80211_iface.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/ieee80211_iface.c b/net/mac80211/ieee80211_iface.c
index 08c1e18..40d4b63 100644
--- a/net/mac80211/ieee80211_iface.c
+++ b/net/mac80211/ieee80211_iface.c
@@ -242,6 +242,9 @@ void ieee80211_if_reinit(struct net_device *dev)
 
 	ieee80211_if_sdata_deinit(sdata);
 
+	BUG_ON(netif_running(dev));
+	dev->hard_start_xmit = NULL;
+
 	switch (sdata->type) {
 	case IEEE80211_IF_TYPE_MGMT:
 		/* nothing to do */
-- 
1.5.3.3

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

end of thread, other threads:[~2007-10-06  2:25 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-04 11:33 [PATCH] mac80211: Fix TX after monitor interface is converted to managed Daniel Drake
2007-10-04 14:34 ` Michael Wu
2007-10-04 15:06   ` Michael Buesch
2007-10-04 15:14     ` Michael Wu
2007-10-04 15:14       ` Michael Wu
2007-10-04 15:19     ` John W. Linville
2007-10-04 17:11       ` Michael Wu
2007-10-04 18:15         ` John W. Linville
2007-10-04 21:16           ` Michael Wu
2007-10-04 21:31           ` Roland Dreier
2007-10-04 22:13             ` John W. Linville
2007-10-04 18:12   ` Johannes Berg
2007-10-04 15:54 ` Stephen Hemminger
2007-10-04 16:56   ` Michael Wu
2007-10-04 16:56     ` Michael Wu
2007-10-04 18:07 ` John W. Linville
2007-10-04 18:09 ` [PATCH] ieee80211_if_set_type: make check for master dev more explicit John W. Linville
2007-10-04 18:44   ` Johannes Berg
2007-10-04 19:13     ` John W. Linville
2007-10-04 19:13       ` John W. Linville
2007-10-05 12:01       ` Johannes Berg
2007-10-05 12:01         ` Johannes Berg
2007-10-04 21:26   ` Michael Wu
2007-10-04 21:26     ` Michael Wu
2007-10-04 23:02     ` John W. Linville
2007-10-04 23:02       ` John W. Linville
2007-10-06  2:23       ` Michael Wu
2007-10-06  2:23         ` Michael Wu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.