Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Dec 2019 18:35:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        wireless@FreeBSD.org
Subject:   [Bug 242337] iwm - rate 0 causes iwm panic (and work around)
Message-ID:  <bug-242337-21060-wnFpqOXJi6@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-242337-21060@https.bugs.freebsd.org/bugzilla/>
References:  <bug-242337-21060@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242337

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj@FreeBSD.org

--- Comment #4 from Mark Johnston <markj@FreeBSD.org> ---
Hmm, note that one of the callers of iwm_rate2idx() already contains this l=
ogic
(i.e., maps an unknown rate to the lowest one).

I guess the problem is with the code which programs the fw rate table.=20
iwm_setrates() already skips over invalid rates... but the code which fills=
 in
the rest of the table is wrong.

Can you try this hack instead?  I did not test it.

There is a larger issue here in that we are ending up with a rate of 0, but=
 we
can at least avoid panicking.

diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index 06bd66cc3ef6..4bd6547cc57f 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -4385,8 +4385,10 @@ iwm_setrates(struct iwm_softc *sc, struct iwm_node *=
in,
int rix)

                /* Map 802.11 rate to HW rate index. */
                ridx =3D iwm_rate2ridx(sc, rate);
-               if (ridx =3D=3D -1)
+               if (ridx =3D=3D -1) {
+                       nrates--;
                        continue;
+               }

 #if 0
                if (txant =3D=3D 0)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-242337-21060-wnFpqOXJi6>