diff options
author | 2007-04-04 20:48:12 +0000 | |
---|---|---|
committer | 2007-04-04 20:48:12 +0000 | |
commit | da7efb9e3355f7eb3ead4a2f6889a49efd099e79 (patch) | |
tree | 5c9f8a4f59e1d93efe3a50403c15b5b63aa4c60d | |
parent | Enable pyro(4) and ebus(4) at mainbus(4). Reorder bus drivers such that (diff) | |
download | wireguard-openbsd-da7efb9e3355f7eb3ead4a2f6889a49efd099e79.tar.xz wireguard-openbsd-da7efb9e3355f7eb3ead4a2f6889a49efd099e79.zip |
Activate interference mitigation.
-rw-r--r-- | sys/dev/ic/bcw.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/ic/bcw.c b/sys/dev/ic/bcw.c index 5ba9ff51e01..b329cb730da 100644 --- a/sys/dev/ic/bcw.c +++ b/sys/dev/ic/bcw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcw.c,v 1.87 2007/04/04 19:36:41 mglocker Exp $ */ +/* $OpenBSD: bcw.c,v 1.88 2007/04/04 20:48:12 mglocker Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -2897,6 +2897,7 @@ bcw_chip_init(struct bcw_softc *sc) int bcw_bs_init(struct bcw_softc *sc) { + struct ieee80211com *ic = &sc->sc_ic; uint32_t ucodeflags; BCW_WRITE16(sc, 0x03e6, 0); @@ -2905,6 +2906,8 @@ bcw_bs_init(struct bcw_softc *sc) bcw_phy_init(sc); + bcw_radio_set_interf_mitigation(sc, sc->sc_radio_interfmode); + bcw_phy_set_antenna_diversity(sc); bcw_radio_set_txantenna(sc, BCW_RADIO_TXANTENNA_DEFAULT); @@ -2933,12 +2936,16 @@ bcw_bs_init(struct bcw_softc *sc) else bcw_shm_write16(sc, BCW_SHM_SHARED, 0x3c, 0x1e); - if (sc->sc_phy_type == BCW_PHY_TYPEA) { - bcw_shm_write16(sc, BCW_SHM_SHARED, 0x612, 0x2); + if (ic->ic_opmode != IEEE80211_M_IBSS && + ic->ic_opmode == IEEE80211_M_HOSTAP) { + BCW_WRITE16(sc, 0x612, 0x2); bcw_shm_write16(sc, BCW_SHM_SHARED, 0x416, 0x2); - - bcw_shm_write16(sc, BCW_SHM_SHARED, 0x612, 0x78); + } else if (sc->sc_phy_type == BCW_PHY_TYPEA) { + BCW_WRITE16(sc, 0x612, 0x78); bcw_shm_write16(sc, BCW_SHM_SHARED, 0x416, 0x78); + } else { + BCW_WRITE16(sc, 0x612, 0xfa); + bcw_shm_write16(sc, BCW_SHM_SHARED, 0x416, 0xfa); } return (0); |