From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Arik Nemtsov <arik@wizery.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Jonathan Doron <jond@wizery.com>
Subject: Re: [PATCH v2 4/4] cfg80211: Allow usermode to query wiphy specific regd info
Date: Sat, 22 Nov 2014 00:38:23 +0100 [thread overview]
Message-ID: <20141121233823.GF25677@wotan.suse.de> (raw)
In-Reply-To: <CA+XVXfc2-9Q+2AYj_GwyYN_agawk3LqLGssibzaxA6taszo4NQ@mail.gmail.com>
On Fri, Nov 21, 2014 at 11:33:43AM +0200, Arik Nemtsov wrote:
> On Thu, Nov 20, 2014 at 10:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >>
> >> Then it gets the global one, and it knows it via a wiphy attribute:
> >>
> >> (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) &&
> >> + (nla_put_flag(msg, NL80211_ATTR_WIPHY_SELF_MANAGED_REG)))
> >> + goto nla_put_failure;
> >>
> >> (we won't do this put_flag if it's global)
> >
> > You can still follow this on wpa_s for REGULATORY_WIPHY_SELF_MANAGED, and
> > the other type that uses wiphy->regd would still follow the global regdomain.
> > The other flag I'm looking for is more informational for userspace in particular
> > 'iw reg get' (for central and all devices) or 'iw reg get dev wlan0'.
>
> I'm not sure why another flag is needed for userspace.
wiphy->regd will be used for REGULATORY_WIPHY_SELF_MANAGED and also on
devices that regulatory_hint() is called. Even though users of regulatory_hint()
will still abide by an intersection its useful to display that device's
regulatory domain in userspace, for that you'd need to distinguish it from
REGULATORY_WIPHY_SELF_MANAGED so another flag is needed. Showing that
regulatory domain will be informational.
> If we have
> SELF_MANAGED, we'll return the per-wiphy one (if a wiphy_idx is given
> to us of course). For validation purposes, the global one is used in
> other cases. And for CUSTOM_REG, we'll return the global one (we don't
> have the per-wiphy information in cfg80211).
Atheros cards always use CUSTOM_REG first, then later if they determine
the card was programmed with an alpha2 regulatory_hint() is called and
the CUSTOM_REG flag cleared. Regardless if wiphy->regd is set it would
be useful to have that information available.
Luis
next prev parent reply other threads:[~2014-11-21 23:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-13 16:13 [PATCH v2 1/4] cfg80211: leave invalid channels on regdomain change Arik Nemtsov
2014-11-13 16:13 ` [PATCH v2 2/4] cfg80211: update missing fields in custom regulatory path Arik Nemtsov
2014-11-13 22:55 ` Luis R. Rodriguez
2014-11-16 11:01 ` Arik Nemtsov
2014-11-13 16:13 ` [PATCH v2 3/4] cfg80211: allow wiphy specific regdomain management Arik Nemtsov
2014-11-13 23:11 ` Luis R. Rodriguez
2014-11-16 11:06 ` Arik Nemtsov
2014-11-20 20:27 ` Luis R. Rodriguez
2014-11-21 9:17 ` Arik Nemtsov
2014-11-13 16:13 ` [PATCH v2 4/4] cfg80211: Allow usermode to query wiphy specific regd info Arik Nemtsov
2014-11-13 23:13 ` Luis R. Rodriguez
2014-11-16 11:06 ` Arik Nemtsov
2014-11-20 15:22 ` Johannes Berg
2014-11-20 16:47 ` Arik Nemtsov
2014-11-20 20:54 ` Luis R. Rodriguez
2014-11-21 9:33 ` Arik Nemtsov
2014-11-21 23:38 ` Luis R. Rodriguez [this message]
2014-11-13 22:45 ` [PATCH v2 1/4] cfg80211: leave invalid channels on regdomain change Luis R. Rodriguez
2014-11-16 11:00 ` Arik Nemtsov
2014-11-20 15:17 ` Johannes Berg
2014-11-20 20:35 ` Luis R. Rodriguez
2014-11-20 20:38 ` Johannes Berg
2014-11-20 20:56 ` Luis R. Rodriguez
2014-11-20 15:17 ` Johannes Berg
2014-11-20 20:38 ` Luis R. Rodriguez
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=20141121233823.GF25677@wotan.suse.de \
--to=mcgrof@suse.com \
--cc=arik@wizery.com \
--cc=johannes@sipsolutions.net \
--cc=jond@wizery.com \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).