Skip to contentSkip to conversation

wifi: mt76: fix reading current per-tid starting sequence number for aggregation

PATCH In review Felix Fietkau 2 participants 3 messages Aug 26, 2022 – Sep 12, 2022

Subsystems (2)
lore
Share & tools
lore

Felix Fietkau

author maintainer
#0 lore raw

PATCH 1/1 wifi: mt76: fix reading current per-tid starting sequence number for aggregation

The code was accidentally shifting register values down by tid % 32 instead of (tid * field_size) % 32.

Fixes a28bef561a5c ("mt76: mt7615: re-enable offloading of sequence number assignment")
---
 drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7615/mac.c +1 -1
index ad6c7d632eed..d6aae60c440d 100644
@@ -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;
Signature · 1 line
2.36.1
#1 lore raw
Quoted 6 lines · Felix Fietkau

The code was accidentally shifting register values down by tid % 32 instead of (tid * field_size) % 32.

Fixes a28bef561a5c ("mt76: mt7615: re-enable offloading of sequence number assignment")

I assigned this to myself on patchwork and I'll queue this for v6.0.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw
In reply to Felix Fietkau
Quoted 6 lines · Felix Fietkau

The code was accidentally shifting register values down by tid % 32 instead of (tid * field_size) % 32.

Fixes a28bef561a5c ("mt76: mt7615: re-enable offloading of sequence number assignment")

Patch applied to wireless.git, thanks.

c3a510e2b537 wifi: mt76: fix reading current per-tid starting sequence number for aggregation

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches