summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2010-04-04 08:07:51 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2010-04-04 08:07:51 +0000
commitb7872898e20689664cfa3b484c36c31568e03967 (patch)
treea6dbcc53bafbfc43ec4c3d33d2c203555d008c03 /sys/dev/usb
parent07349718fdc8299be8ebc03c6310f9b5b4c9f409 (diff)
Fix 5GHz channels TX power settings for RT2860/RT2870 (does not
affect RT3572.) Found (again!) by Yao Zhao (dragonlinux at gmail dot com)
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_run.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index 92cc0505853..3594553732f 100644
--- a/sys/dev/usb/if_run.c
+++ b/sys/dev/usb/if_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_run.c,v 1.63 2010/03/27 16:13:24 damien Exp $ */
+/* $OpenBSD: if_run.c,v 1.64 2010/04/04 08:07:50 damien Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2445,13 +2445,13 @@ run_rt2870_set_chan(struct run_softc *sc, u_int chan)
txpow2 = sc->txpow2[i];
if (chan > 14) {
if (txpow1 >= 0)
- txpow1 = txpow1 << 1;
+ txpow1 = txpow1 << 1 | 1;
else
- txpow1 = (7 + txpow1) << 1 | 1;
+ txpow1 = (7 + txpow1) << 1;
if (txpow2 >= 0)
- txpow2 = txpow2 << 1;
+ txpow2 = txpow2 << 1 | 1;
else
- txpow2 = (7 + txpow2) << 1 | 1;
+ txpow2 = (7 + txpow2) << 1;
}
r3 = rfprog[i].r3 | txpow1 << 7;
r4 = rfprog[i].r4 | sc->freq << 13 | txpow2 << 4;