From d98a3d69367564d9f5d723abfa65591fadd28fc0 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Wed, 5 Jun 2013 00:42:04 +0000 Subject: [PATCH] Add a new capability flag to announce that the chip implements LNA mixing for the RX path. This is different to the div comb HAL flag, that says it actually can use this for RX diversity (the "slow" diversity path implemented but disabled in the AR9285 HAL code.) Tested: * AR9285, STA operation --- sys/dev/ath/ath_hal/ah.c | 2 ++ sys/dev/ath/ath_hal/ah.h | 1 + sys/dev/ath/ath_hal/ah_internal.h | 3 ++- sys/dev/ath/ath_hal/ar9002/ar9285_attach.c | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/ath/ath_hal/ah.c b/sys/dev/ath/ath_hal/ah.c index c7840c664975..7fd64d1739e1 100644 --- a/sys/dev/ath/ath_hal/ah.c +++ b/sys/dev/ath/ath_hal/ah.c @@ -784,6 +784,8 @@ ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, case HAL_CAP_MFP: /* Management frame protection setting */ *result = pCap->halMfpSupport; return HAL_OK; + case HAL_CAP_RX_LNA_MIXING: /* Hardware uses an RX LNA mixer to map 2 antennas to a 1 stream receiver */ + return pCap->halRxUsingLnaMixing ? HAL_OK : HAL_ENOTSUPP; default: return HAL_EINVAL; } diff --git a/sys/dev/ath/ath_hal/ah.h b/sys/dev/ath/ath_hal/ah.h index 842b6582fd66..f4798a07e2ca 100644 --- a/sys/dev/ath/ath_hal/ah.h +++ b/sys/dev/ath/ath_hal/ah.h @@ -198,6 +198,7 @@ typedef enum { HAL_CAP_BB_READ_WAR = 244, /* baseband read WAR */ HAL_CAP_SERIALISE_WAR = 245, /* serialise register access on PCI */ HAL_CAP_ENFORCE_TXOP = 246, /* Enforce TXOP if supported */ + HAL_CAP_RX_LNA_MIXING = 247, /* RX hardware uses LNA mixing */ } HAL_CAPABILITY_TYPE; /* diff --git a/sys/dev/ath/ath_hal/ah_internal.h b/sys/dev/ath/ath_hal/ah_internal.h index 74d43c7daf85..f92df9df0860 100644 --- a/sys/dev/ath/ath_hal/ah_internal.h +++ b/sys/dev/ath/ath_hal/ah_internal.h @@ -279,7 +279,8 @@ typedef struct { halAntDivCombSupport : 1, halAntDivCombSupportOrg : 1, halRadioRetentionSupport : 1, - halSpectralScanSupport : 1; + halSpectralScanSupport : 1, + halRxUsingLnaMixing : 1; uint32_t halWirelessModes; uint16_t halTotalQueues; diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c index 5f6a2a9606e7..67a15b846866 100644 --- a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c +++ b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c @@ -525,6 +525,7 @@ ar9285FillCapabilityInfo(struct ath_hal *ah) pCap->halMbssidAggrSupport = AH_TRUE; pCap->hal4AddrAggrSupport = AH_TRUE; pCap->halSpectralScanSupport = AH_TRUE; + pCap->halRxUsingLnaMixing = AH_TRUE; if (AR_SREV_KITE_12_OR_LATER(ah)) pCap->halPSPollBroken = AH_FALSE;