From patchwork Tue Jul 2 12:24:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Hui X-Patchwork-Id: 810331 Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id E048216DECF; Tue, 2 Jul 2024 12:25:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923142; cv=none; b=bPTBpV5sf8zKb3DZA/b5Vlyk/Sru3CR1BbKEDeh6wOeZtW0sejYO35VwIqT18uA1LAcJccxlCzhPOPMMOn64irsUFRWY2F1bKFPXebQ8/VcvPYM2S4162RJOgDkPYRh3HWTlQvbWpTVYZhowo4+wXC0P0GXdZ8ceEaHfwL11zS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923142; c=relaxed/simple; bh=Xi97Ab9KSnAJutc+jpQwepKwVeNjLKH94VB89Wuz084=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version; b=SB03dfQlem9GN036vwnsFcJdeZOzeSlHHIPL/b2Xtx7dtGFDuWuXpnX2pWSa/YugFpjWKLo2oEIZMcC3D85EwmM0GcWip9HRXy6Q/EWhitdYdvUjvmTc3thPYvZ8r19Yn/i91O9Pp5G7hdrXonwy1Pw4SzbJGXY9RYHZYW+YSuU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (MailData Gateway V2.8.8) with ESMTPSA id C2C226031A63E; Tue, 2 Jul 2024 20:25:18 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: arend.vanspriel@broadcom.com, kvalo@kernel.org Cc: Su Hui , johannes.berg@intel.com, kees@kernel.org, a@bayrepo.ru, marcan@marcan.st, quic_alokad@quicinc.com, zyytlz.wz@163.com, petr.tesarik.ext@huawei.com, duoming@zju.edu.cn, colin.i.king@gmail.com, frankyl@broadcom.com, meuleman@broadcom.com, phaber@broadcom.com, linville@tuxdriver.com, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH wireless 1/9] wifi: cfg80211: avoid garbage value of 'io_type' in brcmf_cfg80211_attach() Date: Tue, 2 Jul 2024 20:24:44 +0800 Message-Id: <20240702122450.2213833-2-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 brcmf_fil_cmd_int_get() reads the value of 'io_type' and passes it to brcmf_fil_cmd_data_get(). Initialize 'io_type' to avoid garbage value. Fixes: 83cf17aa8082 ("brcmfmac: adopt new d11 interface") Signed-off-by: Su Hui --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 5fe0e671ecb3..6be7e7bd8ce7 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -8249,7 +8249,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, struct brcmf_cfg80211_vif *vif; struct brcmf_if *ifp; s32 err = 0; - s32 io_type; + s32 io_type = 0; u16 *cap = NULL; if (!ndev) { From patchwork Tue Jul 2 12:24:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Hui X-Patchwork-Id: 809311 Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id DEF19176237; Tue, 2 Jul 2024 12:25:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923146; cv=none; b=AgU8C+y0liv97s6mJo93gh5i/Ok+68bFhfl9U82kgYFnJwop31yqayDSw72ODWW4DROFimzUfMXPjbkU3UmmU/pTgm40ouFnO8EAYSBezGLamo9LC1WzBBbeQBBeNzby9JBhKLyjqwpZ9oQi5IhTRIcShqQTKQJs+TEDvs237/I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923146; c=relaxed/simple; bh=JkUkqJ7im0Np8iJE4dAgzWwTvaR+CRh7XcW/vBuE1XI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version; b=YNWMRdIjSp3W/EOHoUnv+qrVg4YyaIMpdnIBEngEVwEGtedz3onobqJEyUmJnCWZ6nbVWpRb478W2DF0RbhspptWS+Ky5zXedj3ZAJrk7B4YLEFVietxcJu/THxfbALc68NQodm8bDd0hoA054M+o9X8Us39e5kZwSx/xmHjeKY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (MailData Gateway V2.8.8) with ESMTPSA id 23E1D6031A648; Tue, 2 Jul 2024 20:25:20 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: arend.vanspriel@broadcom.com, kvalo@kernel.org Cc: Su Hui , quic_jjohnson@quicinc.com, u.kleine-koenig@pengutronix.de, stanley.hsu@cypress.com, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH wireless 2/9] wifi: brcmfmac: avoid garbage value of 'status' in brcmf_c_download_blob() Date: Tue, 2 Jul 2024 20:24:45 +0800 Message-Id: <20240702122450.2213833-3-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 brcmf_fil_iovar_int_get() reads the value of 'status' and passes it to brcmf_fil_iovar_data_get(). The garbage value of 'status' will finally be copied to 'ifp->drvr->proto_buf'. Initialize 'status' to avoid garbage value. Fixes: fdd0bd88ceae ("brcmfmac: add CLM download support") Signed-off-by: Su Hui --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index b24faae35873..03277131ef2b 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -127,7 +127,7 @@ static int brcmf_c_download_blob(struct brcmf_if *ifp, u32 datalen; u32 cumulative_len; u16 dl_flag = DL_BEGIN; - u32 status; + u32 status = 0; s32 err; brcmf_dbg(TRACE, "Enter\n"); From patchwork Tue Jul 2 12:24:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Hui X-Patchwork-Id: 810328 Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 888F816EB66; Tue, 2 Jul 2024 12:25:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923145; cv=none; b=YJlF3iXAOEjlxZenZJoc3QQCk2lhNm5T6mtzD6Biyn/WXz+7veZCMmjiAE1ijTdzkNUfTmmIvB3h9HN6Cmn5NMChBx1GKakGNSM/c+kNa6Em21NYG7P7lNG0xesNdUsgU+k69afpyLIte3BhHpg5wUkjVl8CpsIdpzag/GIZb6U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923145; c=relaxed/simple; bh=evAy6djT8Jz+ckPi7/Gdz/7kZj/4vFauA7ksswOC9/Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version; b=kVb79GTtUmlDPsSxh04UFYA7x3ylxVRxvGzFkfZyd0OpJuCXoeHbllHcBay7R1A6qv2xmb/wMm9fdPGpdrZKqlEi1azaLk6rajgu2HJ3X0rh6QioXlG0fghl2XNNhePSHC8O7hIR+Z2eMJX7ak1d6RM3qkIXBGLq/YpSEQ55feg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (MailData Gateway V2.8.8) with ESMTPSA id 632836031A638; Tue, 2 Jul 2024 20:25:22 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: arend.vanspriel@broadcom.com, kvalo@kernel.org Cc: Su Hui , johannes.berg@intel.com, kees@kernel.org, a@bayrepo.ru, petr.tesarik.ext@huawei.com, marcan@marcan.st, justinstitt@google.com, duoming@zju.edu.cn, colin.i.king@gmail.com, chi-hsien.lin@cypress.com, ian.lin@infineon.com, wright.feng@cypress.com, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH wireless 3/9] wifi: cfg80211: avoid garbage value of 'noise' in brcmf_cfg80211_dump_survey() Date: Tue, 2 Jul 2024 20:24:46 +0800 Message-Id: <20240702122450.2213833-4-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 brcmf_fil_cmd_int_get() reads the value of 'noise' and passes it to brcmf_fil_cmd_data_get(). Initialize 'noise' to avoid garbage value. Fixes: 6c04deae1438 ("brcmfmac: Add dump_survey cfg80211 ops for HostApd AutoChannelSelection") Signed-off-by: Su Hui --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 6be7e7bd8ce7..2377b88d7ee0 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -8084,7 +8084,7 @@ brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev, struct ieee80211_supported_band *band; enum nl80211_band band_id; struct cca_msrmnt_query req; - u32 noise; + u32 noise = 0; int err; brcmf_dbg(TRACE, "Enter: channel idx=%d\n", idx); From patchwork Tue Jul 2 12:24:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Hui X-Patchwork-Id: 810332 Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id CEE1B16EB66; Tue, 2 Jul 2024 12:25:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923141; cv=none; b=PhO5ElqUelgxmTcpm1vc4mvyQqKLnG6DozXSWXwO3HJ4uptmoXmQr1aGWq1H4h1UEGdMMjmiyVPEkDcfSahqW/XDYym2qn4Uny3CEB5zRDvPCzza0jqOgzZva0wDYKd+OldgCrr3sEjU0b68KRRHhqXv+gNTZEeLoMk8SMlTfQU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923141; c=relaxed/simple; bh=Kx4e1MpD4EQQJ0DKqYJ4N5pzOHjFrlzr5NO8css8ljM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version; b=Hdf7xA24gnlB+4ceJvKZeU6YwAulByFDS9JUAAvdOiHylNMlssMLKxnmpyVN3qhtCtXSCfR0QaZAi3GzZnUapv7Mjer+qWfTKq8G0/Ds9XvIGp9FmgToQsNfBFpyu2A6z+tEtavUWVvhg6Fp1OqhKod0rqgaWq07le/fZP5YZw8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (MailData Gateway V2.8.8) with ESMTPSA id 014F56031A647; Tue, 2 Jul 2024 20:25:23 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: arend.vanspriel@broadcom.com, kvalo@kernel.org Cc: Su Hui , johannes.berg@intel.com, kees@kernel.org, a@bayrepo.ru, marcan@marcan.st, colin.i.king@gmail.com, zyytlz.wz@163.com, petr.tesarik.ext@huawei.com, duoming@zju.edu.cn, zajec5@gmail.com, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH wireless 4/9] wifi: cfg80211: avoid garbage value of 'chanspec' in brcmf_cfg80211_get_channel() Date: Tue, 2 Jul 2024 20:24:47 +0800 Message-Id: <20240702122450.2213833-5-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 brcmf_fil_iovar_int_get() reads the value of 'chanspec'. Initialize 'chanspec' to avoid garbage value. Fixes: ee6e7aa38394 ("brcmfmac: support get_channel cfg80211 callback") Signed-off-by: Su Hui --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 2377b88d7ee0..e672565de437 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -5678,7 +5678,7 @@ static int brcmf_cfg80211_get_channel(struct wiphy *wiphy, struct brcmu_chan ch; enum nl80211_band band = 0; enum nl80211_chan_width width = 0; - u32 chanspec; + u32 chanspec = 0; int freq, err; if (!ndev || drvr->bus_if->state != BRCMF_BUS_UP) From patchwork Tue Jul 2 12:24:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Hui X-Patchwork-Id: 809313 Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 10549176ABB; Tue, 2 Jul 2024 12:25:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923145; cv=none; b=j4nMXqFuEd1SgTTs4yrf3znvihr/NMcJpN7LLY226j7de0NPkpaCMPmqwxuQQZB9C4C9S2NlGK+eQOQzamr1bMEQ5wwoSaa1WiWmY+OYZ7wgrd2h1dbZY82X3COiKFhcO0A9L0LGrpUh9H1oAA9PcCNhpmRTczUEzYF72jcFdvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923145; c=relaxed/simple; bh=/ybC0azd/YcZ5gUZ1daUGO+ZlGw0Gp2SnfzhyW7qEdc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version; b=PGLcqufQvsrQc0T174bU+NlXtRyrmEgL/88OqceNsmHcT7pna+SSbcukzSN5v7SncREw6lo51fVCOujNa+SaiEicNiv775yTDFlructPq7wr5HwLERMwLVfTjLfAxN9CReoS6j5H+W+M+Tf7emVLd7VdbE7KYZQl3Lf0nNLVXAQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (MailData Gateway V2.8.8) with ESMTPSA id 846F56031A64B; Tue, 2 Jul 2024 20:25:25 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: arend.vanspriel@broadcom.com, kvalo@kernel.org Cc: Su Hui , johannes.berg@intel.com, kees@kernel.org, a@bayrepo.ru, petr.tesarik.ext@huawei.com, justinstitt@google.com, marcan@marcan.st, duoming@zju.edu.cn, colin.i.king@gmail.com, antonio@open-mesh.com, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH wireless 5/9] wifi: cfg80211: avoid garbage value of 'freq' in brcmf_cfg80211_mgmt_tx() Date: Tue, 2 Jul 2024 20:24:48 +0800 Message-Id: <20240702122450.2213833-6-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 brcmf_fil_cmd_int_get() reads the value of 'freq'. Initialize 'freq' to avoid garbage value. Fixes: c2ff8cad6423 ("brcm80211: make mgmt_tx in brcmfmac accept a NULL channel") Signed-off-by: Su Hui --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index e672565de437..9a5b1f77c890 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -5511,7 +5511,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, struct brcmf_fil_af_params_le *af_params; bool ack; s32 chan_nr; - u32 freq; + u32 freq = 0; brcmf_dbg(TRACE, "Enter\n"); From patchwork Tue Jul 2 12:24:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Hui X-Patchwork-Id: 809314 Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id B87C91741DC; Tue, 2 Jul 2024 12:25:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923142; cv=none; b=XU5QzCN6b6j3u6tVgduBQDeU/6GZxr29QKTTGin388hzL8t9JHe5hi6dLzme5fTZ7Uau1tJHV99lgELWy77iTpkSBFtY2iqSOwOc8M6pK6Q6gIYeqOkPeFhAsMmcGMr1wNChcGrCW3lPgyFQDrm+nv/HcMSQEjsu/zpZnfcwArc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923142; c=relaxed/simple; bh=P+/RJb3io/2env2ZVV0+EYtpseTvbe49y6WPDt8hvdA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version; b=u5oIknmhCcDVopDcySbA7t99/tjeyaUEwx5GoUWfZ6TVYQb9URiD/2mUEK7vzdP7dqI+JCVVxs1fVVzaC9mVMW7kn426skREWbfKWJToAT+76v9y+xia5pl6f7tYv9EjpVGAEsZBCwPM3rIluCvTUcVHMTJV2JLN+Vjt+Xf6jdM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (MailData Gateway V2.8.8) with ESMTPSA id 1EBF86031A64C; Tue, 2 Jul 2024 20:25:27 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: arend.vanspriel@broadcom.com, kvalo@kernel.org Cc: Su Hui , johannes.berg@intel.com, kees@kernel.org, a@bayrepo.ru, marcan@marcan.st, petr.tesarik.ext@huawei.com, colin.i.king@gmail.com, pieterpg@broadcom.com, meuleman@broadcom.com, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH wireless 6/9] wifi: cfg80211: avoid garbage value of 'wsec' in brcmf_cfg80211_reconfigure_wep() Date: Tue, 2 Jul 2024 20:24:49 +0800 Message-Id: <20240702122450.2213833-7-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 brcmf_fil_bsscfg_int_get() reads the value of 'wsec'. Initialize 'wsec' to avoid garbage value. Fixes: 118eb304d055 ("brcmfmac: Fix WEP configuration for AP mode.") Signed-off-by: Su Hui --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 9a5b1f77c890..eb1196db8407 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2975,7 +2975,7 @@ brcmf_cfg80211_reconfigure_wep(struct brcmf_if *ifp) s32 err; u8 key_idx; struct brcmf_wsec_key *key; - s32 wsec; + s32 wsec = 0; for (key_idx = 0; key_idx < BRCMF_MAX_DEFAULT_KEYS; key_idx++) { key = &ifp->vif->profile.key[key_idx]; From patchwork Tue Jul 2 12:24:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Hui X-Patchwork-Id: 810329 Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 51CEF177986; Tue, 2 Jul 2024 12:25:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923145; cv=none; b=DRYMCIL+3gspMNgApMuv4dohipM7Bk3YeM/00YmSwEItcU9InOXGvVs2zV57j2BHk8rab4f0VQ1HIlPFm7R5JCLuJHuf5uSarQnL7k3Cq1LK/Jwks9OWpcuo6UIw0oFz44Tnzfyi1U0ya4A0FwYcsI8IRr6l2TIMgSAbt4oN10E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923145; c=relaxed/simple; bh=EZlLmoTtAlTf/n0780AcOKkral2xyrZbpk9+FQd/Nhs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version; b=DplwkL5TnbkFSzH6ErXdiiRY5M8SA0OiHWz5odyKNjazUROtTxsUHVLhjiWA42zlWdk8TmIBvvZuGv0zNvVOpIaz7ni4EghcC+axUosomnsSkq30At+Z7tX5IK+hC7sUIsc1Edg+8GpaaSHKff8vo0MRpWu3/qRMuOmCLdG9E5s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (MailData Gateway V2.8.8) with ESMTPSA id 9A8766031A649; Tue, 2 Jul 2024 20:25:28 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: arend.vanspriel@broadcom.com, kvalo@kernel.org Cc: Su Hui , johannes.berg@intel.com, kees@kernel.org, a@bayrepo.ru, marcan@marcan.st, duoming@zju.edu.cn, petr.tesarik.ext@huawei.com, colin.i.king@gmail.com, meuleman@broadcom.com, frankyl@broadcom.com, linville@tuxdriver.com, pieterpg@broadcom.com, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH wireless 7/9] wifi: cfg80211: avoid garbage value of 'wsec' in brcmf_cfg80211_add_key() Date: Tue, 2 Jul 2024 20:24:50 +0800 Message-Id: <20240702122450.2213833-8-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 brcmf_fil_bsscfg_int_get() reads the value of 'wsec'. Initialize 'wsec' to avoid garbage value. Fixes: f09d0c02b63d ("brcmfmac: use different fw api for encryption,auth. config") Signed-off-by: Su Hui --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index eb1196db8407..2a97d4d7f684 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2782,7 +2782,7 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, struct brcmf_pub *drvr = cfg->pub; struct brcmf_wsec_key *key; s32 val; - s32 wsec; + s32 wsec = 0; s32 err; u8 keybuf[8]; bool ext_key; From patchwork Tue Jul 2 12:24:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Hui X-Patchwork-Id: 809315 Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 5C68A1741ED; Tue, 2 Jul 2024 12:25:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923142; cv=none; b=VOVQhc+MHCkAmattrVx2Q5E7F5/7gEua9eNm2IVzAqX+xwduziSZ2LsvAJRfPBaQvOHWGL2SvYqPtNvffe6s9+B7MIpOdp+DF319EnVA1RIxPgLCGIhbMkskt6yns6ID8+/j35tCPEbb3cW6RoLamRlmgRI9La0sLBKmI00zXsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923142; c=relaxed/simple; bh=re5hCi09bz4bN2XgE8UnJKMOfANVbB9O+r83cPT08rE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version; b=SUlfMoK7jZ7dmoL6RfYJfCwspcUHtNr4bo5ZO2yiekVuZaM54Zk0bqhlGOS7jfC5tUl7vA2JadadNqPEr6cLMwCgraGai6SnAUYwNgWYm3Go0g2BxihhC5qgAwYQC8sR1Pmp9CeerOG7uFilA29NTxL3QX2zluMmekhfeuIEkow= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (MailData Gateway V2.8.8) with ESMTPSA id 8E4146031A64E; Tue, 2 Jul 2024 20:25:30 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: arend.vanspriel@broadcom.com, kvalo@kernel.org Cc: Su Hui , johannes.berg@intel.com, kees@kernel.org, a@bayrepo.ru, colin.i.king@gmail.com, marcan@marcan.st, zyytlz.wz@163.com, petr.tesarik.ext@huawei.com, hante.meuleman@broadcom.com, pieter-paul.giesberts@broadcom.com, franky.lin@broadcom.com, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH wireless 8/9] wifi: cfg80211: avoid garbage value of 'val' in brcmf_set_key_mgmt() Date: Tue, 2 Jul 2024 20:24:51 +0800 Message-Id: <20240702122450.2213833-9-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 brcmf_fil_bsscfg_int_get() reads the value of 'val'. Initialize 'val' to avoid garbage vlaue. Fixes: 240d61a9ddeb ("brcmfmac: add 802.11w management frame protection support") Signed-off-by: Su Hui --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 2a97d4d7f684..95193e09504f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2085,7 +2085,7 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme) struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; struct brcmf_pub *drvr = ifp->drvr; - s32 val; + s32 val = 0; s32 err; const struct brcmf_tlv *rsn_ie; const u8 *ie; From patchwork Tue Jul 2 12:24:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Hui X-Patchwork-Id: 810330 Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 238ED174EDF; Tue, 2 Jul 2024 12:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923144; cv=none; b=X725tF2PREo7RM6jHkkz6LC65GuxQYukscoVo6p+tHEEZBVEJexF8h+5vqNgp1FZQoyqFBIMlD20uY+ZUZmA1rwpGyWh7imFYsRCFpjAYxnXf9vbg3zrHGgXUC+jquOmy9fMavsvl1Np5tibLwO6O1bpKnjGK0SUQ/oHvVL6m/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923144; c=relaxed/simple; bh=QEHj1YJApM67xSQPt8/HlxK6R7veWsWbHV9VxRLTYK4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version; b=KwMi8R2JBJ/Ja/8WQhB6na5idmhm2W942P8GAGRjDuH21l4vjvPUmbuNKsB3WuLaIIC4leKxYf40DT3G1/ib9NfvaKtwOw0lYCi+26v0WnJ/u2rBX0GplaJPaPFOq88qR20fN+2km63R+Bwg5oMpT+ULuVdGwfWiI7fXA8Mo0yY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (MailData Gateway V2.8.8) with ESMTPSA id 288AA6031A64D; Tue, 2 Jul 2024 20:25:32 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: arend.vanspriel@broadcom.com, kvalo@kernel.org Cc: Su Hui , johannes.berg@intel.com, kees@kernel.org, a@bayrepo.ru, duoming@zju.edu.cn, marcan@marcan.st, petr.tesarik.ext@huawei.com, colin.i.king@gmail.com, linville@tuxdriver.com, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH wireless 9/9] wifi: cfg80211: avoid garbage value of 'wsec' in brcmf_cfg80211_{get,config_default}_key() Date: Tue, 2 Jul 2024 20:24:52 +0800 Message-Id: <20240702122450.2213833-10-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240702122450.2213833-1-suhui@nfschina.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 brcmf_fil_bsscfg_int_get() reads the value of 'wsec'. Initialize 'wsec' to avoid garbage value. Fixes: 5b435de0d786 ("net: wireless: add brcm80211 drivers") Signed-off-by: Su Hui --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 95193e09504f..eb8d7455d0ea 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2707,7 +2707,7 @@ brcmf_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *ndev, struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_pub *drvr = ifp->drvr; u32 index; - u32 wsec; + u32 wsec = 0; s32 err = 0; brcmf_dbg(TRACE, "Enter\n"); @@ -2907,7 +2907,7 @@ brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev, struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; struct brcmf_pub *drvr = cfg->pub; struct brcmf_cfg80211_security *sec; - s32 wsec; + s32 wsec = 0; s32 err = 0; brcmf_dbg(TRACE, "Enter\n");