Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Brian Cavagnolo <brian@cozybit.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: decrement ref count to netdev after launching mesh discovery
Date: Sat, 17 Jan 2009 10:25:56 +0100	[thread overview]
Message-ID: <1232184356.3668.0.camel@johannes> (raw)
In-Reply-To: <1232161489-29528-1-git-send-email-brian@cozybit.com> (sfid-20090117_035936_492701_222DF2F9)

[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]

On Fri, 2009-01-16 at 19:04 -0800, Brian Cavagnolo wrote:
> 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>


> ---
>  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 a7392af..d0ae7f0 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1358,8 +1358,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);

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2009-01-17  9:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mesh netdev decrement>
2009-01-17  3:04 ` [PATCH] mac80211: decrement ref count to netdev after launching mesh discovery Brian Cavagnolo
2009-01-17  9:25   ` Johannes Berg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1232184356.3668.0.camel@johannes \
    --to=johannes@sipsolutions.net \
    --cc=brian@cozybit.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox