Skip to content

Commit

Permalink
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/jberg/mac80211-next
  • Loading branch information
John W. Linville committed Jan 22, 2013
2 parents aa3c90b + 5a32aff commit 066433a
Show file tree
Hide file tree
Showing 32 changed files with 583 additions and 274 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,14 @@ static const struct ath_ops ath5k_common_ops = {
* Driver Initialization *
\***********************/

static int ath5k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
static void ath5k_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct ath5k_hw *ah = hw->priv;
struct ath_regulatory *regulatory = ath5k_hw_regulatory(ah);

return ath_reg_notifier_apply(wiphy, request, regulatory);
ath_reg_notifier_apply(wiphy, request, regulatory);
}

/********************\
Expand Down
16 changes: 5 additions & 11 deletions drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -3492,8 +3492,8 @@ void ath6kl_cfg80211_stop_all(struct ath6kl *ar)
ath6kl_cfg80211_stop(vif);
}

static int ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
struct regulatory_request *request)
static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ath6kl *ar = wiphy_priv(wiphy);
u32 rates[IEEE80211_NUM_BANDS];
Expand All @@ -3506,17 +3506,13 @@ static int ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
request->processed ? " processed" : "",
request->initiator, request->user_reg_hint_type);

/*
* As firmware is not able intersect regdoms, we can only listen to
* cellular hints.
*/
if (request->user_reg_hint_type != NL80211_USER_REG_HINT_CELL_BASE)
return -EOPNOTSUPP;
return;

ret = ath6kl_wmi_set_regdomain_cmd(ar->wmi, request->alpha2);
if (ret) {
ath6kl_err("failed to set regdomain: %d\n", ret);
return ret;
return;
}

/*
Expand All @@ -3536,10 +3532,8 @@ static int ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
if (ret) {
ath6kl_err("failed to start scan for a regdomain change: %d\n",
ret);
return ret;
return;
}

return 0;
}

static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif)
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/ath/ath9k/htc_drv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid,
return ret;
}

static int ath9k_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
static void ath9k_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct ath9k_htc_priv *priv = hw->priv;

return ath_reg_notifier_apply(wiphy, request,
ath9k_hw_regulatory(priv->ah));
ath_reg_notifier_apply(wiphy, request,
ath9k_hw_regulatory(priv->ah));
}

static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset)
Expand Down
9 changes: 3 additions & 6 deletions drivers/net/wireless/ath/ath9k/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,16 +303,15 @@ static void setup_ht_cap(struct ath_softc *sc,
ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_DEFINED;
}

static int ath9k_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
static void ath9k_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah;
struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
int ret;

ret = ath_reg_notifier_apply(wiphy, request, reg);
ath_reg_notifier_apply(wiphy, request, reg);

/* Set tx power */
if (ah->curchan) {
Expand All @@ -322,8 +321,6 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit;
ath9k_ps_restore(sc);
}

return ret;
}

/*
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/ath/carl9170/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1981,13 +1981,13 @@ static int carl9170_parse_eeprom(struct ar9170 *ar)
return 0;
}

static int carl9170_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
static void carl9170_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct ar9170 *ar = hw->priv;

return ath_reg_notifier_apply(wiphy, request, &ar->common.regulatory);
ath_reg_notifier_apply(wiphy, request, &ar->common.regulatory);
}

int carl9170_register(struct ar9170 *ar)
Expand Down
18 changes: 8 additions & 10 deletions drivers/net/wireless/ath/regd.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ static u16 ath_regd_find_country_by_name(char *alpha2)
return -1;
}

int ath_reg_notifier_apply(struct wiphy *wiphy,
struct regulatory_request *request,
struct ath_regulatory *reg)
void ath_reg_notifier_apply(struct wiphy *wiphy,
struct regulatory_request *request,
struct ath_regulatory *reg)
{
struct ath_common *common = container_of(reg, struct ath_common,
regulatory);
Expand All @@ -373,7 +373,7 @@ int ath_reg_notifier_apply(struct wiphy *wiphy,
* any pending requests in the queue.
*/
if (!request)
return 0;
return;

switch (request->initiator) {
case NL80211_REGDOM_SET_BY_CORE:
Expand Down Expand Up @@ -409,8 +409,6 @@ int ath_reg_notifier_apply(struct wiphy *wiphy,

break;
}

return 0;
}
EXPORT_SYMBOL(ath_reg_notifier_apply);

Expand Down Expand Up @@ -500,8 +498,8 @@ ath_get_regpair(int regdmn)
static int
ath_regd_init_wiphy(struct ath_regulatory *reg,
struct wiphy *wiphy,
int (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request))
void (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request))
{
const struct ieee80211_regdomain *regd;

Expand Down Expand Up @@ -621,8 +619,8 @@ static int __ath_regd_init(struct ath_regulatory *reg)
int
ath_regd_init(struct ath_regulatory *reg,
struct wiphy *wiphy,
int (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request))
void (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request))
{
struct ath_common *common = container_of(reg, struct ath_common,
regulatory);
Expand Down
10 changes: 5 additions & 5 deletions drivers/net/wireless/ath/regd.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,12 @@ enum CountryCode {
bool ath_is_world_regd(struct ath_regulatory *reg);
bool ath_is_49ghz_allowed(u16 redomain);
int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy,
int (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request));
void (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request));
u32 ath_regd_get_band_ctl(struct ath_regulatory *reg,
enum ieee80211_band band);
int ath_reg_notifier_apply(struct wiphy *wiphy,
struct regulatory_request *request,
struct ath_regulatory *reg);
void ath_reg_notifier_apply(struct wiphy *wiphy,
struct regulatory_request *request,
struct ath_regulatory *reg);

#endif
6 changes: 2 additions & 4 deletions drivers/net/wireless/brcm80211/brcmsmac/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,8 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy,
}
}

static int brcms_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
static void brcms_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct brcms_info *wl = hw->priv;
Expand Down Expand Up @@ -744,8 +744,6 @@ static int brcms_reg_notifier(struct wiphy *wiphy,
if (wlc->pub->_nbands > 1 || wlc->band->bandtype == BRCM_BAND_2G)
wlc_phy_chanspec_ch14_widefilter_set(wlc->band->pi,
brcms_c_japan_ccode(request->alpha2));

return 0;
}

void brcms_c_regd_init(struct brcms_c_info *wlc)
Expand Down
33 changes: 15 additions & 18 deletions drivers/net/wireless/libertas/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2132,6 +2132,21 @@ static void lbs_cfg_set_regulatory_hint(struct lbs_private *priv)
lbs_deb_leave(LBS_DEB_CFG80211);
}

static void lbs_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct lbs_private *priv = wiphy_priv(wiphy);

lbs_deb_enter_args(LBS_DEB_CFG80211, "cfg80211 regulatory domain "
"callback for domain %c%c\n", request->alpha2[0],
request->alpha2[1]);

memcpy(priv->country_code, request->alpha2, sizeof(request->alpha2));
if (lbs_iface_active(priv))
lbs_set_11d_domain_info(priv);

lbs_deb_leave(LBS_DEB_CFG80211);
}

/*
* This function get's called after lbs_setup_firmware() determined the
Expand Down Expand Up @@ -2184,24 +2199,6 @@ int lbs_cfg_register(struct lbs_private *priv)
return ret;
}

int lbs_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct lbs_private *priv = wiphy_priv(wiphy);
int ret = 0;

lbs_deb_enter_args(LBS_DEB_CFG80211, "cfg80211 regulatory domain "
"callback for domain %c%c\n", request->alpha2[0],
request->alpha2[1]);

memcpy(priv->country_code, request->alpha2, sizeof(request->alpha2));
if (lbs_iface_active(priv))
ret = lbs_set_11d_domain_info(priv);

lbs_deb_leave(LBS_DEB_CFG80211);
return ret;
}

void lbs_scan_deinit(struct lbs_private *priv)
{
lbs_deb_enter(LBS_DEB_CFG80211);
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/wireless/libertas/cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev);
int lbs_cfg_register(struct lbs_private *priv);
void lbs_cfg_free(struct lbs_private *priv);

int lbs_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request);

void lbs_send_disconnect_notification(struct lbs_private *priv);
void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event);

Expand Down
6 changes: 2 additions & 4 deletions drivers/net/wireless/mwifiex/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ static int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy)
* - Set by user
* - Set bt Country IE
*/
static int mwifiex_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
static void mwifiex_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);

Expand All @@ -540,8 +540,6 @@ static int mwifiex_reg_notifier(struct wiphy *wiphy,
break;
}
mwifiex_send_domain_info_cmd_fw(wiphy);

return 0;
}

/*
Expand Down
20 changes: 9 additions & 11 deletions drivers/net/wireless/rtlwifi/regd.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ static void _rtl_reg_apply_world_flags(struct wiphy *wiphy,
return;
}

static int _rtl_reg_notifier_apply(struct wiphy *wiphy,
struct regulatory_request *request,
struct rtl_regulatory *reg)
static void _rtl_reg_notifier_apply(struct wiphy *wiphy,
struct regulatory_request *request,
struct rtl_regulatory *reg)
{
/* We always apply this */
_rtl_reg_apply_radar_flags(wiphy);
Expand All @@ -314,8 +314,6 @@ static int _rtl_reg_notifier_apply(struct wiphy *wiphy,
_rtl_reg_apply_world_flags(wiphy, request->initiator, reg);
break;
}

return 0;
}

static const struct ieee80211_regdomain *_rtl_regdomain_select(
Expand Down Expand Up @@ -348,9 +346,9 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select(

static int _rtl_regd_init_wiphy(struct rtl_regulatory *reg,
struct wiphy *wiphy,
int (*reg_notifier) (struct wiphy *wiphy,
struct regulatory_request *
request))
void (*reg_notifier) (struct wiphy *wiphy,
struct regulatory_request *
request))
{
const struct ieee80211_regdomain *regd;

Expand Down Expand Up @@ -379,7 +377,7 @@ static struct country_code_to_enum_rd *_rtl_regd_find_country(u16 countrycode)
}

int rtl_regd_init(struct ieee80211_hw *hw,
int (*reg_notifier) (struct wiphy *wiphy,
void (*reg_notifier) (struct wiphy *wiphy,
struct regulatory_request *request))
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
Expand Down Expand Up @@ -421,12 +419,12 @@ int rtl_regd_init(struct ieee80211_hw *hw,
return 0;
}

int rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct rtl_priv *rtlpriv = rtl_priv(hw);

RT_TRACE(rtlpriv, COMP_REGD, DBG_LOUD, "\n");

return _rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd);
_rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd);
}
6 changes: 3 additions & 3 deletions drivers/net/wireless/rtlwifi/regd.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ enum country_code_type_t {
};

int rtl_regd_init(struct ieee80211_hw *hw,
int (*reg_notifier) (struct wiphy *wiphy,
struct regulatory_request *request));
int rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request);
void (*reg_notifier) (struct wiphy *wiphy,
struct regulatory_request *request));
void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request);
#endif
6 changes: 2 additions & 4 deletions drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ static int wl12xx_set_authorized(struct wl1271 *wl,
return 0;
}

static int wl1271_reg_notify(struct wiphy *wiphy,
struct regulatory_request *request)
static void wl1271_reg_notify(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ieee80211_supported_band *band;
struct ieee80211_channel *ch;
Expand All @@ -107,8 +107,6 @@ static int wl1271_reg_notify(struct wiphy *wiphy,
IEEE80211_CHAN_PASSIVE_SCAN;

}

return 0;
}

static int wl1271_set_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif,
Expand Down
Loading

0 comments on commit 066433a

Please sign in to comment.