Wcn36xx: Frequent deauthentication/disassociations with certain APs

Hi,

We’re using the Debian 19.01 release. We’re seeing the wifi driver deauthenticating from the AP very frequently, resulting in a poor experience. The console logs show the following errors:

[ 435.804192] wlan0: deauthenticated from d8:0f:99:07:8e:68 (Reason: 7=CLASS3_FRAME_FROM_NONASSOC_STA)
[ 435.920487] wlan0: authenticate with d8:0f:99:07:8e:68
[ 435.965481] wlan0: send auth to d8:0f:99:07:8e:68 (try 1/3)
[ 435.971075] wlan0: authenticated
[ 435.974680] wlan0: associate with d8:0f:99:07:8e:68 (try 1/3)
[ 435.983925] wlan0: RX AssocResp from d8:0f:99:07:8e:68 (capab=0x431 status=0 aid=9)
[ 436.017112] wlan0: associated
[ 464.104759] wlan0: disassociated from d8:0f:99:07:8e:68 (Reason: 4=DISASSOC_DUE_TO_INACTIVITY)
[ 464.215001] wlan0: authenticate with d8:0f:99:07:8e:68
[ 464.261275] wlan0: send auth to d8:0f:99:07:8e:68 (try 1/3)
[ 464.263478] wlan0: authenticated
[ 464.273019] wlan0: associate with d8:0f:99:07:8e:68 (try 1/3)
[ 464.279865] wlan0: RX AssocResp from d8:0f:99:07:8e:68 (capab=0x431 status=0 aid=10)
[ 464.314101] wlan0: associated
[ 528.348511] wlan0: disassociated from d8:0f:99:07:8e:68 (Reason: 4=DISASSOC_DUE_TO_INACTIVITY)
[ 528.544152] wlan0: authenticate with d8:0f:99:07:8e:68
[ 528.589598] wlan0: send auth to d8:0f:99:07:8e:68 (try 1/3)
[ 528.592939] wlan0: authenticated
[ 528.597196] wlan0: associate with d8:0f:99:07:8e:68 (try 1/3)
[ 528.604532] wlan0: RX AssocResp from d8:0f:99:07:8e:68 (capab=0x431 status=0 aid=11)
[ 528.638910] wlan0: associated

I captured wcn36xx logs [1] for a few seconds with debug_mask=0xffffffff. Some points about the logs:

  • We see the first deauthenticate happen at around 07:39:56.
  • Around that time, I start a ping to the gateway IP.
  • Another disassociatge happens at aroung 07:40:16, while we’re pinging to the gateway.
  • I had set “iw dev wlan0 set power_save off” before capturing the logs.
  • Searching for “wlan0” can help find where the disassociates happen.

This AP is a portable wifi hotspot [2]. The same hotspot works smoothly with other devices. I’d flashed the android release with the msm-3.10 kernel and tried that out. I didn’t know much on how to measure the wifi perfromance, but pings to the gateway IP and 8.8.8.8 very smooth on it too, unlike the debian release. So, I feel like the issue doesn’t exist with the android kernel driver.

We have seen disassociations like these on other hotspots and routers too, but don’t have logs for those. The reason specified in the kernel logs vary sometimes, like Reason: 1=UNSPECIFIED or Reason: 15=4WAY_HANDSHAKE_TIMEOUT.

Does anyone have ideas on how we could debug this futher? Please let me know if more info is needed.

Thanks,
Archit

[1] wcn36xx logs: https://paste.ubuntu.com/p/pNVg9twvt2/
[2] Hotspot info: Amazon.in

Haven’t rootcaused the issue yet, but in case anyone’s interested, reducing the MTU size reduces the disassociations considerably. This commands reduces it from 1500 to 576:

ifconfig wlan0 mtu 576

Hello,

I am also facing similar type of issue with ASUS router (See the specific router only).

[ 1179.359274] wlan0: deauthenticated from 04:d9:f5:c2:de:b8 (Reason: 6=CLASS2_FRAME_FROM_NONAUTH_STA)
[ 1179.435955] wcn36xx: ERROR hal_remove_bsskey response failed err=16
[ 1181.700486] wlan0: authenticate with 04:d9:f5:c2:de:b8
[ 1181.741826] wlan0: send auth to 04:d9:f5:c2:de:b8 (try 1/3)
[ 1181.750091] wlan0: authenticated
[ 1181.757848] wlan0: associate with 04:d9:f5:c2:de:b8 (try 1/3)
[ 1181.769309] wlan0: RX AssocResp from 04:d9:f5:c2:de:b8 (capab=0x411 status=0 aid=1)
[ 1181.802606] wlan0: associated
[ 1181.803136] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1181.860266] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

[ 1205.565288] wlan0: deauthenticated from 04:d9:f5:c2:de:b8 (Reason: 34=DISASSOC_LOW_ACK)
[ 1205.654385] wcn36xx: ERROR hal_remove_bsskey response failed err=16
[ 1207.433647] wlan0: authenticate with 04:d9:f5:c2:de:b8
[ 1207.475246] wlan0: send auth to 04:d9:f5:c2:de:b8 (try 1/3)
[ 1207.483476] wlan0: authenticated
[ 1207.493833] wlan0: associate with 04:d9:f5:c2:de:b8 (try 1/3)
[ 1207.498568] wlan0: RX AssocResp from 04:d9:f5:c2:de:b8 (capab=0x411 status=0 aid=1)
[ 1207.531278] wlan0: associated
[ 1207.531741] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

Thanks,
Darshak