Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: linville@tuxdriver.com, yi.zhu@intel.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/1] mac80211: fix ieee80211_rx_bss_put/get imbalance
Date: Wed, 21 May 2008 17:37:43 +0200	[thread overview]
Message-ID: <1211384263.13667.16.camel@johannes.berg> (raw)
In-Reply-To: <1211383025-1004-1-git-send-email-tomas.winkler@intel.com>

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

On Wed, 2008-05-21 at 18:17 +0300, Tomas Winkler wrote:
> This patch fixes iee80211_rx_bss_put/get imbalance
> introduced by 'mac80211: enable IBSS merging' patch.
> 
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>

Looks correct to me.

Acked-by: Johannes Berg <johannes@sipsolutions.net>

John, when will you start merging real work again? :)


> ---
>  net/mac80211/mlme.c |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 7cfd12e..0ef5993 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -2479,8 +2479,6 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
>  	ifsta->state = IEEE80211_IBSS_JOINED;
>  	mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL);
>  
> -	ieee80211_rx_bss_put(dev, bss);
> -
>  	return res;
>  }
>  
> @@ -3523,6 +3521,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
>  	struct ieee80211_supported_band *sband;
>  	u8 bssid[ETH_ALEN], *pos;
>  	int i;
> +	int ret;
>  	DECLARE_MAC_BUF(mac);
>  
>  #if 0
> @@ -3567,7 +3566,9 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
>  		*pos++ = (u8) (rate / 5);
>  	}
>  
> -	return ieee80211_sta_join_ibss(dev, ifsta, bss);
> +	ret = ieee80211_sta_join_ibss(dev, ifsta, bss);
> +	ieee80211_rx_bss_put(dev, bss);
> +	return ret;
>  }
>  
> 
> @@ -3615,10 +3616,13 @@ static int ieee80211_sta_find_ibss(struct net_device *dev,
>  	    (bss = ieee80211_rx_bss_get(dev, bssid,
>  					local->hw.conf.channel->center_freq,
>  					ifsta->ssid, ifsta->ssid_len))) {
> +		int ret;
>  		printk(KERN_DEBUG "%s: Selected IBSS BSSID %s"
>  		       " based on configured SSID\n",
>  		       dev->name, print_mac(mac, bssid));
> -		return ieee80211_sta_join_ibss(dev, ifsta, bss);
> +		ret = ieee80211_sta_join_ibss(dev, ifsta, bss);
> +		ieee80211_rx_bss_put(dev, bss);
> +		return ret;
>  	}
>  #ifdef CONFIG_MAC80211_IBSS_DEBUG
>  	printk(KERN_DEBUG "   did not try to join ibss\n");

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

      reply	other threads:[~2008-05-21 15:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21 15:17 [PATCH 1/1] mac80211: fix ieee80211_rx_bss_put/get imbalance Tomas Winkler
2008-05-21 15:37 ` 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=1211384263.13667.16.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=tomas.winkler@intel.com \
    --cc=yi.zhu@intel.com \
    /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