Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2011 21:12:35 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227741 - head/sys/dev/ath/ath_hal/ar5416
Message-ID:  <201111192112.pAJLCZv3060601@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat Nov 19 21:12:35 2011
New Revision: 227741
URL: http://svn.freebsd.org/changeset/base/227741

Log:
  Add some (totally untested!) code to correctly set the RF half/quarter
  mode configuration registers. This is apparently required for correct
  behaviour, but also requires the chip to actually officially support it.
  
  Sponsored by:	Hobnob, Inc.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Sat Nov 19 21:05:31 2011	(r227740)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Sat Nov 19 21:12:35 2011	(r227741)
@@ -724,6 +724,20 @@ ar5416SetRfMode(struct ath_hal *ah, cons
 		rfMode |= IEEE80211_IS_CHAN_5GHZ(chan) ?
 			AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ;
 	}
+
+	/*
+	 * Set half/quarter mode flags if required.
+	 *
+	 * This doesn't change the IFS timings at all; that needs to
+	 * be done as part of the MAC setup.  Similarly, the PLL
+	 * configuration also needs some changes for the half/quarter
+	 * rate clock.
+	 */
+	if (IEEE80211_IS_CHAN_HALF(chan))
+		rfMode |= AR_PHY_MODE_HALF;
+	else if (IEEE80211_IS_CHAN_QUARTER(chan))
+		rfMode |= AR_PHY_MODE_QUARTER;
+
 	OS_REG_WRITE(ah, AR_PHY_MODE, rfMode);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111192112.pAJLCZv3060601>