[ath9k-devel] [PATCH 2/2] ath9k: check for Rx-STBC flag and pass it to ieee80211
Signed-off-by: Oleksij Rempel li...@rempel-privat.de --- drivers/net/wireless/ath/ath9k/init.c | 9 +++-- drivers/net/wireless/ath/ath9k/mac.c | 5 + drivers/net/wireless/ath/ath9k/mac.h | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index aba4151..7739b05 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -769,8 +769,13 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) IEEE80211_HW_REPORTS_TX_ACK_STATUS | IEEE80211_HW_SUPPORTS_RC_TABLE; - if (sc-sc_ah-caps.hw_caps ATH9K_HW_CAP_HT) -hw-flags |= IEEE80211_HW_AMPDU_AGGREGATION; + if (sc-sc_ah-caps.hw_caps ATH9K_HW_CAP_HT) { + hw-flags |= IEEE80211_HW_AMPDU_AGGREGATION; + + if (AR_SREV_9280_20_OR_LATER(ah)) + hw-radiotap_mcs_details |= + IEEE80211_RADIOTAP_MCS_HAVE_STBC; + } if (AR_SREV_9160_10_OR_LATER(sc-sc_ah) || ath9k_modparam_nohwcrypt) hw-flags |= IEEE80211_HW_MFP_CAPABLE; diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index a52081d..d055e38 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c @@ -593,6 +593,11 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds, (ads.ds_rxstatus3 AR_GI) ? RX_FLAG_SHORT_GI : 0; rs-flag |= (ads.ds_rxstatus3 AR_2040) ? RX_FLAG_40MHZ : 0; + if (AR_SREV_9280_20_OR_LATER(ah)) + rs-flag |= + (ads.ds_rxstatus3 AR_STBC) ? + /* we can only Nss=1 STBC */ + (1 RX_FLAG_STBC_SHIFT) : 0; if (ads.ds_rxstatus8 AR_PreDelimCRCErr) rs-rs_flags |= ATH9K_RX_DELIM_CRC_PRE; diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h index 3f1e775..b02dfce 100644 --- a/drivers/net/wireless/ath/ath9k/mac.h +++ b/drivers/net/wireless/ath/ath9k/mac.h @@ -534,7 +534,8 @@ struct ar5416_desc { #define AR_2040 0x0002 #define AR_Parallel40 0x0004 #define AR_Parallel40_S 2 -#define AR_RxStatusRsvd30 0x00f8 +#define AR_STBC 0x0008 /* on ar9280 and later */ +#define AR_RxStatusRsvd30 0x00f0 #define AR_RxAntenna 0xff00 #define AR_RxAntenna_S 8 -- 1.8.1.2 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 2/2] ath9k: check for Rx-STBC flag and pass it to ieee80211
On Fri, 2013-05-24 at 12:18 +0200, Oleksij Rempel wrote: Signed-off-by: Oleksij Rempel li...@rempel-privat.de --- drivers/net/wireless/ath/ath9k/init.c | 9 +++-- drivers/net/wireless/ath/ath9k/mac.c | 5 + drivers/net/wireless/ath/ath9k/mac.h | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index aba4151..7739b05 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -769,8 +769,13 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) IEEE80211_HW_REPORTS_TX_ACK_STATUS | IEEE80211_HW_SUPPORTS_RC_TABLE; - if (sc-sc_ah-caps.hw_caps ATH9K_HW_CAP_HT) - hw-flags |= IEEE80211_HW_AMPDU_AGGREGATION; + if (sc-sc_ah-caps.hw_caps ATH9K_HW_CAP_HT) { + hw-flags |= IEEE80211_HW_AMPDU_AGGREGATION; + + if (AR_SREV_9280_20_OR_LATER(ah)) + hw-radiotap_mcs_details |= + IEEE80211_RADIOTAP_MCS_HAVE_STBC; + } Are you sure this is right? It seems that if other devices don't support STBC they can report all frames to be w/o STBC. Or do they support STBC but don't report it? johannes ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 2/2] ath9k: check for Rx-STBC flag and pass it to ieee80211
Am 24.05.2013 12:29, schrieb Johannes Berg: On Fri, 2013-05-24 at 12:18 +0200, Oleksij Rempel wrote: Signed-off-by: Oleksij Rempel li...@rempel-privat.de --- drivers/net/wireless/ath/ath9k/init.c | 9 +++-- drivers/net/wireless/ath/ath9k/mac.c | 5 + drivers/net/wireless/ath/ath9k/mac.h | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index aba4151..7739b05 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -769,8 +769,13 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) IEEE80211_HW_REPORTS_TX_ACK_STATUS | IEEE80211_HW_SUPPORTS_RC_TABLE; -if (sc-sc_ah-caps.hw_caps ATH9K_HW_CAP_HT) - hw-flags |= IEEE80211_HW_AMPDU_AGGREGATION; +if (sc-sc_ah-caps.hw_caps ATH9K_HW_CAP_HT) { +hw-flags |= IEEE80211_HW_AMPDU_AGGREGATION; + +if (AR_SREV_9280_20_OR_LATER(ah)) +hw-radiotap_mcs_details |= +IEEE80211_RADIOTAP_MCS_HAVE_STBC; +} Are you sure this is right? It seems that if other devices don't support STBC they can report all frames to be w/o STBC. Or do they support STBC but don't report it? They support STBC but don't report it. First device whhic can report it is ar9280. -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 2/2] ath9k: check for Rx-STBC flag and pass it to ieee80211
Am 24.05.2013 12:18, schrieb Oleksij Rempel: Signed-off-by: Oleksij Rempel li...@rempel-privat.de --- drivers/net/wireless/ath/ath9k/init.c | 9 +++-- drivers/net/wireless/ath/ath9k/mac.c | 5 + drivers/net/wireless/ath/ath9k/mac.h | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index aba4151..7739b05 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -769,8 +769,13 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) IEEE80211_HW_REPORTS_TX_ACK_STATUS | IEEE80211_HW_SUPPORTS_RC_TABLE; - if (sc-sc_ah-caps.hw_caps ATH9K_HW_CAP_HT) - hw-flags |= IEEE80211_HW_AMPDU_AGGREGATION; + if (sc-sc_ah-caps.hw_caps ATH9K_HW_CAP_HT) { + hw-flags |= IEEE80211_HW_AMPDU_AGGREGATION; + + if (AR_SREV_9280_20_OR_LATER(ah)) + hw-radiotap_mcs_details |= + IEEE80211_RADIOTAP_MCS_HAVE_STBC; comment for my self. i forgot to include net/ieee80211_radiotap.h for IEEE80211_RADIOTAP_MCS_HAVE_STBC. This patch is broken. -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel