diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2005-05-13 19:35:48 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2005-05-13 19:35:48 +0000 |
commit | a00fdb5283ecbe00782757385b6d79beb51255a6 (patch) | |
tree | 430f140edde5ddf59f7acf43c398392f75b412c5 /sys | |
parent | 8d9e9f2c001af68e936cd37e6e934c68a8684222 (diff) |
override default bbp register values with values stored in eeprom (except
for the R17 register).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/ral.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_ral.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c index 8fadafa3c82..5293821050a 100644 --- a/sys/dev/ic/ral.c +++ b/sys/dev/ic/ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ral.c,v 1.51 2005/05/13 19:13:09 damien Exp $ */ +/* $OpenBSD: ral.c,v 1.52 2005/05/13 19:35:44 damien Exp $ */ /*- * Copyright (c) 2005 @@ -2593,14 +2593,12 @@ ral_bbp_init(struct ral_softc *sc) for (i = 0; i < N(ral_def_bbp); i++) ral_bbp_write(sc, ral_def_bbp[i].reg, ral_def_bbp[i].val); -#if 0 /* initialize BBP registers to values stored in EEPROM */ for (i = 0; i < 16; i++) { if (sc->bbp_prom[i].reg == 0xff) continue; ral_bbp_write(sc, sc->bbp_prom[i].reg, sc->bbp_prom[i].val); } -#endif return 0; #undef N @@ -2650,6 +2648,9 @@ ral_init(struct ifnet *ifp) /* set supported basic rates (1, 2, 6, 12, 24) */ RAL_WRITE(sc, RAL_ARSP_PLCP_1, 0x153); + /* set default sensitivity */ + ral_bbp_write(sc, 17, 0x48); + ral_set_txantenna(sc, 1); ral_set_rxantenna(sc, 1); ral_update_slot(sc); diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c index 09f73638ed4..5cf2895914e 100644 --- a/sys/dev/usb/if_ral.c +++ b/sys/dev/usb/if_ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ral.c,v 1.32 2005/05/13 19:13:11 damien Exp $ */ +/* $OpenBSD: if_ral.c,v 1.33 2005/05/13 19:35:47 damien Exp $ */ /*- * Copyright (c) 2005 @@ -1897,14 +1897,12 @@ ural_bbp_init(struct ural_softc *sc) for (i = 0; i < N(ural_def_bbp); i++) ural_bbp_write(sc, ural_def_bbp[i].reg, ural_def_bbp[i].val); -#if 0 /* initialize BBP registers to values stored in EEPROM */ for (i = 0; i < 16; i++) { if (sc->bbp_prom[i].reg == 0xff) continue; ural_bbp_write(sc, sc->bbp_prom[i].reg, sc->bbp_prom[i].val); } -#endif return 0; #undef N @@ -2009,6 +2007,9 @@ ural_init(struct ifnet *ifp) /* clear statistic registers (STA_CSR0 to STA_CSR10) */ ural_read_multi(sc, RAL_STA_CSR0, sta, sizeof sta); + /* set default sensitivity */ + ural_bbp_write(sc, 17, 0x48); + ural_set_txantenna(sc, 1); ural_set_rxantenna(sc, 1); |