UNLOCK(wl);
}
-/*
- * precondition: perimeter lock has been acquired
- */
-static int
-ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan,
- enum nl80211_channel_type type)
-{
- struct brcms_info *wl = hw->priv;
- int err;
-
- switch (type) {
- case NL80211_CHAN_HT20:
- case NL80211_CHAN_NO_HT:
- err = brcms_c_set_channel(wl->wlc, chan->hw_value);
- break;
- case NL80211_CHAN_HT40MINUS:
- case NL80211_CHAN_HT40PLUS:
- wiphy_err(hw->wiphy,
- "%s: Need to implement 40 Mhz Channels!\n", __func__);
- err = -ENOTSUPP;
- break;
- default:
- err = -EINVAL;
- }
-
- return err;
-}
-
static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed)
{
struct ieee80211_conf *conf = &hw->conf;
"\n", __func__, conf->power_level * 4,
new_int);
}
- if (changed & IEEE80211_CONF_CHANGE_CHANNEL)
- err = ieee_set_channel(hw, conf->channel, conf->channel_type);
-
+ if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
+ if (conf->channel_type == NL80211_CHAN_HT20 ||
+ conf->channel_type == NL80211_CHAN_NO_HT)
+ err = brcms_c_set_channel(wl->wlc,
+ conf->channel->hw_value);
+ else
+ err = -ENOTSUPP;
+ }
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS)
err = brcms_c_set_rate_limit(wl->wlc,
conf->short_frame_max_tx_count,
return wlc->band->phytype;
}
-int brcms_c_set_shortslot_override(struct brcms_c_info *wlc, s8 sslot_override)
+void brcms_c_set_shortslot_override(struct brcms_c_info *wlc, s8 sslot_override)
{
- if (sslot_override != BRCMS_SHORTSLOT_AUTO &&
- sslot_override != BRCMS_SHORTSLOT_OFF &&
- sslot_override != BRCMS_SHORTSLOT_ON) {
- return -EINVAL;
- }
-
wlc->shortslot_override = sslot_override;
/*
* currently on the 5G band
*/
if (wlc->band->bandtype == BRCM_BAND_5G)
- return 0;
+ return;
if (wlc->pub->up && wlc->pub->associated) {
/* let watchdog or beacon processing update shortslot */
(wlc->shortslot_override ==
BRCMS_SHORTSLOT_ON);
}
- return 0;
}
/*
int brcms_c_set_rateset(struct brcms_c_info *wlc, struct brcm_rateset *rs);
int brcms_c_set_beacon_period(struct brcms_c_info *wlc, u16 period);
u16 brcms_c_get_phy_type(struct brcms_c_info *wlc, int phyidx);
-int brcms_c_set_shortslot_override(struct brcms_c_info *wlc, s8 sslot_override);
+void brcms_c_set_shortslot_override(struct brcms_c_info *wlc,
+ s8 sslot_override);
/* helper functions */
extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc);