Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268020
b: refs/heads/master
c: 0310b1b
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Aug 26, 2011
1 parent c271123 commit 8afeab0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 36 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: 206a443fc44f63d378c22cbec5d3c8e2d75c498c
refs/heads/master: 0310b1bc75336a05a68589de68d7b04db35483ad
39 changes: 4 additions & 35 deletions trunk/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/kthread.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
#include <linux/bitops.h>
#include <linux/etherdevice.h>
#include <linux/ieee80211.h>
#include <linux/mmc/sdio_func.h>
Expand Down Expand Up @@ -293,11 +294,6 @@ static s32 brcmf_iscan_pending(struct brcmf_cfg80211_priv *cfg_priv);
static s32 brcmf_iscan_inprogress(struct brcmf_cfg80211_priv *cfg_priv);
static s32 brcmf_iscan_aborted(struct brcmf_cfg80211_priv *cfg_priv);

/*
* find most significant bit set
*/
static __used u32 brcmf_find_msb(u16 bit16);

/*
* update pmklist to dongle
*/
Expand Down Expand Up @@ -2008,33 +2004,6 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
return err;
}

static __used u32 brcmf_find_msb(u16 bit16)
{
u32 ret = 0;

if (bit16 & 0xff00) {
ret += 8;
bit16 >>= 8;
}

if (bit16 & 0xf0) {
ret += 4;
bit16 >>= 4;
}

if (bit16 & 0xc) {
ret += 2;
bit16 >>= 2;
}

if (bit16 & 2)
ret += bit16 & 2;
else if (bit16)
ret += bit16;

return ret;
}

static s32
brcmf_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
const u8 *addr,
Expand Down Expand Up @@ -2062,10 +2031,10 @@ brcmf_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,

rateset.count = le32_to_cpu(rateset.count);

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

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

Expand Down

0 comments on commit 8afeab0

Please sign in to comment.