* [PATCH] mac80211: Do not scan for IBSS merge with a fixed BSSID.
@ 2012-01-26 12:36 Nicolas Cavallari
2012-01-28 4:39 ` Johannes Berg
2012-01-30 0:40 ` Johannes Berg
0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Cavallari @ 2012-01-26 12:36 UTC (permalink / raw)
To: John W. Linville, Johannes Berg; +Cc: linux-wireless
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@lri.fr>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: Do not scan for IBSS merge with a fixed BSSID.
2012-01-26 12:36 [PATCH] mac80211: Do not scan for IBSS merge with a fixed BSSID Nicolas Cavallari
@ 2012-01-28 4:39 ` Johannes Berg
2012-01-30 8:54 ` Nicolas Cavallari
2012-01-30 0:40 ` Johannes Berg
1 sibling, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2012-01-28 4:39 UTC (permalink / raw)
To: Nicolas Cavallari; +Cc: John W. Linville, linux-wireless
On 1/26/2012 4:36 AM, Nicolas Cavallari wrote:
> - 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);
Just from the looks of it, this doesn't seem right. If you're fixing the
BSSID, you're still asking for automatic channel selection and merging
with other peers using the same BSSID on different channels, so I
disagree with your commit message quite completely.
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: Do not scan for IBSS merge with a fixed BSSID.
2012-01-26 12:36 [PATCH] mac80211: Do not scan for IBSS merge with a fixed BSSID Nicolas Cavallari
2012-01-28 4:39 ` Johannes Berg
@ 2012-01-30 0:40 ` Johannes Berg
1 sibling, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2012-01-30 0:40 UTC (permalink / raw)
To: Nicolas Cavallari; +Cc: John W. Linville, linux-wireless
On Thu, 2012-01-26 at 13:36 +0100, Nicolas Cavallari wrote:
> 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.
John, please revert f1e3be1561c43b6bbe2426e34849fb1486dc313b
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: Do not scan for IBSS merge with a fixed BSSID.
2012-01-28 4:39 ` Johannes Berg
@ 2012-01-30 8:54 ` Nicolas Cavallari
2012-01-30 14:51 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Cavallari @ 2012-01-30 8:54 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless
On 28/01/2012 05:39, Johannes Berg wrote:
> On 1/26/2012 4:36 AM, Nicolas Cavallari wrote:
>
>> - 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);
>
> Just from the looks of it, this doesn't seem right. If you're fixing the
> BSSID, you're still asking for automatic channel selection and merging
> with other peers using the same BSSID on different channels, so I
> disagree with your commit message quite completely.
I didn't know that. In fact, from my understanding of the current
source, if you fix the BSSID, you won't merge, period. And even if you
don't fix the BSSID, if you found a BSS with the same BSSID but a
different channel, you still won't merge.
And now, if you are alone and you fixed your channel, you won't try to
merge with other BSS in the same channel.
If you believe that the condition should be "fixed_bssid &&
fixed_channel", i can send another patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: Do not scan for IBSS merge with a fixed BSSID.
2012-01-30 8:54 ` Nicolas Cavallari
@ 2012-01-30 14:51 ` Johannes Berg
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2012-01-30 14:51 UTC (permalink / raw)
To: Nicolas Cavallari; +Cc: John W. Linville, linux-wireless
On Mon, 2012-01-30 at 09:54 +0100, Nicolas Cavallari wrote:
> On 28/01/2012 05:39, Johannes Berg wrote:
> > On 1/26/2012 4:36 AM, Nicolas Cavallari wrote:
> >
> >> - 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);
> >
> > Just from the looks of it, this doesn't seem right. If you're fixing the
> > BSSID, you're still asking for automatic channel selection and merging
> > with other peers using the same BSSID on different channels, so I
> > disagree with your commit message quite completely.
>
> I didn't know that. In fact, from my understanding of the current
> source, if you fix the BSSID, you won't merge, period. And even if you
> don't fix the BSSID, if you found a BSS with the same BSSID but a
> different channel, you still won't merge.
>
> And now, if you are alone and you fixed your channel, you won't try to
> merge with other BSS in the same channel.
>
> If you believe that the condition should be "fixed_bssid &&
> fixed_channel", i can send another patch.
No, I don't think that makes sense either. I haven't looked at the
actual code right now (am travelling), but I think the logic should be:
fixed BSSID: try to find networks with that BSSID, if alone, on all
channels
fixed channel: merge with any network with the same SSID on the same
channel
fixed both: just stick to the current channel/BSSID (obviously)
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-30 14:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26 12:36 [PATCH] mac80211: Do not scan for IBSS merge with a fixed BSSID Nicolas Cavallari
2012-01-28 4:39 ` Johannes Berg
2012-01-30 8:54 ` Nicolas Cavallari
2012-01-30 14:51 ` Johannes Berg
2012-01-30 0:40 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).