summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2006-09-19 13:25:55 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2006-09-19 13:25:55 +0000
commit61033a20e0c1eb37d3d00fc843bf6b41b9a0f1bd (patch)
treef583924f3618bdfe9c0079d126be15cfdb112643 /sys/dev/ic
parentd86e6c3bcbfeb0eb2e3bbab74e77a03f841d5b83 (diff)
use the correct antenna mode settings and fix a bug in the tx
descriptor setup. this will fix various issues including 11a mode with ar5212.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/ar5212.c19
-rw-r--r--sys/dev/ic/ath.c4
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;