Message ID | 520C9FE5.6000203@broadcom.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Arend van Spriel <arend@...> writes: > > On 08/15/2013 03:28 AM, Pedram Navid wrote: > > With the latest 3.10-6 kernel I am receiving frequent and consistent > > kernel panics. Downgrading to 3.9.5 resolves the issue. > > Thanks, Pedram > > I have had a couple of other report about this particular panic and did > some investigation. It is a divide-by-zero causing the panic. I do have > a patch to avoid that, but the root cause is something else. Is 3.10.6 > you see this on the unmodified stable release? > > The attached patch avoids the panic, but you will probably have crappy > connectivity. > > Regards, > Arend > I've temporarily solved the problem by reverting patch "mac80211/minstrel_ht: fix cck rate sampling" [1]. After that - no error messages, no panic, connection works at normal speed. [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux- stable.git/commit/?id=ef47a5e4f1aaf1d0e2e6875e34b2c9595897bef6 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 9fd6f2f..ea92ea2 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c @@ -630,10 +630,21 @@ static uint brcms_c_calc_frame_time(struct brcms_c_info *wlc, u32 ratespec, dur = PREN_PREAMBLE + (tot_streams * PREN_PREAMBLE_EXT); if (preamble_type == BRCMS_MM_PREAMBLE) dur += PREN_MM_EXT; + + if (mcs > BRCMS_MAXMCS) { + brcms_err(wlc->hw->d11core, "wl%d: invalid mcs: %u\n", + wlc->pub->unit, mcs); + mcs = 0; + } /* 1000Ndbps = kbps * 4 */ kNdps = mcs_2_rate(mcs, rspec_is40mhz(ratespec), rspec_issgi(ratespec)) * 4; + if (kNdps == 0) { + brcms_err(wlc->hw->d11core, "wl%d: invalid zero rate: rspec=0x%x\n", + wlc->pub->unit, ratespec); + kNdps = 6500 * 4; + } if (rspec_stc(ratespec) == 0) nsyms = CEIL((APHY_SERVICE_NBITS + 8 * mac_len +