Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA698C433F5 for ; Tue, 16 Nov 2021 02:05:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 932B8611ED for ; Tue, 16 Nov 2021 02:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346347AbhKPCH6 (ORCPT ); Mon, 15 Nov 2021 21:07:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:48394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239807AbhKOSEt (ORCPT ); Mon, 15 Nov 2021 13:04:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 24A20632E3; Mon, 15 Nov 2021 17:39:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1636997952; bh=jNLXIb4crFOxAp4RWHpop1FGf8zBYcrRSTu86TwlMoc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hvjXNMa6Yax4JqL0ycYAES7LIfkYAfVKjvE8O42ZBB/MnHYxDzCwx3fQlGYO+crwK 0nT/8zkG1QiMG0soe40lALYlEY2NsgN3VGTokdEK48jihND1nNnMHaZ3VmUPt/PY2A aC8e+EAPvTTDjQh8npICg5lV8XmgZuwfDur2AiGo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shayne Chen , Felix Fietkau , Sasha Levin Subject: [PATCH 5.10 335/575] mt76: mt7915: fix sta_rec_wtbl tag len Date: Mon, 15 Nov 2021 18:01:00 +0100 Message-Id: <20211115165355.373373274@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211115165343.579890274@linuxfoundation.org> References: <20211115165343.579890274@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shayne Chen [ Upstream commit afa0370f3a3a64af6d368da0bedd72ab2a026cd0 ] Fix tag len error for sta_rec_wtbl, which causes fw parsing error for the tags placed behind it. Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index c36c7b0e918a4..63bc4577c5c57 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -667,7 +667,7 @@ mt7915_mcu_alloc_wtbl_req(struct mt7915_dev *dev, struct mt7915_sta *msta, } 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)); } -- 2.33.0