iwn(4) loses connection on a multi-channel AP

broke <[email protected]> Wed, 29 Jul 2026 13:49:47 +0600 (+06)
Newsgroups gmane.os.openbsd.bugs
Message-ID <[email protected]>
I talked about this problem in irc.libera.chat#openbsd, and I was told
to post the log here. This is apparently a bug with iwn(4) when trying
to stick/connect to an AP with multiple channels (e.g. 2.4 or 5 GHz)
the problem I can put in layman terms is that, I see that my wireless
driver is connected to this AP, but sometimes it disconnects and
connects back, it doesn't stick with the connection. I thought it was
an issue with the AP as well, which is a TP-Link Archer C64 with the
default configuration. The log had local ESSID names and such for the
sake of my privacy I cleaned them up. Also, repeated lines are
shortened.

From what I understand from the log, my 2.4 GHz channel has the bssid
of f0:09:0d:b1:f1:aa while :ac is 5 GHz.

---------------------------------------------------------------------
iwn0: begin background scan
iwn0: end background scan
iwn0: - 40:ed:00:37:f1:ee   10  +186 54M   ess  privacy   rsn "ESSID"
iwn0: - 80:af:ca:40:5a:e0    1  +190 54M   ess  privacy   rsn "ESSID"
iwn0: - 80:af:ca:40:5a:e2  157  +169 54M   ess  privacy   rsn "ESSID"
iwn0: - 82:af:ca:60:5a:e2  157  +170 54M   ess  privacy   rsn "ESSID"
iwn0: - 96:9a:4a:ea:8c:32    4  +191 54M   ess  privacy   rsn "ESSID"
iwn0: - 9c:53:22:7b:e5:0f  149  +170 54M   ess  privacy   rsn "ESSID"
iwn0: - 9c:53:22:7c:0e:d6    7  +185 54M   ess  privacy   rsn "ESSID"
iwn0: - b0:19:21:12:42:79    5  +189 54M   ess  privacy   rsn "ESSID"
iwn0: - b0:19:21:12:42:7b  157  +172 54M   ess  privacy   rsn "ESSID"
iwn0: - b2:19:21:22:42:79    5  +192 54M   ess  privacy   rsn "ESSID"
iwn0: - cc:40:d0:a8:98:6c    2  +191 54M   ess  privacy   rsn "ESSID"
iwn0: + f0:09:0d:b1:f1:aa    3  +210 54M   ess  privacy   rsn "ESSID"
iwn0: + f0:09:0d:b1:f1:ac  153  +201 54M   ess  privacy   rsn "ESSID"
iwn0: - f2:09:0d:71:f1:aa  153  +201 54M   ess  privacy   rsn "ESSID"
iwn0: sending delba to f0:09:0d:b1:f1:aa on channel 3 mode auto
iwn0: sending deauth to f0:09:0d:b1:f1:aa on channel 3 mode auto
iwn0: roaming from f0:09:0d:b1:f1:aa chan 3 to f0:09:0d:b1:f1:ac chan 153
iwn0: RUN -> AUTH
iwn0: sending auth to f0:09:0d:b1:f1:ac on channel 153 mode 11a
iwn0: authentication timed out for f0:09:0d:b1:f1:ac
iwn0: AUTH -> SCAN
iwn0: end active scan
iwn0: AP f0:09:0d:b1:f1:ac "MY_ESSID" score 56
iwn0: best AP f0:09:0d:b1:f1:aa "MY_ESSID" score 74
iwn0: switching to network "MY_ESSID"
**************
[Scanned list]
**************
iwn0: SCAN -> AUTH
iwn0: sending auth to f0:09:0d:b1:f1:aa on channel 3 mode 11g
iwn0: AUTH -> ASSOC
iwn0: sending assoc_req to f0:09:0d:b1:f1:aa on channel 3 mode 11g
iwn0: ASSOC -> RUN
iwn0: associated with f0:09:0d:b1:f1:aa ssid "MY_ESSID" channel 3 start MCS 0 long preamble short slot time HT enabled
iwn0: missed beacon threshold set to 30 beacons, beacon interval is 100 TU
iwn0: received msg 1/4 of the 4-way handshake from f0:09:0d:b1:f1:aa
iwn0: sending msg 2/4 of the 4-way handshake to f0:09:0d:b1:f1:aa
iwn0: received msg 3/4 of the 4-way handshake from f0:09:0d:b1:f1:aa
iwn0: sending msg 4/4 of the 4-way handshake to f0:09:0d:b1:f1:aa
iwn0: sending addba_req to f0:09:0d:b1:f1:aa on channel 3 mode 11n
iwn0: sending addba_resp to f0:09:0d:b1:f1:aa on channel 3 mode 11n
iwn0: sending addba_resp to f0:09:0d:b1:f1:aa on channel 3 mode 11n
iwn0: sending addba_resp to f0:09:0d:b1:f1:aa on channel 3 mode 11n
iwn0: RUN -> INIT
iwn0: begin active scan
iwn0: INIT -> SCAN
iwn0: SCAN -> INIT
iwn0: begin active scan
iwn0: INIT -> SCAN
iwn0: end active scan
**************
[Scanned list]
**************
iwn0: SCAN -> AUTH
iwn0: sending auth to f0:09:0d:b1:f1:aa on channel 3 mode 11g
iwn0: AUTH -> ASSOC
iwn0: sending assoc_req to f0:09:0d:b1:f1:aa on channel 3 mode 11g
iwn0: ASSOC -> RUN
iwn0: associated with f0:09:0d:b1:f1:aa ssid "MY_ESSID" channel 3 start MCS 0 long preamble short slot time HT enabled
iwn0: missed beacon threshold set to 30 beacons, beacon interval is 100 TU
iwn0: RUN -> AUTH
iwn0: sending auth to f0:09:0d:b1:f1:aa on channel 3 mode 11n
iwn0: AUTH -> ASSOC
iwn0: sending assoc_req to f0:09:0d:b1:f1:aa on channel 3 mode 11n
iwn0: ASSOC -> AUTH
iwn0: authentication timed out for f0:09:0d:b1:f1:aa
iwn0: AUTH -> SCAN
iwn0: end active scan
iwn0: best AP f0:09:0d:b1:f1:aa "MY_ESSID" score 53
iwn0: switching to network "MY_ESSID"
**************
[Scanned list]
**************
iwn0: SCAN -> SCAN
iwn0: end active scan
**************
[Scanned list]
**************
iwn0: SCAN -> SCAN
iwn0: end passive scan
**************
[Scanned list]
**************
iwn0: SCAN -> SCAN
iwn0: end passive scan
**************
[Scanned list]
**************
iwn0: SCAN -> AUTH
iwn0: sending auth to f0:09:0d:b1:f1:aa on channel 3 mode 11g
iwn0: AUTH -> ASSOC
iwn0: sending assoc_req to f0:09:0d:b1:f1:aa on channel 3 mode 11g
iwn0: ASSOC -> RUN
iwn0: associated with f0:09:0d:b1:f1:aa ssid "MY_ESSID" channel 3 start MCS 0 long preamble short slot time HT enabled
iwn0: missed beacon threshold set to 30 beacons, beacon interval is 100 TU
iwn0: received msg 1/4 of the 4-way handshake from f0:09:0d:b1:f1:aa
iwn0: sending msg 2/4 of the 4-way handshake to f0:09:0d:b1:f1:aa
iwn0: received msg 3/4 of the 4-way handshake from f0:09:0d:b1:f1:aa
iwn0: sending msg 4/4 of the 4-way handshake to f0:09:0d:b1:f1:aa
iwn0: sending addba_req to f0:09:0d:b1:f1:aa on channel 3 mode 11n
iwn0: sending addba_resp to f0:09:0d:b1:f1:aa on channel 3 mode 11n
iwn0: sending addba_resp to f0:09:0d:b1:f1:aa on channel 3 mode 11n
iwn0: sending addba_resp to f0:09:0d:b1:f1:aa on channel 3 mode 11n
---------------------------------------------------------------------