aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-01-11 13:39:36 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-14 05:32:44 -0500
commit0c0280bd0ba410326eecdaeb1b936696eda6381d (patch)
treed7d2795b3418db1c5b9ffa971c7beeaa2245b0fe /drivers
parent55b183ad8635589ea731a31653de79a2626491c4 (diff)
wireless: make the reg_notifier() void
The reg_notifier()'s return value need not be checked as it is only supposed to do post regulatory work and that should never fail. Any behaviour to regulatory that needs to be considered before cfg80211 does work to a driver should be specified by using the already existing flags, the reg_notifier() just does post processing should it find it needs to. Also make lbs_reg_notifier static. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> [move lbs_reg_notifier to not break compile] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c5
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c16
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_init.c8
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c9
-rw-r--r--drivers/net/wireless/ath/carl9170/main.c6
-rw-r--r--drivers/net/wireless/ath/regd.c18
-rw-r--r--drivers/net/wireless/ath/regd.h10
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/channel.c6
-rw-r--r--drivers/net/wireless/libertas/cfg.c33
-rw-r--r--drivers/net/wireless/libertas/cfg.h3
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c6
-rw-r--r--drivers/net/wireless/rtlwifi/regd.c20
-rw-r--r--drivers/net/wireless/rtlwifi/regd.h6
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c6
14 files changed, 64 insertions, 88 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 30ca0a60a64c..1d264c0f5a9b 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -240,13 +240,14 @@ static const struct ath_ops ath5k_common_ops = {
240* Driver Initialization * 240* Driver Initialization *
241\***********************/ 241\***********************/
242 242
243static int ath5k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) 243static void ath5k_reg_notifier(struct wiphy *wiphy,
244 struct regulatory_request *request)
244{ 245{
245 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); 246 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
246 struct ath5k_hw *ah = hw->priv; 247 struct ath5k_hw *ah = hw->priv;
247 struct ath_regulatory *regulatory = ath5k_hw_regulatory(ah); 248 struct ath_regulatory *regulatory = ath5k_hw_regulatory(ah);
248 249
249 return ath_reg_notifier_apply(wiphy, request, regulatory); 250 ath_reg_notifier_apply(wiphy, request, regulatory);
250} 251}
251 252
252/********************\ 253/********************\
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 5516a8ccc3c6..4225cca0f198 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3492,8 +3492,8 @@ void ath6kl_cfg80211_stop_all(struct ath6kl *ar)
3492 ath6kl_cfg80211_stop(vif); 3492 ath6kl_cfg80211_stop(vif);
3493} 3493}
3494 3494
3495static int ath6kl_cfg80211_reg_notify(struct wiphy *wiphy, 3495static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
3496 struct regulatory_request *request) 3496 struct regulatory_request *request)
3497{ 3497{
3498 struct ath6kl *ar = wiphy_priv(wiphy); 3498 struct ath6kl *ar = wiphy_priv(wiphy);
3499 u32 rates[IEEE80211_NUM_BANDS]; 3499 u32 rates[IEEE80211_NUM_BANDS];
@@ -3506,17 +3506,13 @@ static int ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
3506 request->processed ? " processed" : "", 3506 request->processed ? " processed" : "",
3507 request->initiator, request->user_reg_hint_type); 3507 request->initiator, request->user_reg_hint_type);
3508 3508
3509 /*
3510 * As firmware is not able intersect regdoms, we can only listen to
3511 * cellular hints.
3512 */
3513 if (request->user_reg_hint_type != NL80211_USER_REG_HINT_CELL_BASE) 3509 if (request->user_reg_hint_type != NL80211_USER_REG_HINT_CELL_BASE)
3514 return -EOPNOTSUPP; 3510 return;
3515 3511
3516 ret = ath6kl_wmi_set_regdomain_cmd(ar->wmi, request->alpha2); 3512 ret = ath6kl_wmi_set_regdomain_cmd(ar->wmi, request->alpha2);
3517 if (ret) { 3513 if (ret) {
3518 ath6kl_err("failed to set regdomain: %d\n", ret); 3514 ath6kl_err("failed to set regdomain: %d\n", ret);
3519 return ret; 3515 return;
3520 } 3516 }
3521 3517
3522 /* 3518 /*
@@ -3536,10 +3532,8 @@ static int ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
3536 if (ret) { 3532 if (ret) {
3537 ath6kl_err("failed to start scan for a regdomain change: %d\n", 3533 ath6kl_err("failed to start scan for a regdomain change: %d\n",
3538 ret); 3534 ret);
3539 return ret; 3535 return;
3540 } 3536 }
3541
3542 return 0;
3543} 3537}
3544 3538
3545static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif) 3539static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 05d5ba66cac3..e5d7958ab948 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -280,14 +280,14 @@ err:
280 return ret; 280 return ret;
281} 281}
282 282
283static int ath9k_reg_notifier(struct wiphy *wiphy, 283static void ath9k_reg_notifier(struct wiphy *wiphy,
284 struct regulatory_request *request) 284 struct regulatory_request *request)
285{ 285{
286 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); 286 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
287 struct ath9k_htc_priv *priv = hw->priv; 287 struct ath9k_htc_priv *priv = hw->priv;
288 288
289 return ath_reg_notifier_apply(wiphy, request, 289 ath_reg_notifier_apply(wiphy, request,
290 ath9k_hw_regulatory(priv->ah)); 290 ath9k_hw_regulatory(priv->ah));
291} 291}
292 292
293static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset) 293static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset)
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index f69ef5d48c7b..315d6593e18e 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -302,16 +302,15 @@ static void setup_ht_cap(struct ath_softc *sc,
302 ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_DEFINED; 302 ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_DEFINED;
303} 303}
304 304
305static int ath9k_reg_notifier(struct wiphy *wiphy, 305static void ath9k_reg_notifier(struct wiphy *wiphy,
306 struct regulatory_request *request) 306 struct regulatory_request *request)
307{ 307{
308 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); 308 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
309 struct ath_softc *sc = hw->priv; 309 struct ath_softc *sc = hw->priv;
310 struct ath_hw *ah = sc->sc_ah; 310 struct ath_hw *ah = sc->sc_ah;
311 struct ath_regulatory *reg = ath9k_hw_regulatory(ah); 311 struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
312 int ret;
313 312
314 ret = ath_reg_notifier_apply(wiphy, request, reg); 313 ath_reg_notifier_apply(wiphy, request, reg);
315 314
316 /* Set tx power */ 315 /* Set tx power */
317 if (ah->curchan) { 316 if (ah->curchan) {
@@ -321,8 +320,6 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
321 sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit; 320 sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit;
322 ath9k_ps_restore(sc); 321 ath9k_ps_restore(sc);
323 } 322 }
324
325 return ret;
326} 323}
327 324
328/* 325/*
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index 9d2051aeb782..aaa2699e5a8c 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -1918,13 +1918,13 @@ static int carl9170_parse_eeprom(struct ar9170 *ar)
1918 return 0; 1918 return 0;
1919} 1919}
1920 1920
1921static int carl9170_reg_notifier(struct wiphy *wiphy, 1921static void carl9170_reg_notifier(struct wiphy *wiphy,
1922 struct regulatory_request *request) 1922 struct regulatory_request *request)
1923{ 1923{
1924 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); 1924 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
1925 struct ar9170 *ar = hw->priv; 1925 struct ar9170 *ar = hw->priv;
1926 1926
1927 return ath_reg_notifier_apply(wiphy, request, &ar->common.regulatory); 1927 ath_reg_notifier_apply(wiphy, request, &ar->common.regulatory);
1928} 1928}
1929 1929
1930int carl9170_register(struct ar9170 *ar) 1930int carl9170_register(struct ar9170 *ar)
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index 7a6c79e1f819..ccc4c718f124 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -356,9 +356,9 @@ static u16 ath_regd_find_country_by_name(char *alpha2)
356 return -1; 356 return -1;
357} 357}
358 358
359int ath_reg_notifier_apply(struct wiphy *wiphy, 359void ath_reg_notifier_apply(struct wiphy *wiphy,
360 struct regulatory_request *request, 360 struct regulatory_request *request,
361 struct ath_regulatory *reg) 361 struct ath_regulatory *reg)
362{ 362{
363 struct ath_common *common = container_of(reg, struct ath_common, 363 struct ath_common *common = container_of(reg, struct ath_common,
364 regulatory); 364 regulatory);
@@ -373,7 +373,7 @@ int ath_reg_notifier_apply(struct wiphy *wiphy,
373 * any pending requests in the queue. 373 * any pending requests in the queue.
374 */ 374 */
375 if (!request) 375 if (!request)
376 return 0; 376 return;
377 377
378 switch (request->initiator) { 378 switch (request->initiator) {
379 case NL80211_REGDOM_SET_BY_CORE: 379 case NL80211_REGDOM_SET_BY_CORE:
@@ -409,8 +409,6 @@ int ath_reg_notifier_apply(struct wiphy *wiphy,
409 409
410 break; 410 break;
411 } 411 }
412
413 return 0;
414} 412}
415EXPORT_SYMBOL(ath_reg_notifier_apply); 413EXPORT_SYMBOL(ath_reg_notifier_apply);
416 414
@@ -500,8 +498,8 @@ ath_get_regpair(int regdmn)
500static int 498static int
501ath_regd_init_wiphy(struct ath_regulatory *reg, 499ath_regd_init_wiphy(struct ath_regulatory *reg,
502 struct wiphy *wiphy, 500 struct wiphy *wiphy,
503 int (*reg_notifier)(struct wiphy *wiphy, 501 void (*reg_notifier)(struct wiphy *wiphy,
504 struct regulatory_request *request)) 502 struct regulatory_request *request))
505{ 503{
506 const struct ieee80211_regdomain *regd; 504 const struct ieee80211_regdomain *regd;
507 505
@@ -621,8 +619,8 @@ static int __ath_regd_init(struct ath_regulatory *reg)
621int 619int
622ath_regd_init(struct ath_regulatory *reg, 620ath_regd_init(struct ath_regulatory *reg,
623 struct wiphy *wiphy, 621 struct wiphy *wiphy,
624 int (*reg_notifier)(struct wiphy *wiphy, 622 void (*reg_notifier)(struct wiphy *wiphy,
625 struct regulatory_request *request)) 623 struct regulatory_request *request))
626{ 624{
627 struct ath_common *common = container_of(reg, struct ath_common, 625 struct ath_common *common = container_of(reg, struct ath_common,
628 regulatory); 626 regulatory);
diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index 03a8268ccf21..37f53bd8fcb1 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -252,12 +252,12 @@ enum CountryCode {
252bool ath_is_world_regd(struct ath_regulatory *reg); 252bool ath_is_world_regd(struct ath_regulatory *reg);
253bool ath_is_49ghz_allowed(u16 redomain); 253bool ath_is_49ghz_allowed(u16 redomain);
254int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, 254int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy,
255 int (*reg_notifier)(struct wiphy *wiphy, 255 void (*reg_notifier)(struct wiphy *wiphy,
256 struct regulatory_request *request)); 256 struct regulatory_request *request));
257u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, 257u32 ath_regd_get_band_ctl(struct ath_regulatory *reg,
258 enum ieee80211_band band); 258 enum ieee80211_band band);
259int ath_reg_notifier_apply(struct wiphy *wiphy, 259void ath_reg_notifier_apply(struct wiphy *wiphy,
260 struct regulatory_request *request, 260 struct regulatory_request *request,
261 struct ath_regulatory *reg); 261 struct ath_regulatory *reg);
262 262
263#endif 263#endif
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
index 4eb3f0d52105..cdb62b8ccc79 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
@@ -702,8 +702,8 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy,
702 } 702 }
703} 703}
704 704
705static int brcms_reg_notifier(struct wiphy *wiphy, 705static void brcms_reg_notifier(struct wiphy *wiphy,
706 struct regulatory_request *request) 706 struct regulatory_request *request)
707{ 707{
708 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); 708 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
709 struct brcms_info *wl = hw->priv; 709 struct brcms_info *wl = hw->priv;
@@ -744,8 +744,6 @@ static int brcms_reg_notifier(struct wiphy *wiphy,
744 if (wlc->pub->_nbands > 1 || wlc->band->bandtype == BRCM_BAND_2G) 744 if (wlc->pub->_nbands > 1 || wlc->band->bandtype == BRCM_BAND_2G)
745 wlc_phy_chanspec_ch14_widefilter_set(wlc->band->pi, 745 wlc_phy_chanspec_ch14_widefilter_set(wlc->band->pi,
746 brcms_c_japan_ccode(request->alpha2)); 746 brcms_c_japan_ccode(request->alpha2));
747
748 return 0;
749} 747}
750 748
751void brcms_c_regd_init(struct brcms_c_info *wlc) 749void brcms_c_regd_init(struct brcms_c_info *wlc)
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index ec6d5d6b452e..230f8ebbe289 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -2132,6 +2132,21 @@ static void lbs_cfg_set_regulatory_hint(struct lbs_private *priv)
2132 lbs_deb_leave(LBS_DEB_CFG80211); 2132 lbs_deb_leave(LBS_DEB_CFG80211);
2133} 2133}
2134 2134
2135static void lbs_reg_notifier(struct wiphy *wiphy,
2136 struct regulatory_request *request)
2137{
2138 struct lbs_private *priv = wiphy_priv(wiphy);
2139
2140 lbs_deb_enter_args(LBS_DEB_CFG80211, "cfg80211 regulatory domain "
2141 "callback for domain %c%c\n", request->alpha2[0],
2142 request->alpha2[1]);
2143
2144 memcpy(priv->country_code, request->alpha2, sizeof(request->alpha2));
2145 if (lbs_iface_active(priv))
2146 lbs_set_11d_domain_info(priv);
2147
2148 lbs_deb_leave(LBS_DEB_CFG80211);
2149}
2135 2150
2136/* 2151/*
2137 * This function get's called after lbs_setup_firmware() determined the 2152 * This function get's called after lbs_setup_firmware() determined the
@@ -2184,24 +2199,6 @@ int lbs_cfg_register(struct lbs_private *priv)
2184 return ret; 2199 return ret;
2185} 2200}
2186 2201
2187int lbs_reg_notifier(struct wiphy *wiphy,
2188 struct regulatory_request *request)
2189{
2190 struct lbs_private *priv = wiphy_priv(wiphy);
2191 int ret = 0;
2192
2193 lbs_deb_enter_args(LBS_DEB_CFG80211, "cfg80211 regulatory domain "
2194 "callback for domain %c%c\n", request->alpha2[0],
2195 request->alpha2[1]);
2196
2197 memcpy(priv->country_code, request->alpha2, sizeof(request->alpha2));
2198 if (lbs_iface_active(priv))
2199 ret = lbs_set_11d_domain_info(priv);
2200
2201 lbs_deb_leave(LBS_DEB_CFG80211);
2202 return ret;
2203}
2204
2205void lbs_scan_deinit(struct lbs_private *priv) 2202void lbs_scan_deinit(struct lbs_private *priv)
2206{ 2203{
2207 lbs_deb_enter(LBS_DEB_CFG80211); 2204 lbs_deb_enter(LBS_DEB_CFG80211);
diff --git a/drivers/net/wireless/libertas/cfg.h b/drivers/net/wireless/libertas/cfg.h
index 558168ce634d..10995f59fe34 100644
--- a/drivers/net/wireless/libertas/cfg.h
+++ b/drivers/net/wireless/libertas/cfg.h
@@ -10,9 +10,6 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev);
10int lbs_cfg_register(struct lbs_private *priv); 10int lbs_cfg_register(struct lbs_private *priv);
11void lbs_cfg_free(struct lbs_private *priv); 11void lbs_cfg_free(struct lbs_private *priv);
12 12
13int lbs_reg_notifier(struct wiphy *wiphy,
14 struct regulatory_request *request);
15
16void lbs_send_disconnect_notification(struct lbs_private *priv); 13void lbs_send_disconnect_notification(struct lbs_private *priv);
17void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event); 14void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event);
18 15
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index a875499f8945..a838ddecd91a 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -519,8 +519,8 @@ static int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy)
519 * - Set by user 519 * - Set by user
520 * - Set bt Country IE 520 * - Set bt Country IE
521 */ 521 */
522static int mwifiex_reg_notifier(struct wiphy *wiphy, 522static void mwifiex_reg_notifier(struct wiphy *wiphy,
523 struct regulatory_request *request) 523 struct regulatory_request *request)
524{ 524{
525 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy); 525 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
526 526
@@ -540,8 +540,6 @@ static int mwifiex_reg_notifier(struct wiphy *wiphy,
540 break; 540 break;
541 } 541 }
542 mwifiex_send_domain_info_cmd_fw(wiphy); 542 mwifiex_send_domain_info_cmd_fw(wiphy);
543
544 return 0;
545} 543}
546 544
547/* 545/*
diff --git a/drivers/net/wireless/rtlwifi/regd.c b/drivers/net/wireless/rtlwifi/regd.c
index 7e3ead774fb9..d7d0d4948b01 100644
--- a/drivers/net/wireless/rtlwifi/regd.c
+++ b/drivers/net/wireless/rtlwifi/regd.c
@@ -298,9 +298,9 @@ static void _rtl_reg_apply_world_flags(struct wiphy *wiphy,
298 return; 298 return;
299} 299}
300 300
301static int _rtl_reg_notifier_apply(struct wiphy *wiphy, 301static void _rtl_reg_notifier_apply(struct wiphy *wiphy,
302 struct regulatory_request *request, 302 struct regulatory_request *request,
303 struct rtl_regulatory *reg) 303 struct rtl_regulatory *reg)
304{ 304{
305 /* We always apply this */ 305 /* We always apply this */
306 _rtl_reg_apply_radar_flags(wiphy); 306 _rtl_reg_apply_radar_flags(wiphy);
@@ -314,8 +314,6 @@ static int _rtl_reg_notifier_apply(struct wiphy *wiphy,
314 _rtl_reg_apply_world_flags(wiphy, request->initiator, reg); 314 _rtl_reg_apply_world_flags(wiphy, request->initiator, reg);
315 break; 315 break;
316 } 316 }
317
318 return 0;
319} 317}
320 318
321static const struct ieee80211_regdomain *_rtl_regdomain_select( 319static const struct ieee80211_regdomain *_rtl_regdomain_select(
@@ -348,9 +346,9 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select(
348 346
349static int _rtl_regd_init_wiphy(struct rtl_regulatory *reg, 347static int _rtl_regd_init_wiphy(struct rtl_regulatory *reg,
350 struct wiphy *wiphy, 348 struct wiphy *wiphy,
351 int (*reg_notifier) (struct wiphy *wiphy, 349 void (*reg_notifier) (struct wiphy *wiphy,
352 struct regulatory_request * 350 struct regulatory_request *
353 request)) 351 request))
354{ 352{
355 const struct ieee80211_regdomain *regd; 353 const struct ieee80211_regdomain *regd;
356 354
@@ -379,7 +377,7 @@ static struct country_code_to_enum_rd *_rtl_regd_find_country(u16 countrycode)
379} 377}
380 378
381int rtl_regd_init(struct ieee80211_hw *hw, 379int rtl_regd_init(struct ieee80211_hw *hw,
382 int (*reg_notifier) (struct wiphy *wiphy, 380 void (*reg_notifier) (struct wiphy *wiphy,
383 struct regulatory_request *request)) 381 struct regulatory_request *request))
384{ 382{
385 struct rtl_priv *rtlpriv = rtl_priv(hw); 383 struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -421,12 +419,12 @@ int rtl_regd_init(struct ieee80211_hw *hw,
421 return 0; 419 return 0;
422} 420}
423 421
424int rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) 422void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
425{ 423{
426 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); 424 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
427 struct rtl_priv *rtlpriv = rtl_priv(hw); 425 struct rtl_priv *rtlpriv = rtl_priv(hw);
428 426
429 RT_TRACE(rtlpriv, COMP_REGD, DBG_LOUD, "\n"); 427 RT_TRACE(rtlpriv, COMP_REGD, DBG_LOUD, "\n");
430 428
431 return _rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd); 429 _rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd);
432} 430}
diff --git a/drivers/net/wireless/rtlwifi/regd.h b/drivers/net/wireless/rtlwifi/regd.h
index 70ef2f418a44..4e1f4f00e6e9 100644
--- a/drivers/net/wireless/rtlwifi/regd.h
+++ b/drivers/net/wireless/rtlwifi/regd.h
@@ -55,7 +55,7 @@ enum country_code_type_t {
55}; 55};
56 56
57int rtl_regd_init(struct ieee80211_hw *hw, 57int rtl_regd_init(struct ieee80211_hw *hw,
58 int (*reg_notifier) (struct wiphy *wiphy, 58 void (*reg_notifier) (struct wiphy *wiphy,
59 struct regulatory_request *request)); 59 struct regulatory_request *request));
60int rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request); 60void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request);
61#endif 61#endif
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index d7de06359ae1..ce6e62a37e14 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -89,8 +89,8 @@ static int wl12xx_set_authorized(struct wl1271 *wl,
89 return 0; 89 return 0;
90} 90}
91 91
92static int wl1271_reg_notify(struct wiphy *wiphy, 92static void wl1271_reg_notify(struct wiphy *wiphy,
93 struct regulatory_request *request) 93 struct regulatory_request *request)
94{ 94{
95 struct ieee80211_supported_band *band; 95 struct ieee80211_supported_band *band;
96 struct ieee80211_channel *ch; 96 struct ieee80211_channel *ch;
@@ -107,8 +107,6 @@ static int wl1271_reg_notify(struct wiphy *wiphy,
107 IEEE80211_CHAN_PASSIVE_SCAN; 107 IEEE80211_CHAN_PASSIVE_SCAN;
108 108
109 } 109 }
110
111 return 0;
112} 110}
113 111
114static int wl1271_set_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif, 112static int wl1271_set_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif,