Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp132101rdb; Thu, 8 Feb 2024 00:56:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXth62+47jQlSMOIPovRODRGZE8g0+zhCncQpyrNlV3yKe0ZxvRKohQ8OJboUeRvKsaiMuPk5xk+AyusY1XJl3QGEtCxsVNWY7pW5SyXg== X-Google-Smtp-Source: AGHT+IE8mmLp5GIDnr5f3aq21sC0F/OpIRU+zBB4k42NzmpvjQUYYya/rkxUpt8kLrrn12YR2sb9 X-Received: by 2002:a05:6358:591b:b0:178:cf5d:4372 with SMTP id g27-20020a056358591b00b00178cf5d4372mr6400242rwf.5.1707382604834; Thu, 08 Feb 2024 00:56:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707382604; cv=pass; d=google.com; s=arc-20160816; b=p+ztXqUWPqqSb+IFz/u/eZdM0fJ6vsBB/kqyvC3YVC2tlFL7atNvjhBPLWXwnDIPso REarWyfs2yoWG6SeVU7afwCi83spOkmiJ9jwHoDI9JBmBBVrI0YDrzPwFxz1MieWQmKT vg+RTtp295YPx7I1Yl1CXf5nr5lbCtuOnvEebm62hZCtzmhD1d6PQpXbkqN96l8nTwcx bA74XLpy3xcrMRuj+AM8gkxo7aHcB55fxWq27wpsaXpPAV5z2BUjYEVw5eyjHQe7OGdk ZlbM5ZhmzV8L+9rMHgWcHtwGCmTRKEewhvidqwkEneGykHqHuLCPqN2wlCYHsc/NaL5/ c4Zg== 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=AtE5ReX7bgr57wrB0vLUqyJNoZixAxr1MSludCs8wtA=; fh=B8EG1Zj4BPrjASc5mos+UbjNPoSLkmQQiCeJRzg99do=; b=iDFyPVmAi0joGxU1NJTEI2E4gl1ZFXA4uO8yjCNserOjOHL+VTjEhrkHMKyrWYhEsa WAUxCRHtH97nTJt5mE6H2XuOsNaZTWujw2mrPrYBqDMzXdv7ybAJTi7pM7uSxb3BkwEZ NOIU37WURCxp7C7VR3bP/hnRl/2EGHuwqlPn3Z3sdOF1pC8NTGpx9VvqOeXLQIVgxjYy dCOtQmAnmOy5mOH39RXnwNiL9JAwt1WfGkfg8DiSwROGtga4/Jmc2M0KXMcS9ImDTeOm kcUx3BNNBWBzcGSSkn/BeoIhNlo3OVFu6qD1mX1V9iM6A4uIT4M/YQAZ8DBLvP/siLUF 7JDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bayrepo.ru header.s=mail header.b=fdIMWT2T; arc=pass (i=1 spf=pass spfdomain=bayrepo.ru dkim=pass dkdomain=bayrepo.ru); spf=pass (google.com: domain of linux-wireless+bounces-3326-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3326-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCWAAL3eJV/XTzKgbSs1HmVkn2MOaXGBaRw5WYf6CbuIXzRvOx0zSf6q9DGS91ebI8ba+Ol0ut6vpSoYdnXLaUyfo3dbUvBHdekffHxBJQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ch2-20020a056a0208c200b0059b64b153f6si3774815pgb.845.2024.02.08.00.56.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:56:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3326-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bayrepo.ru header.s=mail header.b=fdIMWT2T; arc=pass (i=1 spf=pass spfdomain=bayrepo.ru dkim=pass dkdomain=bayrepo.ru); spf=pass (google.com: domain of linux-wireless+bounces-3326-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3326-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0F8D6289D90 for ; Thu, 8 Feb 2024 08:55:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78D386A8B0; Thu, 8 Feb 2024 08:52:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=bayrepo.ru header.i=@bayrepo.ru header.b="fdIMWT2T" X-Original-To: linux-wireless@vger.kernel.org Received: from forward103c.mail.yandex.net (forward103c.mail.yandex.net [178.154.239.214]) (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 E1EA46931C for ; Thu, 8 Feb 2024 08:51:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.214 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707382324; cv=none; b=M9FJ+Pj5FLc2XH1xTjW6Bs/tbINpf17F/wPaAxjBEST3YKo5M577TtJ2T8NnGiuhWzJ5cSb5bYZ4D0rWa0KcWladZit7l+/8m7KZF6FEm4WdhRPwH3hLJUyykrTfmDWx0V9RIC870AtbC1E50JrSgLgoHeLd8isVtZ8FhJTlJys= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707382324; c=relaxed/simple; bh=5hz4MSSmydqNYmWrxYCfPGy1EK1/KI70gO7b2v2//lE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GChDWo4TqI3bqKzVsHg+1Z+/YPrCp3Erot7GRfe10ohFmvpXDUMtiqUKkntYadAkV8CnVYlntQwD7lnb5Ml2q1yMtjmuaziQN9z4dz1EhcHDbiYBYuYW+Na0l6XOV9jluHM+JWwP4VCEatt+Xo0WpkW1Oqtoaye41xi5HR2wL8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bayrepo.ru; spf=pass smtp.mailfrom=bayrepo.ru; dkim=pass (1024-bit key) header.d=bayrepo.ru header.i=@bayrepo.ru header.b=fdIMWT2T; arc=none smtp.client-ip=178.154.239.214 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bayrepo.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bayrepo.ru Received: from mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net [IPv6:2a02:6b8:c08:a088:0:640:6c7c:0]) by forward103c.mail.yandex.net (Yandex) with ESMTPS id 910DC60B76; Thu, 8 Feb 2024 11:51:50 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id mpdAMe78USw0-1jMFk9pX; Thu, 08 Feb 2024 11:51:49 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bayrepo.ru; s=mail; t=1707382309; bh=AtE5ReX7bgr57wrB0vLUqyJNoZixAxr1MSludCs8wtA=; h=Message-Id:Date:Cc:Subject:To:From; b=fdIMWT2TzUq+sB1fKtiSh0jA76Aa5rtl+Tdxm0+kngZVvO/ZyQGEJH+QmXP+ov8eD sy8am6K1yr69ZvnYhCdmJSZzHVgmbcoZZK0QkHrQXgv+4P5a1RkbL/dUZblFt4GEWm FUKh88JXLZw535o6HwtJ5ddoeF7u0s5x/C7TyXDw= Authentication-Results: mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net; dkim=pass header.i=@bayrepo.ru From: Alexey Berezhok To: Arend van Spriel Cc: Kalle Valo , linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org, Alexey Berezhok Subject: [PATCH] wifi: brcmfmac: do not cast hidden SSID attribute value to boolean Date: Thu, 8 Feb 2024 11:51:21 +0300 Message-Id: <20240208085121.2430-1-a@bayrepo.ru> X-Mailer: git-send-email 2.39.3 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In 'brcmf_cfg80211_start_ap()', not assume that NL80211_HIDDEN_SSID_NOT_IN_USE is zero but prefer an explicit check instead. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Alexey Berezhok --- 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 736b2ada6..63f6e9436 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -5272,7 +5272,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, settings->hidden_ssid); if (err) { bphy_err(drvr, "%s closednet error (%d)\n", - settings->hidden_ssid ? + (settings->hidden_ssid != NL80211_HIDDEN_SSID_NOT_IN_USE) ? "enabled" : "disabled", err); goto exit; -- 2.39.3