diff options
-rw-r--r-- | sys/dev/ic/ar5212.c | 19 | ||||
-rw-r--r-- | sys/dev/ic/ath.c | 4 |
2 files changed, 10 insertions, 13 deletions
diff --git a/sys/dev/ic/ar5212.c b/sys/dev/ic/ar5212.c index ea2bfc57cab..8ccb60e252a 100644 --- a/sys/dev/ic/ar5212.c +++ b/sys/dev/ic/ar5212.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5212.c,v 1.30 2006/09/19 13:14:32 reyk Exp $ */ +/* $OpenBSD: ar5212.c,v 1.31 2006/09/19 13:25:54 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org> @@ -628,15 +628,10 @@ ar5k_ar5212_reset(struct ath_hal *hal, HAL_OPMODE op_mode, HAL_CHANNEL *channel, AR5K_REG_MASKED_BITS(AR5K_AR5212_PHY(0x44), hal->ah_antenna[ee_mode][0], 0xfffffc06); - ant[0] = HAL_ANT_FIXED_A; - ant[1] = HAL_ANT_FIXED_B; - - if (hal->ah_ant_diversity == AH_FALSE) { - if (freq == AR5K_INI_RFGAIN_2GHZ) - ant[0] = HAL_ANT_FIXED_B; - else - ant[1] = HAL_ANT_FIXED_A; - } + if (freq == AR5K_INI_RFGAIN_2GHZ) + ant[0] = ant[1] = HAL_ANT_FIXED_B; + else + ant[0] = ant[1] = HAL_ANT_FIXED_A; AR5K_REG_WRITE(AR5K_AR5212_PHY_ANT_SWITCH_TABLE_0, hal->ah_antenna[ee_mode][ant[0]]); @@ -1310,11 +1305,13 @@ ar5k_ar5212_fill_tx_desc(struct ath_hal *hal, struct ath_desc *desc, u_int segment_length, HAL_BOOL first_segment, HAL_BOOL last_segment) { struct ar5k_ar5212_tx_desc *tx_desc; + struct ar5k_ar5212_tx_status *tx_status; tx_desc = (struct ar5k_ar5212_tx_desc*)&desc->ds_ctl0; + tx_status = (struct ar5k_ar5212_tx_status*)&desc->ds_hw[2]; /* Clear status descriptor */ - bzero(desc->ds_hw, sizeof(desc->ds_hw)); + bzero(tx_status, sizeof(struct ar5k_ar5212_tx_status)); /* Validate segment length and initialize the descriptor */ if ((tx_desc->tx_control_1 = (segment_length & diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index a631394a1e5..eddf1fd0447 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.52 2006/06/23 21:53:01 reyk Exp $ */ +/* $OpenBSD: ath.c,v 1.53 2006/09/19 13:25:54 reyk Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -725,7 +725,7 @@ ath_init1(struct ath_softc *sc) */ hchan.channel = ic->ic_ibss_chan->ic_freq; hchan.channelFlags = ath_chan2flags(ic, ic->ic_ibss_chan); - if (!ath_hal_reset(ah, ic->ic_opmode, &hchan, AH_FALSE, &status)) { + if (!ath_hal_reset(ah, ic->ic_opmode, &hchan, AH_TRUE, &status)) { printf("%s: unable to reset hardware; hal status %u\n", ifp->if_xname, status); error = EIO; |