Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1423066rdb; Sat, 3 Feb 2024 05:55:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGFiUSLCbru16o3mAcDQv7FNzFnuumAhJlNgxeIKcm6Izy62/xfkL36Ewl0ItYihXScOVcD X-Received: by 2002:a17:906:3299:b0:a36:9f72:2460 with SMTP id 25-20020a170906329900b00a369f722460mr3260194ejw.0.1706968501535; Sat, 03 Feb 2024 05:55:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706968501; cv=pass; d=google.com; s=arc-20160816; b=loSeukSGBPo5EKDuEgFFfPltIv9W90SpdbOUuI8FC/Gk9GJkIAdJqn5YWhaB+PBSJz kKqmzBc9JygmPp3UZkxFtUu48+lRRGgO4FnyCUFsIVhxdqW/Y2H+Q2bCw4W5g2YKLHVU C5wSue02hZaVpFMowNLHHabHpla7M3No7eZkgPPwfuqgZyzXNH8EdVTuRWb2tDU7Ss7O OZOj4LqkSB06VaMgNItkdpN0uQbjr+K//sQOC2In7Oz2R3tj070notFZbCxjROZ+di9+ AIbSNddSqh5R1JSuYP3Rol4NIzxs5eYQSHnMq2pXtOFncaI35v3aJJDt0G8hFWsEBZqR Hilw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=aEPwejJF8n9dT0rNMNmVEFMU356gZk6jqJKgL18WPW4=; fh=BAnL5g65o4SYW2hRP0t5fyU+fJ9RiI8SFFncSF55RpE=; b=qDinQIpkSPTSPqjraKjpGyb1tCAw1Acdr1Qwp0l8JEOvx9EBaQvmNniJcBtDXWQy9O Xi65ug6G+GYNPLFy8Px4WmkYbuk3qOwvgY7XBLoAr5GWyi93hn26fN4YbNGamxoSQIgy 2frd4B7Oty1EL6n3OyB3Rl3ldVkt6ySVufDDYcIwD234kY4LA7OMmBR999vdcr+h64up +XAWvMRZcITgPQqHht5S5FWQ9l0EHjGgtera5idZuU2dwiqNK+BHsSoBTfhF86enoTcO aj8lrFpwIFBUr728H7B7aT+lEYP/b2NdEFNBpCMv+JYDZFfF6qLF02dV/0QnLdnAb6cB 0ELQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=fKchBD6E; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-3080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name X-Forwarded-Encrypted: i=1; AJvYcCVLLzDO4llbfNP7syLnBkspGkjwoKh18aU65LDUTkbt7F8YvFtL9Tmu8omE5An6plnlsPbeo/TbAkHY3QxrUDB/Ey/ZtbzcxwWXU7aMKg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id af2-20020a170906998200b00a364880b07esi1825965ejc.158.2024.02.03.05.55.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 05:55:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=fKchBD6E; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-3080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3EED31F2314C for ; Sat, 3 Feb 2024 13:55:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D24351AAD7; Sat, 3 Feb 2024 13:54:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="fKchBD6E" X-Original-To: linux-wireless@vger.kernel.org Received: from nbd.name (nbd.name [46.4.11.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A68AF5D72F for ; Sat, 3 Feb 2024 13:54:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.4.11.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706968496; cv=none; b=jspGQSHDRp/bvXcRWwRqMpc2L5NRygmuNvkLyiDfJO4tVgUAtAvUzd1ao2Zqh93CPYdWIBWra0HYmDVnRLjD42zE9SOi72sfx1rA6M3/Pyduc2v8iBcNT867LHnfV1+mh1bwFwslZ5llZVflYxw4e/J2NRF6W4akJA9z8jLWV34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706968496; c=relaxed/simple; bh=GT2GmlXPYN+2WDYv0iRc7uBL7iWlgUjLwnYle/xpkC4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nG+NF4In+lVowqVyytt37yZlnr+80SBQEXoA6SDyLvkSahwzVb7Nv/lNVg50bfVUzrXOY3GdrJNVgUhrAkNTszpY2pNmxwQGlt8WaE05TfVthuzrKEws9CE7yvS8VrzjYIiQGFEFSjjsaxZ4xZSlKj5tekhTRYyITo8ztsn/5ZM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name; spf=none smtp.mailfrom=nbd.name; dkim=pass (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b=fKchBD6E; arc=none smtp.client-ip=46.4.11.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=nbd.name DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=aEPwejJF8n9dT0rNMNmVEFMU356gZk6jqJKgL18WPW4=; b=fKchBD6EmAVZ+En6Lh+y2D4Y4+ rjb8VOAcbCqxYUa4MsiZjQRv3ebvK6eAyDvT/6KMow9SXXuaXJlbmr8RdPqMvBBPHqI3KPhzygSn4 kl1c0w9gFNlczWEDx1LOAGCmFPmu0qMYQR7sT4iEw+nFUkHMozEOLmJOEDE/LSg9Fjzo=; Received: from p54ae9e7b.dip0.t-ipconnect.de ([84.174.158.123] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1rWG0m-00AXsM-Ja; Sat, 03 Feb 2024 14:24:48 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: kvalo@kernel.org Subject: [PATCH wireless] wifi: mt76: mt7996: fix fortify warning Date: Sat, 3 Feb 2024 14:24:46 +0100 Message-ID: <20240203132446.54790-1-nbd@nbd.name> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Copy cck and ofdm separately in order to avoid __read_overflow2_field warning. Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support") Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c index 3c729b563edc..699be57309c2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c @@ -4477,7 +4477,8 @@ int mt7996_mcu_set_txpower_sku(struct mt7996_phy *phy) skb_put_data(skb, &req, sizeof(req)); /* cck and ofdm */ - skb_put_data(skb, &la.cck, sizeof(la.cck) + sizeof(la.ofdm)); + skb_put_data(skb, &la.cck, sizeof(la.cck)); + skb_put_data(skb, &la.ofdm, sizeof(la.ofdm)); /* ht20 */ skb_put_data(skb, &la.mcs[0], 8); /* ht40 */ -- 2.43.0