diff options
| author | Arik Nemtsov <arik@wizery.com> | 2014-12-15 12:26:01 -0500 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2014-12-17 05:49:55 -0500 |
| commit | 1bdd716cbccabc8127fbbaaa663c3090302ef78b (patch) | |
| tree | 6640c2203455f00eae2599976c20d8cf833dd289 /include/uapi/linux | |
| parent | b0d7aa59592b4270531de5ce65dcf18338a2d98c (diff) | |
cfg80211: return private regdom for self-managed devices
If a device has self-managed regulatory, insist on returning the wiphy
specific regdomain if a wiphy-idx is specified. The global regdomain is
meaningless for such devices.
Also add an attribute for self-managed devices, so usermode can
distinguish them as such.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/nl80211.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index fb58e654f523..b3ada0b3a276 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -261,6 +261,9 @@ | |||
| 261 | * the regulatory core to help with compliance. A dump version of this API | 261 | * the regulatory core to help with compliance. A dump version of this API |
| 262 | * is now available which will returns the global regdomain as well as | 262 | * is now available which will returns the global regdomain as well as |
| 263 | * all private regdomains of present wiphys (for those that have it). | 263 | * all private regdomains of present wiphys (for those that have it). |
| 264 | * If a wiphy is self-managed (%NL80211_ATTR_WIPHY_SELF_MANAGED_REG), then | ||
| 265 | * its private regdomain is the only valid one for it. The regulatory | ||
| 266 | * core is not used to help with compliance in this case. | ||
| 264 | * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command | 267 | * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command |
| 265 | * after being queried by the kernel. CRDA replies by sending a regulatory | 268 | * after being queried by the kernel. CRDA replies by sending a regulatory |
| 266 | * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our | 269 | * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our |
| @@ -1702,6 +1705,11 @@ enum nl80211_commands { | |||
| 1702 | * | 1705 | * |
| 1703 | * @NL80211_ATTR_MAC_MASK: MAC address mask | 1706 | * @NL80211_ATTR_MAC_MASK: MAC address mask |
| 1704 | * | 1707 | * |
| 1708 | * @NL80211_ATTR_WIPHY_SELF_MANAGED_REG: flag attribute indicating this device | ||
| 1709 | * is self-managing its regulatory information and any regulatory domain | ||
| 1710 | * obtained from it is coming from the device's wiphy and not the global | ||
| 1711 | * cfg80211 regdomain. | ||
| 1712 | * | ||
| 1705 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 1713 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 1706 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1714 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1707 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1715 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -2059,6 +2067,8 @@ enum nl80211_attrs { | |||
| 2059 | 2067 | ||
| 2060 | NL80211_ATTR_MAC_MASK, | 2068 | NL80211_ATTR_MAC_MASK, |
| 2061 | 2069 | ||
| 2070 | NL80211_ATTR_WIPHY_SELF_MANAGED_REG, | ||
| 2071 | |||
| 2062 | /* add attributes here, update the policy in nl80211.c */ | 2072 | /* add attributes here, update the policy in nl80211.c */ |
| 2063 | 2073 | ||
| 2064 | __NL80211_ATTR_AFTER_LAST, | 2074 | __NL80211_ATTR_AFTER_LAST, |
