Date: Sun, 23 Jan 2011 14:49:51 +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: r217752 - head/sys/dev/ath/ath_hal/ar5416 Message-ID: <201101231449.p0NEnpt1058581@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun Jan 23 14:49:50 2011 New Revision: 217752 URL: http://svn.freebsd.org/changeset/base/217752 Log: Enable the 11n PHY by default whether or not 11n is configured. The linux ath9k driver and (from what I've been told) the atheros reference driver does this; it then leaves discarding 11n frames to the 802.11 layer. Whilst I'm here, merge in a fix from ath9k which maintains a turbo register setting when enabling the 11n register; and remove an un-needed (duplicate) flag setting. 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 Sun Jan 23 14:30:35 2011 (r217751) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Jan 23 14:49:50 2011 (r217752) @@ -2138,22 +2138,28 @@ interpolate(uint16_t target, uint16_t sr return rv; } +/* + * The linux ath9k driver and (from what I've been told) the reference + * Atheros driver enables the 11n PHY by default whether or not it's + * configured. + */ static void ar5416Set11nRegs(struct ath_hal *ah, const struct ieee80211_channel *chan) { uint32_t phymode; + uint32_t enableDacFifo = 0; HAL_HT_MACMODE macmode; /* MAC - 20/40 mode */ - if (!IEEE80211_IS_CHAN_HT(chan)) - return; + if (AR_SREV_KITE_10_OR_LATER(ah)) + enableDacFifo = (OS_REG_READ(ah, AR_PHY_TURBO) & AR_PHY_FC_ENABLE_DAC_FIFO); /* Enable 11n HT, 20 MHz */ phymode = AR_PHY_FC_HT_EN | AR_PHY_FC_SHORT_GI_40 - | AR_PHY_FC_SINGLE_HT_LTF1 | AR_PHY_FC_WALSH; + | AR_PHY_FC_SINGLE_HT_LTF1 | AR_PHY_FC_WALSH | enableDacFifo; /* Configure baseband for dynamic 20/40 operation */ if (IEEE80211_IS_CHAN_HT40(chan)) { - phymode |= AR_PHY_FC_DYN2040_EN | AR_PHY_FC_SHORT_GI_40; + phymode |= AR_PHY_FC_DYN2040_EN; /* Configure control (primary) channel at +-10MHz */ if (IEEE80211_IS_CHAN_HT40U(chan))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101231449.p0NEnpt1058581>