Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268410
b: refs/heads/master
c: b87987b
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Sep 16, 2011
1 parent d386b11 commit 4c323db
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 42 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 648f3b75b4688a1107fbfcc5c42005eabff2a3f8
refs/heads/master: b87987b1f4524f9abca525c5d2a346ea0079d295
39 changes: 8 additions & 31 deletions trunk/drivers/staging/brcm80211/brcmsmac/mac80211_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,34 +363,6 @@ brcms_ops_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
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;
Expand Down Expand Up @@ -433,9 +405,14 @@ static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed)
"\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,
Expand Down
11 changes: 2 additions & 9 deletions trunk/drivers/staging/brcm80211/brcmsmac/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6288,22 +6288,16 @@ u16 brcms_c_get_phy_type(struct brcms_c_info *wlc, int phyidx)
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;

/*
* shortslot is an 11g feature, so no more work if we are
* 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 */
Expand All @@ -6320,7 +6314,6 @@ int brcms_c_set_shortslot_override(struct brcms_c_info *wlc, s8 sslot_override)
(wlc->shortslot_override ==
BRCMS_SHORTSLOT_ON);
}
return 0;
}

/*
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/staging/brcm80211/brcmsmac/pub.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ void brcms_c_get_current_rateset(struct brcms_c_info *wlc,
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);
Expand Down

0 comments on commit 4c323db

Please sign in to comment.