On Fri, May 29, 2020 at 09:46:09AM +0200, Stefan Sperling wrote:
> > As I cannot repro the panic, I guess for now I don't have anything more
> > to add to this thread, except that your diff works, Stefan.
>  
> Thank you, Mikolaj. I have committed the fix.
> 
> > I can trigger athn device timeouts, but this looks like a different
> > issue, so I may start new thread about it, but for now I need to think
> > how to collect anything useful for this problem, because except dmesg
> > messages I don't have anything else about the problem.
> 
> Yeah, I occasionally see those, too.
> 
> "device timout" happens when hardware does not report Tx success/failure
> back to the driver after some time has passed. The hardware device is
> supposed to assert an interrupt whenver a frame on its queue has been
> transmitted successfully, or if transmission has failed, so that the
> driver can clean up resources the OS has allocated to that particular frame.
> 
> When "device timeout" is logged, such an interrupt did not occur within a
> couple of seconds, and the driver will simply free all queued frames,
> reset the device, and start over. It's unclear why the problem happens.
> There could be many reasons. In any case, the driver can recover from such
> errors and they usually only affect one or a couple of frames.

I see. While I was looking around I found that in function
ieee80211_node_leave_rsn() there seems to be dead code
assignment of ni->ni_rsn_state. With below change kernel
compiles and I'm running it on athn access point and athn
client, without any issues so far. When checking objdump -d
on ieee80211_node.o there seems to be one small chagne,
with below diff.

Index: sys/net80211/ieee80211_node.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_node.c,v
retrieving revision 1.181
diff -u -p -u -r1.181 ieee80211_node.c
--- sys/net80211/ieee80211_node.c       5 May 2020 18:14:42 -0000       1.181
+++ sys/net80211/ieee80211_node.c       30 May 2020 15:41:58 -0000
@@ -2705,8 +2705,6 @@ ieee80211_node_leave_rsn(struct ieee8021
 {
        int rekeysta = 0;
 
-       ni->ni_rsn_state = RSNA_DISCONNECTED;
-
        ni->ni_rsn_state = RSNA_INITIALIZE;
        if (ni->ni_flags & IEEE80211_NODE_REKEY) {
                ni->ni_flags &= ~IEEE80211_NODE_REKEY;

-- 
Regards,
 Mikolaj

Reply via email to