mt76: connac: fix sta_rec_wtbl tag len
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 19 Dec 2021 17:40:06 +0000 (18:40 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 3 Feb 2022 12:57:56 +0000 (13:57 +0100)
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>
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c

index f79e3d5084f3976211238586d8d9fcc6b0085269..5664f119447bc4958668d98028a98002d29d88e0 100644 (file)
@@ -310,7 +310,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));
 }