summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorBrian Cavagnolo <brian@cozybit.com>2009-01-16 19:04:49 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-02 08:28:07 -0800
commit803f9eb9987e92e1b4c382c33892ec623d821d1d (patch)
tree958eb1e818f30889f86f1ca3b44bf49c14f2c2e6 /net
parent8682f8563f4e2160845779237ee5762fa37a4c4e (diff)
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')
-rw-r--r--net/mac80211/tx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4788f7b91f49..56ad58dc01ef 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1335,8 +1335,10 @@ int ieee80211_master_start_xmit(struct sk_buff *skb,
if (is_multicast_ether_addr(hdr->addr3))
memcpy(hdr->addr1, hdr->addr3, ETH_ALEN);
else
- if (mesh_nexthop_lookup(skb, odev))
+ if (mesh_nexthop_lookup(skb, odev)) {
+ dev_put(odev);
return 0;
+ }
if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0)
IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.sta,
fwded_frames);