Commit 0654ff05 authored by John W. Linville's avatar John W. Linville Committed by David S. Miller

[PATCH] ieee80211_if_set_type: make check for master dev more explicit

Problem description by Daniel Drake <dsd@gentoo.org>:

"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."

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 <dsd@gentoo.org>
Acked-by: default avatarMichael Wu <flamingice@sourmilk.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 04799fae
...@@ -106,7 +106,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type) ...@@ -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 already has a hard_start_xmit routine assigned
* which must not be changed. * which must not be changed.
*/ */
if (!dev->hard_start_xmit) if (dev != sdata->local->mdev)
dev->hard_start_xmit = ieee80211_subif_start_xmit; dev->hard_start_xmit = ieee80211_subif_start_xmit;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment