On Mon, Dec 01, 2014 at 05:48:44PM +0200, Arik Nemtsov wrote: > If a wiphy-idx is specified, the kernel will return the wiphy specific > regdomain, if such exists. Otherwise return the global regdom. > > When no wiphy-idx is specified, return the global regdomain as well as > all wiphy-specific regulatory domains in the system, via a new nested > list of attributes. > > Add a new attribute for each wiphy-specific regdomain, for usermode to > identify it as such. > > Signed-off-by: Arik Nemtsov <arikx.nemtsov@xxxxxxxxx> > --- > include/uapi/linux/nl80211.h | 11 ++- > net/wireless/nl80211.c | 178 +++++++++++++++++++++++++++++++++++-------- > net/wireless/reg.c | 2 +- > net/wireless/reg.h | 1 + > 4 files changed, 157 insertions(+), 35 deletions(-) > > diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h > index b37bd5a..2b03274 100644 > --- a/include/uapi/linux/nl80211.h > +++ b/include/uapi/linux/nl80211.h > @@ -252,7 +252,9 @@ > * %NL80211_ATTR_IFINDEX. > * > * @NL80211_CMD_GET_REG: ask the wireless core to send us its currently set > - * regulatory domain. > + * regulatory domain. If %NL80211_ATTR_WIPHY is specified and the device > + * has a private regulatory domain, it will be returned. Otherwise, the > + * global regdomain will be returned. Its important we clarify here the meaning of what a private regdomain is and the differenct types there are. Since this is patch 1 and no self managed is yet added you can just describe that a driver that uses regulatory_hint() may have a regulatory domain hint first instantiated and used for it, this is the regdomain that is sent. Even if a regdomain was originally used the wiphy channel information will still be mended depending on further hints from the regulatory core to help with compliance. > @@ -1688,6 +1690,11 @@ enum nl80211_commands { > * > * @NL80211_ATTR_MAC_MASK: MAC address mask > * > + * @NL80211_ATTR_WIPHY_SELF_MANAGED_REG: flag attribute indicating this device > + * is self-managing its regulatory information and any regulatory domain > + * obtained from it is coming from the device's wiphy and not the global > + * cfg80211 regdomain. > + * > * @NUM_NL80211_ATTR: total number of nl80211_attrs available > * @NL80211_ATTR_MAX: highest attribute number currently defined > * @__NL80211_ATTR_AFTER_LAST: internal use > @@ -2045,6 +2052,8 @@ enum nl80211_attrs { > > NL80211_ATTR_MAC_MASK, > > + NL80211_ATTR_WIPHY_SELF_MANAGED_REG, > + This is unused in this patch... it is actually used on patch #3 so it seems this belongs there. 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