[wifi] CRDA Regulatory Support is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
system-image (Ubuntu) |
In Progress
|
High
|
Mathieu Trudel-Lapierre |
Bug Description
Our images currently are broken with respect to Wi-Fi CRDA ( Central Regulatory Domain Agent ) / Regulatory support.
We don't include the regulatory DB package ( wireless-regdb ) nor the user agent used to load regulatory information into the kernel ( crda ). The kernel requests CRDA updates by generating a uevent, which is caught by udevd, which in turn matches a simple role that causes /sbin/crda to be invoked. As we're missing the required packages and not running udev on our images, CRDA updates fail.
If you look /var/log/syslog on a Galaxy Nexus / maguro running phablet-image >= 83, you'll see the following messages whenever the phone boots:
cfg80211: Calling CRDA to update world regulatory domain
This may be related to some of the bugs we're seeing with 802.11an ( 5GHz band ) access points we've seen including bug # 1107943 ( maguro ) and bug # 1126264 ( manta ).
Also, I went ahead an installed wireless-regdb and crda on my maguro. When I run 'sudo iw reg set US', it has no effect.
Note, for more information on the Linux regulatory framework, please refer to:
http://
or Documentation/
In order for this to be fixed, we need to do the following:
1. Add wireless-regdb and crda to our builds
2. Figure out someway to properly set the REGDOMAIN in /etc/default/crda
( distro plans to fix by modifying the post-install script of crda, but I'm not sure this will work for us )
3. Fix one or more Wi-Fi drivers, if so required
== Drivers ==
=== Galaxy Nexus (maguro) ===
The Galaxy Nexus uses the bcmdhd Wi-Fi driver. Which it turns out has code to set a custom world regdomain by default ( see /drivers/
This causes problems for wpa_supplicant, which actually queries the regdomain info from the kernel/driver, and uses this information to govern it's behavior.
This means it's probably time to revisit the delta between Android's version of wpa_supplicant, and the latest version in Ubuntu.
Also note, while doing some investigation on the bcmdhd driver, I ran into a reference of a private Broadcom-specific wpa_supplicant library.
== Nexus 4 (mako) ==
The Nexus 4 uses the wcnss_wlan driver ( aka prima ). The upstream git tree can be found at git://codeauror
This driver also apparently doesn't react to 'iw reg set' either. It also doesn't appear to be integrated with cfg80211 either.
Note, from the codearora.org site, it appears the Prima driver is for a Qualcomm MSM WLAN module ( which may use an Atheros chip internally ).
Changed in manhattan: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
importance: | Medium → High |
assignee: | nobody → Tony Espy (awe) |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
information type: | Proprietary → Public |
affects: | manhattan → touch-preview-images |
Changed in touch-preview-images: | |
assignee: | Tony Espy (awe) → Mathieu Trudel-Lapierre (mathieu-tl) |
affects: | touch-preview-images → system-image (Ubuntu) |
tags: | added: touch-preview-images |
Debug logging for libnl can be enabled by setting the following two environment variables:
NLCB=debug
NLDBG=4
From the log ( see attached ), I can see that the kernel is NAK'ing one of the netlink messages sent by CRDA. I have to dig a bit into the trace as the function/identity of the message isn't output. The kernel is returning an error of -22 "Invalid Argument" to the message. For some unfortunate reason, crda turns this into a -7 ( E2BIG ) return code which is mis-leading.