Re: Hostapd 'Country' and regulatory compliance question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 08, 2020 at 11:09:25AM -0500, Mariya Krovatkina wrote:
> Our project team is planning to use hostapd to create a wifi access point
> at the oilfield, but we've been having questions and concerns related to
> regulatory compliance, as this will be enterprise use, not personal use.
> I guess, we weren't able to find clear information on how hostapd deals
> with the country settings and how the regulatory compliance information
> is being updated.
> So far I see at least 4 levels of where the impact can happen:
> - NIC hardware - supported channels and modes
> - NIC firmware
> - Linux drivers (in our case brcmsmac)
> - Hostapd configuration (uses nl80211 to configure the driver)

It is the first three that are expected to enforce regulatory
requirements.

> 1. When we set a country and dot11CountryString, does hostapd use a certain
> database with current regulatory details for the country and translate
> to driver commands?

hostapd notifies the driver about the configured country code and
fetches the allowed channel list from the driver, so no, hostapd does
not do such database processing; the database is in the driver (or well,
somewhere in the kernel, e.g., in cfg80211 regulatory that can be shared
by multiple drivers).

> 2. Where is this database stored and can we update it if some unusual
> country decides to change regulations (which happens quite rarely though)?

That depends on the driver. It might be in cfg80211 and loaded from
/lib/firmware/regulatory.db or built into the kernel image. Or it might
be in the driver/firmware/hardware calibration data.

> 3. Is it possible that hostapd will report the country as set correctly,
> but the driver will not accept all of the settings, so resulting frequencies
> on the NIC will not be compliant?

hostapd will refuse to start AP if the configured channel is not shown
as being available in the channel list fetched from the driver, but the
main enforcement of non-compliant parameters is expected to be done in
the driver.

> 4. I think, worldwide regulatory domain is set on our NIC by default.
> Will hostapd always be able to change it using the Country setting?
> If not, will it impact the regulatory profile?

That depends on the driver. Number of drivers enforce local
configuration and refuse to enable new channels based on country code
provided from user space. In such cases, the driver may, e.g., not allow
any 5 GHz channels to be used if the hardware is configured to use
worldwide roaming defaults.

> 5. What troubleshooting commands can be helpful to make sure the right
> profile is applied? (e.g. iw reg get, iw list, etc.)

That's also driver specific, but looking at what those commands return
is quite useful part of this for cfg80211-based drivers.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux