diff options
author | Brian Cavagnolo <brian@cozybit.com> | 2009-01-16 19:04:49 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-02 09:53:17 -0800 |
commit | 09fc8bdeb6790fed49a08091a160d4e4f4e54a81 (patch) | |
tree | 39f96d88f1e6c1ba31e6633f2b42bb14e92d1811 /net/mac80211 | |
parent | 2ea7bdf99f6bab01f52ab98a3b4a975d7ca82d46 (diff) | |
download | lwn-09fc8bdeb6790fed49a08091a160d4e4f4e54a81.tar.gz lwn-09fc8bdeb6790fed49a08091a160d4e4f4e54a81.zip |
mac80211: decrement ref count to netdev after launching mesh discovery
commit 5dc306f3bd1d4cfdf79df39221b3036eab1ddcf3 upstream.
After launching mesh discovery in tx path, reference count was not being
decremented. This was preventing module unload.
Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 1460537faf33..077be80c8420 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1299,8 +1299,10 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev) if (is_multicast_ether_addr(hdr->addr3)) memcpy(hdr->addr1, hdr->addr3, ETH_ALEN); else - if (mesh_nexthop_lookup(skb, osdata)) - return 0; + if (mesh_nexthop_lookup(skb, osdata)) { + dev_put(odev); + return 0; + } if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0) IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.mesh, fwded_frames); |