diff options
author | Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | 2011-12-08 13:29:26 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-13 15:31:04 -0500 |
commit | 4a38994f1c43351b4aaca01ae93bd574f5b5075e (patch) | |
tree | ce4120cddb527315be41ceeace4ad5568e4faf07 /net/wireless | |
parent | 687f545ecf5600cf43717f937d94d859e105574c (diff) |
cfg80211: notify core hints that helps to restore regd settings
Regulatory updates set by CORE are ignored for custom regulatory cards.
Let us notify the changes to the driver, as some drivers uses core hint
to restore its orig_* reg domain setting.
Cc: Paul Stewart <pstew@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/reg.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 70b171a52aea..2f5b0505c95d 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1163,9 +1163,21 @@ void regulatory_update(struct wiphy *wiphy, | |||
1163 | static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator) | 1163 | static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator) |
1164 | { | 1164 | { |
1165 | struct cfg80211_registered_device *rdev; | 1165 | struct cfg80211_registered_device *rdev; |
1166 | struct wiphy *wiphy; | ||
1166 | 1167 | ||
1167 | list_for_each_entry(rdev, &cfg80211_rdev_list, list) | 1168 | list_for_each_entry(rdev, &cfg80211_rdev_list, list) { |
1168 | wiphy_update_regulatory(&rdev->wiphy, initiator); | 1169 | wiphy = &rdev->wiphy; |
1170 | wiphy_update_regulatory(wiphy, initiator); | ||
1171 | /* | ||
1172 | * Regulatory updates set by CORE are ignored for custom | ||
1173 | * regulatory cards. Let us notify the changes to the driver, | ||
1174 | * as some drivers used this to restore its orig_* reg domain. | ||
1175 | */ | ||
1176 | if (initiator == NL80211_REGDOM_SET_BY_CORE && | ||
1177 | wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY && | ||
1178 | wiphy->reg_notifier) | ||
1179 | wiphy->reg_notifier(wiphy, last_request); | ||
1180 | } | ||
1169 | } | 1181 | } |
1170 | 1182 | ||
1171 | static void handle_channel_custom(struct wiphy *wiphy, | 1183 | static void handle_channel_custom(struct wiphy *wiphy, |