lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211203185700.756121-1-arnd@kernel.org>
Date:   Fri,  3 Dec 2021 19:56:45 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Johannes Berg <johannes@...solutions.net>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, Finn Behrens <me@...enk.dev>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Luca Coelho <luciano.coelho@...el.com>,
        Ilan Peer <ilan.peer@...el.com>,
        Bhaskar Chowdhury <unixbhaskar@...il.com>,
        Miri Korenblit <miriam.rachel.korenblit@...el.com>,
        Sriram R <srirrama@...eaurora.org>,
        Qiheng Lin <linqiheng@...wei.com>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] nl80211: use correct enum type in reg_reload_regdb

From: Arnd Bergmann <arnd@...db.de>

NL80211_USER_REG_HINT_USER is not something that can be
assigned to an 'enum nl80211_reg_initiator', as pointed out
by gcc.

net/wireless/reg.c: In function 'reg_reload_regdb':
net/wireless/reg.c:1137:28: error: implicit conversion from 'enum nl80211_user_reg_hint_type' to 'enum nl80211_reg_initiator' [-Werror=enum-conversion]

I don't know what was intended here, most likely it was either
NL80211_REGDOM_SET_BY_CORE (same numeric value) or
NL80211_REGDOM_SET_BY_USER (most similar name), so I pick the former
here, leaving the behavior unchanged while avoiding the warning.

Fixes: 1eda919126b4 ("nl80211: reset regdom when reloading regdb")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 net/wireless/reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 61f1bf1bc4a7..edb2081f75e8 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1134,7 +1134,7 @@ int reg_reload_regdb(void)
 	request->wiphy_idx = WIPHY_IDX_INVALID;
 	request->alpha2[0] = current_regdomain->alpha2[0];
 	request->alpha2[1] = current_regdomain->alpha2[1];
-	request->initiator = NL80211_USER_REG_HINT_USER;
+	request->initiator = NL80211_REGDOM_SET_BY_CORE;
 	request->user_reg_hint_type = NL80211_USER_REG_HINT_USER;
 	request->reload = true;
 
-- 
2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ