Automatic channel selection causes wifi to die

I am compiling the trunk branch of OpenWRT and found that the automatic channel selection on ATH79 will cause wifi to die. My chip is QCA9531.

Wifi configuration as follows:

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'platform/ahb/18100000.wmac'
        option txpower_max '23'
        option txpower '23'
        option noscan '1'
        option htmode 'HT40'
        option band '2G'
        option disabled '0'
        option channel 'auto'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'GL-XE300-7dd'
        option encryption 'psk2'
        option key 'goodlife'
        option wds '1'
        option disassoc_low_ack '0'
        option ifname 'wlan0'
        option disabled '0

logread

Tue Sep 15 02:23:01 2020 daemon.notice netifd: radio0 (21237): Device setup failed: INVALID_CHANNEL
Tue Sep 15 02:23:01 2020 daemon.notice netifd: radio0 (21237): Command failed: Not found
Tue Sep 15 02:23:01 2020 kern.info kernel: [ 2185.601144] br-lan: port 2(wlan0) entered disabled state
Tue Sep 15 02:23:01 2020 kern.info kernel: [ 2185.619572] device wlan0 left promiscuous mode
Tue Sep 15 02:23:01 2020 kern.info kernel: [ 2185.624242] br-lan: port 2(wlan0) entered disabled state
Tue Sep 15 02:23:01 2020 daemon.notice netifd: radio0 (21267): sh: acs_survey: out of range
Tue Sep 15 02:23:01 2020 daemon.notice netifd: radio0 (21267): sh: acs_survey: out of range
Tue Sep 15 02:23:32 2020 daemon.notice netifd: radio0 (21267): Command failed: Request timed out
Tue Sep 15 02:23:32 2020 daemon.notice netifd: radio0 (21267): Command failed: Not found
Tue Sep 15 02:23:32 2020 daemon.notice netifd: radio0 (21267): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process  path (/proc/exe)
Tue Sep 15 02:23:32 2020 daemon.notice netifd: radio0 (21267): Command failed: Invalid argument
Tue Sep 15 02:23:33 2020 kern.info kernel: [ 2217.741227] br-lan: port 2(wlan0) entered blocking state
Tue Sep 15 02:23:33 2020 kern.info kernel: [ 2217.746892] br-lan: port 2(wlan0) entered disabled state
Tue Sep 15 02:23:33 2020 kern.info kernel: [ 2217.752837] device wlan0 entered promiscuous mode

iwinfo

wlan0     ESSID: "GL-XE300-7dd"
          Access Point: E4:95:6E:40:B7:DF
          Mode: Master  Channel: unknown (2.407 GHz)
          Tx-Power: 20 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -95 dBm
          Bit Rate: unknown
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11bgn
          Hardware: unknown [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: yes  PHY name: phy0

According to the above information, it seems that the channel selection is wrong. If I add channels parameter, wifi will work normally, but the log will still appear ACs_survey: out of range

option channels '1-11'

The logread show

Tue Sep 15 01:55:25 2020 daemon.notice netifd: radio0 (6723): Command failed: Not found
Tue Sep 15 01:55:25 2020 daemon.notice netifd: radio0 (6744): sh: acs_survey: out of range
Tue Sep 15 01:55:26 2020 daemon.notice netifd: radio0 (6744): sh: acs_survey: out of range
Tue Sep 15 01:55:30 2020 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy0.conf (phy wlan0) --> new PHY
Tue Sep 15 01:55:30 2020 kern.info kernel: [  534.584055] br-lan: port 2(wlan0) entered blocking state
Tue Sep 15 01:55:30 2020 kern.info kernel: [  534.589728] br-lan: port 2(wlan0) entered disabled state
Tue Sep 15 01:55:30 2020 kern.info kernel: [  534.595918] device wlan0 entered promiscuous mode
Tue Sep 15 01:55:30 2020 daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
Tue Sep 15 01:55:30 2020 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->ACS
Tue Sep 15 01:55:30 2020 daemon.notice hostapd: wlan0: ACS-STARTED
Tue Sep 15 01:55:36 2020 daemon.notice hostapd: wlan0: ACS-COMPLETED freq=2437 channel=6
Tue Sep 15 01:55:36 2020 daemon.notice hostapd: wlan0: interface state ACS->ENABLED
Tue Sep 15 01:55:36 2020 daemon.notice hostapd: wlan0: AP-ENABLED

Now, my wifi is working, but I want to find out why, is this a known problem?

There is an "l" missing (channels)

1 Like

Yes, I have fixed it :sweat_smile:

If I set the country to JP, wifi can also work normally, which May be a bug, I think