On Sun, Jul 04, 2021 at 07:58:47PM -0700, Greg Steuck wrote:
> I stumbled upon a weird hotel WiFi which never gets to a fully running
> link with iwx0. I see ifconfig is stuck with:
> 
> iwx0: flags=808847<UP,BROADCAST,DEBUG,RUNNING,SIMPLEX,MULTICAST,AUTOCONF4> 
> mtu 1500
>         lladdr xx
>         index 1 priority 4 llprio 3
>         groups: wlan egress
>         media: IEEE802.11 autoselect (HT-MCS11 mode 11n)
>         status: no network
>         ieee80211: nwid MarlinGuest chan 4 bssid 38:ff:36:23:09:a8 68% wpakey 
> wpaprotos wpa2 wpaakms psk wpaciphers ccmp wpagroupcipher tkip
> 
> The network is functional as evidenced by the assorted android and
> chromeos devices connecting to it.
> 
> I start with
> $ doas ifconfig iwx0 inet nwid MarlinGuest wpakey <...> debug autoconf
> 
> The following gets dumped into dmesg:
> 
> iwx0 at pci0 dev 20 function 3 "Intel Wi-Fi 6 AX201" rev 0x00, msix
> iwx0: hw rev 0x350, fw ver 48.1335886879.0, address xx
> ...
> iwx0: firmware has detected regulatory domain 'US' (0x5553)
> iwx0: SCAN -> AUTH
> iwx0: sending auth to 38:ff:36:23:09:a8 on channel 4 mode 11g
> iwx0: authentication timed out for 38:ff:36:23:09:a8
> iwx0: AUTH -> SCAN
> iwx0: end active scan
> ...
> iwx0: + 38:ff:36:22:ce:b8    1   +19 54M   ess  privacy   rsn  "MarlinGuest"
> iwx0: + 38:ff:36:23:09:ac   52   +39 54M   ess  privacy   rsn  "MarlinGuest"
> ...
> iwx0: + f8:e7:1e:1b:85:f8    4   +22 54M   ess  privacy   rsn  "MarlinGuest"
> ...
> iwx0: firmware has detected regulatory domain 'US' (0x5553)
> iwx0: SCAN -> AUTH
> iwx0: sending auth to 38:ff:36:23:09:ac on channel 52 mode 11a
> iwx0: AUTH -> ASSOC
> iwx0: sending assoc_req to 38:ff:36:23:09:ac on channel 52 mode 11a
> iwx0: ASSOC -> RUN
> iwx0: associated with 38:ff:36:23:09:ac ssid "MarlinGuest" channel 52 start 
> MCS 0 long preamble long slot time HT enabled
> iwx0: missed beacon threshold set to 30 beacons, beacon interval is 100 TU
> iwx0: received msg 1/4 of the 4-way handshake from 38:ff:36:23:09:ac
> iwx0: sending msg 2/4 of the 4-way handshake to 38:ff:36:23:09:ac
> iwx0: received msg 3/4 of the 4-way handshake from 38:ff:36:23:09:ac
> iwx0: sending msg 4/4 of the 4-way handshake to 38:ff:36:23:09:ac
> 
> I never see "iwx0: sending action to" after this.

And you still see status: "no network" in ifconfig at this point?
This could mean we're failing to set the link UP after the WPA handshake
has completed. But I cannot explain why.

> Now, to send this email I tether to my cell phone which works much better:
> 
> ...
> iwx0: + 0a:ab:60:xx:xx:xx    9   +42 54M   ess  privacy   rsn  "gnezdo"
> ...
> iwx0: - 38:ff:36:22:04:b8    9   +16 54M   ess  privacy   rsn  "MarlinGuest"!
> iwx0: - 38:ff:36:22:ce:b8    1   +17 54M   ess  privacy   rsn  "MarlinGuest"!
> iwx0: - 38:ff:36:23:09:a8    4   +20 54M   ess  privacy   rsn  "MarlinGuest"!
> iwx0: - 38:ff:36:23:09:ac   52   +40 54M   ess  privacy   rsn  "MarlinGuest"!
> ...
> iwx0: - f8:e7:1e:1b:85:f8    4   +23 54M   ess  privacy   rsn  "MarlinGuest"!
> ...
> iwx0: firmware has detected regulatory domain 'US' (0x5553)
> iwx0: SCAN -> AUTH
> iwx0: sending auth to 0a:ab:60:xx:xx:xx on channel 9 mode 11g
> iwx0: AUTH -> ASSOC
> iwx0: sending assoc_req to 0a:ab:60:xx:xx:xx on channel 9 mode 11g
> iwx0: ASSOC -> RUN
> iwx0: associated with 0a:ab:60:xx:xx:xx ssid "gnezdo" channel 9 start MCS 0 
> short preamble short slot time HT enabled
> iwx0: missed beacon threshold set to 30 beacons, beacon interval is 100 TU
> iwx0: received msg 1/4 of the 4-way handshake from 0a:ab:60:xx:xx:xx
> iwx0: sending msg 2/4 of the 4-way handshake to 0a:ab:60:xx:xx:xx
> iwx0: received msg 3/4 of the 4-way handshake from 0a:ab:60:xx:xx:xx
> iwx0: sending msg 4/4 of the 4-way handshake to 0a:ab:60:xx:xx:xx
> iwx0: sending action to 0a:ab:60:xx:xx:xx on channel 9 mode 11n
> iwx0: sending action to 0a:ab:60:xx:xx:xx on channel 9 mode 11n
> iwx0: sending action to 0a:ab:60:xx:xx:xx on channel 9 mode 11n
> 
> Any debugging clues?

netstat -nI iwx0
netstat -W iwx0

Do any of the counters keep changing? Which ones?

Failing that, we will need to see packet captures from another machine
which has e.g. an iwm interface:

  # enable monitor mode and write packets to a pcap file:
  ifconfig iwm0 down
  ifconfig iwm0 mediaopt monitor chan 52
  ifconfig iwm0 up
  tcpdump -n -y IEEE802_11_RADIO -s 4096 -w /tmp/iwm.pcap -i iwm0
  # now reproduce the issue and share the resulting pcap file

  # go back to regular operation on iwm0:
  ifconfig iwm0 down
  ifconfig iwm0 -mediaopt monitor -chan

Cheers,
Stefan

Reply via email to