Bug 12315
Summary: | Cannot list available channels on ath5k-based R52 with iw phy | ||
---|---|---|---|
Product: | Networking | Reporter: | Simon Farnsworth (linux-kernel) |
Component: | Wireless | Assignee: | networking_wireless (networking_wireless) |
Status: | CLOSED CODE_FIX | ||
Severity: | low | CC: | acab, alan, daniel.blueman, linville, mcgrof, me |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.28-rc9-9238-gf2109d7 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Simon Farnsworth
2008-12-28 08:54:08 UTC
I have a workaround patch: diff --git a/drivers/net/wireless/ath5k/caps.c b/drivers/net/wireless/ath5k/caps.c index 150f5ed..eec9d60 100644 --- a/drivers/net/wireless/ath5k/caps.c +++ b/drivers/net/wireless/ath5k/caps.c @@ -69,8 +69,8 @@ int ath5k_hw_set_capabilities(struct ath5k_hw *ah) if (AR5K_EEPROM_HDR_11A(ee_header)) { /* 4920 */ - ah->ah_capabilities.cap_range.range_5ghz_min = 5005; - ah->ah_capabilities.cap_range.range_5ghz_max = 6100; + ah->ah_capabilities.cap_range.range_5ghz_min = 5170; + ah->ah_capabilities.cap_range.range_5ghz_max = 5710; /* Set supported modes */ __set_bit(AR5K_MODE_11A, @@ -88,7 +88,7 @@ int ath5k_hw_set_capabilities(struct ath5k_hw *ah) AR5K_EEPROM_HDR_11G(ee_header)) { /* 2312 */ ah->ah_capabilities.cap_range.range_2ghz_min = 2412; - ah->ah_capabilities.cap_range.range_2ghz_max = 2732; + ah->ah_capabilities.cap_range.range_2ghz_max = 2482; if (AR5K_EEPROM_HDR_11B(ee_header)) __set_bit(AR5K_MODE_11B, The workaround patch seems to address the 'iw phy phy0 info' command (presumably the request IOCTL doesn't pass enough allocated buffer space for the larger channel list), but doesn't help with the hostapd channel setting. I have found that commenting out the channel setting in hostapd.conf and using eg 'iwconfig wlan0 channel 11' seems a possible workaround for the hostapd issue. It works for me with hostapd git. Without the workaround patch, hostapd fails to list possible channels - with it, it can list and set them, both in the 5GHz band, and the 2.4GHz band. The hostapd (git HEAD/0.6.7) failure I see is: # ./hostapd hostapd.conf Configuration file: hostapd.conf wlan0: IEEE 802.11 Configured channel (11) not found from the channel list of current mode (1) IEEE 802.11g wlan0: IEEE 802.11 Hardware does not support configured channel Could not select hw_mode and channel. (-1) rmdir[ctrl_interface]: No such file or directory I'm using 2.6.28.1's ath5k with AR5414 hardware and some minimal and seemingly well-known patches to enable AP mode in ath5k and mac80211. What about you? I'm tracking wireless-testing, with the two patches in this bug applied. My 2.4GHz configuration is: interface=wlan1 bridge=main-bridge driver=nl80211 logger_syslog=-1 logger_syslog_level=2 logger_stdout=0 logger_stdout_level=0 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 ssid=FarnzPrivate country_code=GB ieee80211d=1 hw_mode=g channel=11 preamble=1 auth_algs=3 Plus auth stuff that's common with the 5GHz configuration I can confirm the patch from Simon Farnsworth works. However this still doesn't make hostapd (git) happy. All available channels are in fact marked as PASSIVE_SCAN|NO_IBSS: # ./iw list Wiphy phy1 Band 1: Frequencies: * 2412 MHz [1] (20.0 dBm) (passive scanning, no IBSS) * 2417 MHz [2] (20.0 dBm) (passive scanning, no IBSS) * 2422 MHz [3] (20.0 dBm) (passive scanning, no IBSS) * 2427 MHz [4] (20.0 dBm) (passive scanning, no IBSS) [...] And hostapd doesn't like them (hw_features.c:70): for (j = 0; j < feature->num_channels; j++) { /* * Disable all channels that are marked not to allow * IBSS operation or active scanning. In addition, * disable all channels that require radar detection, * since that (in addition to full DFS) is not yet * supported. */ if (feature->channels[j].flag & (HOSTAPD_CHAN_NO_IBSS | HOSTAPD_CHAN_PASSIVE_SCAN | HOSTAPD_CHAN_RADAR)) feature->channels[j].flag |= HOSTAPD_CHAN_DISABLED; Here all the available channels are marked as unavailable. As a quick hack it is possible to comment out that check to make hostapd happy and working. A better fix is probably to set correct channel flags in ath5k/base.c Please try this patch: http://marc.info/?l=linux-wireless&m=123841474910111&q=raw acaB: what regulatory domain are you using? (In reply to comment #7) > Please try this patch: > > http://marc.info/?l=linux-wireless&m=123841474910111&q=raw This patch works on my system, and is as effective as my patch was. Tested-By: Simon Farnsworth <simon@farnz.org.uk> (In reply to comment #8) > acaB: what regulatory domain are you using? Sorry I'm unable to do any test ATM as the alix board where the card is plugged in is currently unable to boot after upgrading from 2.6.29-rc8 to 2.6.29.1 :( I will let you know as soon as I manage to boot again. (In reply to comment #7) > Please try this patch: > > http://marc.info/?l=linux-wireless&m=123841474910111&q=raw The patch works for iw phy. I now get: Wiphy phy0 Band 1: Frequencies: * 2412 MHz [1] (20.0 dBm) (passive scanning, no IBSS) * 2417 MHz [2] (20.0 dBm) (passive scanning, no IBSS) * 2422 MHz [3] (20.0 dBm) (passive scanning, no IBSS) * 2427 MHz [4] (20.0 dBm) (passive scanning, no IBSS) * 2432 MHz [5] (20.0 dBm) (passive scanning, no IBSS) * 2437 MHz [6] (20.0 dBm) (passive scanning, no IBSS) * 2442 MHz [7] (20.0 dBm) (passive scanning, no IBSS) * 2447 MHz [8] (20.0 dBm) (passive scanning, no IBSS) * 2452 MHz [9] (20.0 dBm) (passive scanning, no IBSS) * 2457 MHz [10] (20.0 dBm) (passive scanning, no IBSS) * 2462 MHz [11] (20.0 dBm) (passive scanning, no IBSS) * 2467 MHz [12] (disabled) * 2472 MHz [13] (disabled) * 2484 MHz [14] (disabled) Bitrates: * 1.0 Mbps * 2.0 Mbps (short preamble supported) * 5.5 Mbps (short preamble supported) * 11.0 Mbps (short preamble supported) * 6.0 Mbps * 9.0 Mbps * 12.0 Mbps * 18.0 Mbps * 24.0 Mbps * 36.0 Mbps * 48.0 Mbps * 54.0 Mbps Band 2: Frequencies: * 5180 MHz [36] (disabled) * 5200 MHz [40] (disabled) * 5220 MHz [44] (disabled) * 5240 MHz [48] (disabled) * 5260 MHz [52] (disabled) * 5280 MHz [56] (disabled) * 5300 MHz [60] (disabled) * 5320 MHz [64] (disabled) * 5500 MHz [100] (disabled) * 5520 MHz [104] (disabled) * 5540 MHz [108] (disabled) * 5560 MHz [112] (disabled) * 5580 MHz [116] (disabled) * 5600 MHz [120] (disabled) * 5620 MHz [124] (disabled) * 5640 MHz [128] (disabled) * 5660 MHz [132] (disabled) * 5680 MHz [136] (disabled) * 5700 MHz [140] (disabled) * 5745 MHz [149] (disabled) * 5765 MHz [153] (disabled) * 5785 MHz [157] (disabled) * 5805 MHz [161] (disabled) * 5825 MHz [165] (disabled) Bitrates: * 6.0 Mbps * 9.0 Mbps * 12.0 Mbps * 18.0 Mbps * 24.0 Mbps * 36.0 Mbps * 48.0 Mbps * 54.0 Mbps Supported interface modes: * IBSS * managed * AP * AP/VLAN * monitor * mesh point (In reply to comment #8) > acaB: what regulatory domain are you using? loneliness:~# iw reg get command failed: Operation not supported (-95) However "reg set" works. I can set it to world or IT or US without any change to the above. Another update: I'm now running + kernel 2.6.29.2 + Wireless-testing 5ece8a46f9aeb9d6f80a3c4414f2c27682dc706b + this set of 9 patches: https://lists.ath5k.org/pipermail/ath5k-devel/2009-April/002314.html Everything seems fine now: - channels are no longer marked passivescan+noibss in iw - iw reg get and set both work properly - hostapd works without my crude hack Thanks! Thanks for testing, all. These patches are all in wireless-testing now so this bug can be closed. |