Skip to content

Commit

Permalink
mac80211: Do not scan for IBSS merge with a fixed BSSID.
Browse files Browse the repository at this point in the history
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 39d02a7,
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@lri.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Nicolas Cavallari authored and John W. Linville committed Jan 27, 2012
1 parent 6e1b1b2 commit f1e3be1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/mac80211/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,14 +655,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)
Expand Down

0 comments on commit f1e3be1

Please sign in to comment.