Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71807
b: refs/heads/master
c: c899a57
h: refs/heads/master
i:
  71805: 87d8f8c
  71803: 5c1de2d
  71799: bd2f3ee
  71791: c64804f
  71775: 46ba10e
  71743: a984f06
  71679: f5fb021
v: v3
  • Loading branch information
Adrian Bunk authored and John W. Linville committed Oct 18, 2007
1 parent 008992e commit 0b7a360
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: ba8007ceb076f336a453a049cc5353eaa01d7136
refs/heads/master: c899a575fa9cc802a4a77f6c5078b14fc1d12487
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -4492,13 +4492,13 @@ static u8 ratio2dB[100] = {
* Conversion assumes that levels are voltages (20*log), not powers (10*log). */
int iwl_calc_db_from_ratio(int sig_ratio)
{
/* Anything above 1000:1 just report as 60 dB */
if (sig_ratio > 1000)
/* 1000:1 or higher just report as 60 dB */
if (sig_ratio >= 1000)
return 60;

/* Above 100:1, divide by 10 and use table,
/* 100:1 or higher, divide by 10 and use table,
* add 20 dB to make up for divide by 10 */
if (sig_ratio > 100)
if (sig_ratio >= 100)
return (20 + (int)ratio2dB[sig_ratio/10]);

/* We shouldn't see this */
Expand Down

0 comments on commit 0b7a360

Please sign in to comment.