diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-04-19 13:57:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-20 11:52:36 -0400 |
commit | 074a8c0db255e79960593122b5458c9a9c0551fa (patch) | |
tree | 7d1beb94abbca5fdd6b6e1c39e1d482be51cff5a /drivers/net/wireless/ath/ath9k | |
parent | f79d9bad37cb1e7ef23d60b1dd0b7859957ced9e (diff) |
ath9k: add support for Tx and Rx STBC
Supported only for single stream rates by the hardware
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mac.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 351538cd8e4c..70e5aa415c89 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -214,6 +214,12 @@ static void setup_ht_cap(struct ath_softc *sc, | |||
214 | else | 214 | else |
215 | max_streams = 2; | 215 | max_streams = 2; |
216 | 216 | ||
217 | if (AR_SREV_9280_10_OR_LATER(ah)) { | ||
218 | if (max_streams >= 2) | ||
219 | ht_info->cap |= IEEE80211_HT_CAP_TX_STBC; | ||
220 | ht_info->cap |= (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT); | ||
221 | } | ||
222 | |||
217 | /* set up supported mcs set */ | 223 | /* set up supported mcs set */ |
218 | memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); | 224 | memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); |
219 | tx_streams = count_streams(common->tx_chainmask, max_streams); | 225 | tx_streams = count_streams(common->tx_chainmask, max_streams); |
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h index 66d0d5e56149..00f3e0c7528a 100644 --- a/drivers/net/wireless/ath/ath9k/mac.h +++ b/drivers/net/wireless/ath/ath9k/mac.h | |||
@@ -37,6 +37,8 @@ | |||
37 | AR_2040_##_index : 0) \ | 37 | AR_2040_##_index : 0) \ |
38 | |((_series)[_index].RateFlags & ATH9K_RATESERIES_HALFGI ? \ | 38 | |((_series)[_index].RateFlags & ATH9K_RATESERIES_HALFGI ? \ |
39 | AR_GI##_index : 0) \ | 39 | AR_GI##_index : 0) \ |
40 | |((_series)[_index].RateFlags & ATH9K_RATESERIES_STBC ? \ | ||
41 | AR_STBC##_index : 0) \ | ||
40 | |SM((_series)[_index].ChSel, AR_ChainSel##_index)) | 42 | |SM((_series)[_index].ChSel, AR_ChainSel##_index)) |
41 | 43 | ||
42 | #define CCK_SIFS_TIME 10 | 44 | #define CCK_SIFS_TIME 10 |
@@ -434,7 +436,10 @@ struct ar5416_desc { | |||
434 | #define AR_ChainSel3_S 17 | 436 | #define AR_ChainSel3_S 17 |
435 | #define AR_RTSCTSRate 0x0ff00000 | 437 | #define AR_RTSCTSRate 0x0ff00000 |
436 | #define AR_RTSCTSRate_S 20 | 438 | #define AR_RTSCTSRate_S 20 |
437 | #define AR_TxCtlRsvd70 0xf0000000 | 439 | #define AR_STBC0 0x10000000 |
440 | #define AR_STBC1 0x20000000 | ||
441 | #define AR_STBC2 0x40000000 | ||
442 | #define AR_STBC3 0x80000000 | ||
438 | 443 | ||
439 | #define AR_TxRSSIAnt00 0x000000ff | 444 | #define AR_TxRSSIAnt00 0x000000ff |
440 | #define AR_TxRSSIAnt00_S 0 | 445 | #define AR_TxRSSIAnt00_S 0 |
@@ -647,6 +652,7 @@ enum ath9k_rx_filter { | |||
647 | #define ATH9K_RATESERIES_RTS_CTS 0x0001 | 652 | #define ATH9K_RATESERIES_RTS_CTS 0x0001 |
648 | #define ATH9K_RATESERIES_2040 0x0002 | 653 | #define ATH9K_RATESERIES_2040 0x0002 |
649 | #define ATH9K_RATESERIES_HALFGI 0x0004 | 654 | #define ATH9K_RATESERIES_HALFGI 0x0004 |
655 | #define ATH9K_RATESERIES_STBC 0x0008 | ||
650 | 656 | ||
651 | struct ath9k_11n_rate_series { | 657 | struct ath9k_11n_rate_series { |
652 | u32 Tries; | 658 | u32 Tries; |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 2237658144e6..b0d345a675fe 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1607,6 +1607,8 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf) | |||
1607 | series[i].Rate = rix | 0x80; | 1607 | series[i].Rate = rix | 0x80; |
1608 | series[i].PktDuration = ath_pkt_duration(sc, rix, bf, | 1608 | series[i].PktDuration = ath_pkt_duration(sc, rix, bf, |
1609 | is_40, is_sgi, is_sp); | 1609 | is_40, is_sgi, is_sp); |
1610 | if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC)) | ||
1611 | series[i].RateFlags |= ATH9K_RATESERIES_STBC; | ||
1610 | continue; | 1612 | continue; |
1611 | } | 1613 | } |
1612 | 1614 | ||