* [PATCH] cfg80211: inspect off channel operation only when off channel given
@ 2018-07-03 23:04 peter.oh
2018-07-06 12:31 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: peter.oh @ 2018-07-03 23:04 UTC (permalink / raw)
To: linux-wireless, johannes; +Cc: Peter Oh, johannes.berg
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);
return -EBUSY;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] cfg80211: inspect off channel operation only when off channel given
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
2019-08-30 10:40 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2018-07-06 12:31 UTC (permalink / raw)
To: peter.oh, linux-wireless
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cfg80211: inspect off channel operation only when off channel given
2018-07-06 12:31 ` Johannes Berg
@ 2019-08-30 10:40 ` Johannes Berg
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2019-08-30 10:40 UTC (permalink / raw)
To: peter.oh, linux-wireless
On Fri, 2018-07-06 at 14:31 +0200, Johannes Berg wrote:
> 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.
For the record, in addition to this question, the commit log might need
some rewording since the whole regulatory/non-ETSI part isn't really
obvious (and not clear to me right now).
I've had this patch waiting for about a year now, I'll drop it. Please
resend if it's still relevant.
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-30 10:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-08-30 10:40 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox