Date: Sun, 29 May 2011 00:17:13 +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: r222432 - in head/sys/dev/ath: . ath_hal/ar9002 Message-ID: <201105290017.p4T0HDke006347@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun May 29 00:17:13 2011 New Revision: 222432 URL: http://svn.freebsd.org/changeset/base/222432 Log: Teach if_ath about devices which have short-GI in 20MHz channel modes. This has been disabled until now because there hasn't been any supported device which has this feature. Since the AR9287 is the first device to support it, and since now the HAL has functional AR9287+11n support, flip this on. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Sat May 28 22:11:22 2011 (r222431) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Sun May 29 00:17:13 2011 (r222432) @@ -439,9 +439,14 @@ ar9287FillCapabilityInfo(struct ath_hal /* Disable this so Block-ACK works correctly */ pCap->halHasRxSelfLinkedTail = AH_FALSE; pCap->halPSPollBroken = AH_FALSE; + + /* Hardware supports (at least) single-stream STBC TX/RX */ pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; + /* Hardware supports short-GI w/ 20MHz */ + pCap->halHTSGI20Support = 1; + return AH_TRUE; } Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat May 28 22:11:22 2011 (r222431) +++ head/sys/dev/ath/if_ath.c Sun May 29 00:17:13 2011 (r222432) @@ -627,13 +627,22 @@ ath_attach(u_int16_t devid, struct ath_s | IEEE80211_HTC_AMPDU /* A-MPDU tx/rx */ | IEEE80211_HTC_AMSDU /* A-MSDU tx/rx */ | IEEE80211_HTCAP_MAXAMSDU_3839 /* max A-MSDU length */ - /* At the present time, the hardware doesn't support short-GI in 20mhz mode */ -#if 0 - | IEEE80211_HTCAP_SHORTGI20 /* short GI in 20MHz */ -#endif | IEEE80211_HTCAP_SMPS_OFF; /* SM power save off */ ; + /* + * Enable short-GI for HT20 only if the hardware + * advertises support. + * Notably, anything earlier than the AR9287 doesn't. + */ + if ((ath_hal_getcapability(ah, + HAL_CAP_HT20_SGI, 0, NULL) == HAL_OK) && + (wmodes & HAL_MODE_HT20)) { + device_printf(sc->sc_dev, + "[HT] enabling short-GI in 20MHz mode\n"); + ic->ic_htcaps |= IEEE80211_HTCAP_SHORTGI20; + } + if (wmodes & HAL_MODE_HT40) ic->ic_htcaps |= IEEE80211_HTCAP_CHWIDTH40 | IEEE80211_HTCAP_SHORTGI40;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105290017.p4T0HDke006347>