From owner-freebsd-wireless@FreeBSD.ORG Fri Aug 24 07:40:05 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 733AA106564A for ; Fri, 24 Aug 2012 07:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 585208FC08 for ; Fri, 24 Aug 2012 07:40:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7O7e5Em063564 for ; Fri, 24 Aug 2012 07:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7O7e5TS063563; Fri, 24 Aug 2012 07:40:05 GMT (envelope-from gnats) Date: Fri, 24 Aug 2012 07:40:05 GMT Message-Id: <201208240740.q7O7e5TS063563@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/170904: commit references a PR X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2012 07:40:05 -0000 The following reply was made to PR kern/170904; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/170904: commit references a PR Date: Fri, 24 Aug 2012 07:32:51 +0000 (UTC) Author: adrian Date: Fri Aug 24 07:32:35 2012 New Revision: 239642 URL: http://svn.freebsd.org/changeset/base/239642 Log: Add the method to fetch the default DFS parameters for the AR5212 PHY. I need to check whether new parameters were added for the AR5413 NIC. PR: kern/170904 Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Fri Aug 24 06:56:44 2012 (r239641) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Fri Aug 24 07:32:35 2012 (r239642) @@ -633,6 +633,8 @@ extern void ar5212AniReset(struct ath_ha extern HAL_BOOL ar5212IsNFCalInProgress(struct ath_hal *ah); extern HAL_BOOL ar5212WaitNFCalComplete(struct ath_hal *ah, int i); extern void ar5212EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); +extern HAL_BOOL ar5212GetDfsDefaultThresh(struct ath_hal *ah, + HAL_PHYERR_PARAM *pe); extern void ar5212GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); extern HAL_BOOL ar5212ProcessRadarEvent(struct ath_hal *ah, struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf, Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Fri Aug 24 06:56:44 2012 (r239641) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Fri Aug 24 07:32:35 2012 (r239642) @@ -137,6 +137,7 @@ static const struct ath_hal_private ar52 /* DFS Functions */ .ah_enableDfs = ar5212EnableDfs, .ah_getDfsThresh = ar5212GetDfsThresh, + .ah_getDfsDefaultThresh = ar5212GetDfsDefaultThresh, .ah_procRadarEvent = ar5212ProcessRadarEvent, .ah_isFastClockEnabled = ar5212IsFastClockEnabled, .ah_get11nExtBusy = ar5212Get11nExtBusy, Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Fri Aug 24 06:56:44 2012 (r239641) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Fri Aug 24 07:32:35 2012 (r239642) @@ -1163,6 +1163,35 @@ ar5212EnableDfs(struct ath_hal *ah, HAL_ OS_REG_WRITE(ah, AR_PHY_RADAR_0, val | AR_PHY_RADAR_0_ENA); } +/* + * Parameters for the AR5212 PHY. + * + * TODO: figure out what values were added for the AR5413 and later + * PHY; update these here. + */ +#define AR5212_DFS_FIRPWR -41 +#define AR5212_DFS_RRSSI 12 +#define AR5212_DFS_HEIGHT 20 +#define AR5212_DFS_PRSSI 22 +#define AR5212_DFS_INBAND 6 + +HAL_BOOL +ar5212GetDfsDefaultThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ + + pe->pe_firpwr = AR5212_DFS_FIRPWR; + pe->pe_rrssi = AR5212_DFS_RRSSI; + pe->pe_height = AR5212_DFS_HEIGHT; + pe->pe_prssi = AR5212_DFS_PRSSI; + pe->pe_inband = AR5212_DFS_INBAND; + /* XXX look up what is needed for the AR5413 */ + pe->pe_relpwr = 0; + pe->pe_relstep = 0; + pe->pe_maxlen = 0; + + return (AH_TRUE); +} + void ar5212GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) { @@ -1250,7 +1279,7 @@ ar5212Get11nExtBusy(struct ath_hal *ah) } /* - * There's no channel survey support for the AR5211. + * There's no channel survey support for the AR5212. */ HAL_BOOL ar5212GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"