diff options
Diffstat (limited to 'drivers/net/wireless/ath9k/regd.c')
-rw-r--r-- | drivers/net/wireless/ath9k/regd.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath9k/regd.c b/drivers/net/wireless/ath9k/regd.c index ff0afc02f3ce..b8f9b6d6bec4 100644 --- a/drivers/net/wireless/ath9k/regd.c +++ b/drivers/net/wireless/ath9k/regd.c | |||
@@ -168,8 +168,9 @@ static bool ath9k_is_radar_freq(u16 center_freq) | |||
168 | * received a beacon on a channel we can enable active scan and | 168 | * received a beacon on a channel we can enable active scan and |
169 | * adhoc (or beaconing). | 169 | * adhoc (or beaconing). |
170 | */ | 170 | */ |
171 | static void ath9k_reg_apply_beaconing_flags(struct wiphy *wiphy, | 171 | static void ath9k_reg_apply_beaconing_flags( |
172 | enum reg_set_by setby) | 172 | struct wiphy *wiphy, |
173 | enum nl80211_reg_initiator initiator) | ||
173 | { | 174 | { |
174 | enum ieee80211_band band; | 175 | enum ieee80211_band band; |
175 | struct ieee80211_supported_band *sband; | 176 | struct ieee80211_supported_band *sband; |
@@ -194,7 +195,7 @@ static void ath9k_reg_apply_beaconing_flags(struct wiphy *wiphy, | |||
194 | (ch->flags & IEEE80211_CHAN_RADAR)) | 195 | (ch->flags & IEEE80211_CHAN_RADAR)) |
195 | continue; | 196 | continue; |
196 | 197 | ||
197 | if (setby == REGDOM_SET_BY_COUNTRY_IE) { | 198 | if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) { |
198 | r = freq_reg_info(wiphy, ch->center_freq, | 199 | r = freq_reg_info(wiphy, ch->center_freq, |
199 | &bandwidth, ®_rule); | 200 | &bandwidth, ®_rule); |
200 | if (r) | 201 | if (r) |
@@ -226,8 +227,9 @@ static void ath9k_reg_apply_beaconing_flags(struct wiphy *wiphy, | |||
226 | } | 227 | } |
227 | 228 | ||
228 | /* Allows active scan scan on Ch 12 and 13 */ | 229 | /* Allows active scan scan on Ch 12 and 13 */ |
229 | static void ath9k_reg_apply_active_scan_flags(struct wiphy *wiphy, | 230 | static void ath9k_reg_apply_active_scan_flags( |
230 | enum reg_set_by setby) | 231 | struct wiphy *wiphy, |
232 | enum nl80211_reg_initiator initiator) | ||
231 | { | 233 | { |
232 | struct ieee80211_supported_band *sband; | 234 | struct ieee80211_supported_band *sband; |
233 | struct ieee80211_channel *ch; | 235 | struct ieee80211_channel *ch; |
@@ -241,7 +243,7 @@ static void ath9k_reg_apply_active_scan_flags(struct wiphy *wiphy, | |||
241 | * If no country IE has been received always enable active scan | 243 | * If no country IE has been received always enable active scan |
242 | * on these channels. This is only done for specific regulatory SKUs | 244 | * on these channels. This is only done for specific regulatory SKUs |
243 | */ | 245 | */ |
244 | if (setby != REGDOM_SET_BY_COUNTRY_IE) { | 246 | if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) { |
245 | ch = &sband->channels[11]; /* CH 12 */ | 247 | ch = &sband->channels[11]; /* CH 12 */ |
246 | if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) | 248 | if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) |
247 | ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; | 249 | ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; |
@@ -308,7 +310,8 @@ void ath9k_reg_apply_radar_flags(struct wiphy *wiphy) | |||
308 | } | 310 | } |
309 | } | 311 | } |
310 | 312 | ||
311 | void ath9k_reg_apply_world_flags(struct wiphy *wiphy, enum reg_set_by setby) | 313 | void ath9k_reg_apply_world_flags(struct wiphy *wiphy, |
314 | enum nl80211_reg_initiator initiator) | ||
312 | { | 315 | { |
313 | struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); | 316 | struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); |
314 | struct ath_wiphy *aphy = hw->priv; | 317 | struct ath_wiphy *aphy = hw->priv; |
@@ -320,11 +323,11 @@ void ath9k_reg_apply_world_flags(struct wiphy *wiphy, enum reg_set_by setby) | |||
320 | case 0x63: | 323 | case 0x63: |
321 | case 0x66: | 324 | case 0x66: |
322 | case 0x67: | 325 | case 0x67: |
323 | ath9k_reg_apply_beaconing_flags(wiphy, setby); | 326 | ath9k_reg_apply_beaconing_flags(wiphy, initiator); |
324 | break; | 327 | break; |
325 | case 0x68: | 328 | case 0x68: |
326 | ath9k_reg_apply_beaconing_flags(wiphy, setby); | 329 | ath9k_reg_apply_beaconing_flags(wiphy, initiator); |
327 | ath9k_reg_apply_active_scan_flags(wiphy, setby); | 330 | ath9k_reg_apply_active_scan_flags(wiphy, initiator); |
328 | break; | 331 | break; |
329 | } | 332 | } |
330 | return; | 333 | return; |
@@ -340,11 +343,11 @@ int ath9k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) | |||
340 | ath9k_reg_apply_radar_flags(wiphy); | 343 | ath9k_reg_apply_radar_flags(wiphy); |
341 | 344 | ||
342 | switch (request->initiator) { | 345 | switch (request->initiator) { |
343 | case REGDOM_SET_BY_DRIVER: | 346 | case NL80211_REGDOM_SET_BY_DRIVER: |
344 | case REGDOM_SET_BY_CORE: | 347 | case NL80211_REGDOM_SET_BY_CORE: |
345 | case REGDOM_SET_BY_USER: | 348 | case NL80211_REGDOM_SET_BY_USER: |
346 | break; | 349 | break; |
347 | case REGDOM_SET_BY_COUNTRY_IE: | 350 | case NL80211_REGDOM_SET_BY_COUNTRY_IE: |
348 | if (ath9k_is_world_regd(sc->sc_ah)) | 351 | if (ath9k_is_world_regd(sc->sc_ah)) |
349 | ath9k_reg_apply_world_flags(wiphy, request->initiator); | 352 | ath9k_reg_apply_world_flags(wiphy, request->initiator); |
350 | break; | 353 | break; |