]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
cfg80211: fix allowing country IEs for WIPHY_FLAG_STRICT_REGULATORY
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 20 Oct 2010 17:18:54 +0000 (10:18 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 22:46:58 +0000 (14:46 -0800)
commit 749b527b21465fb079796c03ffb4302584dc31c1 upstream.

We should be enabling country IE hints for WIPHY_FLAG_STRICT_REGULATORY
even if we haven't yet recieved regulatory domain hint for the driver
if it needed one. Without this Country IEs are not passed on to drivers
that have set WIPHY_FLAG_STRICT_REGULATORY, today this is just all
Atheros chipset drivers: ath5k, ath9k, ar9170, carl9170.

This was part of the original design, however it was completely
overlooked...

Cc: Easwar Krishnan <easwar.krishnan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/net/cfg80211.h
net/wireless/reg.c

index 2fd06c60ffbba1b81af86303d46e5187f98e946d..a1662a52fb7d6e215728cd0d6ec0b423a5bd7fa4 100644 (file)
@@ -1201,13 +1201,14 @@ struct cfg80211_ops {
  *     initiator is %REGDOM_SET_BY_CORE).
  * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will
  *     ignore regulatory domain settings until it gets its own regulatory
- *     domain via its regulatory_hint(). After its gets its own regulatory
- *     domain it will only allow further regulatory domain settings to
- *     further enhance compliance. For example if channel 13 and 14 are
- *     disabled by this regulatory domain no user regulatory domain can
- *     enable these channels at a later time. This can be used for devices
- *     which do not have calibration information gauranteed for frequencies
- *     or settings outside of its regulatory domain.
+ *     domain via its regulatory_hint() unless the regulatory hint is
+ *     from a country IE. After its gets its own regulatory domain it will
+ *     only allow further regulatory domain settings to further enhance
+ *     compliance. For example if channel 13 and 14 are disabled by this
+ *     regulatory domain no user regulatory domain can enable these channels
+ *     at a later time. This can be used for devices which do not have
+ *     calibration information guaranteed for frequencies or settings
+ *     outside of its regulatory domain.
  * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure
  *     that passive scan flags and beaconing flags may not be lifted by
  *     cfg80211 due to regulatory beacon hints. For more information on beacon
index 21071487e7af1f96f5b28e06c8618a4a6c40f6ee..edccc093e71b7e330bd9aa2cebc65f7657fa45dd 100644 (file)
@@ -816,6 +816,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
         * desired regulatory domain set
         */
        if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd &&
+           initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
            !is_world_regdom(last_request->alpha2))
                return true;
        return false;