Date: Thu, 20 Jan 2011 09:46:18 +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: r217634 - head/sys/dev/ath/ath_hal/ar5416 Message-ID: <201101200946.p0K9kIZg008299@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu Jan 20 09:46:18 2011 New Revision: 217634 URL: http://svn.freebsd.org/changeset/base/217634 Log: Only enable 11n modes if the chipset suports 11n. Since the AR2427 doesn't allow 802.11n, it shouldn't have them configured. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Jan 20 09:39:16 2011 (r217633) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Jan 20 09:46:18 2011 (r217634) @@ -40,14 +40,18 @@ u_int ar5416GetWirelessModes(struct ath_hal *ah) { u_int mode; + struct ath_hal_private *ahpriv = AH_PRIVATE(ah); + HAL_CAPABILITIES *pCap = &ahpriv->ah_caps; mode = ar5212GetWirelessModes(ah); - if (mode & HAL_MODE_11A) + + /* Only enable HT modes if the NIC supports HT */ + if (pCap->halHTSupport == AH_TRUE && (mode & HAL_MODE_11A)) mode |= HAL_MODE_11NA_HT20 | HAL_MODE_11NA_HT40PLUS | HAL_MODE_11NA_HT40MINUS ; - if (mode & HAL_MODE_11G) + if (pCap->halHTSupport == AH_TRUE && (mode & HAL_MODE_11G)) mode |= HAL_MODE_11NG_HT20 | HAL_MODE_11NG_HT40PLUS | HAL_MODE_11NG_HT40MINUS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101200946.p0K9kIZg008299>