diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-11-05 12:18:00 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 14:49:45 -0500 |
commit | 222ea5819901ed174db4df2e26aa5e982f857845 (patch) | |
tree | 1552374c866b454e657ca9978b4ac994e86966dc /include | |
parent | fe7c3a1f20a419d86d3f90316d8efc2d04f3f0ed (diff) |
cfg80211: force WIPHY_FLAG_CUSTOM_REGULATORY on wiphy_apply_custom_regulatory()
wiphy_apply_custom_regulatory() implies WIPHY_FLAG_CUSTOM_REGULATORY
but we never enforced it, do that now and warn if the driver
didn't set it. All drivers should be following this today already.
Having WIPHY_FLAG_CUSTOM_REGULATORY does not however mean you will
use wiphy_apply_custom_regulatory() though, you may have your own
_orig value set up tools / helpers. The intel drivers are examples
of this type of driver.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/cfg80211.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index c1b887413234..b7a825ecff56 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -2441,7 +2441,9 @@ struct cfg80211_ops { | |||
2441 | * has its own custom regulatory domain and cannot identify the | 2441 | * has its own custom regulatory domain and cannot identify the |
2442 | * ISO / IEC 3166 alpha2 it belongs to. When this is enabled | 2442 | * ISO / IEC 3166 alpha2 it belongs to. When this is enabled |
2443 | * we will disregard the first regulatory hint (when the | 2443 | * we will disregard the first regulatory hint (when the |
2444 | * initiator is %REGDOM_SET_BY_CORE). | 2444 | * initiator is %REGDOM_SET_BY_CORE). Drivers that use |
2445 | * wiphy_apply_custom_regulatory() should have this flag set | ||
2446 | * or the regulatory core will set it for wiphy. | ||
2445 | * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will | 2447 | * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will |
2446 | * ignore regulatory domain settings until it gets its own regulatory | 2448 | * ignore regulatory domain settings until it gets its own regulatory |
2447 | * domain via its regulatory_hint() unless the regulatory hint is | 2449 | * domain via its regulatory_hint() unless the regulatory hint is |
@@ -3471,6 +3473,9 @@ int regulatory_hint(struct wiphy *wiphy, const char *alpha2); | |||
3471 | * custom regulatory domain will be trusted completely and as such previous | 3473 | * custom regulatory domain will be trusted completely and as such previous |
3472 | * default channel settings will be disregarded. If no rule is found for a | 3474 | * default channel settings will be disregarded. If no rule is found for a |
3473 | * channel on the regulatory domain the channel will be disabled. | 3475 | * channel on the regulatory domain the channel will be disabled. |
3476 | * Drivers using this for a wiphy should also set the wiphy flag | ||
3477 | * WIPHY_FLAG_CUSTOM_REGULATORY or cfg80211 will set it for the wiphy | ||
3478 | * that called this helper. | ||
3474 | */ | 3479 | */ |
3475 | void wiphy_apply_custom_regulatory(struct wiphy *wiphy, | 3480 | void wiphy_apply_custom_regulatory(struct wiphy *wiphy, |
3476 | const struct ieee80211_regdomain *regd); | 3481 | const struct ieee80211_regdomain *regd); |