Toke Høiland-Jørgensen <toke@xxxxxxxxxx> writes: > Dan Carpenter <dan.carpenter@xxxxxxxxxx> writes: > >> On Tue, Nov 26, 2019 at 09:04:15AM +0100, Toke Høiland-Jørgensen wrote: >>> Dan Carpenter <dan.carpenter@xxxxxxxxxx> writes: >>> >>> > @@ -242,7 +242,7 @@ u32 mt76_calc_rx_airtime(struct mt76_dev *dev, struct mt76_rx_status *status, >>> > return 0; >>> > >>> > sband = dev->hw->wiphy->bands[status->band]; >>> > - if (!sband || status->rate_idx > sband->n_bitrates) >>> > + if (!sband || status->rate_idx >= sband->n_bitrates) >>> > return 0; >>> > >>> > rate = &sband->bitrates[status->rate_idx]; >>> >>> This code has recently been ported to mac80211 (net/mac80211/airtime.c). >>> It seems that the bug is also present there; care to send a patch for >>> that as well? :) >> >> Oh. Thanks for pointing that out. I actually saw the static checker >> warning for that and ignored it thinking that it was the same code. >> :P > > Well, it's copy-pasted from the same code ;) > > The plan is to get rid of the version inside mt76; was waiting for the > trees to converge, though, so I guess after the merge window? Yup, as I'm not taking anything to w-d-next until -rc1 is released. -- Kalle Valo