mt76: connac: fix sta_rec_wtbl tag len
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 19 Dec 2021 17:40:06 +0000 (18:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:27 +0000 (14:23 +0200)
[ Upstream commit 74c337ec0905d99111fc63a15f2e0784b9ed5503 ]

Similar to mt7915 driver, fix tag len error for sta_rec_wtbl, which
causes fw parsing error for the tags placed behind it.

Fixes: d0e274af2f2e4 ("mt76: mt76_connac: create mcu library")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c

index d25b50e769328f0446bd61ae7fc53ae9da0ee820..017bd59c4ea80f91aa1dfeafecb22bf5e9a1ec8d 100644 (file)
@@ -295,7 +295,7 @@ mt76_connac_mcu_alloc_wtbl_req(struct mt76_dev *dev, struct mt76_wcid *wcid,
        }
 
        if (sta_hdr)
-               sta_hdr->len = cpu_to_le16(sizeof(hdr));
+               le16_add_cpu(&sta_hdr->len, sizeof(hdr));
 
        return skb_put_data(nskb, &hdr, sizeof(hdr));
 }