Message ID | 20220826182329.18155-1-nbd@nbd.name |
---|---|
State | New |
Headers | show |
Series | [6.0] wifi: mt76: fix reading current per-tid starting sequence number for aggregation | expand |
Felix Fietkau <nbd@nbd.name> writes: > The code was accidentally shifting register values down by tid % 32 instead of > (tid * field_size) % 32. > > Cc: stable@vger.kernel.org > Fixes: a28bef561a5c ("mt76: mt7615: re-enable offloading of sequence number assignment") > Signed-off-by: Felix Fietkau <nbd@nbd.name> I assigned this to myself on patchwork and I'll queue this for v6.0.
Felix Fietkau <nbd@nbd.name> wrote: > The code was accidentally shifting register values down by tid % 32 instead of > (tid * field_size) % 32. > > Cc: stable@vger.kernel.org > Fixes: a28bef561a5c ("mt76: mt7615: re-enable offloading of sequence number assignment") > Signed-off-by: Felix Fietkau <nbd@nbd.name> Patch applied to wireless.git, thanks. c3a510e2b537 wifi: mt76: fix reading current per-tid starting sequence number for aggregation
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index ad6c7d632eed..d6aae60c440d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -1088,7 +1088,7 @@ u32 mt7615_mac_get_sta_tid_sn(struct mt7615_dev *dev, int wcid, u8 tid) offset %= 32; val = mt76_rr(dev, addr); - val >>= (tid % 32); + val >>= offset; if (offset > 20) { addr += 4;
The code was accidentally shifting register values down by tid % 32 instead of (tid * field_size) % 32. Cc: stable@vger.kernel.org Fixes: a28bef561a5c ("mt76: mt7615: re-enable offloading of sequence number assignment") Signed-off-by: Felix Fietkau <nbd@nbd.name> --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)