Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249408
b: refs/heads/master
c: b8fbc39
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed May 10, 2011
1 parent 40a763b commit ab0a63b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 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: dc1e961668d148fa5c2784ac51a9a78cb7274cf3
refs/heads/master: b8fbc3928cce0c8fa7c01afc33ddef02062504e1
19 changes: 8 additions & 11 deletions trunk/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@

#include <linux/kernel.h>
#include <linux/string.h>
#include <bcmdefs.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/pci.h>

#include <bcmdefs.h>
#include <bcmnvram.h>
#include <sbchipc.h>
#include <bcmdevs.h>
Expand Down Expand Up @@ -2746,20 +2748,15 @@ s8 lcnphy_gain_index_offset_for_pkt_rssi[] = {

void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_cmplx_pwr_dB, u8 core)
{
u8 shift_ct, lsb, msb, secondmsb, i;
u8 msb, secondmsb, i;
u32 tmp;

for (i = 0; i < core; i++) {
secondmsb = 0;
tmp = cmplx_pwr[i];
shift_ct = msb = secondmsb = 0;
while (tmp != 0) {
tmp = tmp >> 1;
shift_ct++;
lsb = (u8) (tmp & 1);
if (lsb == 1)
msb = shift_ct;
}
secondmsb = (u8) ((cmplx_pwr[i] >> (msb - 1)) & 1);
msb = fls(tmp);
if (msb)
secondmsb = (u8) ((tmp >> (--msb - 1)) & 1);
p_cmplx_pwr_dB[i] = (s8) (3 * msb + 2 * secondmsb);
}
}
Expand Down

0 comments on commit ab0a63b

Please sign in to comment.