diff options
author | adrian <adrian@FreeBSD.org> | 2011-01-20 09:46:18 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-01-20 09:46:18 +0000 |
commit | 2d762880b382332f9c370074912c7a597cb2325d (patch) | |
tree | 6e80b9ffb134cd5fac4d25a72ad0b64f268a853a /sys/dev | |
parent | 5c60dad7720489b9c6e0f8bab13349d156d97cd9 (diff) | |
download | FreeBSD-src-2d762880b382332f9c370074912c7a597cb2325d.zip FreeBSD-src-2d762880b382332f9c370074912c7a597cb2325d.tar.gz |
Only enable 11n modes if the chipset suports 11n.
Since the AR2427 doesn't allow 802.11n, it shouldn't have them
configured.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ath/ath_hal/ar5416/ar5416_misc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c b/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c index ac6009b..4a07a16 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c @@ -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 |