* [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies
@ 2010-11-10 10:27 juuso.oikarinen
2010-11-10 10:27 ` [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" juuso.oikarinen
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: juuso.oikarinen @ 2010-11-10 10:27 UTC (permalink / raw)
To: luciano.coelho; +Cc: linux-wireless
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
The wl1271 does not support radar detection. Hence, prevent ad-hoc and
active scanning on frequencies requiring DFS.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
---
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
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" 2010-11-10 10:27 [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies juuso.oikarinen @ 2010-11-10 10:27 ` juuso.oikarinen 2010-11-10 11:18 ` Gery Kahn 2010-11-10 11:02 ` [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies Tuomas Katila ` (3 subsequent siblings) 4 siblings, 1 reply; 15+ messages in thread From: juuso.oikarinen @ 2010-11-10 10:27 UTC (permalink / raw) To: luciano.coelho; +Cc: linux-wireless From: Juuso Oikarinen <juuso.oikarinen@nokia.com> This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791. The reverted patch caused more harm than benefit. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> --- 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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" 2010-11-10 10:27 ` [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" juuso.oikarinen @ 2010-11-10 11:18 ` Gery Kahn 2010-11-10 11:21 ` Juuso Oikarinen 0 siblings, 1 reply; 15+ messages in thread From: Gery Kahn @ 2010-11-10 11:18 UTC (permalink / raw) To: juuso.oikarinen@nokia.com Cc: luciano.coelho@nokia.com, linux-wireless@vger.kernel.org On 11/10/2010 12:27 PM, juuso.oikarinen@nokia.com wrote: > From: Juuso Oikarinen<juuso.oikarinen@nokia.com> > > This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791. > > The reverted patch caused more harm than benefit. > > Signed-off-by: Juuso Oikarinen<juuso.oikarinen@nokia.com> > --- > 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? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" 2010-11-10 11:18 ` Gery Kahn @ 2010-11-10 11:21 ` Juuso Oikarinen 2010-11-10 11:36 ` Gery Kahn 0 siblings, 1 reply; 15+ messages in thread From: Juuso Oikarinen @ 2010-11-10 11:21 UTC (permalink / raw) To: geryk@ti.com Cc: Coelho Luciano (Nokia-MS/Helsinki), linux-wireless@vger.kernel.org On Wed, 2010-11-10 at 12:18 +0100, ext Gery Kahn wrote: > On 11/10/2010 12:27 PM, juuso.oikarinen@nokia.com wrote: > > From: Juuso Oikarinen<juuso.oikarinen@nokia.com> > > > > This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791. > > > > The reverted patch caused more harm than benefit. > > > > Signed-off-by: Juuso Oikarinen<juuso.oikarinen@nokia.com> > > > 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" 2010-11-10 11:21 ` Juuso Oikarinen @ 2010-11-10 11:36 ` Gery Kahn 2010-11-10 11:42 ` Juuso Oikarinen 0 siblings, 1 reply; 15+ messages in thread From: Gery Kahn @ 2010-11-10 11:36 UTC (permalink / raw) To: Juuso Oikarinen Cc: Coelho Luciano (Nokia-MS/Helsinki), linux-wireless@vger.kernel.org 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, juuso.oikarinen@nokia.com wrote: >>> From: Juuso Oikarinen<juuso.oikarinen@nokia.com> >>> >>> This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791. >>> >>> The reverted patch caused more harm than benefit. >>> >>> Signed-off-by: Juuso Oikarinen<juuso.oikarinen@nokia.com> >>> >> 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" 2010-11-10 11:36 ` Gery Kahn @ 2010-11-10 11:42 ` Juuso Oikarinen 2010-11-11 19:47 ` Gery Kahn 0 siblings, 1 reply; 15+ messages in thread From: Juuso Oikarinen @ 2010-11-10 11:42 UTC (permalink / raw) To: geryk@ti.com Cc: Coelho Luciano (Nokia-MS/Helsinki), linux-wireless@vger.kernel.org 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, juuso.oikarinen@nokia.com wrote: > >>> From: Juuso Oikarinen<juuso.oikarinen@nokia.com> > >>> > >>> This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791. > >>> > >>> The reverted patch caused more harm than benefit. > >>> > >>> Signed-off-by: Juuso Oikarinen<juuso.oikarinen@nokia.com> > >>> > >> 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 majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" 2010-11-10 11:42 ` Juuso Oikarinen @ 2010-11-11 19:47 ` Gery Kahn 0 siblings, 0 replies; 15+ messages in thread From: Gery Kahn @ 2010-11-11 19:47 UTC (permalink / raw) To: Juuso Oikarinen Cc: Coelho Luciano (Nokia-MS/Helsinki), linux-wireless@vger.kernel.org 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, juuso.oikarinen@nokia.com wrote: >>>>> From: Juuso Oikarinen<juuso.oikarinen@nokia.com> >>>>> >>>>> This reverts commit fa21c7a9e4be439e217fe72edbd39b643b643791. >>>>> >>>>> The reverted patch caused more harm than benefit. >>>>> >>>>> Signed-off-by: Juuso Oikarinen<juuso.oikarinen@nokia.com> >>>>> >>>> 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 majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies 2010-11-10 10:27 [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies juuso.oikarinen 2010-11-10 10:27 ` [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" juuso.oikarinen @ 2010-11-10 11:02 ` Tuomas Katila 2010-11-11 9:35 ` Luciano Coelho ` (2 subsequent siblings) 4 siblings, 0 replies; 15+ messages in thread From: Tuomas Katila @ 2010-11-10 11:02 UTC (permalink / raw) To: Oikarinen Juuso (Nokia-MS/Tampere) Cc: Coelho Luciano (Nokia-MS/Helsinki), linux-wireless@vger.kernel.org On Wed, 2010-11-10 at 11:27 +0100, Oikarinen Juuso (Nokia-MS/Tampere) wrote: > From: Juuso Oikarinen <juuso.oikarinen@nokia.com> > > The wl1271 does not support radar detection. Hence, prevent ad-hoc and > active scanning on frequencies requiring DFS. > > Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> > --- For both of the patches: Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com> -Tuomas ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies 2010-11-10 10:27 [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies juuso.oikarinen 2010-11-10 10:27 ` [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" juuso.oikarinen 2010-11-10 11:02 ` [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies Tuomas Katila @ 2010-11-11 9:35 ` Luciano Coelho 2010-11-11 12:15 ` Luciano Coelho 2010-11-17 6:52 ` Gabay, Benzy 4 siblings, 0 replies; 15+ messages in thread From: Luciano Coelho @ 2010-11-11 9:35 UTC (permalink / raw) To: Oikarinen Juuso (Nokia-MS/Tampere); +Cc: linux-wireless@vger.kernel.org On Wed, 2010-11-10 at 11:27 +0100, Oikarinen Juuso (Nokia-MS/Tampere) wrote: > From: Juuso Oikarinen <juuso.oikarinen@nokia.com> > > The wl1271 does not support radar detection. Hence, prevent ad-hoc and > active scanning on frequencies requiring DFS. > > Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> > --- This looks good, except for the typo described below. Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> > 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. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies 2010-11-10 10:27 [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies juuso.oikarinen ` (2 preceding siblings ...) 2010-11-11 9:35 ` Luciano Coelho @ 2010-11-11 12:15 ` Luciano Coelho 2010-11-17 6:52 ` Gabay, Benzy 4 siblings, 0 replies; 15+ messages in thread From: Luciano Coelho @ 2010-11-11 12:15 UTC (permalink / raw) To: Oikarinen Juuso (Nokia-MS/Tampere); +Cc: linux-wireless@vger.kernel.org On Wed, 2010-11-10 at 11:27 +0100, Oikarinen Juuso (Nokia-MS/Tampere) wrote: > From: Juuso Oikarinen <juuso.oikarinen@nokia.com> > > The wl1271 does not support radar detection. Hence, prevent ad-hoc and > active scanning on frequencies requiring DFS. > > Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> > --- Applied both patches to wl12xx and pushed, thanks! -- Cheers, Luca. ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies 2010-11-10 10:27 [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies juuso.oikarinen ` (3 preceding siblings ...) 2010-11-11 12:15 ` Luciano Coelho @ 2010-11-17 6:52 ` Gabay, Benzy 2010-11-17 7:00 ` Juuso Oikarinen 4 siblings, 1 reply; 15+ messages in thread From: Gabay, Benzy @ 2010-11-17 6:52 UTC (permalink / raw) To: juuso.oikarinen@nokia.com, luciano.coelho@nokia.com Cc: linux-wireless@vger.kernel.org Juuso, > From: Juuso Oikarinen <juuso.oikarinen@nokia.com> > > 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 <juuso.oikarinen@nokia.com> > --- > 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies 2010-11-17 6:52 ` Gabay, Benzy @ 2010-11-17 7:00 ` Juuso Oikarinen 2010-11-17 8:25 ` Gabay, Benzy 0 siblings, 1 reply; 15+ messages in thread From: Juuso Oikarinen @ 2010-11-17 7:00 UTC (permalink / raw) To: ext Gabay, Benzy; +Cc: luciano.coelho@nokia.com, linux-wireless@vger.kernel.org On Wed, 2010-11-17 at 00:52 -0600, ext Gabay, Benzy wrote: > Juuso, > > > From: Juuso Oikarinen <juuso.oikarinen@nokia.com> > > > > 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 <juuso.oikarinen@nokia.com> > > --- > > 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies 2010-11-17 7:00 ` Juuso Oikarinen @ 2010-11-17 8:25 ` Gabay, Benzy 2010-11-17 8:34 ` Juuso Oikarinen 0 siblings, 1 reply; 15+ messages in thread From: Gabay, Benzy @ 2010-11-17 8:25 UTC (permalink / raw) To: Juuso Oikarinen; +Cc: luciano.coelho@nokia.com, linux-wireless@vger.kernel.org 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies 2010-11-17 8:25 ` Gabay, Benzy @ 2010-11-17 8:34 ` Juuso Oikarinen 2010-11-17 9:57 ` Bruno Randolf 0 siblings, 1 reply; 15+ messages in thread From: Juuso Oikarinen @ 2010-11-17 8:34 UTC (permalink / raw) To: ext Gabay, Benzy; +Cc: luciano.coelho@nokia.com, linux-wireless@vger.kernel.org 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies 2010-11-17 8:34 ` Juuso Oikarinen @ 2010-11-17 9:57 ` Bruno Randolf 0 siblings, 0 replies; 15+ messages in thread From: Bruno Randolf @ 2010-11-17 9:57 UTC (permalink / raw) To: Juuso Oikarinen Cc: ext Gabay, Benzy, luciano.coelho@nokia.com, linux-wireless@vger.kernel.org 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2010-11-22 6:02 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-11-10 10:27 [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies juuso.oikarinen 2010-11-10 10:27 ` [PATCH 2/2] Revert "wl1271: Change supported channel order for a more optimal scan" juuso.oikarinen 2010-11-10 11:18 ` Gery Kahn 2010-11-10 11:21 ` Juuso Oikarinen 2010-11-10 11:36 ` Gery Kahn 2010-11-10 11:42 ` Juuso Oikarinen 2010-11-11 19:47 ` Gery Kahn 2010-11-10 11:02 ` [PATCH 1/2] wl1271: Prevent ad-hoc and active scanning on 11a DFS frequencies Tuomas Katila 2010-11-11 9:35 ` Luciano Coelho 2010-11-11 12:15 ` Luciano Coelho 2010-11-17 6:52 ` Gabay, Benzy 2010-11-17 7:00 ` Juuso Oikarinen 2010-11-17 8:25 ` Gabay, Benzy 2010-11-17 8:34 ` Juuso Oikarinen 2010-11-17 9:57 ` Bruno Randolf
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).