Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3529608pxb; Mon, 1 Mar 2021 12:25:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxRrOFvbFYOwZKNIldwz8Fn1XAHknnoQyiI6YRrFNM10JZH4zaWiSSBNVISemGpS8j5xrW X-Received: by 2002:a50:ee16:: with SMTP id g22mr18856493eds.235.1614630334086; Mon, 01 Mar 2021 12:25:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614630334; cv=none; d=google.com; s=arc-20160816; b=IbdGNGA/eyPf42LtO5kcB2BY6p6TpoBPYJ4f0r67Q5ZV8JZUSmXYDHBLAra+Vplnug BlaC7MDH1YUqEOiH0fOuvs2PBF1WhYtLem/L1vIuGZ0f6XZcafdi+A0nEIawqKjzQKCJ /8ZhesBYkj7KkbnsDwc6rOH32ejslyiWs2l4l5BM1h5o67iNrj9XsxhN0P4OPPG2YFjb ctDGrTqM64tOH1JdAw59kqeNQRwW70WEw5r/ptjiode3QslTDD9YJN7dmpMwBK+ChTtQ 18w1ACsxfc0ZgZd+hBK3d++moi+aijEciAr7hBVeVPQSkR2NPzEfH9GNcyCuz8Joynjd +8vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=x3cy5lTWqH3cywwgyXMeyr3FpPQms/VXuYAjXVYYqAE=; b=CKCd4x3IYOT0Vd1S8zArbBcRrKfYHjCBJBBCp1lh5GDGBMs8mavmhK+uimKv+eqk7M 5rGeFGOtuM7Ua0q5ARETxlCpplSO04LSAkuaNKEqHFz/G+sVrEAukv9lXPyautLeshYe sS/DmpF5xIYCkT/qls3jxx+i8nj/vgqMVUgUasHRbEE4MsjYU1scZGjUoObmrh84E2ZW 3qGqgfREkHusVySzFlqaPRUzj5FBY5GdWCyQlyOFvcsvIelmayvZFWn0zsG4TobPJBLR H7X1+05Dn6HAN9YlDxrqE3iRQOt5eDoJC+U8mcub2MqFgjH5b7RzgDu0UeipTfbX9G/4 KE5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Lf0lq09y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk18si4187620edb.178.2021.03.01.12.25.10; Mon, 01 Mar 2021 12:25:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Lf0lq09y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243148AbhCAUXO (ORCPT + 99 others); Mon, 1 Mar 2021 15:23:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:36350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236436AbhCARFH (ORCPT ); Mon, 1 Mar 2021 12:05:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0CF6E64FF9; Mon, 1 Mar 2021 16:39:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616784; bh=aARMoHxYwJ4WVlFoBOQjCxPpwycliUudrIUIeuxn4vQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lf0lq09yK80FVtEvTHrjJU6oGA02qQPuwhzN/vyGKPOOQAy4pyBvv9ztjnb2DnoRA 7j8vqCkdmVHrSSo1G7ob2Jcx8yhyX/Zj8+29vpsHLGiEFPC6V8FYJAoflIe19GllFs ktC21d0vJW2tGQEJfaOm8myTotKcHTZwM8soL3l8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Larry Finger , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 065/247] b43: N-PHY: Fix the update of coef for the PHY revision >= 3case Date: Mon, 1 Mar 2021 17:11:25 +0100 Message-Id: <20210301161034.854049446@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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: Colin Ian King [ Upstream commit 4773acf3d4b50768bf08e9e97a204819e9ea0895 ] The documentation for the PHY update [1] states: Loop 4 times with index i If PHY Revision >= 3 Copy table[i] to coef[i] Otherwise Set coef[i] to 0 the copy of the table to coef is currently implemented the wrong way around, table is being updated from uninitialized values in coeff. Fix this by swapping the assignment around. [1] https://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreCal/ Fixes: 2f258b74d13c ("b43: N-PHY: implement restoring general configuration") Addresses-Coverity: ("Uninitialized scalar variable") Signed-off-by: Colin Ian King Acked-by: Larry Finger Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/wireless/broadcom/b43/phy_n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c index 44ab080d65182..88446258e7751 100644 --- a/drivers/net/wireless/broadcom/b43/phy_n.c +++ b/drivers/net/wireless/broadcom/b43/phy_n.c @@ -5320,7 +5320,7 @@ static void b43_nphy_restore_cal(struct b43_wldev *dev) for (i = 0; i < 4; i++) { if (dev->phy.rev >= 3) - table[i] = coef[i]; + coef[i] = table[i]; else coef[i] = 0; } -- 2.27.0