diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-03-09 22:07:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-16 18:09:40 -0400 |
commit | 73d54c9e74c4d8ee8a41bc516f481f0f754eca32 (patch) | |
tree | ce190210e3a0cd00008b7aa88af6c1ebccee2193 /include/linux/nl80211.h | |
parent | 7db90f4a25bd4184f3d36dfa4f512f53b0448da7 (diff) |
cfg80211: add regulatory netlink multicast group
This allows us to send to userspace "regulatory" events.
For now we just send an event when we change regulatory domains.
We also notify userspace when devices are using their own custom
world roaming regulatory domains.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r-- | include/linux/nl80211.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index c0fd432b57dc..f33aa08dd9b3 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -150,6 +150,17 @@ | |||
150 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, | 150 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, |
151 | * partial scan results may be available | 151 | * partial scan results may be available |
152 | * | 152 | * |
153 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain | ||
154 | * has been changed and provides details of the request information | ||
155 | * that caused the change such as who initiated the regulatory request | ||
156 | * (%NL80211_ATTR_REG_INITIATOR), the wiphy_idx | ||
157 | * (%NL80211_ATTR_REG_ALPHA2) on which the request was made from if | ||
158 | * the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or | ||
159 | * %NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain | ||
160 | * set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is | ||
161 | * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on | ||
162 | * to (%NL80211_ATTR_REG_ALPHA2). | ||
163 | * | ||
153 | * @NL80211_CMD_MAX: highest used command number | 164 | * @NL80211_CMD_MAX: highest used command number |
154 | * @__NL80211_CMD_AFTER_LAST: internal use | 165 | * @__NL80211_CMD_AFTER_LAST: internal use |
155 | */ | 166 | */ |
@@ -204,6 +215,8 @@ enum nl80211_commands { | |||
204 | NL80211_CMD_NEW_SCAN_RESULTS, | 215 | NL80211_CMD_NEW_SCAN_RESULTS, |
205 | NL80211_CMD_SCAN_ABORTED, | 216 | NL80211_CMD_SCAN_ABORTED, |
206 | 217 | ||
218 | NL80211_CMD_REG_CHANGE, | ||
219 | |||
207 | /* add new commands above here */ | 220 | /* add new commands above here */ |
208 | 221 | ||
209 | /* used to define NL80211_CMD_MAX below */ | 222 | /* used to define NL80211_CMD_MAX below */ |
@@ -218,6 +231,8 @@ enum nl80211_commands { | |||
218 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS | 231 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS |
219 | #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE | 232 | #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE |
220 | 233 | ||
234 | #define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE | ||
235 | |||
221 | /** | 236 | /** |
222 | * enum nl80211_attrs - nl80211 netlink attributes | 237 | * enum nl80211_attrs - nl80211 netlink attributes |
223 | * | 238 | * |
@@ -329,6 +344,11 @@ enum nl80211_commands { | |||
329 | * messages carried the same generation number) | 344 | * messages carried the same generation number) |
330 | * @NL80211_ATTR_BSS: scan result BSS | 345 | * @NL80211_ATTR_BSS: scan result BSS |
331 | * | 346 | * |
347 | * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain | ||
348 | * currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_* | ||
349 | * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently | ||
350 | * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*) | ||
351 | * | ||
332 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 352 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
333 | * @__NL80211_ATTR_AFTER_LAST: internal use | 353 | * @__NL80211_ATTR_AFTER_LAST: internal use |
334 | */ | 354 | */ |
@@ -403,6 +423,9 @@ enum nl80211_attrs { | |||
403 | NL80211_ATTR_SCAN_GENERATION, | 423 | NL80211_ATTR_SCAN_GENERATION, |
404 | NL80211_ATTR_BSS, | 424 | NL80211_ATTR_BSS, |
405 | 425 | ||
426 | NL80211_ATTR_REG_INITIATOR, | ||
427 | NL80211_ATTR_REG_TYPE, | ||
428 | |||
406 | /* add attributes here, update the policy in nl80211.c */ | 429 | /* add attributes here, update the policy in nl80211.c */ |
407 | 430 | ||
408 | __NL80211_ATTR_AFTER_LAST, | 431 | __NL80211_ATTR_AFTER_LAST, |
@@ -420,6 +443,8 @@ enum nl80211_attrs { | |||
420 | #define NL80211_ATTR_WIPHY_CHANNEL_TYPE NL80211_ATTR_WIPHY_CHANNEL_TYPE | 443 | #define NL80211_ATTR_WIPHY_CHANNEL_TYPE NL80211_ATTR_WIPHY_CHANNEL_TYPE |
421 | #define NL80211_ATTR_MGMT_SUBTYPE NL80211_ATTR_MGMT_SUBTYPE | 444 | #define NL80211_ATTR_MGMT_SUBTYPE NL80211_ATTR_MGMT_SUBTYPE |
422 | #define NL80211_ATTR_IE NL80211_ATTR_IE | 445 | #define NL80211_ATTR_IE NL80211_ATTR_IE |
446 | #define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR | ||
447 | #define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE | ||
423 | 448 | ||
424 | #define NL80211_MAX_SUPP_RATES 32 | 449 | #define NL80211_MAX_SUPP_RATES 32 |
425 | #define NL80211_MAX_SUPP_REG_RULES 32 | 450 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -692,6 +717,29 @@ enum nl80211_reg_initiator { | |||
692 | }; | 717 | }; |
693 | 718 | ||
694 | /** | 719 | /** |
720 | * enum nl80211_reg_type - specifies the type of regulatory domain | ||
721 | * @NL80211_REGDOM_TYPE_COUNTRY: the regulatory domain set is one that pertains | ||
722 | * to a specific country. When this is set you can count on the | ||
723 | * ISO / IEC 3166 alpha2 country code being valid. | ||
724 | * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory | ||
725 | * domain. | ||
726 | * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom | ||
727 | * driver specific world regulatory domain. These do not apply system-wide | ||
728 | * and are only applicable to the individual devices which have requested | ||
729 | * them to be applied. | ||
730 | * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product | ||
731 | * of an intersection between two regulatory domains -- the previously | ||
732 | * set regulatory domain on the system and the last accepted regulatory | ||
733 | * domain request to be processed. | ||
734 | */ | ||
735 | enum nl80211_reg_type { | ||
736 | NL80211_REGDOM_TYPE_COUNTRY, | ||
737 | NL80211_REGDOM_TYPE_WORLD, | ||
738 | NL80211_REGDOM_TYPE_CUSTOM_WORLD, | ||
739 | NL80211_REGDOM_TYPE_INTERSECTION, | ||
740 | }; | ||
741 | |||
742 | /** | ||
695 | * enum nl80211_reg_rule_attr - regulatory rule attributes | 743 | * enum nl80211_reg_rule_attr - regulatory rule attributes |
696 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional | 744 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional |
697 | * considerations for a given frequency range. These are the | 745 | * considerations for a given frequency range. These are the |