aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nl80211.h
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@qca.qualcomm.com>2012-07-12 14:49:18 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-17 06:16:39 -0400
commit57b5ce072e7361218a8e2ea1d62960cbb71d9cff (patch)
treec00265b8f2123f860978d293fa122427ea2139f8 /include/linux/nl80211.h
parentb594bab9021f5225a24bcb69d7f7b7272419adb2 (diff)
cfg80211: add cellular base station regulatory hint support
Cellular base stations can provide hints to cfg80211 about where they think we are. This can be done for example on a cell phone. To enable these hints we simply allow them through as user regulatory hints but we allow userspace to clasify the hint as either coming directly from the user or coming from a cellular base station. This option is only available when you enable CONFIG_CFG80211_CERTIFICATION_ONUS. The base station hints themselves will not be processed by the core unless at least one device on the system supports this feature. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r--include/linux/nl80211.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index d6cfacc3ce4d..2f3878806403 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1245,6 +1245,12 @@ enum nl80211_commands {
1245 * @NL80211_ATTR_BG_SCAN_PERIOD: Background scan period in seconds 1245 * @NL80211_ATTR_BG_SCAN_PERIOD: Background scan period in seconds
1246 * or 0 to disable background scan. 1246 * or 0 to disable background scan.
1247 * 1247 *
1248 * @NL80211_ATTR_USER_REG_HINT_TYPE: type of regulatory hint passed from
1249 * userspace. If unset it is assumed the hint comes directly from
1250 * a user. If set code could specify exactly what type of source
1251 * was used to provide the hint. For the different types of
1252 * allowed user regulatory hints see nl80211_user_reg_hint_type.
1253 *
1248 * @NL80211_ATTR_MAX: highest attribute number currently defined 1254 * @NL80211_ATTR_MAX: highest attribute number currently defined
1249 * @__NL80211_ATTR_AFTER_LAST: internal use 1255 * @__NL80211_ATTR_AFTER_LAST: internal use
1250 */ 1256 */
@@ -1498,6 +1504,8 @@ enum nl80211_attrs {
1498 1504
1499 NL80211_ATTR_WDEV, 1505 NL80211_ATTR_WDEV,
1500 1506
1507 NL80211_ATTR_USER_REG_HINT_TYPE,
1508
1501 /* add attributes here, update the policy in nl80211.c */ 1509 /* add attributes here, update the policy in nl80211.c */
1502 1510
1503 __NL80211_ATTR_AFTER_LAST, 1511 __NL80211_ATTR_AFTER_LAST,
@@ -2061,6 +2069,26 @@ enum nl80211_dfs_regions {
2061}; 2069};
2062 2070
2063/** 2071/**
2072 * enum nl80211_user_reg_hint_type - type of user regulatory hint
2073 *
2074 * @NL80211_USER_REG_HINT_USER: a user sent the hint. This is always
2075 * assumed if the attribute is not set.
2076 * @NL80211_USER_REG_HINT_CELL_BASE: the hint comes from a cellular
2077 * base station. Device drivers that have been tested to work
2078 * properly to support this type of hint can enable these hints
2079 * by setting the NL80211_FEATURE_CELL_BASE_REG_HINTS feature
2080 * capability on the struct wiphy. The wireless core will
2081 * ignore all cell base station hints until at least one device
2082 * present has been registered with the wireless core that
2083 * has listed NL80211_FEATURE_CELL_BASE_REG_HINTS as a
2084 * supported feature.
2085 */
2086enum nl80211_user_reg_hint_type {
2087 NL80211_USER_REG_HINT_USER = 0,
2088 NL80211_USER_REG_HINT_CELL_BASE = 1,
2089};
2090
2091/**
2064 * enum nl80211_survey_info - survey information 2092 * enum nl80211_survey_info - survey information
2065 * 2093 *
2066 * These attribute types are used with %NL80211_ATTR_SURVEY_INFO 2094 * These attribute types are used with %NL80211_ATTR_SURVEY_INFO
@@ -2963,11 +2991,15 @@ enum nl80211_ap_sme_features {
2963 * @NL80211_FEATURE_HT_IBSS: This driver supports IBSS with HT datarates. 2991 * @NL80211_FEATURE_HT_IBSS: This driver supports IBSS with HT datarates.
2964 * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up 2992 * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up
2965 * the connected inactive stations in AP mode. 2993 * the connected inactive stations in AP mode.
2994 * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested
2995 * to work properly to suppport receiving regulatory hints from
2996 * cellular base stations.
2966 */ 2997 */
2967enum nl80211_feature_flags { 2998enum nl80211_feature_flags {
2968 NL80211_FEATURE_SK_TX_STATUS = 1 << 0, 2999 NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
2969 NL80211_FEATURE_HT_IBSS = 1 << 1, 3000 NL80211_FEATURE_HT_IBSS = 1 << 1,
2970 NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, 3001 NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2,
3002 NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3,
2971}; 3003};
2972 3004
2973/** 3005/**