diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-04-18 00:56:38 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-04-18 00:56:38 +0000 |
commit | 857ed7b676a241ad304166d2a7c7cdb7a2e58da6 (patch) | |
tree | 3c5273157da7726178ec4d1045fbe5839b95c8ae /package/mac80211/patches/566-ath9k_stbc_support.patch | |
parent | 2f366cb4bd9a535870214d4d74a8d381137fca07 (diff) | |
download | upstream-857ed7b676a241ad304166d2a7c7cdb7a2e58da6.tar.gz upstream-857ed7b676a241ad304166d2a7c7cdb7a2e58da6.tar.bz2 upstream-857ed7b676a241ad304166d2a7c7cdb7a2e58da6.zip |
ath9k: add stbc support
SVN-Revision: 20976
Diffstat (limited to 'package/mac80211/patches/566-ath9k_stbc_support.patch')
-rw-r--r-- | package/mac80211/patches/566-ath9k_stbc_support.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/package/mac80211/patches/566-ath9k_stbc_support.patch b/package/mac80211/patches/566-ath9k_stbc_support.patch new file mode 100644 index 0000000000..b403377b5d --- /dev/null +++ b/package/mac80211/patches/566-ath9k_stbc_support.patch @@ -0,0 +1,57 @@ +--- a/drivers/net/wireless/ath/ath9k/init.c ++++ b/drivers/net/wireless/ath/ath9k/init.c +@@ -217,6 +217,12 @@ static void setup_ht_cap(struct ath_soft + else + max_streams = 2; + ++ if (AR_SREV_9280_10_OR_LATER(ah)) { ++ if (max_streams >= 2) ++ ht_info->cap |= IEEE80211_HT_CAP_TX_STBC; ++ ht_info->cap |= (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT); ++ } ++ + /* set up supported mcs set */ + memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); + tx_streams = count_streams(common->tx_chainmask, max_streams); +--- a/drivers/net/wireless/ath/ath9k/mac.h ++++ b/drivers/net/wireless/ath/ath9k/mac.h +@@ -37,6 +37,8 @@ + AR_2040_##_index : 0) \ + |((_series)[_index].RateFlags & ATH9K_RATESERIES_HALFGI ? \ + AR_GI##_index : 0) \ ++ |((_series)[_index].RateFlags & ATH9K_RATESERIES_STBC ? \ ++ AR_STBC##_index : 0) \ + |SM((_series)[_index].ChSel, AR_ChainSel##_index)) + + #define CCK_SIFS_TIME 10 +@@ -434,7 +436,10 @@ struct ar5416_desc { + #define AR_ChainSel3_S 17 + #define AR_RTSCTSRate 0x0ff00000 + #define AR_RTSCTSRate_S 20 +-#define AR_TxCtlRsvd70 0xf0000000 ++#define AR_STBC0 0x10000000 ++#define AR_STBC1 0x20000000 ++#define AR_STBC2 0x40000000 ++#define AR_STBC3 0x80000000 + + #define AR_TxRSSIAnt00 0x000000ff + #define AR_TxRSSIAnt00_S 0 +@@ -647,6 +652,7 @@ enum ath9k_rx_filter { + #define ATH9K_RATESERIES_RTS_CTS 0x0001 + #define ATH9K_RATESERIES_2040 0x0002 + #define ATH9K_RATESERIES_HALFGI 0x0004 ++#define ATH9K_RATESERIES_STBC 0x0008 + + struct ath9k_11n_rate_series { + u32 Tries; +--- 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_ + series[i].Rate = rix | 0x80; + series[i].PktDuration = ath_pkt_duration(sc, rix, bf, + is_40, is_sgi, is_sp); ++ if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC)) ++ series[i].RateFlags |= ATH9K_RATESERIES_STBC; + continue; + } + |