From patchwork Mon Oct 19 21:55:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinette Chatre X-Patchwork-Id: 54845 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9JLu7qd008280 for ; Mon, 19 Oct 2009 21:56:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932342AbZJSVzj (ORCPT ); Mon, 19 Oct 2009 17:55:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932341AbZJSVzi (ORCPT ); Mon, 19 Oct 2009 17:55:38 -0400 Received: from mga01.intel.com ([192.55.52.88]:39112 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932297AbZJSVze (ORCPT ); Mon, 19 Oct 2009 17:55:34 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 19 Oct 2009 14:49:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,587,1249282800"; d="scan'208";a="505188019" Received: from rc-desk.jf.intel.com (HELO localhost.localdomain) ([134.134.15.187]) by fmsmga002.fm.intel.com with ESMTP; 19 Oct 2009 14:47:13 -0700 From: Reinette Chatre To: johannes@sipsolutions.net, linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, Reinette Chatre Subject: [PATCH] mac80211: fix ibss joining Date: Mon, 19 Oct 2009 14:55:37 -0700 Message-Id: <1255989337-25473-1-git-send-email-reinette.chatre@intel.com> X-Mailer: git-send-email 1.5.6.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 6eaf698..ca8ecce 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -538,13 +538,12 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) WLAN_CAPABILITY_PRIVACY, capability); + if (bss) { #ifdef CONFIG_MAC80211_IBSS_DEBUG - if (bss) printk(KERN_DEBUG " sta_find_ibss: selected %pM current " "%pM\n", bss->cbss.bssid, ifibss->bssid); #endif /* CONFIG_MAC80211_IBSS_DEBUG */ - if (bss && !memcmp(ifibss->bssid, bss->cbss.bssid, ETH_ALEN)) { printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM" " based on configured SSID\n", sdata->dev->name, bss->cbss.bssid); @@ -552,8 +551,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) ieee80211_sta_join_ibss(sdata, bss); ieee80211_rx_bss_put(local, bss); return; - } else if (bss) - ieee80211_rx_bss_put(local, bss); + } #ifdef CONFIG_MAC80211_IBSS_DEBUG printk(KERN_DEBUG " did not try to join ibss\n");