aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-05-21 11:17:05 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-28 16:43:42 -0400
commit167ad6f7a2b2ae58dfaa46620b9b3212594f38e6 (patch)
tree7deb19348ed23e84ff99295680fce7c201d50a29
parent679fda1aa49fddf938bb699df7867c01988371ab (diff)
mac80211: fix ieee80211_rx_bss_put/get imbalance
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/mlme.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7cfd12e0d1e2..0ef5993e785b 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,
2479 ifsta->state = IEEE80211_IBSS_JOINED; 2479 ifsta->state = IEEE80211_IBSS_JOINED;
2480 mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); 2480 mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL);
2481 2481
2482 ieee80211_rx_bss_put(dev, bss);
2483
2484 return res; 2482 return res;
2485} 2483}
2486 2484
@@ -3523,6 +3521,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
3523 struct ieee80211_supported_band *sband; 3521 struct ieee80211_supported_band *sband;
3524 u8 bssid[ETH_ALEN], *pos; 3522 u8 bssid[ETH_ALEN], *pos;
3525 int i; 3523 int i;
3524 int ret;
3526 DECLARE_MAC_BUF(mac); 3525 DECLARE_MAC_BUF(mac);
3527 3526
3528#if 0 3527#if 0
@@ -3567,7 +3566,9 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
3567 *pos++ = (u8) (rate / 5); 3566 *pos++ = (u8) (rate / 5);
3568 } 3567 }
3569 3568
3570 return ieee80211_sta_join_ibss(dev, ifsta, bss); 3569 ret = ieee80211_sta_join_ibss(dev, ifsta, bss);
3570 ieee80211_rx_bss_put(dev, bss);
3571 return ret;
3571} 3572}
3572 3573
3573 3574
@@ -3615,10 +3616,13 @@ static int ieee80211_sta_find_ibss(struct net_device *dev,
3615 (bss = ieee80211_rx_bss_get(dev, bssid, 3616 (bss = ieee80211_rx_bss_get(dev, bssid,
3616 local->hw.conf.channel->center_freq, 3617 local->hw.conf.channel->center_freq,
3617 ifsta->ssid, ifsta->ssid_len))) { 3618 ifsta->ssid, ifsta->ssid_len))) {
3619 int ret;
3618 printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" 3620 printk(KERN_DEBUG "%s: Selected IBSS BSSID %s"
3619 " based on configured SSID\n", 3621 " based on configured SSID\n",
3620 dev->name, print_mac(mac, bssid)); 3622 dev->name, print_mac(mac, bssid));
3621 return ieee80211_sta_join_ibss(dev, ifsta, bss); 3623 ret = ieee80211_sta_join_ibss(dev, ifsta, bss);
3624 ieee80211_rx_bss_put(dev, bss);
3625 return ret;
3622 } 3626 }
3623#ifdef CONFIG_MAC80211_IBSS_DEBUG 3627#ifdef CONFIG_MAC80211_IBSS_DEBUG
3624 printk(KERN_DEBUG " did not try to join ibss\n"); 3628 printk(KERN_DEBUG " did not try to join ibss\n");