From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9B407191F82; Tue, 10 Sep 2024 09:45:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725961514; cv=none; b=Mr1bSr4Dv6CO8Zjuw2Smx7v6Q00u5liY4rroTvWO+mHgWYXNOrMfEFfsbN8/uunJ4wK6GjKIz+miapmt/dbrw9ktx3S9kbAfEOLxkmCaK2gClY/LR9IJckPfDpUirpiqaHuoVT2wpwOkY0FNqZxbfAOoX2uRAWRp0rFc9WRFVpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725961514; c=relaxed/simple; bh=4CICg0sb5wEiRSYRBZNtrqYEPv/sBHR1xzCdDKIo3YY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MSUNEKXYgojQ5X0jSMlyPcok2cYRcQwrOK3+geK2sB5a9T3+0rheDqd0jfJSm/+HRYzl4ifAygdPBOxbjsgTiUgFenfCvFtn4TbX+WYjipjBBlavRIqZhBz3WXD63u8KY4bB5qDt4FGmG9NOLYwaJSgU2r8+jK7AoZTc/5PHoHU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X4lP6UYp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="X4lP6UYp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF22CC4CEC3; Tue, 10 Sep 2024 09:45:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725961514; bh=4CICg0sb5wEiRSYRBZNtrqYEPv/sBHR1xzCdDKIo3YY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X4lP6UYpKBBW4Dcx13uKoCO9ZMTUz/INkt2fq11Uyu6QVeOYW7vQ55T7+cGgYLbWo aAcvalw9frPActggD5ldGqtC3iorCAevIKebT0A02YwoUh37Io+dseMvyoLaEpjZMY Dcxf5HmHyP8jBZ/IZ9jM2bjvI0+NQ+UpI83W8hdA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aaradhana Sahu , Jeff Johnson , Kalle Valo , Sasha Levin Subject: [PATCH 6.10 095/375] wifi: ath12k: fix uninitialize symbol error on ath12k_peer_assoc_h_he() Date: Tue, 10 Sep 2024 11:28:12 +0200 Message-ID: <20240910092625.436894406@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240910092622.245959861@linuxfoundation.org> References: <20240910092622.245959861@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aaradhana Sahu [ Upstream commit 19b77e7c656a3e125319cc3ef347b397cf042bf6 ] Smatch throws following errors drivers/net/wireless/ath/ath12k/mac.c:1922 ath12k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'. drivers/net/wireless/ath/ath12k/mac.c:1922 ath12k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_160'. drivers/net/wireless/ath/ath12k/mac.c:1924 ath12k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'. In ath12k_peer_assoc_h_he() rx_mcs_80 and rx_mcs_160 variables remain uninitialized in the following conditions: 1. Whenever the value of mcs_80 become equal to IEEE80211_HE_MCS_NOT_SUPPORTED then rx_mcs_80 remains uninitialized. 2. Whenever phy capability is not supported 160 channel width and value of mcs_160 become equal to IEEE80211_HE_MCS_NOT_SUPPORTED then rx_mcs_160 remains uninitialized. Initialize these variables during declaration. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aaradhana Sahu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240611031017.297927-3-quic_aarasahu@quicinc.com Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath12k/mac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 8474e25d2ac6..71b4ec7717d5 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -1881,7 +1881,9 @@ static void ath12k_peer_assoc_h_he(struct ath12k *ar, { const struct ieee80211_sta_he_cap *he_cap = &sta->deflink.he_cap; int i; - u8 ampdu_factor, rx_mcs_80, rx_mcs_160, max_nss; + u8 ampdu_factor, max_nss; + u8 rx_mcs_80 = IEEE80211_HE_MCS_NOT_SUPPORTED; + u8 rx_mcs_160 = IEEE80211_HE_MCS_NOT_SUPPORTED; u16 mcs_160_map, mcs_80_map; bool support_160; u16 v; -- 2.43.0