[Bug 242337] iwm - rate 0 causes iwm panic (and work around)
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Dec 2 18:35:09 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242337
Mark Johnston <markj at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markj at FreeBSD.org
--- Comment #4 from Mark Johnston <markj at FreeBSD.org> ---
Hmm, note that one of the callers of iwm_rate2idx() already contains this logic
(i.e., maps an unknown rate to the lowest one).
I guess the problem is with the code which programs the fw rate table.
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 = iwm_rate2ridx(sc, rate);
- if (ridx == -1)
+ if (ridx == -1) {
+ nrates--;
continue;
+ }
#if 0
if (txant == 0)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-wireless
mailing list