Search Linux Wireless

[PATCH] mac80211: Do not scan for IBSS merge with a fixed BSSID.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently, when we are on an IBSS network with no active station,
we would scan for other BSSID, even if fixed_bssid is on,  due to
a bug in ibss.c,  where fixed_channel would be checked instead of
fixed_bssid.  This would trigger useless scans where scan results
would not be used anyway.

This patch also reverts commit 39d02a7d90602d4557ee05db2a157a4e0,
which assumed that the ifibss->fixed_channel check was legitimate
to disable single-channel scans.  IBSS single-channel scan should
now be fixed.

Signed-off-by: Nicolas Cavallari <cavallar@xxxxxx>
---
 net/mac80211/ibss.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 9d8e699..22f7099 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -656,14 +656,15 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
 	if (ieee80211_sta_active_ibss(sdata))
 		return;
 
-	if (ifibss->fixed_channel)
+	if (ifibss->fixed_bssid)
 		return;
 
 	printk(KERN_DEBUG "%s: No active IBSS STAs - trying to scan for other "
 	       "IBSS networks with same SSID (merge)\n", sdata->name);
 
 	ieee80211_request_internal_scan(sdata,
-			ifibss->ssid, ifibss->ssid_len, NULL);
+			ifibss->ssid, ifibss->ssid_len,
+			ifibss->fixed_channel ? ifibss->channel : NULL);
 }
 
 static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
-- 
1.7.8.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux