diff options
-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 479d7869a3f..89a7babf45c 100644 --- a/sys/dev/ic/rt2860.c +++ b/sys/dev/ic/rt2860.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860.c,v 1.41 2010/02/08 18:46:47 damien Exp $ */ +/* $OpenBSD: rt2860.c,v 1.42 2010/03/27 16:13:24 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -2505,10 +2505,10 @@ rt2860_read_eeprom(struct rt2860_softc *sc) for (ridx = 0; ridx < 5; ridx++) { uint32_t reg; - val = rt2860_eeprom_read(sc, RT2860_EEPROM_RPWR + ridx); - reg = (uint32_t)val << 16; - val = rt2860_eeprom_read(sc, RT2860_EEPROM_RPWR + ridx + 1); - reg |= val; + val = rt2860_eeprom_read(sc, RT2860_EEPROM_RPWR + ridx * 2); + reg = val; + val = rt2860_eeprom_read(sc, RT2860_EEPROM_RPWR + ridx * 2 + 1); + reg |= (uint32_t)val << 16; sc->txpow20mhz[ridx] = reg; sc->txpow40mhz_2ghz[ridx] = b4inc(reg, delta_2ghz); diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c index ab930344697..92cc0505853 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.62 2010/02/25 17:46:20 damien Exp $ */ +/* $OpenBSD: if_run.c,v 1.63 2010/03/27 16:13:24 damien Exp $ */ /*- * Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr> @@ -1313,10 +1313,10 @@ run_read_eeprom(struct run_softc *sc) for (ridx = 0; ridx < 5; ridx++) { uint32_t reg; - run_srom_read(sc, RT2860_EEPROM_RPWR + ridx, &val); - reg = (uint32_t)val << 16; - run_srom_read(sc, RT2860_EEPROM_RPWR + ridx + 1, &val); - reg |= val; + run_srom_read(sc, RT2860_EEPROM_RPWR + ridx * 2, &val); + reg = val; + run_srom_read(sc, RT2860_EEPROM_RPWR + ridx * 2 + 1, &val); + reg |= (uint32_t)val << 16; sc->txpow20mhz[ridx] = reg; sc->txpow40mhz_2ghz[ridx] = b4inc(reg, delta_2ghz); |