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>
This commit is contained in:
parent
3cc5240b5e
commit
e9219779f9
1 changed files with 9 additions and 0 deletions
|
@ -692,6 +692,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
|
||||||
int ack_dur;
|
int ack_dur;
|
||||||
int stbc;
|
int stbc;
|
||||||
int i;
|
int i;
|
||||||
|
unsigned int smps;
|
||||||
|
|
||||||
/* fall back to the old minstrel for legacy stations */
|
/* fall back to the old minstrel for legacy stations */
|
||||||
if (!sta->ht_cap.ht_supported)
|
if (!sta->ht_cap.ht_supported)
|
||||||
|
@ -731,6 +732,9 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
|
||||||
oper_chan_type != NL80211_CHAN_HT40PLUS)
|
oper_chan_type != NL80211_CHAN_HT40PLUS)
|
||||||
sta_cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
sta_cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||||
|
|
||||||
|
smps = (sta_cap & IEEE80211_HT_CAP_SM_PS) >>
|
||||||
|
IEEE80211_HT_CAP_SM_PS_SHIFT;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(mi->groups); i++) {
|
for (i = 0; i < ARRAY_SIZE(mi->groups); i++) {
|
||||||
u16 req = 0;
|
u16 req = 0;
|
||||||
|
|
||||||
|
@ -748,6 +752,11 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
|
||||||
if ((sta_cap & req) != req)
|
if ((sta_cap & req) != req)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* Mark MCS > 7 as unsupported if STA is in static SMPS mode */
|
||||||
|
if (smps == WLAN_HT_CAP_SM_PS_STATIC &&
|
||||||
|
minstrel_mcs_groups[i].streams > 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
mi->groups[i].supported =
|
mi->groups[i].supported =
|
||||||
mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];
|
mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue