diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-17 18:04:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-17 18:04:31 -0400 |
commit | af4330631cd48987755f1a8d324dc318f60cf16b (patch) | |
tree | 3c9233e81b450921326da13a7f8abacb58ab1f5e /include | |
parent | 2d6a5e9500103680464a723a4564961675652680 (diff) | |
parent | 808ff697b357cee54e214efd27921a9ec6461a94 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl80211.h | 67 | ||||
-rw-r--r-- | include/net/cfg80211.h | 27 |
2 files changed, 70 insertions, 24 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index f6e56370ea65..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 |
@@ -673,6 +698,48 @@ enum nl80211_bitrate_attr { | |||
673 | }; | 698 | }; |
674 | 699 | ||
675 | /** | 700 | /** |
701 | * enum nl80211_initiator - Indicates the initiator of a reg domain request | ||
702 | * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world | ||
703 | * regulatory domain. | ||
704 | * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the | ||
705 | * regulatory domain. | ||
706 | * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the | ||
707 | * wireless core it thinks its knows the regulatory domain we should be in. | ||
708 | * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an | ||
709 | * 802.11 country information element with regulatory information it | ||
710 | * thinks we should consider. | ||
711 | */ | ||
712 | enum nl80211_reg_initiator { | ||
713 | NL80211_REGDOM_SET_BY_CORE, | ||
714 | NL80211_REGDOM_SET_BY_USER, | ||
715 | NL80211_REGDOM_SET_BY_DRIVER, | ||
716 | NL80211_REGDOM_SET_BY_COUNTRY_IE, | ||
717 | }; | ||
718 | |||
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 | /** | ||
676 | * enum nl80211_reg_rule_attr - regulatory rule attributes | 743 | * enum nl80211_reg_rule_attr - regulatory rule attributes |
677 | * @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 |
678 | * considerations for a given frequency range. These are the | 745 | * considerations for a given frequency range. These are the |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 75fa556728ce..50f3fd9ff524 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -349,30 +349,9 @@ struct bss_parameters { | |||
349 | }; | 349 | }; |
350 | 350 | ||
351 | /** | 351 | /** |
352 | * enum reg_set_by - Indicates who is trying to set the regulatory domain | ||
353 | * @REGDOM_SET_BY_INIT: regulatory domain was set by initialization. We will be | ||
354 | * using a static world regulatory domain by default. | ||
355 | * @REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world regulatory domain. | ||
356 | * @REGDOM_SET_BY_USER: User asked the wireless core to set the | ||
357 | * regulatory domain. | ||
358 | * @REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the wireless core | ||
359 | * it thinks its knows the regulatory domain we should be in. | ||
360 | * @REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an 802.11 country | ||
361 | * information element with regulatory information it thinks we | ||
362 | * should consider. | ||
363 | */ | ||
364 | enum reg_set_by { | ||
365 | REGDOM_SET_BY_INIT, | ||
366 | REGDOM_SET_BY_CORE, | ||
367 | REGDOM_SET_BY_USER, | ||
368 | REGDOM_SET_BY_DRIVER, | ||
369 | REGDOM_SET_BY_COUNTRY_IE, | ||
370 | }; | ||
371 | |||
372 | /** | ||
373 | * enum environment_cap - Environment parsed from country IE | 352 | * enum environment_cap - Environment parsed from country IE |
374 | * @ENVIRON_ANY: indicates country IE applies to both indoor and | 353 | * @ENVIRON_ANY: indicates country IE applies to both indoor and |
375 | * outdoor operation. | 354 | * outdoor operation. |
376 | * @ENVIRON_INDOOR: indicates country IE applies only to indoor operation | 355 | * @ENVIRON_INDOOR: indicates country IE applies only to indoor operation |
377 | * @ENVIRON_OUTDOOR: indicates country IE applies only to outdoor operation | 356 | * @ENVIRON_OUTDOOR: indicates country IE applies only to outdoor operation |
378 | */ | 357 | */ |
@@ -391,7 +370,7 @@ enum environment_cap { | |||
391 | * and potentially inform users of which devices specifically | 370 | * and potentially inform users of which devices specifically |
392 | * cased the conflicts. | 371 | * cased the conflicts. |
393 | * @initiator: indicates who sent this request, could be any of | 372 | * @initiator: indicates who sent this request, could be any of |
394 | * of those set in reg_set_by, %REGDOM_SET_BY_* | 373 | * of those set in nl80211_reg_initiator (%NL80211_REGDOM_SET_BY_*) |
395 | * @alpha2: the ISO / IEC 3166 alpha2 country code of the requested | 374 | * @alpha2: the ISO / IEC 3166 alpha2 country code of the requested |
396 | * regulatory domain. We have a few special codes: | 375 | * regulatory domain. We have a few special codes: |
397 | * 00 - World regulatory domain | 376 | * 00 - World regulatory domain |
@@ -408,7 +387,7 @@ enum environment_cap { | |||
408 | */ | 387 | */ |
409 | struct regulatory_request { | 388 | struct regulatory_request { |
410 | int wiphy_idx; | 389 | int wiphy_idx; |
411 | enum reg_set_by initiator; | 390 | enum nl80211_reg_initiator initiator; |
412 | char alpha2[2]; | 391 | char alpha2[2]; |
413 | bool intersect; | 392 | bool intersect; |
414 | u32 country_ie_checksum; | 393 | u32 country_ie_checksum; |