Comment 24 for bug 1437913

Revision history for this message
Seth Forshee (sforshee) wrote : Re: [Bug 1437913] Re: 8086:095b [Lenovo ThinkPad X250] Wifi unstable on vivid with Intel 7265

On Thu, Jun 04, 2015 at 03:45:32PM -0000, Jason Gerard DeRose wrote:
> @sforshee - I'm trying to better understand the consequences of Ubuntu
> currently having an "an old regulatory database version", as some
> System76 customers are having WiFi problems when connecting to AC
> routers with an Intel 7265 and `sudo iw reg set US` seems to fix their
> issues.
>
> In particular, should a regulatory domain be set automatically once the
> database is updated? Currently I'm seeing the world-regulatory domain
> (ie, not set), which seems to be an intersection of all domains and
> means some band that could be used aren't (in the US anyway).

The answer is a bit complicated. iwlwifi will actually read out a set of
custom regulatory rules from the firmware and supply those to the
wireless core. This becomes the "default" set of rules rather than the
generic world domain when no specific regulatory domain has been
supplied. This could be a similarly conservative set of rules meant to
be "safe" around the world, or it could reflect the rules of the country
where the device was intended to be sold (I'm not sure off the top of my
head which it is for this card, but my best recollection is that it's
the former).

To emphasize the point - even though the kernel has retrieved the world
domain from crda, prints them in dmesg, and outputs them in response to
'iw reg get', these rules are *not* being used for an Intel wireless
card unless the user has manually loaded those rules (e.g. 'iw reg set
00'). Instead the kernel is using the rules it was given by the device's
firmware.

When a specific regulatory domain is set a process in userspace (crda)
will read the rules for that domain from the regulatory database and
load them into the kernel, and those rules will be used instead of the
ones the driver supplied. Sometimes the access point will broadcast
information about the regulatory domain in its beacon frames, in which
case the regulatory rules for the country will be loaded automatically
when connecting to that AP. More often (in my experience at least) the
AP does not provide this information.

The update to the database will change nothing about this process. The
same rules are going to be supplied by iwlwifi, and country-specific
rules will still be loaded or not loaded automatically based on what the
AP is broadcasting exactly as before. All it will change is the rules
which get loaded into the kernel for a given regulatory domain.

You aren't specific about what kind of problems your customers are
experiencing. One possibility is that the AP is using a channel that the
default rules says is not allowed but the US rules do allow, and that
loading the US rules opens up use on that channel. If this is the
problem then it will not be fixed by updating the database.