2010-11-10 10:27:27

by Juuso Oikarinen

[permalink] [raw]
Subject: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies

From: Juuso Oikarinen <[email protected]>

The wl1271 does not support radar detection. Hence, prevent ad-hoc and
active scanning on frequencies requiring DFS.

Signed-off-by: Juuso Oikarinen <[email protected]>
---
drivers/net/wireless/wl12xx/wl1271_main.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index f5b1d19..eb9f821 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -335,6 +335,27 @@ out:
return NOTIFY_OK;
}

+static int wl1271_reg_notify(struct wiphy *wiphy,
+ struct regulatory_request *request) {
+ struct ieee80211_supported_band *band;
+ struct ieee80211_channel *ch;
+ int i;
+
+ band = wiphy->bands[IEEE80211_BAND_5GHZ];
+ for (i = 0; i < band->n_channels; i++) {
+ ch = &band->channels[i];
+ if (ch->flags % IEEE80211_CHAN_DISABLED)
+ continue;
+
+ if (ch->flags & IEEE80211_CHAN_RADAR)
+ ch->flags |= IEEE80211_CHAN_NO_IBSS |
+ IEEE80211_CHAN_PASSIVE_SCAN;
+
+ }
+
+ return 0;
+}
+
static void wl1271_conf_init(struct wl1271 *wl)
{

@@ -2590,6 +2611,8 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
wl->hw->queues = 4;
wl->hw->max_rates = 1;

+ wl->hw->wiphy->reg_notifier = wl1271_reg_notify;
+
SET_IEEE80211_DEV(wl->hw, wl1271_wl_to_dev(wl));

return 0;
--
1.7.1



2010-11-17 06:53:04

by Gabay, Benzy

[permalink] [raw]
Subject: RE: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies

Juuso,

> From: Juuso Oikarinen <[email protected]>
>
> The wl1271 does not support radar detection. Hence, prevent ad-hoc and
> active scanning on frequencies requiring DFS.

I know it's a bit late but:
Doesn't the fact that your referring here to 1271, which is support 2.4Ghz device only matter here to anyone?
Correct me if I'm wrong here but radar detection was meant only for 5.0Ghz device types.
Should this patch should be done on 1273 device type or a change in the naming convention should be applied here.


>
> Signed-off-by: Juuso Oikarinen <[email protected]>
> ---
> drivers/net/wireless/wl12xx/wl1271_main.c | 23
> +++++++++++++++++++++++
> 1 files changed, 23 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c
> b/drivers/net/wireless/wl12xx/wl1271_main.c
> index f5b1d19..eb9f821 100644
> --- a/drivers/net/wireless/wl12xx/wl1271_main.c
> +++ b/drivers/net/wireless/wl12xx/wl1271_main.c
> @@ -335,6 +335,27 @@ out:
> return NOTIFY_OK;
> }
>
> +static int wl1271_reg_notify(struct wiphy *wiphy,
> + struct regulatory_request *request) {
> + struct ieee80211_supported_band *band;
> + struct ieee80211_channel *ch;
> + int i;
> +
> + band = wiphy->bands[IEEE80211_BAND_5GHZ];
> + for (i = 0; i < band->n_channels; i++) {
> + ch = &band->channels[i];
> + if (ch->flags % IEEE80211_CHAN_DISABLED)
> + continue;
> +
> + if (ch->flags & IEEE80211_CHAN_RADAR)
> + ch->flags |= IEEE80211_CHAN_NO_IBSS |
> + IEEE80211_CHAN_PASSIVE_SCAN;
> +
> + }
> +
> + return 0;
> +}
> +
> static void wl1271_conf_init(struct wl1271 *wl)
> {
>
> @@ -2590,6 +2611,8 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
> wl->hw->queues = 4;
> wl->hw->max_rates = 1;
>
> + wl->hw->wiphy->reg_notifier = wl1271_reg_notify;
> +
> SET_IEEE80211_DEV(wl->hw, wl1271_wl_to_dev(wl));
>
> return 0;
> --
> 1.7.1



=========
Benzy Gabay
Texas Instruments

2010-11-17 08:25:50

by Gabay, Benzy

[permalink] [raw]
Subject: RE: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies

SnV1c28sDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gPg0KPiA+IEkga25vdyBp
dCdzIGEgYml0IGxhdGUgYnV0Og0KPiA+IERvZXNuJ3QgdGhlIGZhY3QgdGhhdCB5b3VyIHJlZmVy
cmluZyBoZXJlIHRvIDEyNzEsIHdoaWNoIGlzIHN1cHBvcnQNCj4gMi40R2h6IGRldmljZSBvbmx5
IG1hdHRlciBoZXJlIHRvIGFueW9uZT8NCj4gPiBDb3JyZWN0IG1lIGlmIEknbSB3cm9uZyBoZXJl
IGJ1dCByYWRhciBkZXRlY3Rpb24gd2FzIG1lYW50IG9ubHkgZm9yDQo+IDUuMEdoeiBkZXZpY2Ug
dHlwZXMuDQo+ID4gU2hvdWxkIHRoaXMgcGF0Y2ggc2hvdWxkIGJlIGRvbmUgb24gMTI3MyBkZXZp
Y2UgdHlwZSBvciBhIGNoYW5nZSBpbg0KPiB0aGUgbmFtaW5nIGNvbnZlbnRpb24gc2hvdWxkIGJl
IGFwcGxpZWQgaGVyZS4NCj4gDQo+IFllcywgeW91IGFyZSBjb3JyZWN0IGluIHRoZSBmYWN0IHRo
ZSBuYW1pbmcgaGVyZSBpcyB3cm9uZy4gSSB1c2VkIGl0LA0KPiBiZWNhdXNlIGZvciBsZWdhY3kg
cmVhc29ucywgdGhlIGRyaXZlciB3YXMgc3RpbGwgY2FsbGVkIHdsMTI3MSBhdCB0aGUNCj4gdGlt
ZSBJIHdyb3RlIHRoZSBwYXRjaC4gQWx0aG91Z2ggdGhlIGRyaXZlciB3YXMgbmFtZWQgIndsMTI3
MSIgaXQgaXMNCj4gc3RpbGwgaW50ZW5kZWQgdG8gZHJpdmUgYWxzbyB0aGUgd2wxMjczLg0KPiAN
Cj4gUmVjZW50bHksIHdvcmsgaGFzIGJlZW4gb25nb2luZyB0byBjaGFuZ2UgdGhpcyBuYW1pbmcu
IFRoZSB3bDEyNzENCj4gZHJpdmVyDQo+IHdhcyByZW5hbWVkIHRvIHdsMTJ4eCB0byBiZXR0ZXIg
cmVmbGVjdCByZWFsaXR5LCBhcyB5b3UgaGF2ZSBwb3NzaWJseQ0KPiBub3RlZC4NCj4gDQo+IC1K
dXVzbw0KPiANCj4gPg0KDQpZZWFoIGp1c3Qgc2F3IGl0LCBhZnRlciBJJ3ZlIHBvc3RlZCB0aGUg
ZW1haWwgOi0pDQoNCllldCBhbm90aGVyIHF1ZXN0aW9uIG9uIHRoaXMgdG9waWMsDQpBZC1Ib2Mg
d2FzIGRlc2lnbmVkIG9yaWdpbmFsbHkgZm9yIEIgbW9kZSBvbmx5LiBTb21lIGNvbXBhbmllcyBl
eHRlbmRlZCBpdCB0byBHIGFsc28uIA0KRG8gd2UgaGF2ZSBNQUM4MDIuMTEgc3VwcG9ydCBmb3Ig
QWQtSG9jIG9uIDExYSBjaGFubmVscyB0aGVzZSBkYXlzPw0KDQpCZW56eQ0K

2010-11-22 06:02:20

by Juuso Oikarinen

[permalink] [raw]
Subject: RE: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies

On Wed, 2010-11-17 at 00:52 -0600, ext Gabay, Benzy wrote:
> Juuso,
>
> > From: Juuso Oikarinen <[email protected]>
> >
> > The wl1271 does not support radar detection. Hence, prevent ad-hoc and
> > active scanning on frequencies requiring DFS.
>
> I know it's a bit late but:
> Doesn't the fact that your referring here to 1271, which is support 2.4Ghz device only matter here to anyone?
> Correct me if I'm wrong here but radar detection was meant only for 5.0Ghz device types.
> Should this patch should be done on 1273 device type or a change in the naming convention should be applied here.

Yes, you are correct in the fact the naming here is wrong. I used it,
because for legacy reasons, the driver was still called wl1271 at the
time I wrote the patch. Although the driver was named "wl1271" it is
still intended to drive also the wl1273.

Recently, work has been ongoing to change this naming. The wl1271 driver
was renamed to wl12xx to better reflect reality, as you have possibly
noted.

-Juuso

>
> >
> > Signed-off-by: Juuso Oikarinen <[email protected]>
> > ---
> > drivers/net/wireless/wl12xx/wl1271_main.c | 23
> > +++++++++++++++++++++++
> > 1 files changed, 23 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c
> > b/drivers/net/wireless/wl12xx/wl1271_main.c
> > index f5b1d19..eb9f821 100644
> > --- a/drivers/net/wireless/wl12xx/wl1271_main.c
> > +++ b/drivers/net/wireless/wl12xx/wl1271_main.c
> > @@ -335,6 +335,27 @@ out:
> > return NOTIFY_OK;
> > }
> >
> > +static int wl1271_reg_notify(struct wiphy *wiphy,
> > + struct regulatory_request *request) {
> > + struct ieee80211_supported_band *band;
> > + struct ieee80211_channel *ch;
> > + int i;
> > +
> > + band = wiphy->bands[IEEE80211_BAND_5GHZ];
> > + for (i = 0; i < band->n_channels; i++) {
> > + ch = &band->channels[i];
> > + if (ch->flags % IEEE80211_CHAN_DISABLED)
> > + continue;
> > +
> > + if (ch->flags & IEEE80211_CHAN_RADAR)
> > + ch->flags |= IEEE80211_CHAN_NO_IBSS |
> > + IEEE80211_CHAN_PASSIVE_SCAN;
> > +
> > + }
> > +
> > + return 0;
> > +}
> > +
> > static void wl1271_conf_init(struct wl1271 *wl)
> > {
> >
> > @@ -2590,6 +2611,8 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
> > wl->hw->queues = 4;
> > wl->hw->max_rates = 1;
> >
> > + wl->hw->wiphy->reg_notifier = wl1271_reg_notify;
> > +
> > SET_IEEE80211_DEV(wl->hw, wl1271_wl_to_dev(wl));
> >
> > return 0;
> > --
> > 1.7.1
>
>
>
> =========
> Benzy Gabay
> Texas Instruments



2010-11-11 12:15:56

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies

On Wed, 2010-11-10 at 11:27 +0100, Oikarinen Juuso (Nokia-MS/Tampere)
wrote:
> From: Juuso Oikarinen <[email protected]>
>
> The wl1271 does not support radar detection. Hence, prevent ad-hoc and
> active scanning on frequencies requiring DFS.
>
> Signed-off-by: Juuso Oikarinen <[email protected]>
> ---

Applied both patches to wl12xx and pushed, thanks!

--
Cheers,
Luca.


2010-11-10 11:21:55

by Juuso Oikarinen

[permalink] [raw]
Subject: Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan"

On Wed, 2010-11-10 at 12:18 +0100, ext Gery Kahn wrote:
> On 11/10/2010 12:27 PM, [email protected] wrote:
> > From: Juuso Oikarinen<[email protected]>
> >
> > This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791.
> >
> > The reverted patch caused more harm than benefit.
> >
> > Signed-off-by: Juuso Oikarinen<[email protected]>
> >
> Just couple words what harm it was?

The harm is that the supported channels are reported to user-space in
the order they are registered in the driver. The result of that is quite
messy in userspace PoV.

-Juuso


2010-11-17 09:57:01

by Bruno Randolf

[permalink] [raw]
Subject: Re: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies

On Wed November 17 2010 17:34:36 Juuso Oikarinen wrote:
> On Wed, 2010-11-17 at 02:25 -0600, ext Gabay, Benzy wrote:
> > Yet another question on this topic,
> > Ad-Hoc was designed originally for B mode only. Some companies extended
> > it to G also. Do we have MAC802.11 support for Ad-Hoc on 11a channels
> > these days?
>
> Based on our testing, ad-hoc on 11a appears to work, tested between two
> linux-based devices.

Sure, we're using it all day & night... :)
In the few bands where it's permitted, of course.

bruno

2010-11-22 06:02:16

by Juuso Oikarinen

[permalink] [raw]
Subject: RE: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies

On Wed, 2010-11-17 at 02:25 -0600, ext Gabay, Benzy wrote:
> Yet another question on this topic,
> Ad-Hoc was designed originally for B mode only. Some companies extended it to G also.
> Do we have MAC802.11 support for Ad-Hoc on 11a channels these days?

Based on our testing, ad-hoc on 11a appears to work, tested between two
linux-based devices.

-Juuso



2010-11-11 19:47:37

by Kahn, Gery

[permalink] [raw]
Subject: Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan"

On 11/10/2010 1:42 PM, Juuso Oikarinen wrote:
> On Wed, 2010-11-10 at 12:36 +0100, ext Gery Kahn wrote:
>> On 11/10/2010 01:21 PM, Juuso Oikarinen wrote:
>>> On Wed, 2010-11-10 at 12:18 +0100, ext Gery Kahn wrote:
>>>> On 11/10/2010 12:27 PM, [email protected] wrote:
>>>>> From: Juuso Oikarinen<[email protected]>
>>>>>
>>>>> This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791.
>>>>>
>>>>> The reverted patch caused more harm than benefit.
>>>>>
>>>>> Signed-off-by: Juuso Oikarinen<[email protected]>
>>>>>
>>>> Just couple words what harm it was?
>>> The harm is that the supported channels are reported to user-space in
>>> the order they are registered in the driver. The result of that is quite
>>> messy in userspace PoV.
>>>
>>> -Juuso
>>>
>> Thank you for answer.
>>
>> The reason of doing such channel sorting was channel overlapping.
>>
>> Let's say for 11a (bandwidth 20MHz) it is not a problem.
>> While 11g, preferred channel sorting would be 1,6,11,...
>>
>> Gery
> Yes, this is why we had this reordering in the first place.
>
> One benefit of sorting channels would be to get faster results for the
> whole band, as there are responses from the overlapping channels too.
>
Another benefit is to have max band coverage with minimum prob reqs.
The overlapping answers have collisions, which discard all packets and
if timeout scan -
no responce from AP or even silence in channel.
> Currently the the scanning code however waits for all channels to be
> scanned before sending results to userspace, so this benefit is not
> utilized, and removing this patch makes no difference in that sense.
>
> To take advantage of channel reordering, some other changes are needed
> too. And the reordering needs to be performed in the mac80211/cfg80211
> level (I actually earlier submitted a RFC patch doing just this.)
>
> -Juuso
>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>


2010-11-10 11:36:34

by Kahn, Gery

[permalink] [raw]
Subject: Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan"

On 11/10/2010 01:21 PM, Juuso Oikarinen wrote:
> On Wed, 2010-11-10 at 12:18 +0100, ext Gery Kahn wrote:
>> On 11/10/2010 12:27 PM, [email protected] wrote:
>>> From: Juuso Oikarinen<[email protected]>
>>>
>>> This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791.
>>>
>>> The reverted patch caused more harm than benefit.
>>>
>>> Signed-off-by: Juuso Oikarinen<[email protected]>
>>>
>> Just couple words what harm it was?
>
> The harm is that the supported channels are reported to user-space in
> the order they are registered in the driver. The result of that is quite
> messy in userspace PoV.
>
> -Juuso
>
Thank you for answer.

The reason of doing such channel sorting was channel overlapping.

Let's say for 11a (bandwidth 20MHz) it is not a problem.
While 11g, preferred channel sorting would be 1,6,11,...

Gery


2010-11-10 11:09:20

by Tuomas Katila

[permalink] [raw]
Subject: Re: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies

On Wed, 2010-11-10 at 11:27 +0100, Oikarinen Juuso (Nokia-MS/Tampere)
wrote:
> From: Juuso Oikarinen <[email protected]>
>
> The wl1271 does not support radar detection. Hence, prevent ad-hoc and
> active scanning on frequencies requiring DFS.
>
> Signed-off-by: Juuso Oikarinen <[email protected]>
> ---

For both of the patches:

Tested-by: Tuomas Katila <[email protected]>

-Tuomas


2010-11-22 06:01:41

by Juuso Oikarinen

[permalink] [raw]
Subject: Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan"

On Wed, 2010-11-10 at 12:36 +0100, ext Gery Kahn wrote:
> On 11/10/2010 01:21 PM, Juuso Oikarinen wrote:
> > On Wed, 2010-11-10 at 12:18 +0100, ext Gery Kahn wrote:
> >> On 11/10/2010 12:27 PM, [email protected] wrote:
> >>> From: Juuso Oikarinen<[email protected]>
> >>>
> >>> This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791.
> >>>
> >>> The reverted patch caused more harm than benefit.
> >>>
> >>> Signed-off-by: Juuso Oikarinen<[email protected]>
> >>>
> >> Just couple words what harm it was?
> >
> > The harm is that the supported channels are reported to user-space in
> > the order they are registered in the driver. The result of that is quite
> > messy in userspace PoV.
> >
> > -Juuso
> >
> Thank you for answer.
>
> The reason of doing such channel sorting was channel overlapping.
>
> Let's say for 11a (bandwidth 20MHz) it is not a problem.
> While 11g, preferred channel sorting would be 1,6,11,...
>
> Gery

Yes, this is why we had this reordering in the first place.

One benefit of sorting channels would be to get faster results for the
whole band, as there are responses from the overlapping channels too.

Currently the the scanning code however waits for all channels to be
scanned before sending results to userspace, so this benefit is not
utilized, and removing this patch makes no difference in that sense.

To take advantage of channel reordering, some other changes are needed
too. And the reordering needs to be performed in the mac80211/cfg80211
level (I actually earlier submitted a RFC patch doing just this.)

-Juuso

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



2010-11-11 09:35:48

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies

On Wed, 2010-11-10 at 11:27 +0100, Oikarinen Juuso (Nokia-MS/Tampere)
wrote:
> From: Juuso Oikarinen <[email protected]>
>
> The wl1271 does not support radar detection. Hence, prevent ad-hoc and
> active scanning on frequencies requiring DFS.
>
> Signed-off-by: Juuso Oikarinen <[email protected]>
> ---

This looks good, except for the typo described below.

Reviewed-by: Luciano Coelho <[email protected]>


> diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
> index f5b1d19..eb9f821 100644
> --- a/drivers/net/wireless/wl12xx/wl1271_main.c
> +++ b/drivers/net/wireless/wl12xx/wl1271_main.c
> @@ -335,6 +335,27 @@ out:
> return NOTIFY_OK;
> }
>
> +static int wl1271_reg_notify(struct wiphy *wiphy,
> + struct regulatory_request *request) {
> + struct ieee80211_supported_band *band;
> + struct ieee80211_channel *ch;
> + int i;
> +
> + band = wiphy->bands[IEEE80211_BAND_5GHZ];
> + for (i = 0; i < band->n_channels; i++) {
> + ch = &band->channels[i];
> + if (ch->flags % IEEE80211_CHAN_DISABLED)

Typo here, should be & instead of %. I'll fix it myself before
applying, so no need to resend.

--
Cheers,
Luca.


2010-11-10 10:27:27

by Juuso Oikarinen

[permalink] [raw]
Subject: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan"

From: Juuso Oikarinen <[email protected]>

This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791.

The reverted patch caused more harm than benefit.

Signed-off-by: Juuso Oikarinen <[email protected]>
---
drivers/net/wireless/wl12xx/wl1271_main.c | 86 +++++++++++++---------------
1 files changed, 40 insertions(+), 46 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index eb9f821..1f912cd 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -2215,24 +2215,21 @@ static struct ieee80211_rate wl1271_rates[] = {
.hw_value_short = CONF_HW_BIT_RATE_54MBPS, },
};

-/*
- * Can't be const, mac80211 writes to this. The order of the channels here
- * is designed to improve scanning.
- */
+/* can't be const, mac80211 writes to this */
static struct ieee80211_channel wl1271_channels[] = {
{ .hw_value = 1, .center_freq = 2412, .max_power = 25 },
- { .hw_value = 5, .center_freq = 2432, .max_power = 25 },
- { .hw_value = 9, .center_freq = 2452, .max_power = 25 },
- { .hw_value = 13, .center_freq = 2472, .max_power = 25 },
- { .hw_value = 4, .center_freq = 2427, .max_power = 25 },
- { .hw_value = 8, .center_freq = 2447, .max_power = 25 },
- { .hw_value = 12, .center_freq = 2467, .max_power = 25 },
- { .hw_value = 3, .center_freq = 2422, .max_power = 25 },
- { .hw_value = 7, .center_freq = 2442, .max_power = 25 },
- { .hw_value = 11, .center_freq = 2462, .max_power = 25 },
{ .hw_value = 2, .center_freq = 2417, .max_power = 25 },
+ { .hw_value = 3, .center_freq = 2422, .max_power = 25 },
+ { .hw_value = 4, .center_freq = 2427, .max_power = 25 },
+ { .hw_value = 5, .center_freq = 2432, .max_power = 25 },
{ .hw_value = 6, .center_freq = 2437, .max_power = 25 },
+ { .hw_value = 7, .center_freq = 2442, .max_power = 25 },
+ { .hw_value = 8, .center_freq = 2447, .max_power = 25 },
+ { .hw_value = 9, .center_freq = 2452, .max_power = 25 },
{ .hw_value = 10, .center_freq = 2457, .max_power = 25 },
+ { .hw_value = 11, .center_freq = 2462, .max_power = 25 },
+ { .hw_value = 12, .center_freq = 2467, .max_power = 25 },
+ { .hw_value = 13, .center_freq = 2472, .max_power = 25 },
};

/* mapping to indexes for wl1271_rates */
@@ -2323,52 +2320,49 @@ static struct ieee80211_rate wl1271_rates_5ghz[] = {
.hw_value_short = CONF_HW_BIT_RATE_54MBPS, },
};

-/*
- * 5 GHz band channels for WL1273 - can't be const, mac80211 writes to this.
- * The order of the channels here is designed to improve scanning.
- */
+/* 5 GHz band channels for WL1273 */
static struct ieee80211_channel wl1271_channels_5ghz[] = {
{ .hw_value = 183, .center_freq = 4915},
- { .hw_value = 188, .center_freq = 4940},
- { .hw_value = 8, .center_freq = 5040},
- { .hw_value = 34, .center_freq = 5170},
- { .hw_value = 44, .center_freq = 5220},
- { .hw_value = 60, .center_freq = 5300},
- { .hw_value = 112, .center_freq = 5560},
- { .hw_value = 132, .center_freq = 5660},
- { .hw_value = 157, .center_freq = 5785},
{ .hw_value = 184, .center_freq = 4920},
+ { .hw_value = 185, .center_freq = 4925},
+ { .hw_value = 187, .center_freq = 4935},
+ { .hw_value = 188, .center_freq = 4940},
{ .hw_value = 189, .center_freq = 4945},
- { .hw_value = 9, .center_freq = 5045},
- { .hw_value = 36, .center_freq = 5180},
- { .hw_value = 46, .center_freq = 5230},
- { .hw_value = 64, .center_freq = 5320},
- { .hw_value = 116, .center_freq = 5580},
- { .hw_value = 136, .center_freq = 5680},
{ .hw_value = 192, .center_freq = 4960},
- { .hw_value = 11, .center_freq = 5055},
- { .hw_value = 38, .center_freq = 5190},
- { .hw_value = 48, .center_freq = 5240},
- { .hw_value = 100, .center_freq = 5500},
- { .hw_value = 120, .center_freq = 5600},
- { .hw_value = 140, .center_freq = 5700},
- { .hw_value = 185, .center_freq = 4925},
{ .hw_value = 196, .center_freq = 4980},
- { .hw_value = 12, .center_freq = 5060},
- { .hw_value = 40, .center_freq = 5200},
- { .hw_value = 52, .center_freq = 5260},
- { .hw_value = 104, .center_freq = 5520},
- { .hw_value = 124, .center_freq = 5620},
- { .hw_value = 149, .center_freq = 5745},
- { .hw_value = 161, .center_freq = 5805},
- { .hw_value = 187, .center_freq = 4935},
{ .hw_value = 7, .center_freq = 5035},
+ { .hw_value = 8, .center_freq = 5040},
+ { .hw_value = 9, .center_freq = 5045},
+ { .hw_value = 11, .center_freq = 5055},
+ { .hw_value = 12, .center_freq = 5060},
{ .hw_value = 16, .center_freq = 5080},
+ { .hw_value = 34, .center_freq = 5170},
+ { .hw_value = 36, .center_freq = 5180},
+ { .hw_value = 38, .center_freq = 5190},
+ { .hw_value = 40, .center_freq = 5200},
{ .hw_value = 42, .center_freq = 5210},
+ { .hw_value = 44, .center_freq = 5220},
+ { .hw_value = 46, .center_freq = 5230},
+ { .hw_value = 48, .center_freq = 5240},
+ { .hw_value = 52, .center_freq = 5260},
{ .hw_value = 56, .center_freq = 5280},
+ { .hw_value = 60, .center_freq = 5300},
+ { .hw_value = 64, .center_freq = 5320},
+ { .hw_value = 100, .center_freq = 5500},
+ { .hw_value = 104, .center_freq = 5520},
{ .hw_value = 108, .center_freq = 5540},
+ { .hw_value = 112, .center_freq = 5560},
+ { .hw_value = 116, .center_freq = 5580},
+ { .hw_value = 120, .center_freq = 5600},
+ { .hw_value = 124, .center_freq = 5620},
{ .hw_value = 128, .center_freq = 5640},
+ { .hw_value = 132, .center_freq = 5660},
+ { .hw_value = 136, .center_freq = 5680},
+ { .hw_value = 140, .center_freq = 5700},
+ { .hw_value = 149, .center_freq = 5745},
{ .hw_value = 153, .center_freq = 5765},
+ { .hw_value = 157, .center_freq = 5785},
+ { .hw_value = 161, .center_freq = 5805},
{ .hw_value = 165, .center_freq = 5825},
};

--
1.7.1


2010-11-10 11:18:26

by Kahn, Gery

[permalink] [raw]
Subject: Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan"

On 11/10/2010 12:27 PM, [email protected] wrote:
> From: Juuso Oikarinen<[email protected]>
>
> This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791.
>
> The reverted patch caused more harm than benefit.
>
> Signed-off-by: Juuso Oikarinen<[email protected]>
> ---
> drivers/net/wireless/wl12xx/wl1271_main.c | 86 +++++++++++++---------------
> 1 files changed, 40 insertions(+), 46 deletions(-)
>
> diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
> index eb9f821..1f912cd 100644
> --- a/drivers/net/wireless/wl12xx/wl1271_main.c
> +++ b/drivers/net/wireless/wl12xx/wl1271_main.c
> @@ -2215,24 +2215,21 @@ static struct ieee80211_rate wl1271_rates[] = {
> .hw_value_short = CONF_HW_BIT_RATE_54MBPS, },
> };
>
> -/*
> - * Can't be const, mac80211 writes to this. The order of the channels here
> - * is designed to improve scanning.
> - */
> +/* can't be const, mac80211 writes to this */
> static struct ieee80211_channel wl1271_channels[] = {
> { .hw_value = 1, .center_freq = 2412, .max_power = 25 },
> - { .hw_value = 5, .center_freq = 2432, .max_power = 25 },
> - { .hw_value = 9, .center_freq = 2452, .max_power = 25 },
> - { .hw_value = 13, .center_freq = 2472, .max_power = 25 },
> - { .hw_value = 4, .center_freq = 2427, .max_power = 25 },
> - { .hw_value = 8, .center_freq = 2447, .max_power = 25 },
> - { .hw_value = 12, .center_freq = 2467, .max_power = 25 },
> - { .hw_value = 3, .center_freq = 2422, .max_power = 25 },
> - { .hw_value = 7, .center_freq = 2442, .max_power = 25 },
> - { .hw_value = 11, .center_freq = 2462, .max_power = 25 },
> { .hw_value = 2, .center_freq = 2417, .max_power = 25 },
> + { .hw_value = 3, .center_freq = 2422, .max_power = 25 },
> + { .hw_value = 4, .center_freq = 2427, .max_power = 25 },
> + { .hw_value = 5, .center_freq = 2432, .max_power = 25 },
> { .hw_value = 6, .center_freq = 2437, .max_power = 25 },
> + { .hw_value = 7, .center_freq = 2442, .max_power = 25 },
> + { .hw_value = 8, .center_freq = 2447, .max_power = 25 },
> + { .hw_value = 9, .center_freq = 2452, .max_power = 25 },
> { .hw_value = 10, .center_freq = 2457, .max_power = 25 },
> + { .hw_value = 11, .center_freq = 2462, .max_power = 25 },
> + { .hw_value = 12, .center_freq = 2467, .max_power = 25 },
> + { .hw_value = 13, .center_freq = 2472, .max_power = 25 },
> };
>
> /* mapping to indexes for wl1271_rates */
> @@ -2323,52 +2320,49 @@ static struct ieee80211_rate wl1271_rates_5ghz[] = {
> .hw_value_short = CONF_HW_BIT_RATE_54MBPS, },
> };
>
> -/*
> - * 5 GHz band channels for WL1273 - can't be const, mac80211 writes to this.
> - * The order of the channels here is designed to improve scanning.
> - */
> +/* 5 GHz band channels for WL1273 */
> static struct ieee80211_channel wl1271_channels_5ghz[] = {
> { .hw_value = 183, .center_freq = 4915},
> - { .hw_value = 188, .center_freq = 4940},
> - { .hw_value = 8, .center_freq = 5040},
> - { .hw_value = 34, .center_freq = 5170},
> - { .hw_value = 44, .center_freq = 5220},
> - { .hw_value = 60, .center_freq = 5300},
> - { .hw_value = 112, .center_freq = 5560},
> - { .hw_value = 132, .center_freq = 5660},
> - { .hw_value = 157, .center_freq = 5785},
> { .hw_value = 184, .center_freq = 4920},
> + { .hw_value = 185, .center_freq = 4925},
> + { .hw_value = 187, .center_freq = 4935},
> + { .hw_value = 188, .center_freq = 4940},
> { .hw_value = 189, .center_freq = 4945},
> - { .hw_value = 9, .center_freq = 5045},
> - { .hw_value = 36, .center_freq = 5180},
> - { .hw_value = 46, .center_freq = 5230},
> - { .hw_value = 64, .center_freq = 5320},
> - { .hw_value = 116, .center_freq = 5580},
> - { .hw_value = 136, .center_freq = 5680},
> { .hw_value = 192, .center_freq = 4960},
> - { .hw_value = 11, .center_freq = 5055},
> - { .hw_value = 38, .center_freq = 5190},
> - { .hw_value = 48, .center_freq = 5240},
> - { .hw_value = 100, .center_freq = 5500},
> - { .hw_value = 120, .center_freq = 5600},
> - { .hw_value = 140, .center_freq = 5700},
> - { .hw_value = 185, .center_freq = 4925},
> { .hw_value = 196, .center_freq = 4980},
> - { .hw_value = 12, .center_freq = 5060},
> - { .hw_value = 40, .center_freq = 5200},
> - { .hw_value = 52, .center_freq = 5260},
> - { .hw_value = 104, .center_freq = 5520},
> - { .hw_value = 124, .center_freq = 5620},
> - { .hw_value = 149, .center_freq = 5745},
> - { .hw_value = 161, .center_freq = 5805},
> - { .hw_value = 187, .center_freq = 4935},
> { .hw_value = 7, .center_freq = 5035},
> + { .hw_value = 8, .center_freq = 5040},
> + { .hw_value = 9, .center_freq = 5045},
> + { .hw_value = 11, .center_freq = 5055},
> + { .hw_value = 12, .center_freq = 5060},
> { .hw_value = 16, .center_freq = 5080},
> + { .hw_value = 34, .center_freq = 5170},
> + { .hw_value = 36, .center_freq = 5180},
> + { .hw_value = 38, .center_freq = 5190},
> + { .hw_value = 40, .center_freq = 5200},
> { .hw_value = 42, .center_freq = 5210},
> + { .hw_value = 44, .center_freq = 5220},
> + { .hw_value = 46, .center_freq = 5230},
> + { .hw_value = 48, .center_freq = 5240},
> + { .hw_value = 52, .center_freq = 5260},
> { .hw_value = 56, .center_freq = 5280},
> + { .hw_value = 60, .center_freq = 5300},
> + { .hw_value = 64, .center_freq = 5320},
> + { .hw_value = 100, .center_freq = 5500},
> + { .hw_value = 104, .center_freq = 5520},
> { .hw_value = 108, .center_freq = 5540},
> + { .hw_value = 112, .center_freq = 5560},
> + { .hw_value = 116, .center_freq = 5580},
> + { .hw_value = 120, .center_freq = 5600},
> + { .hw_value = 124, .center_freq = 5620},
> { .hw_value = 128, .center_freq = 5640},
> + { .hw_value = 132, .center_freq = 5660},
> + { .hw_value = 136, .center_freq = 5680},
> + { .hw_value = 140, .center_freq = 5700},
> + { .hw_value = 149, .center_freq = 5745},
> { .hw_value = 153, .center_freq = 5765},
> + { .hw_value = 157, .center_freq = 5785},
> + { .hw_value = 161, .center_freq = 5805},
> { .hw_value = 165, .center_freq = 5825},
> };
>
Just couple words what harm it was?