Date: Sun, 1 Dec 2019 10:03:07 -0800 From: Adrian Chadd <adrian.chadd@gmail.com> To: bugzilla-noreply@freebsd.org Cc: "freebsd-wireless@freebsd.org" <wireless@freebsd.org> Subject: Re: [Bug 242337] iwm - rate 0 causes iwm panic (and work around) Message-ID: <CAJ-Vmomvvkd-u6aUg9KxjM0qLHcFddk-vPxkyzY5uxSE1YKNnQ@mail.gmail.com> In-Reply-To: <bug-242337-21060-isSHShaaFq@https.bugs.freebsd.org/bugzilla/> References: <bug-242337-21060@https.bugs.freebsd.org/bugzilla/> <bug-242337-21060-isSHShaaFq@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi! Wait, someone's calling iwn_rate2ridx() with rate=0 ? That's highly bogus and yes will lead to a firmware panic. what's the caller? How's it being called with rate=0 ? It sounds like something in the rate negotiation is failing... -adrian On Sun, 1 Dec 2019 at 05:24, <bugzilla-noreply@freebsd.org> wrote: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242337 > > --- Comment #2 from dirkx@webweaving.org --- > As a workaround - in if_iwm.c -- simply picking the first rate from the table > (the slowest) makes things work again although it emits below error: > > > iwm0: frame 0/230 b800002c UNHANDLED (this should not happen) > tun0: link state changed to UP > > Function changed below. > > static int > iwm_rate2ridx(struct iwm_softc *sc, uint8_t rate) > { > int i; > > for (i = 0; i <= IWM_RIDX_MAX; i++) { > if (iwm_rates[i].rate == rate) > return i; > } > > device_printf(sc->sc_dev, > "%s: WARNING: device rate for %u not found!!\n", > __func__, rate); > > // On KPN Experia ADSL modems - one somehow gets a rate==0; > // just picking the first value from the table works. > if (rate == 0) { > device_printf(sc->sc_dev, > "%s: WARNING: using first rate fom the table.\n", > __func__); > return 0; > }; > return -1; > } > > -- > You are receiving this mail because: > You are the assignee for the bug. > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmomvvkd-u6aUg9KxjM0qLHcFddk-vPxkyzY5uxSE1YKNnQ>