Wifi client disconnecting takes the whole wifi AP down on 21.02 snapshot - how to debug?

Device: Asus RT-N56U

I installed 21.02 snapshot, commit 60fad8f from 13 July 2021. No special configurations. Just wifi, LAN switch, WAN ethernet.

Wifi works initially. My mobile can connect to the AP no problem and get internet.

But if I turn off wifi on my mobile, then turn it back on, the AP does not come up in the list of networks.

With another mobile I verified the AP is not visible.

So it seems once one wifi client has deauthed, the whole AP goes down?

Wifi becomes visible on the mobiles if I use "wifi down; wifi up" or "ifdown lan; ifup lan" on the router.

Before updating to 21.02 snapshot, the device used development snapshot from March 2021 with no such issue.

I performed build using commit fe498dd3f10 from 4 June 2021 and observed same wifi problems.

Some time between March 2021 and June 2021 is when it got broke.

How to get more debug from hostapd? There is no debugs in "logread" or "dmesg" when the AP goes down.

I performed scans with airmon-ng and wireshark and confirmed the wifi AP beacons stopped transmitting.

The last things seen before beacons stopped:

  1. ap: beacon frame
  2. mobile1: Qos Null function (no data), no flags
  3. mobile1: Qos Null function (no data), P flags set "PWR MGT: STA will go to sleep"
  4. mobile1: [retransmit of above] x15
  5. sequence 3 and 4 repeat with SN incremented by 1

The primary question is how can I get more debugs out of hostapd to see what it is thinking? I modified "/etc/init.d/wpad" and added "-dd" to the hostapd command line but I do not see more debugs in "logread". I am building openwrt from git.

I am using "hostapd" to use WPA3.

wiki seems to have a method to kick up verbosity

Thanks I missed the wiki entry.

I turned log_level to 0 and now the device reboots when the AP goes down.

It gives more STA output but not any AP related outputs.

It's not quite clear to me, but I got the impression the bottom section to enable compiler debug flags is now required on your build; but it is not explicitly stated, just that hint about recent versions???

It seems the wiki is accurate as of 21.02 snapshot. CONFIG_NO_STDOUT_DEBUG has not been removed in hostapd-full.config, leaving it undefined, so it should keep the debugs in.

Maybe I am looking for more debugs that are not there in hostapd. I assumed setting debug level to 0 should overwhelm output. I will look into the code but I am not a wifi expert.

The issue seems to be when the wifi client has too low a signal is when it takes the whole AP down. If I can reliably reproduce I will try to bisect git.

I have isolated the commit to: a078037ace50, commited 30 June 2021:

mac80211: improve rate control performance

Call rate control handler after intermediate queueuing
Includes follow-up fixes

Test case:

  1. Connect to AP
  2. Move far away or shield mobile so the AP signal drops significantly as seen by mobile
  3. Viewing the wifi networks of the mobile (android), if when signal drops below some threshold:
    4.1 AP disappears from list: FAIL [the router also reboots]
    4.2 AP moves from "Connected" to "Saved": PASS

I created build of openwrt-21.02 with latest commits as of 23 July 2021, but reverted the problem commits ("git revert ccbe535; git revert a07803"), and the issue has not been seen so far.

2 Likes

Opened: https://bugs.openwrt.org/index.php?do=details&task_id=3947

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.