[network][maguro] 802.11a is broken

Bug #1107943 reported by Tony Espy
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
touch-preview-images
Invalid
High
Mathieu Trudel-Lapierre

Bug Description

Our current jellybean/maguro image doesn't support 802.11a ( 5 GHz Wi-Fi ) networking on maguro devices.

5 GHz access points are not displayed by the networking indicator.

Maguro devices running stock Android Jellybean images supports 802.11a.

Last tested on phablet-image ( maguro/phone ) build #48 ( 20130128 ).

Test Scenario:

In a location with known 802.11a access points, access the networking indicator.

Expected Results:

5 GHz access points are displayed in the network indicator if present.

Actual Results

No 5 GHz access points are displayed.

Tags: maguro wifi
Tony Espy (awe)
Changed in manhattan:
status: New → Confirmed
assignee: nobody → Tony Espy (awe)
Revision history for this message
Tony Espy (awe) wrote :

I disabled network-manager ( via an upstart override file ), and manually started wpa_supplicant with verbose logging ( -dd ) enabled. The scan results only show 2.4 GHz access points.

One interesting bit of information is that regulatory log messages from wpa_supplicant:

nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz
nl80211: 2457-2482 @ 20 MHz
nl80211: 2474-2494 @ 20 MHz
nl80211: 5170-5250 @ 40 MHz
nl80211: 5735-5835 @ 40 MHz
nl80211: Added 802.11b mode based on 802.11g information

Revision history for this message
Tony Espy (awe) wrote :

The two 5 GHz frequency bands specified above contain all of the non-DFS 5 GHz channels available in the US. When I checked my laptop, it shows three additional DFS bands:

espy@zappa:% iw reg get
country US:
(2402 - 2472 @ 40), (3, 27)
(5170 - 5250 @ 40), (3, 17)
(5250 - 5330 @ 40), (3, 20), DFS
(5490 - 5600 @ 40), (3, 20), DFS
(5650 - 5710 @ 40), (3, 20), DFS
(5735 - 5835 @ 40), (3, 30)

Revision history for this message
Tony Espy (awe) wrote :

It looks like the AP in question ( Ubuntu-5 GHz-an ) is configured to use any of the available 5 GHz frequency bands. I ran a couple of manual scans and I've seen if on channels 153 ( 5765 ), 157 ( 5785 ) and 161 ( 5805 ).

The scan results from ' iw scan' show that access point can use any of the 5 GHz channels:

Country: US Environment: Indoor/Outdoor
Channels [36 - 48] @ 20 dBm
Channels [52 - 64] @ 20 dBm
Channels [100 - 116] @ 20 dBm
Channels [132 - 140] @ 20 dBm
Channels [149 - 165] @ 20 dBm

Revision history for this message
Tony Espy (awe) wrote :

If I scan directly on my device from within the container using 'iw', I only see 2.4 GHz access points ( same result as manually running wpa_supplicant ).

Revision history for this message
Tony Espy (awe) wrote :

If I query the regulatory domains on the device it looks like all of the non-2.4 GHz frequency bands are set up as passive scan only:

root@localhost:/# iw reg get
country 00:
(2402 - 2472 @ 40), (6, 20)
(2457 - 2482 @ 20), (6, 20), PASSIVE-SCAN, NO-IBSS
(2474 - 2494 @ 20), (6, 20), NO-OFDM, PASSIVE-SCAN, NO-IBSS
(5170 - 5250 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS
(5735 - 5835 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS

PASSIVE-SCAN seems suspicious to me.

Revision history for this message
Tony Espy (awe) wrote :

There's a good possibility this could be related to the fact that the wireless regulatory framework ( CRDA ) is broken in our builds ( see bug # 1126751 for more details ).

I took a look at the Wi-Fi driver ( bcmdhd ) in the maguro kernel tree. In the physical device setup, the 5GHz band initialization is commented out, and states "set in runtime".

Also one other interesting tidbit, when I run 'iw info', only four channels are listed for band 2 ( 5GHz band ):

Frequencies:
  * 5180 MHz [36] (20.0 dBm)
  * 5200 MHz [40] (20.0 dBm)
  * 5220 MHz [44] (20.0 dBm)
  * 5240 MHz [48] (20.0 dBm)

Whereas if I run the same command on my thinkpad, I see 21 active channels for 5G.

Changed in manhattan:
importance: Undecided → High
Revision history for this message
Tony Espy (awe) wrote :

So this is definitely due to the fact that Ubuntu currently doesn't set a value for the wireless regdomain during install, so the regdomain is set to the default "00" which has a very conservative set of rules for 5G.

I've discussed with distro, and the plan will be to patch the crda package to take care of this in it's post-install script.

That said, we have three other issues that need to be addressed for this to work in our phablet images:

1. crda and wireless-regdb need to be added to our images.

2. We need to create an upstart script to manually run crda after COUNTRY has been set. This is due to the lack of udev in our images.

3. We need to fix crda to work with the Android kernels.

All three are addressed in bug #1126751.

Revision history for this message
Tony Espy (awe) wrote :

UN-DUP'd as the based on conversations with Seth Forshee, we don't believe this is directly related to CRDA.

Revision history for this message
Tony Espy (awe) wrote :

Some more info. As mentioned in comment #6, if I run 'iw list' on a Maguro, it only shows four channels for 5G:

I mentioned that I'd run a test previously where I disabled NetworkManager on start-up via an Upstart override file. On boot, 5G is disabled. I found reference in the bcmdhd driver that this was on purpose, and that 5G channels are supposed to be configured at runtime:

/* wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; - set in runtime */

Running 'iw list' confirms this, as the output only lists Band 1.

So the issue seems to be that only four channels are activated. As NM doesn't really muck with channels, or frequencies, all signs point to wpa_supplicant.

I asked Ricardo Salveti about whether or not he could shed light on the references to vendor specific wpa_supplicant libraries I'd seen, and sure enough, he found the following:

http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_hardware_qcom_wlan.git;a=tree;f=qcwcn/wpa_supplicant_8_lib;h=d573fffaf2cf867ea8f7d6a8d966f02e7c74f8e8;hb=refs/heads/phablet-10.1

http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_hardware_broadcom_wlan.git;a=tree;f=bcm4329/wpa_supplicant_8_lib;h=d3851716d855e10a7cd9ef5a41db75f73a4fd16c;hb=refs/heads/phablet-10.1

http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_hardware_broadcom_wlan.git;a=tree;f=bcmdhd/wpa_supplicant_8_lib;h=fe9dc1d1c0d0c0f9301960e9fc89fa104456f441;hb=refs/heads/phablet-10.1

I also found a Ti specific wlan project, which seems to have mac80211 patches in addition to a wpa_supplicant library:

http://phablet.ubuntu.com/gitweb?p=CyanogenMod/android_hardware_ti_wlan.git;a=summary

So...I'm pretty sure the logic to load the device-specific libraries is found in the device specific init script ( eg. init.tuna.rc ).

Tony Espy (awe)
tags: added: wifi
Changed in manhattan:
assignee: Tony Espy (awe) → nobody
Tony Espy (awe)
information type: Proprietary → Public
affects: manhattan → touch-preview-images
Changed in touch-preview-images:
assignee: nobody → Tony Espy (awe)
assignee: Tony Espy (awe) → Mathieu Trudel-Lapierre (mathieu-tl)
Revision history for this message
Seth Forshee (sforshee) wrote :

A couple of relevant pieces of information.

1. If 'iw info' doesn't show the channels, the problem is that the driver isn't claiming support for the channels. If they are disabled due to regulatory then they will still show up in the list but will be marked disabled.

2. bcmdhd has a default list of supported channels, but that list will be overwritten with one read from the firmware if available. This list is rebuilt whenever the interface is started and also in response to a couple of commands ("COUNTRY" and "SETBAND") which the driver considers to be Android-specific.

This seems to support the hypothesis that wpa_supplicant is doing something in Android to "unlock" the 5GHz channels (or some subset thereof). Let me know if more information about the Android-specific interfaces is required and I can investigate further.

Rex Tsai (chihchun)
tags: added: maguro
Bill Filler (bfiller)
Changed in touch-preview-images:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.