Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: peter.oh@bowerswilkins.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211: inspect off channel operation only when off channel given
Date: Fri, 06 Jul 2018 14:31:35 +0200	[thread overview]
Message-ID: <1530880295.3197.39.camel@sipsolutions.net> (raw)
In-Reply-To: <1530659052-5834-1-git-send-email-peter.oh@bowerswilkins.com>

On Tue, 2018-07-03 at 16:04 -0700, peter.oh@bowerswilkins.com wrote:
> From: Peter Oh <peter.oh@bowerswilkins.com>
> 
> NL80211_ATTR_OFFCHANNEL_TX_OK does not mean given channel is always
> off channel, but it means the channel given could be off channel.
> Hence it should not block the given channel to be used if given
> channel does not require off channel mgmt tx although regulatory
> domain is non-ETSI.
> 
> Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
> ---
>  net/wireless/nl80211.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 4eece06..991042b 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -9915,7 +9915,9 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
>  		return -EINVAL;
>  
>  	wdev_lock(wdev);
> -	if (params.offchan && !cfg80211_off_channel_oper_allowed(wdev)) {
> +	if (params.offchan &&
> +	    !cfg80211_chandef_identical(&chandef, &wdev->chandef) &&
> +	    !cfg80211_off_channel_oper_allowed(wdev)) {
>  		wdev_unlock(wdev);

Hmm. That seems fine, but can we be sure that wdev->chandef is always
valid? ISTR that it isn't necessarily updated all the time, but I can't
really say right now.

johannes

  reply	other threads:[~2018-07-06 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03 23:04 [PATCH] cfg80211: inspect off channel operation only when off channel given peter.oh
2018-07-06 12:31 ` Johannes Berg [this message]
2019-08-30 10:40   ` Johannes Berg

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=1530880295.3197.39.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=peter.oh@bowerswilkins.com \
    /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