From: John W. Linville Date: Thu, 4 Oct 2007 18:04:40 +0000 (-0400) Subject: [PATCH] ieee80211_if_set_type: make check for master dev more explicit X-Git-Tag: v2.6.24-rc1~1454^2~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0654ff055c6ce5642eed88ba22915b0e56666794;p=platform%2Fkernel%2Flinux-3.10.git [PATCH] ieee80211_if_set_type: make check for master dev more explicit Problem description by Daniel Drake : "This sequence of events causes loss of connectivity: ifconfig eth7 down iwconfig eth7 mode monitor ifconfig eth7 up ifconfig eth7 down iwconfig eth7 mode managed 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." The problem is caused by ieee80211_if_set_type checking for a non-zero hard_start_xmit pointer value in order to avoid changing that value for master devices. The fix is to make that check more explicitly linked to master devices rather than simply checking if the value has been previously set. CC: Daniel Drake Acked-by: Michael Wu Signed-off-by: John W. Linville --- diff --git a/net/mac80211/ieee80211_iface.c b/net/mac80211/ieee80211_iface.c index be7e77f..43e505d 100644 --- a/net/mac80211/ieee80211_iface.c +++ b/net/mac80211/ieee80211_iface.c @@ -106,7 +106,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type) * which already has a hard_start_xmit routine assigned * which must not be changed. */ - if (!dev->hard_start_xmit) + if (dev != sdata->local->mdev) dev->hard_start_xmit = ieee80211_subif_start_xmit; /*