#10496 closed defect (fixed)
OpenWrt configures wireless interface before changing its regulatory domain
Reported by: | jan.klos@… | Owned by: | developers |
---|---|---|---|
Priority: | normal | Milestone: | Barrier Breaker 14.07 |
Component: | base system | Version: | Trunk |
Keywords: | CRDA cfg80211 channel | Cc: |
Description
My WNDR3700v2 router is running a latest trunk build of OpenWrt I compiled (with ATH_USER_REGD set). My 2.4 GHz interface is configured to operate as AP on channel 13 - which is legal in Czech Republic, but not in the US. On some reboots, it fails to start:
Jan 1 01:00:13 Router kern.info kernel: cfg80211: Calling CRDA for country: CZ Jan 1 01:00:15 Router daemon.warn hostapd: wlan0: IEEE 802.11 Configured channel (13) not found from the channel list of current mode (1) IEEE 802.11g Jan 1 01:00:15 Router daemon.warn hostapd: wlan0: IEEE 802.11 Hardware does not support configured channel Jan 1 01:00:15 Router user.info sysinit: rmdir[ctrl_interface]: No such file or directory Jan 1 01:00:15 Router kern.info kernel: cfg80211: Regulatory domain changed to country: CZ Jan 1 01:00:15 Router kern.info kernel: cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) Jan 1 01:00:15 Router kern.info kernel: cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm) Jan 1 01:00:15 Router kern.info kernel: cfg80211: (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2301 mBm) Jan 1 01:00:15 Router kern.info kernel: cfg80211: (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm) Jan 1 01:00:15 Router kern.info kernel: cfg80211: (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm) Jan 1 01:00:15 Router user.info sysinit: Configuration file: /var/run/hostapd-phy0.conf Jan 1 01:00:15 Router user.info sysinit: channel [12] (13) is disabled for use in AP mode, flags: 0x1 Jan 1 01:00:15 Router user.info sysinit: wlan0: IEEE 802.11 Configured channel (13) not found from the channel list of current mode (1) IEEE 802.11g Jan 1 01:00:15 Router user.info sysinit: wlan0: IEEE 802.11 Hardware does not support configured channel Jan 1 01:00:15 Router user.info sysinit: Could not select hw_mode and channel. (-4) Jan 1 01:00:15 Router user.info sysinit: wlan0: Unable to setup interface. Jan 1 01:00:15 Router user.info sysinit: Failed to start hostapd for phy0
Sometimes, everything works perfectly:
Jan 1 01:00:13 Router kern.info kernel: cfg80211: Calling CRDA for country: CZ Jan 1 01:00:15 Router kern.info kernel: cfg80211: Regulatory domain changed to country: CZ Jan 1 01:00:15 Router kern.info kernel: cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) Jan 1 01:00:15 Router kern.info kernel: cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm) Jan 1 01:00:15 Router kern.info kernel: cfg80211: (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2301 mBm) Jan 1 01:00:15 Router kern.info kernel: cfg80211: (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm) Jan 1 01:00:15 Router kern.info kernel: cfg80211: (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm) Jan 1 01:00:15 Router kern.debug kernel: ar71xx: pll_reg 0xb8050014: 0x11110000 Jan 1 01:00:15 Router kern.info kernel: eth1: link up (1000Mbps/Full duplex) Jan 1 01:00:15 Router kern.info kernel: br-wan: port 1(eth1) entering forwarding state Jan 1 01:00:15 Router kern.info kernel: br-wan: port 1(eth1) entering forwarding state Jan 1 01:00:16 Router daemon.info hostapd: wlan0: STA ff:ff:ff:ff:ff:ff IEEE 802.11: authenticated Jan 1 01:00:16 Router daemon.info hostapd: wlan0: STA ff:ff:ff:ff:ff:ff IEEE 802.11: associated (aid 1) Jan 1 01:00:17 Router daemon.info hostapd: wlan0: STA ff:ff:ff:ff:ff:ff IEEE 802.11: authenticated Jan 1 01:00:17 Router daemon.info hostapd: wlan0: STA ff:ff:ff:ff:ff:ff IEEE 802.11: associated (aid 1) Jan 1 01:00:17 Router daemon.info hostapd: wlan0: STA ff:ff:ff:ff:ff:ff WPA: pairwise key handshake completed (RSN) Jan 1 01:00:17 Router user.notice ifup: Enabling Router Solicitations on wifi0 (wlan0)
It seems to me that randomly, calling CRDA takes too long and OpenWrt does not wait for it to finish changing regdomain before trying to configure the interface.
Attachments (0)
Change History (7)
comment:1 Changed 6 years ago by soban@…
comment:2 Changed 6 years ago by nbd
- Resolution set to fixed
- Status changed from new to closed
fixed in r28387
comment:3 Changed 6 years ago by OXINARF <francisco-ferreira@…>
- Resolution fixed deleted
- Status changed from closed to reopened
This doesn't seem solved. I was using a snapshot of trunk, but since I wanted to use channel 13 I compiled my version with ATH_USER_REGD set.
As you can see in https://forum.openwrt.org/viewtopic.php?id=35828&p=2 various people have the same problem. It doesn't wait for regulatory domain to be set and so it fails to load wifi.
Right now I have a call in rc.local to /sbin/wifi, but I don't it is a solution.
This only happens when using channels 12 or 13 and ATH_USER_REGD is set of course.
comment:4 Changed 6 years ago by nbd
- Resolution set to fixed
- Status changed from reopened to closed
should be fixed in r31859
comment:5 Changed 6 years ago by soban@…
- Resolution fixed deleted
- Status changed from closed to reopened
OpenWrt Attitude Adjustment r32482 TP-LINK TL-WDR4300
root@router:~# iw reg get
country CZ:
(2400 - 2483 @ 40), (N/A, 20)
(5150 - 5250 @ 40), (N/A, 23), NO-OUTDOOR
(5250 - 5350 @ 40), (N/A, 20), NO-OUTDOOR, DFS
(5470 - 5725 @ 40), (N/A, 27), DFS
Wiphy phy0
Band 1:
Capabilities: 0x11ef
RX LDPC
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-15
Frequencies:
- 2412 MHz [1] (20.0 dBm)
- 2417 MHz [2] (20.0 dBm)
- 2422 MHz [3] (20.0 dBm)
- 2427 MHz [4] (20.0 dBm)
- 2432 MHz [5] (20.0 dBm)
- 2437 MHz [6] (20.0 dBm)
- 2442 MHz [7] (20.0 dBm)
- 2447 MHz [8] (20.0 dBm)
- 2452 MHz [9] (20.0 dBm)
- 2457 MHz [10] (20.0 dBm)
- 2462 MHz [11] (20.0 dBm)
- 2467 MHz [12] (disabled) <------ ERROR enable CZ
- 2472 MHz [13] (disabled) <------ ERROR enable CZ
- 2484 MHz [14] (disabled)
Bitrates (non-HT):
- 1.0 Mbps
comment:6 Changed 6 years ago by nbd
- Resolution set to fixed
- Status changed from reopened to closed
the issue in that last comment is a different one, tracked in #9678.
please leave this one closed.
comment:7 Changed 4 years ago by jow
- Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07
Milestone Attitude Adjustment 12.09 deleted
TP-LINK TL-WR1043ND OpenWrt Backfire 10.03.1-RC6