OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity High
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Amish Vishwakarma - 12.06.2021

FS#3873 - Hostapd: Wlan1 (MT7613 gets disabled after restarting Radio1

Supply the following if possible:
- Device problem occurs on

     TP-Link Archer C6 v3 & 
     Linksys e5600

- Software versions of OpenWrt/LEDE release, packages, etc.

     e5600 :https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/openwrt-ramips-mt7621-linksys_e5600-squashfs-factory.bin
     Archer C6V3: OpenWrt 21.02-SNAPSHOT r0-2c462a2 

- Steps to reproduce

     Make changes to SSID/channel etc on the SSID of Radio1 and restart Radio 1 after reapplying the changes. The radio will be disabled after a few restart. Even, if the radio stays enable there is no output on 5G band, and can be verified by scanners like linSSID.

The logs show

Sat Jun 12 19:18:21 2021 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED <mac #>
Sat Jun 12 19:18:21 2021 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED <mac #> 1
Sat Jun 12 19:18:21 2021 daemon.info hostapd: wlan1: STA <mac #> IEEE 802.11: authenticated
Sat Jun 12 19:18:21 2021 daemon.info hostapd: wlan1: STA <mac #> IEEE 802.11: associated (aid 1)
Sat Jun 12 19:18:21 2021 daemon.notice hostapd: wlan1: AP-STA-CONNECTED <mac #>
Sat Jun 12 19:18:21 2021 daemon.info hostapd: wlan1: STA <mac #> RADIUS: starting accounting session F29691BFEF566F6D
Sat Jun 12 19:18:21 2021 daemon.info hostapd: wlan1: STA <mac #> WPA: pairwise key handshake completed (RSN)
Sat Jun 12 19:18:21 2021 daemon.notice hostapd: wlan1: EAPOL-4WAY-HS-COMPLETED <mac #>
***snip****
Sat Jun 12 19:18:44 2021 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy1.conf (phy wlan1)
Sat Jun 12 19:18:44 2021 daemon.err hostapd: Interface name wlan1 already in use
Sat Jun 12 19:18:44 2021 daemon.notice netifd: radio1 (30801): Command failed: Invalid argument
Sat Jun 12 19:18:44 2021 daemon.notice netifd: radio1 (30801): Device setup failed: HOSTAPD_START_FAILED
Sat Jun 12 19:18:44 2021 kern.warn kernel: [346712.410330] IPv6: MLD: clamping QRV from 1 to 2!
Sat Jun 12 19:18:44 2021 daemon.notice netifd: radio1 (30916): WARNING: Variable 'data' does not exist or is not an array/object
Sat Jun 12 19:18:50 2021 kern.warn kernel: [346718.422284] IPv6: MLD: clamping QRV from 1 to 2!

Stephane commented on 13.06.2021 13:52

I have similar problems with : OpenWrt 21.02.0-rc2 + Netgear R7800

The 5GHz wifi is broken, that's maybe the same bug ?
https://bugs.openwrt.org/index.php?do=details&task_id=3775

Can you try modifying the 5GHz wifi channel width to 80MHz ?

Amish Vishwakarma commented on 14.06.2021 06:16

I am using 80MHz by default. The problem is reproducible on both routers having MT7613BE radios.

Nathan Lutchansky commented on 19.06.2021 19:17

I am also running into this problem with the Archer A6 v3 (US) running 21.02 RC3. A workaround is to set up the /etc/config/wireless settings you want, then shut down and power cycle the router. (Rebooting is not sufficient.) For me, following this procedure results in stable wireless, as long as I don't touch the config again without doing a power cycle.

I'll look into this more in a few days. It seems like kind of a problem for 21.02.

Borromini commented on 19.06.2021 21:55

I've seen this frequently on the 21.02 branch and it looks like a stray hostapd instance. If I do a

kill -9 $(pgrep hostapd)

then do a

wifi up

it usually works.

Nathan Lutchansky commented on 19.06.2021 21:59

I'll give that a go, but I suspect it's something deeper, since a reboot doesn't fix it, only a full power cycle.

bob commented on 25.06.2021 16:12

The message "Device setup failed: HOSTAPD_START_FAILED" comes from function drv_mac80211_setup in /lib/netifd/wireless/mac80211.sh. The relevant portion of the code is,

[ -n "$hostapd_ctrl" ] && {

      local no_reload=1
      if [ -n "$(ubus list | grep hostapd.$primary_ap)" ]; then 
              [ "${NEW_MD5}" = "${OLD_MD5}" ] || {
                      ubus call hostapd.$primary_ap reload
                      no_reload=$?
                      if [ "$no_reload" != "0" ]; then 
                              mac80211_vap_cleanup hostapd "${OLDAPLIST}"
                              mac80211_vap_cleanup wpa_supplicant "$(uci -q -P /var/state get wireless._${phy}.splist)"
                              mac80211_vap_cleanup none "$(uci -q -P /var/state get wireless._${phy}.umlist)"
                              sleep 2 
                              mac80211_iw_interface_add "$phy" "${NEWAPLIST%% *}" __ap
                              for_each_interface "sta adhoc mesh monitor" mac80211_prepare_vif
                      fi              
              }               
      fi              
      if [ "$no_reload" != "0" ]; then
              add_ap=1
              ubus wait_for hostapd
              local hostapd_res="$(ubus call hostapd config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}")"                 
              ret="$?"
              [ "$ret" != 0 -o -z "$hostapd_res" ] && {
                      wireless_setup_failed HOSTAPD_START_FAILED
                      return  
              }               
              wireless_add_process "$(jsonfilter -s "$hostapd_res" -l 1 -e @.pid)" "/usr/sbin/hostapd" 1 1
      fi              

To assist with debugging, would you mind inserting a line immediately before or after "sleep 2" which says "touch /tmp/debug".

Then try restarting radio1 and see whether file /tmp/debug is created.

If /tmp/debug is *not* created, then the following pull-requests may help. They only modify this shell-script, so you can try them without recompiling the firmware.

https://github.com/openwrt/openwrt/pull/4313

https://github.com/openwrt/openwrt/pull/4314

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing