aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel_ht.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-12 08:21:00 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 03:41:41 -0500
commitaf0ed69badc67a0b6e976543f52029fce9ac8f69 (patch)
tree95f35f3f70f3fd949beda47ad3cee838b0c343c1 /net/mac80211/rc80211_minstrel_ht.c
parent9fb04b501a57ad29fa989ab3cd2123482e7eac5f (diff)
mac80211: stop modifying HT SMPS capability
Instead of modifying the HT SMPS capability field for stations, track the SMPS mode explicitly in a new field in the station struct and use it in the drivers that care about it. This simplifies the code using it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht.c')
-rw-r--r--net/mac80211/rc80211_minstrel_ht.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 6176c71d47ff..3af141c69712 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -808,7 +808,6 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
808 int ack_dur; 808 int ack_dur;
809 int stbc; 809 int stbc;
810 int i; 810 int i;
811 unsigned int smps;
812 811
813 /* fall back to the old minstrel for legacy stations */ 812 /* fall back to the old minstrel for legacy stations */
814 if (!sta->ht_cap.ht_supported) 813 if (!sta->ht_cap.ht_supported)
@@ -844,9 +843,6 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
844 if (sta_cap & IEEE80211_HT_CAP_LDPC_CODING) 843 if (sta_cap & IEEE80211_HT_CAP_LDPC_CODING)
845 mi->tx_flags |= IEEE80211_TX_CTL_LDPC; 844 mi->tx_flags |= IEEE80211_TX_CTL_LDPC;
846 845
847 smps = (sta_cap & IEEE80211_HT_CAP_SM_PS) >>
848 IEEE80211_HT_CAP_SM_PS_SHIFT;
849
850 for (i = 0; i < ARRAY_SIZE(mi->groups); i++) { 846 for (i = 0; i < ARRAY_SIZE(mi->groups); i++) {
851 mi->groups[i].supported = 0; 847 mi->groups[i].supported = 0;
852 if (i == MINSTREL_CCK_GROUP) { 848 if (i == MINSTREL_CCK_GROUP) {
@@ -869,7 +865,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
869 continue; 865 continue;
870 866
871 /* Mark MCS > 7 as unsupported if STA is in static SMPS mode */ 867 /* Mark MCS > 7 as unsupported if STA is in static SMPS mode */
872 if (smps == WLAN_HT_CAP_SM_PS_STATIC && 868 if (sta->smps_mode == IEEE80211_SMPS_STATIC &&
873 minstrel_mcs_groups[i].streams > 1) 869 minstrel_mcs_groups[i].streams > 1)
874 continue; 870 continue;
875 871