All of lore.kernel.org
 help / color / mirror / Atom feed
* question concerning Japan regulation and NO-OUTDOOR
@ 2018-12-21 10:17 Kurt Van Dijck
  2018-12-21 20:24 ` Marcin Sielski
  0 siblings, 1 reply; 2+ messages in thread
From: Kurt Van Dijck @ 2018-12-21 10:17 UTC (permalink / raw)
  To: linux-wireless

Hey all,

I work on a project for an outdoor device equipped with a Ralink wifi
key. In order to get certified in Japan, we should be able to proof that
the device is not using the 5.2GHz bands since this band is limited to
indoor use only in Japan.
As I understood, 5.4GHz and up are allowed.

My first, rather rough, approach is to specify all 2.4GHz bands in
wpa_supplicant's global 'freq_list' parameter.
We found that our device still connect to 5GHz networks, I believe
because passive scanning allows 5GHz networks to be detected anyway.

2nd attempt, on top of the 1st, is to patch wpa_supplicant with:

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 37d429d..c32aa1a 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1223,6 +1223,13 @@ struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
 			continue;
 		}
 
+		if (!freq_allowed(wpa_s->conf->freq_list, bss->freq)) {
+			wpa_msg(wpa_s, MSG_INFO,
+				"frequency %u excluded", bss->freq);
+			wpa_dbg(wpa_s, MSG_DEBUG,
+				"   skip - avoid this frequency");
+			continue;
+		}
 		if (!freq_allowed(ssid->freq_list, bss->freq)) {
 			if (debug_print)
 				wpa_dbg(wpa_s, MSG_DEBUG,

In short, this enforces wpa_supplicant to honor the global freq_list
parameter for joining accesspoints, as it does for per-network
freq_lists.

Is this sufficient to avoid our chip to send on 5GHz band?

I also noticed some NO-OUTDOOR specifiers in the wireless regdb,
but not on the 5.2GHz bands for Japan.
I'm in the position to find out those details, and I'm willing to amend
in the upstream repository.
I do not yet see however how I can tell the kernel that it should limit
wifi regulation to outdoor use only. There seems no simple 'iw reg set
outdoor' or similar command. How is this done?

Thanks for your responses in advance,
Kurt

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: question concerning Japan regulation and NO-OUTDOOR
  2018-12-21 10:17 question concerning Japan regulation and NO-OUTDOOR Kurt Van Dijck
@ 2018-12-21 20:24 ` Marcin Sielski
  0 siblings, 0 replies; 2+ messages in thread
From: Marcin Sielski @ 2018-12-21 20:24 UTC (permalink / raw)
  To: linux-wireless

Hi,

I think indoor/outdoor hint is currently only set by hostapd (see
phy_info_freq function at driver_nl80211_capa.c).
The entire implementation is based on US FCC regulations which allows
passive scanning.
https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122
I am curious how it is defined in EU RED.

Best Regards

Marcin Sielski

pt., 21 gru 2018 o 17:25 Kurt Van Dijck
<dev.kurt@vandijck-laurijssen.be> napisał(a):
>
> Hey all,
>
> I work on a project for an outdoor device equipped with a Ralink wifi
> key. In order to get certified in Japan, we should be able to proof that
> the device is not using the 5.2GHz bands since this band is limited to
> indoor use only in Japan.
> As I understood, 5.4GHz and up are allowed.
>
> My first, rather rough, approach is to specify all 2.4GHz bands in
> wpa_supplicant's global 'freq_list' parameter.
> We found that our device still connect to 5GHz networks, I believe
> because passive scanning allows 5GHz networks to be detected anyway.
>
> 2nd attempt, on top of the 1st, is to patch wpa_supplicant with:
>
> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> index 37d429d..c32aa1a 100644
> --- a/wpa_supplicant/events.c
> +++ b/wpa_supplicant/events.c
> @@ -1223,6 +1223,13 @@ struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
>                         continue;
>                 }
>
> +               if (!freq_allowed(wpa_s->conf->freq_list, bss->freq)) {
> +                       wpa_msg(wpa_s, MSG_INFO,
> +                               "frequency %u excluded", bss->freq);
> +                       wpa_dbg(wpa_s, MSG_DEBUG,
> +                               "   skip - avoid this frequency");
> +                       continue;
> +               }
>                 if (!freq_allowed(ssid->freq_list, bss->freq)) {
>                         if (debug_print)
>                                 wpa_dbg(wpa_s, MSG_DEBUG,
>
> In short, this enforces wpa_supplicant to honor the global freq_list
> parameter for joining accesspoints, as it does for per-network
> freq_lists.
>
> Is this sufficient to avoid our chip to send on 5GHz band?
>
> I also noticed some NO-OUTDOOR specifiers in the wireless regdb,
> but not on the 5.2GHz bands for Japan.
> I'm in the position to find out those details, and I'm willing to amend
> in the upstream repository.
> I do not yet see however how I can tell the kernel that it should limit
> wifi regulation to outdoor use only. There seems no simple 'iw reg set
> outdoor' or similar command. How is this done?
>
> Thanks for your responses in advance,
> Kurt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-21 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-21 10:17 question concerning Japan regulation and NO-OUTDOOR Kurt Van Dijck
2018-12-21 20:24 ` Marcin Sielski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.