public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Finn Behrens <me@kloenk.de>
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] nl80211: remove reload flag from regulatory_request
Date: Wed, 1 Dec 2021 08:43:10 -0700	[thread overview]
Message-ID: <YaeYDmN8DhADXOSg@archlinux-ax161> (raw)
In-Reply-To: <YadvTolO8rQcNCd/@gimli.kloenk.dev>

On Wed, Dec 01, 2021 at 01:49:18PM +0100, Finn Behrens wrote:
> This removes the previously unused reload flag, which was introduced in
> 1eda919126b4.
> The request is handled as NL80211_REGDOM_SET_BY_CORE, which is parsed
> unconditionally.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Fixes: 1eda919126b4 ("nl80211: reset regdom when reloading regdb")
> Link: https://lore.kernel.org/all/YaZuKYM5bfWe2Urn@archlinux-ax161/
> Signed-off-by: Finn Behrens <me@kloenk.de>

Thank you for the quick patch, it seems to make sense to me.

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> Hi,
> 
> I removed the reload flag, and set it to NL80211_REGDOM_SET_BY_CORE, as
> it already was by accident.
> 
> Thanks,
> Finn
> 
>  include/net/regulatory.h | 1 -
>  net/wireless/reg.c       | 6 ++----
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/include/net/regulatory.h b/include/net/regulatory.h
> index 0cf9335431e0..47f06f6f5a67 100644
> --- a/include/net/regulatory.h
> +++ b/include/net/regulatory.h
> @@ -83,7 +83,6 @@ struct regulatory_request {
>  	enum nl80211_dfs_regions dfs_region;
>  	bool intersect;
>  	bool processed;
> -	bool reload;
>  	enum environment_cap country_ie_env;
>  	struct list_head list;
>  };
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index 61f1bf1bc4a7..8148a3b5f607 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -1134,9 +1134,8 @@ 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;
>  
>  	reg_process_hint(request);
>  
> @@ -2712,8 +2711,7 @@ reg_process_hint_user(struct regulatory_request *user_request)
>  
>  	treatment = __reg_process_hint_user(user_request);
>  	if (treatment == REG_REQ_IGNORE ||
> -	    (treatment == REG_REQ_ALREADY_SET &&
> -	     !user_request->reload))
> +	    treatment == REG_REQ_ALREADY_SET)
>  		return REG_REQ_IGNORE;
>  
>  	user_request->intersect = treatment == REG_REQ_INTERSECT;
> -- 
> 2.31.1
> 

      reply	other threads:[~2021-12-01 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 12:49 [PATCH] nl80211: remove reload flag from regulatory_request Finn Behrens
2021-12-01 15:43 ` Nathan Chancellor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YaeYDmN8DhADXOSg@archlinux-ax161 \
    --to=nathan@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=me@kloenk.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox