Date: Wed, 14 Jan 2009 19:22:07 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r187232 - in user/sam/wifi/sys/dev/ath/ath_hal: . ar5212 Message-ID: <200901141922.n0EJM7PR051657@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Wed Jan 14 19:22:06 2009 New Revision: 187232 URL: http://svn.freebsd.org/changeset/base/187232 Log: Move iqCalValid from an internal channel member to a flag in privFlags. This allows us to move antennaMax up and fully pack the structure. Need to revisit IQ calibration for 5212 parts; looks like we only ever do it once for a channel; may want to reset state using a long-term mechanism as done for 5416-class parts. Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah.h Wed Jan 14 19:07:20 2009 (r187231) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah.h Wed Jan 14 19:22:06 2009 (r187232) @@ -397,6 +397,7 @@ typedef struct { #define CHANNEL_DFS 0x02 /* DFS required on channel */ #define CHANNEL_4MS_LIMIT 0x04 /* 4msec packet limit on this channel */ #define CHANNEL_NFCREQUIRED 0x08 /* channel requires noise floor check */ +#define CHANNEL_IQVALID 0x10 /* IQ calibration valid */ #define CHANNEL_A (CHANNEL_5GHZ|CHANNEL_OFDM) #define CHANNEL_B (CHANNEL_2GHZ|CHANNEL_CCK) Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h Wed Jan 14 19:07:20 2009 (r187231) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h Wed Jan 14 19:22:06 2009 (r187232) @@ -120,15 +120,14 @@ typedef struct { int8_t maxTxPower; int8_t minTxPower; /* as above... */ - uint8_t iqCalValid; /* NB: really HAL_BOOL */ uint8_t calValid; /* bitmask of cal types */ int8_t iCoff; int8_t qCoff; + int8_t antennaMax; int16_t rawNoiseFloor; int16_t noiseFloorAdjust; uint16_t mainSpur; /* cached spur value for this cahnnel */ uint32_t conformanceTestLimit; /* conformance test limit from reg domain */ - int8_t antennaMax; } HAL_CHANNEL_INTERNAL; typedef struct { Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Wed Jan 14 19:07:20 2009 (r187231) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Wed Jan 14 19:22:06 2009 (r187232) @@ -1073,12 +1073,12 @@ ar5212PerCalibrationN(struct ath_hal *ah AR_PHY_TIMING_CTRL4_IQCORR_ENABLE); ahp->ah_bIQCalibration = IQ_CAL_DONE; - ichan->iqCalValid = AH_TRUE; + ichan->privFlags |= CHANNEL_IQVALID; ichan->iCoff = iCoff; ichan->qCoff = qCoff; } } else if (!IS_CHAN_B(chan) && ahp->ah_bIQCalibration == IQ_CAL_DONE && - !ichan->iqCalValid) { + (ichan->privFlags & CHANNEL_IQVALID) == 0) { /* * Start IQ calibration if configured channel has changed. * Use a magic number of 15 based on default value. @@ -1574,7 +1574,7 @@ ar5212SetBoardValues(struct ath_hal *ah, } AR_PHY_BIS(ah, 73, 0xFFFFFF01, (falseDectectBackoff << 1) & 0xFE); - if (chan->iqCalValid) { + if (chan->privFlags & CHANNEL_IQVALID) { iCoff = chan->iCoff; qCoff = chan->qCoff; } else {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901141922.n0EJM7PR051657>