On Sun, Sep 08, 2019 at 09:31:55PM BST, Bryan Stenson wrote:
> Hi all -
> 
> I'm writing to "misc" rather than "bugs" as I'm not yet sure this is a
> bug.  I'm hoping to help triage this with assistance from this list.
> 
> I'm running -CURRENT and the iwn(4) driver for my wireless card.  Over
> the past year, this has been working great, but recently (within the
> last month or so), I've had issues where the NIC just stops working
> after a few hours of usage.  I don't have a solid steps for
> reproduction.
> 
> I realize "stops working" is not a very accurate account here...but
> I'm confused on how to get more descriptive information of the
> problem.  When it stops, "ifconfig" shows iwn0 with an IP address, but
> I'm unable to ping.  Additionally, I'm not seeing any
> warnings/messages in "dmesg" about the device...so I'm confused.
> 
> A simple "ifconfig iwn0 down; sh /etc/netstart iwn0" seems to fix the
> problem, but I haven't had to do that in the past...it just feels like
> a recent change (iwn(4) work?) has put me in this state.
> 

Hi Bryan,

I've noticed exactly the same(?) behaviour since about July but
hadn't used the machine enough and, despite some changes to the
iwn(4) and/or ieee80211, I thought it might have had something to
do with the new AP I got.

Your email prompted me today to have a look at what is happening
while the laptop loses connectivity - it's been disconnected for 3
days after about 30 minutes of being connected (enough time to run
'pkg_add -u'). After putting the interface into debug modes:

        # ifconfig iwn0 debug

/var/log/messages shows:

        iwn0: AUTH -> SCAN
        iwn0: end active scan
        iwn0: - [...]
        iwn0: - 12:34:56:12:34:56   11  +212 54M ess  privacy   rsn  "MYNWID2"!
        iwn0: + 12:34:56:12:34:57   44  +203 54M ess  privacy   rsn  "MYNWID5"
        iwn0: - [...]
        iwn0: SCAN -> AUTH
        iwn0: sending auth to 12:34:56:12:34:57 on channel 44 mode 11a

What seems strange there is the mode - after a very brief look, it
seems like the laptop is "stuck" trying to use 11a mode.

After forcing the 11n mode:

        # ifconfig iwn0 mode 11n

it connects instantaneously:

        iwn0: SCAN -> INIT
        iwn0: begin active scan
        iwn0: INIT -> SCAN
        iwn0: end active scan
        iwn0: AP 12:34:56:12:34:56 "MYNWID5" score 52
        iwn0: best AP 12:34:56:12:34:57 "MYNWID2" score 52
        iwn0: switching to network "MYNWID2"
        iwn0: [...]
        iwn0: + 12:34:56:12:34:56   11  +216 54M   ess  privacy   rsn "MYNWID2"
        iwn0: - 12:34:56:12:34:57   44    +0 54M   ess  privacy   rsn "MYNWID5"!
        iwn0: [...]
        iwn0: SCAN -> AUTH
        iwn0: sending auth to 12:34:56:12:34:56 on channel 11 mode 11g
        iwn0: AUTH -> ASSOC
        iwn0: sending assoc_req to 12:34:56:12:34:56 on channel 11 mode 11g
        iwn0: ASSOC -> RUN
        iwn0: associated with 12:34:56:12:34:56 ssid "MYNWID2" channel 11
        start MCS 0 short preamble long slot time HT enabled
        iwn0: missed beacon threshold set to 7 beacons, beacon interval is 100 
TU
        iwn0: received msg 1/4 of the 4-way handshake from 12:34:56:12:34:56
        iwn0: sending msg 2/4 of the 4-way handshake to 12:34:56:12:34:56
        iwn0: received msg 3/4 of the 4-way handshake from 12:34:56:12:34:56
        iwn0: sending msg 4/4 of the 4-way handshake to 12:34:56:12:34:56
        iwn0: sending action to 12:34:56:12:34:56 on channel 11 mode 11n

MYNWID2 and MYNWID5 are the two NWIDs I use - 2.4 and 5GHz respectively.

I use the same hostname.if on all of my laptops:

        join MYNWID5 wpakey ...
        join MYNWID2 wpakey ...
        [...]
        dhcp

BTW, after reboot (upgrade to a new snapshot) and ~1h run, it
disconnected again.

Any thoughts, Stefan?

Regards,

Raf

Reply via email to