diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2010-04-04 08:07:51 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2010-04-04 08:07:51 +0000 |
commit | b7872898e20689664cfa3b484c36c31568e03967 (patch) | |
tree | a6dbcc53bafbfc43ec4c3d33d2c203555d008c03 /sys/dev | |
parent | 07349718fdc8299be8ebc03c6310f9b5b4c9f409 (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')
-rw-r--r-- | sys/dev/ic/rt2860.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/if_run.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c index 89a7babf45c..01a16eb56ff 100644 --- a/sys/dev/ic/rt2860.c +++ b/sys/dev/ic/rt2860.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860.c,v 1.42 2010/03/27 16:13:24 damien Exp $ */ +/* $OpenBSD: rt2860.c,v 1.43 2010/04/04 08:07:50 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -1993,13 +1993,13 @@ rt2860_set_chan(struct rt2860_softc *sc, struct ieee80211_channel *c) txpow2 = sc->txpow2[i]; if (IEEE80211_IS_CHAN_5GHZ(c)) { 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; 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; |