Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351808
b: refs/heads/master
c: ac74439
h: refs/heads/master
v: v3
  • Loading branch information
Hante Meuleman authored and John W. Linville committed Jan 7, 2013
1 parent 6c6f5a9 commit 02dd8b1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 63 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: 0429a6fa6be9489bf451e9fcc0f97341e4a356b6
refs/heads/master: ac744395ba0a0491f8524a8371ad6f7df67bf673
62 changes: 0 additions & 62 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2011,67 +2011,6 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
return err;
}

static s32
brcmf_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *ndev,
const u8 *addr,
const struct cfg80211_bitrate_mask *mask)
{
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcm_rateset_le rateset_le;
s32 rate;
s32 val;
s32 err_bg;
s32 err_a;
u32 legacy;
s32 err = 0;

brcmf_dbg(TRACE, "Enter\n");
if (!check_vif_up(ifp->vif))
return -EIO;

/* addr param is always NULL. ignore it */
/* Get current rateset */
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_CURR_RATESET,
&rateset_le, sizeof(rateset_le));
if (err) {
brcmf_err("could not get current rateset (%d)\n", err);
goto done;
}

legacy = ffs(mask->control[IEEE80211_BAND_2GHZ].legacy & 0xFFFF);
if (!legacy)
legacy = ffs(mask->control[IEEE80211_BAND_5GHZ].legacy &
0xFFFF);

val = wl_g_rates[legacy - 1].bitrate * 100000;

if (val < le32_to_cpu(rateset_le.count))
/* Select rate by rateset index */
rate = rateset_le.rates[val] & 0x7f;
else
/* Specified rate in bps */
rate = val / 500000;

brcmf_dbg(CONN, "rate %d mbps\n", rate / 2);

/*
*
* Set rate override,
* Since the is a/b/g-blind, both a/bg_rate are enforced.
*/
err_bg = brcmf_fil_iovar_int_set(ifp, "bg_rate", rate);
err_a = brcmf_fil_iovar_int_set(ifp, "a_rate", rate);
if (err_bg && err_a) {
brcmf_err("could not set fixed rate (%d) (%d)\n", err_bg,
err_a);
err = err_bg | err_a;
}

done:
brcmf_dbg(TRACE, "Exit\n");
return err;
}

static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
struct brcmf_bss_info_le *bi)
{
Expand Down Expand Up @@ -3703,7 +3642,6 @@ static struct cfg80211_ops wl_cfg80211_ops = {
.set_default_key = brcmf_cfg80211_config_default_key,
.set_default_mgmt_key = brcmf_cfg80211_config_default_mgmt_key,
.set_power_mgmt = brcmf_cfg80211_set_power_mgmt,
.set_bitrate_mask = brcmf_cfg80211_set_bitrate_mask,
.connect = brcmf_cfg80211_connect,
.disconnect = brcmf_cfg80211_disconnect,
.suspend = brcmf_cfg80211_suspend,
Expand Down

0 comments on commit 02dd8b1

Please sign in to comment.