summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-05-29 00:59:38 +0000
committerattilio <attilio@FreeBSD.org>2011-05-29 00:59:38 +0000
commit55a3bf38a5f8f3d517542f92fc9e34a1cebcce52 (patch)
tree19a91bf94ba6b6dca19c88849791de347e024692 /sys/dev
parenteefddaeed6c0577102de6360a326fa15c36afd07 (diff)
parent16f4172df58aff2531075ad9428e980aba6a25bd (diff)
downloadFreeBSD-src-55a3bf38a5f8f3d517542f92fc9e34a1cebcce52.zip
FreeBSD-src-55a3bf38a5f8f3d517542f92fc9e34a1cebcce52.tar.gz
MFC
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9287_attach.c5
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9287_reset.c1
-rw-r--r--sys/dev/ath/if_ath.c17
3 files changed, 19 insertions, 4 deletions
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
index daee414..fdf1f96 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
@@ -439,9 +439,14 @@ ar9287FillCapabilityInfo(struct ath_hal *ah)
/* 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;
}
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c b/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c
index 34a723a..a799ba0 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c
@@ -185,6 +185,7 @@ ar9287SetPowerPerRateTable(struct ath_hal *ah,
break;
case 2:
scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
+ break;
default:
return AH_FALSE; /* Unsupported number of chains */
}
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 745a0d5..5527098 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -627,13 +627,22 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
| 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;
OpenPOWER on IntegriCloud