summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-11-12 14:22:02 -0800
committerJohn W. Linville <linville@tuxdriver.com>2008-11-25 16:41:26 -0500
commit3f2355cb9111ac04e7ae06a4d7044da2ae813863 (patch)
tree11f5594b7d48281a12a2116ad7af1d20d5947455 /include/net
parent88dc1c3f7f9058cd5ceae1e4b53453484c7b0364 (diff)
downloadlinux-3f2355cb9111ac04e7ae06a4d7044da2ae813863.tar.gz
linux-3f2355cb9111ac04e7ae06a4d7044da2ae813863.tar.bz2
linux-3f2355cb9111ac04e7ae06a4d7044da2ae813863.zip
cfg80211/mac80211: Add 802.11d support
This adds country IE parsing to mac80211 and enables its usage within the new regulatory infrastructure in cfg80211. We parse the country IEs only on management beacons for the BSSID you are associated to and disregard the IEs when the country and environment (indoor, outdoor, any) matches the already processed country IE. To avoid following misinformed or outdated APs we build and use a regulatory domain out of the intersection between what the AP provides us on the country IE and what CRDA is aware is allowed on the same country. A secondary device is allowed to follow only the same country IE as it make no sense for two devices on a system to be in two different countries. In the case the AP is using country IEs for an incorrect country the user may help compliance further by setting the regulatory domain before or after the IE is parsed and in that case another intersection will be performed. CONFIG_WIRELESS_OLD_REGULATORY is supported but requires CRDA present. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/wireless.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/wireless.h b/include/net/wireless.h
index 412351560b76..c85fa0ea5c51 100644
--- a/include/net/wireless.h
+++ b/include/net/wireless.h
@@ -373,4 +373,19 @@ ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
* for a regulatory domain structure for the respective country.
*/
extern void regulatory_hint(struct wiphy *wiphy, const char *alpha2);
+
+/**
+ * regulatory_hint_11d - hints a country IE as a regulatory domain
+ * @wiphy: the wireless device giving the hint (used only for reporting
+ * conflicts)
+ * @country_ie: pointer to the country IE
+ * @country_ie_len: length of the country IE
+ *
+ * We will intersect the rd with the what CRDA tells us should apply
+ * for the alpha2 this country IE belongs to, this prevents APs from
+ * sending us incorrect or outdated information against a country.
+ */
+extern void regulatory_hint_11d(struct wiphy *wiphy,
+ u8 *country_ie,
+ u8 country_ie_len);
#endif /* __NET_WIRELESS_H */