diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 4c88e8715df2..a1b0ff56bc35 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -652,19 +652,19 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags, | |||
652 | return 1; | 652 | return 1; |
653 | } | 653 | } |
654 | 654 | ||
655 | /* FIXME:RS: in 4965 we don't use greenfield at all */ | 655 | /* in 4965 we don't use greenfield at all */ |
656 | /* FIXME:RS: don't use greenfield for now in TX */ | 656 | static inline u8 rs_use_green(struct iwl_priv *priv, |
657 | #if 0 | 657 | struct ieee80211_conf *conf) |
658 | static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) | ||
659 | { | 658 | { |
660 | return (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) && | 659 | u8 is_green; |
661 | priv->current_ht_config.is_green_field && | 660 | |
662 | !priv->current_ht_config.non_GF_STA_present; | 661 | if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_4965) |
663 | } | 662 | is_green = 0; |
664 | #endif | 663 | else |
665 | static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) | 664 | is_green = (conf_is_ht(conf) && |
666 | { | 665 | priv->current_ht_config.is_green_field && |
667 | return 0; | 666 | !priv->current_ht_config.non_GF_STA_present); |
667 | return is_green; | ||
668 | } | 668 | } |
669 | 669 | ||
670 | /** | 670 | /** |
@@ -2061,6 +2061,10 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
2061 | active_tbl = 1 - lq_sta->active_tbl; | 2061 | active_tbl = 1 - lq_sta->active_tbl; |
2062 | 2062 | ||
2063 | tbl = &(lq_sta->lq_info[active_tbl]); | 2063 | tbl = &(lq_sta->lq_info[active_tbl]); |
2064 | if (is_legacy(tbl->lq_type)) | ||
2065 | lq_sta->is_green = 0; | ||
2066 | else | ||
2067 | lq_sta->is_green = rs_use_green(priv, conf); | ||
2064 | is_green = lq_sta->is_green; | 2068 | is_green = lq_sta->is_green; |
2065 | 2069 | ||
2066 | /* current tx rate */ | 2070 | /* current tx rate */ |
@@ -2896,7 +2900,8 @@ static ssize_t rs_sta_dbgfs_scale_table_read(struct file *file, | |||
2896 | ((is_mimo2(tbl->lq_type)) ? "MIMO2" : "MIMO3")); | 2900 | ((is_mimo2(tbl->lq_type)) ? "MIMO2" : "MIMO3")); |
2897 | desc += sprintf(buff+desc, " %s", | 2901 | desc += sprintf(buff+desc, " %s", |
2898 | (tbl->is_fat) ? "40MHz" : "20MHz"); | 2902 | (tbl->is_fat) ? "40MHz" : "20MHz"); |
2899 | desc += sprintf(buff+desc, " %s\n", (tbl->is_SGI) ? "SGI" : ""); | 2903 | desc += sprintf(buff+desc, " %s %s\n", (tbl->is_SGI) ? "SGI" : "", |
2904 | (lq_sta->is_green) ? "GF enabled" : ""); | ||
2900 | } | 2905 | } |
2901 | desc += sprintf(buff+desc, "last tx rate=0x%X\n", | 2906 | desc += sprintf(buff+desc, "last tx rate=0x%X\n", |
2902 | lq_sta->last_rate_n_flags); | 2907 | lq_sta->last_rate_n_flags); |
@@ -2959,13 +2964,14 @@ static ssize_t rs_sta_dbgfs_stats_table_read(struct file *file, | |||
2959 | return -ENOMEM; | 2964 | return -ENOMEM; |
2960 | 2965 | ||
2961 | for (i = 0; i < LQ_SIZE; i++) { | 2966 | for (i = 0; i < LQ_SIZE; i++) { |
2962 | desc += sprintf(buff+desc, "%s type=%d SGI=%d FAT=%d DUP=%d\n" | 2967 | desc += sprintf(buff+desc, "%s type=%d SGI=%d FAT=%d DUP=%d GF=%d\n" |
2963 | "rate=0x%X\n", | 2968 | "rate=0x%X\n", |
2964 | lq_sta->active_tbl == i ? "*" : "x", | 2969 | lq_sta->active_tbl == i ? "*" : "x", |
2965 | lq_sta->lq_info[i].lq_type, | 2970 | lq_sta->lq_info[i].lq_type, |
2966 | lq_sta->lq_info[i].is_SGI, | 2971 | lq_sta->lq_info[i].is_SGI, |
2967 | lq_sta->lq_info[i].is_fat, | 2972 | lq_sta->lq_info[i].is_fat, |
2968 | lq_sta->lq_info[i].is_dup, | 2973 | lq_sta->lq_info[i].is_dup, |
2974 | lq_sta->is_green, | ||
2969 | lq_sta->lq_info[i].current_rate); | 2975 | lq_sta->lq_info[i].current_rate); |
2970 | for (j = 0; j < IWL_RATE_COUNT; j++) { | 2976 | for (j = 0; j < IWL_RATE_COUNT; j++) { |
2971 | desc += sprintf(buff+desc, | 2977 | desc += sprintf(buff+desc, |