* Re: [PATCH v5] nl80211: reset regdom when reloading regdb [not found] ` <YaIIZfxHgqc/UTA7@gimli.kloenk.dev> @ 2021-11-30 16:02 ` Nathan Chancellor 2021-11-30 16:50 ` Finn Behrens 0 siblings, 1 reply; 3+ messages in thread From: Nathan Chancellor @ 2021-11-30 16:02 UTC (permalink / raw) To: Finn Behrens; +Cc: johannes, linux-wireless, llvm Hi Finn, On Sat, Nov 27, 2021 at 11:28:53AM +0100, Finn Behrens wrote: > this reloads the regdom when the regulatory db is reloaded. > Without this patch the user had to change the regulatoy domain to a > different, and then reset it to the one the user is in, to have the new > regulatory db take effect > > Signed-off-by: Finn Behrens <fin@nyantec.com> This patch as commit 1eda919126b4 ("nl80211: reset regdom when reloading regdb") in -next causes the following clang warning/error: net/wireless/reg.c:1137:23: error: implicit conversion from enumeration type 'enum nl80211_user_reg_hint_type' to different enumeration type 'enum nl80211_reg_initiator' [-Werror,-Wenum-conversion] request->initiator = NL80211_USER_REG_HINT_USER; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Should that be NL80211_REGDOM_SET_BY_CORE (same value, 0) or something different? Cheers, Nathan ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v5] nl80211: reset regdom when reloading regdb 2021-11-30 16:02 ` [PATCH v5] nl80211: reset regdom when reloading regdb Nathan Chancellor @ 2021-11-30 16:50 ` Finn Behrens 2021-11-30 18:32 ` Nathan Chancellor 0 siblings, 1 reply; 3+ messages in thread From: Finn Behrens @ 2021-11-30 16:50 UTC (permalink / raw) To: Nathan Chancellor; +Cc: Finn Lasse Behrens, johannes, linux-wireless, llvm > On 30. Nov 2021, at 17:02, Nathan Chancellor <nathan@kernel.org> wrote: > > Hi Finn, > > On Sat, Nov 27, 2021 at 11:28:53AM +0100, Finn Behrens wrote: >> this reloads the regdom when the regulatory db is reloaded. >> Without this patch the user had to change the regulatoy domain to a >> different, and then reset it to the one the user is in, to have the new >> regulatory db take effect >> >> Signed-off-by: Finn Behrens <fin@nyantec.com> > > This patch as commit 1eda919126b4 ("nl80211: reset regdom when reloading > regdb") in -next causes the following clang warning/error: > > net/wireless/reg.c:1137:23: error: implicit conversion from enumeration type 'enum nl80211_user_reg_hint_type' to different enumeration type 'enum nl80211_reg_initiator' [-Werror,-Wenum-conversion] > request->initiator = NL80211_USER_REG_HINT_USER; > ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 error generated. > > Should that be NL80211_REGDOM_SET_BY_CORE (same value, 0) or something > different? > > Cheers, > Nathan Hi Nathan, I think It should have been NL80211_REGDOM_SET_BY_USER, as the reload flag check is currently implemented in the user hint function. But If I see it correctly right now. We could remove the reload flag, and NL80211_REGDOM_SET_BY_CORE should work as well. As the reg_query_database function is called unconditionally there. I will prepare a patch that reverts the reload flag, and changes to NL80211_REGDOM_SET_BY_CORE as this already works. Or should it be NL80211_REGDOM_SET_BY_USER, as it’s results from an user called function? Cheers, Finn ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v5] nl80211: reset regdom when reloading regdb 2021-11-30 16:50 ` Finn Behrens @ 2021-11-30 18:32 ` Nathan Chancellor 0 siblings, 0 replies; 3+ messages in thread From: Nathan Chancellor @ 2021-11-30 18:32 UTC (permalink / raw) To: Finn Behrens; +Cc: johannes, linux-wireless, llvm On Tue, Nov 30, 2021 at 05:50:58PM +0100, Finn Behrens wrote: > > On 30. Nov 2021, at 17:02, Nathan Chancellor <nathan@kernel.org> wrote: > > On Sat, Nov 27, 2021 at 11:28:53AM +0100, Finn Behrens wrote: > >> this reloads the regdom when the regulatory db is reloaded. > >> Without this patch the user had to change the regulatoy domain to a > >> different, and then reset it to the one the user is in, to have the new > >> regulatory db take effect > >> > >> Signed-off-by: Finn Behrens <fin@nyantec.com> > > > > This patch as commit 1eda919126b4 ("nl80211: reset regdom when reloading > > regdb") in -next causes the following clang warning/error: > > > > net/wireless/reg.c:1137:23: error: implicit conversion from enumeration type 'enum nl80211_user_reg_hint_type' to different enumeration type 'enum nl80211_reg_initiator' [-Werror,-Wenum-conversion] > > request->initiator = NL80211_USER_REG_HINT_USER; > > ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > 1 error generated. > > > > Should that be NL80211_REGDOM_SET_BY_CORE (same value, 0) or something > > different? > > I think It should have been NL80211_REGDOM_SET_BY_USER, as the reload > flag check is currently implemented in the user hint function. But If > I see it correctly right now. We could remove the reload flag, and > NL80211_REGDOM_SET_BY_CORE should work as well. As the > reg_query_database function is called unconditionally there. If you tested the current version of your patch and it worked fine, then it seems like you should just revert the addition of the reload flag and change request->initiator = NL80211_USER_REG_HINT_USER; to request->initiator = NL80211_REGDOM_SET_BY_CORE; given that is what is happening right now. The warning is basically pointing out that reg_process_hint() is calling reg_process_hint_core() instead of reg_process_hint_user() because NL80211_USER_REG_HINT_USER = NL80211_REGDOM_SET_BY_CORE = 0. Hopefully that makes sense. Cheers, Nathan ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-30 18:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210526112418.cdwkn7ed4twctimc@imap.mailbox.org>
[not found] ` <YaIIZfxHgqc/UTA7@gimli.kloenk.dev>
2021-11-30 16:02 ` [PATCH v5] nl80211: reset regdom when reloading regdb Nathan Chancellor
2021-11-30 16:50 ` Finn Behrens
2021-11-30 18:32 ` Nathan Chancellor
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox