]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.36.4/cfg80211-fix-allowing-country-ies-for-wiphy_flag_strict_regulatory.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.4 / cfg80211-fix-allowing-country-ies-for-wiphy_flag_strict_regulatory.patch
1 From 749b527b21465fb079796c03ffb4302584dc31c1 Mon Sep 17 00:00:00 2001
2 From: Luis R. Rodriguez <lrodriguez@atheros.com>
3 Date: Wed, 20 Oct 2010 10:18:54 -0700
4 Subject: cfg80211: fix allowing country IEs for WIPHY_FLAG_STRICT_REGULATORY
5
6 From: Luis R. Rodriguez <lrodriguez@atheros.com>
7
8 commit 749b527b21465fb079796c03ffb4302584dc31c1 upstream.
9
10 We should be enabling country IE hints for WIPHY_FLAG_STRICT_REGULATORY
11 even if we haven't yet recieved regulatory domain hint for the driver
12 if it needed one. Without this Country IEs are not passed on to drivers
13 that have set WIPHY_FLAG_STRICT_REGULATORY, today this is just all
14 Atheros chipset drivers: ath5k, ath9k, ar9170, carl9170.
15
16 This was part of the original design, however it was completely
17 overlooked...
18
19 Cc: Easwar Krishnan <easwar.krishnan@atheros.com>
20 Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
21 Signed-off-by: John W. Linville <linville@tuxdriver.com>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23
24 ---
25 include/net/cfg80211.h | 15 ++++++++-------
26 net/wireless/reg.c | 1 +
27 2 files changed, 9 insertions(+), 7 deletions(-)
28
29 --- a/include/net/cfg80211.h
30 +++ b/include/net/cfg80211.h
31 @@ -1201,13 +1201,14 @@ struct cfg80211_ops {
32 * initiator is %REGDOM_SET_BY_CORE).
33 * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will
34 * ignore regulatory domain settings until it gets its own regulatory
35 - * domain via its regulatory_hint(). After its gets its own regulatory
36 - * domain it will only allow further regulatory domain settings to
37 - * further enhance compliance. For example if channel 13 and 14 are
38 - * disabled by this regulatory domain no user regulatory domain can
39 - * enable these channels at a later time. This can be used for devices
40 - * which do not have calibration information gauranteed for frequencies
41 - * or settings outside of its regulatory domain.
42 + * domain via its regulatory_hint() unless the regulatory hint is
43 + * from a country IE. After its gets its own regulatory domain it will
44 + * only allow further regulatory domain settings to further enhance
45 + * compliance. For example if channel 13 and 14 are disabled by this
46 + * regulatory domain no user regulatory domain can enable these channels
47 + * at a later time. This can be used for devices which do not have
48 + * calibration information guaranteed for frequencies or settings
49 + * outside of its regulatory domain.
50 * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure
51 * that passive scan flags and beaconing flags may not be lifted by
52 * cfg80211 due to regulatory beacon hints. For more information on beacon
53 --- a/net/wireless/reg.c
54 +++ b/net/wireless/reg.c
55 @@ -816,6 +816,7 @@ static bool ignore_reg_update(struct wip
56 * desired regulatory domain set
57 */
58 if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd &&
59 + initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
60 !is_world_regdom(last_request->alpha2))
61 return true;
62 return false;