aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2012-03-09 08:13:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-12 14:19:39 -0400
commite9219779f943dfa1010ccbb63de14d49a47c43ee (patch)
treed622df869844dfdb0b7f9ec465c3c0ca208713a4 /net
parent3cc5240b5e036abb565c8ac7cffdcceb06a13517 (diff)
mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS
Disable multi stream rates (MCS > 7) when a STA is in static SMPS mode since it has only one active rx chain. Hence, it doesn't even make sense to sample multi stream rates. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/rc80211_minstrel_ht.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index ff5f7b84e825..2b42564d6e29 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -692,6 +692,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
692 int ack_dur; 692 int ack_dur;
693 int stbc; 693 int stbc;
694 int i; 694 int i;
695 unsigned int smps;
695 696
696 /* fall back to the old minstrel for legacy stations */ 697 /* fall back to the old minstrel for legacy stations */
697 if (!sta->ht_cap.ht_supported) 698 if (!sta->ht_cap.ht_supported)
@@ -731,6 +732,9 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
731 oper_chan_type != NL80211_CHAN_HT40PLUS) 732 oper_chan_type != NL80211_CHAN_HT40PLUS)
732 sta_cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; 733 sta_cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
733 734
735 smps = (sta_cap & IEEE80211_HT_CAP_SM_PS) >>
736 IEEE80211_HT_CAP_SM_PS_SHIFT;
737
734 for (i = 0; i < ARRAY_SIZE(mi->groups); i++) { 738 for (i = 0; i < ARRAY_SIZE(mi->groups); i++) {
735 u16 req = 0; 739 u16 req = 0;
736 740
@@ -748,6 +752,11 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
748 if ((sta_cap & req) != req) 752 if ((sta_cap & req) != req)
749 continue; 753 continue;
750 754
755 /* Mark MCS > 7 as unsupported if STA is in static SMPS mode */
756 if (smps == WLAN_HT_CAP_SM_PS_STATIC &&
757 minstrel_mcs_groups[i].streams > 1)
758 continue;
759
751 mi->groups[i].supported = 760 mi->groups[i].supported =
752 mcs->rx_mask[minstrel_mcs_groups[i].streams - 1]; 761 mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];
753 762