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(®_indoor_lock); > + > + /* Other user space processes cannot override the current owner */ > + if (reg_is_indoor_portid && reg_is_indoor_portid != portid) { > + spin_unlock(®_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. > + > + if (reg_is_indoor == is_indoor) { > + spin_unlock(®_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. Luis -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html