Openwrt on wndr3800 - 5Ghz wifi shows as disabled

2

1

My openwrt GUI shows all 5Ghz networks as disabled. (Red circle-with-slash, and "Wireless is disabled or not associated"). Nor does the 5Ghz wireless network show up on my computers.

I've had 5Ghz working in the recent past, but this just doesn't seem to be behaving at the moment. I currently have

  • Netgear WNDR3800
  • OpenWRT stable - 15.05 Chaos Calmer. (Not 15.05.1 yet. I ran some opkg update a few months ago though, so it might be a bit in-between).

My configuration mainly just mimics CeroWRT (a fork project developed on the wndr3800 platform). Specifically:

  • sqm-scripts to fix latency under load ("kill bufferbloat").
  • Separate networks for "guest" and myself which are routed instead of bridged to the LAN.
  • Separate networks for 2.4Ghz and 5Ghz. (I'd actually prefer seamless roaming as suggested by recent Googly presentation (TM); it just hasn't always been 100% reliable for me and I end up wanting to force 2.4Ghz).

I noticed the following in the router's system log:

Sun Apr  3 15:02:19 2016 user.notice SQM: Starting simple.qos
Sun Apr  3 15:02:19 2016 user.notice SQM: ifb associated with interface pppoe-wan: 
Sun Apr  3 15:02:19 2016 user.notice SQM: Currently no ifb is associated with pppoe-wan, this is normal during starting of the sqm system.
Sun Apr  3 15:02:19 2016 daemon.notice netifd: radio1 (9031): wlan1: ACS-COMPLETED freq=5320 channel=64
Sun Apr  3 15:02:19 2016 daemon.notice netifd: radio1 (9031): Using interface wlan1 with hwaddr 74:44:01:86:42:d6 and ssid "VOYAGER2091-90-jenkins"
Sun Apr  3 15:02:20 2016 user.notice SQM: Squashing differentiated services code points (DSCP) from ingress.
Sun Apr  3 15:02:21 2016 kern.info kernel: [  199.510000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Sun Apr  3 15:02:21 2016 daemon.notice netifd: radio1 (9031): Could not set interface wlan1-1 flags (UP): Device or resource busy
Sun Apr  3 15:02:21 2016 daemon.notice netifd: radio1 (9031): Failed to add BSS (BSSID=76:44:01:86:42:d6)
Sun Apr  3 15:02:21 2016 daemon.notice netifd: radio1 (9031): Interface initialization failed
Sun Apr  3 15:02:21 2016 daemon.notice netifd: radio1 (9031): wlan1: interface state ACS->DISABLED
Sun Apr  3 15:02:21 2016 daemon.notice netifd: radio1 (9031): wlan1: AP-DISABLED 
Sun Apr  3 15:02:21 2016 daemon.notice netifd: radio1 (9031): ACS: Possibly channel configuration is invalid, please report this along with your config file.
Sun Apr  3 15:02:21 2016 daemon.notice netifd: radio1 (9031): ACS: Failed to start
Sun Apr  3 15:02:21 2016 daemon.notice netifd: radio1 (9031): wlan1: AP-DISABLED

Running /etc/init.d/network restart on the router doesn't help.

Running ifdown wifi_a_guest and then ifup wifi_a_guest seems to fix everything until the next reboot.

sourcejedi

Posted 2016-04-03T16:12:03.533

Reputation: 2 292

Answers

1

Those last two sentences are key. There appears to be a race condition in OpenWRT, which is triggered by my specific configuration, as described above.

Having enabled miniupnpd seems to be part of it too. After disabling it (due to confusing logspam), I found that /etc/init.d/network restart did get 5Ghz working. That was the next key.

Disabling sqm resolved the 5Ghz problem permanently. Of course, I would like to find a way to have sqm working :). I know that sqm has a fairly slow script (it can take a number of seconds) that runs when its network interface is brought up.

Since sqm is not configured to touch the wireless interfaces, I'm inclined to blame a race condition in OpenWRT's homegrown netifd. In fact, I was able to reproduce the failure even after replacing the implementation of sqm with a busy loop. (Not a delay - sleep 3 didn't reproduce the failure). In /usr/lib/sqm/run.sh:

run_sqm_scripts() {
    local section="$1"
    export IFACE=$(config_get "$section" interface)

    [ -z "$RUN_IFACE" -o "$RUN_IFACE" = "$IFACE" ] || return

    # XXX test hack
    if [ "$RUN_IFACE" = "$IFACE" ]; then
      let i=0
      while [[ $i -le 20000 ]]; do
        let i++
      done
    fi
    return
    # XXX end test hack

    [ $(config_get "$section" enabled) -ne 1 ] && ACTION=stop

sourcejedi

Posted 2016-04-03T16:12:03.533

Reputation: 2 292