linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: "Peer, Ilan" <ilan.peer@intel.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ArikX Nemtsov <arik@wizery.com>
Subject: Re: [PATCH v9 2/3] cfg80211: Add API to change the indoor regulatory setting
Date: Thu, 5 Mar 2015 23:44:29 +0100	[thread overview]
Message-ID: <20150305224429.GA25035@wotan.suse.de> (raw)
In-Reply-To: <CB3B3D4774441E42AA3EA0E1BA8230A04D02863A@HASMSX106.ger.corp.intel.com>

On Wed, Mar 04, 2015 at 10:37:35AM +0000, Peer, Ilan wrote:
> 
> > -----Original Message-----
> > From: Luis R. Rodriguez [mailto:mcgrof@suse.com]
> > Sent: Monday, March 02, 2015 23:23
> > To: Peer, Ilan
> > Cc: linux-wireless@vger.kernel.org; ArikX Nemtsov
> > Subject: Re: [PATCH v9 2/3] cfg80211: Add API to change the indoor
> > regulatory setting
> > 
> > On Sun, Mar 01, 2015 at 01:02:28AM -0500, Ilan Peer wrote:
> > > diff --git a/net/wireless/reg.c b/net/wireless/reg.c index
> > > c24c8bf..f88d512 100644
> > > --- a/net/wireless/reg.c
> > > +++ b/net/wireless/reg.c
> > > @@ -128,9 +128,12 @@ static int reg_num_devs_support_basehint;
> > >   * State variable indicating if the platform on which the devices
> > >   * are attached is operating in an indoor environment. The state variable
> > >   * is relevant for all registered devices.
> > > - * (protected by RTNL)
> > >   */
> > >  static bool reg_is_indoor;
> > > +static spinlock_t reg_indoor_lock;
> > > +
> > > +/* Used to track the userspace process controlling the indoor setting
> > > +*/ static u32 reg_is_indoor_portid;
> > >
> > >  static const struct ieee80211_regdomain *get_cfg80211_regdom(void)  {
> > > @@ -2288,15 +2291,52 @@ int regulatory_hint_user(const char *alpha2,
> > >  	return 0;
> > >  }
> > >
> > > -int regulatory_hint_indoor_user(void)
> > > +int regulatory_hint_indoor(bool is_indoor, u32 portid)
> > >  {
> > > +	spin_lock(&reg_indoor_lock);
> > > +
> > > +	/* Other user space processes cannot override the current owner */
> > > +	if (reg_is_indoor_portid && reg_is_indoor_portid != portid) {
> > > +		spin_unlock(&reg_indoor_lock);
> > > +		return -EPERM;
> > > +	}
> > 
> > I am not satisfied with this solution to conflict. I don't want to think about the
> > solution to this for you -- please address the conflicts with sensible solutions.
> > 
> 
> We could always allow the any user space process to set indoor=0, i.e.,
> indoor=1 is allowed iff all user space process agree on it.

That makes sense if for indoor we tend to have a more liberal
regulatory settings. Do we know this for sure? That is, are
we more restrictive outdoors? Does that vary by country?

> > > +
> > > +	if (reg_is_indoor == is_indoor) {
> > > +		spin_unlock(&reg_indoor_lock);
> > > +		return 0;
> > > +	}
> > 
> > For instance this is a solution to agreement, but yet the above only allows for
> > one wiphy to set this setting and limiting the wireless core. That's rather silly.
> > We've addressed bigger conflicts than this for regulatory -- I have confidence
> > you can address this well.
> 
> This should not really be wiphy specific.

Sorry I meant supplicant specific.

 Luis

  reply	other threads:[~2015-03-05 22:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-01  6:02 [PATCH v9 1/3] cfg80211: Simplify the handling of regulatory indoor setting Ilan Peer
2015-03-01  6:02 ` [PATCH v9 2/3] cfg80211: Add API to change the indoor regulatory setting Ilan Peer
2015-03-02 21:22   ` Luis R. Rodriguez
2015-03-04 10:37     ` Peer, Ilan
2015-03-05 22:44       ` Luis R. Rodriguez [this message]
2015-03-01  6:02 ` [PATCH v9 3/3] cfg80211: Schedule timeout for all CRDA calls Ilan Peer

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=20150305224429.GA25035@wotan.suse.de \
    --to=mcgrof@suse.com \
    --cc=arik@wizery.com \
    --cc=ilan.peer@intel.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).