diff options
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965-rs.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/rs.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/sta.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rs.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 5 | ||||
-rw-r--r-- | include/net/mac80211.h | 2 | ||||
-rw-r--r-- | net/mac80211/ht.c | 19 | ||||
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 6 | ||||
-rw-r--r-- | net/mac80211/rx.c | 16 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 2 |
11 files changed, 50 insertions, 48 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-rs.c b/drivers/net/wireless/iwlegacy/4965-rs.c index f3b8e91aa3dc..e8324b5e5bfe 100644 --- a/drivers/net/wireless/iwlegacy/4965-rs.c +++ b/drivers/net/wireless/iwlegacy/4965-rs.c | |||
@@ -1183,8 +1183,7 @@ il4965_rs_switch_to_mimo2(struct il_priv *il, struct il_lq_sta *lq_sta, | |||
1183 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) | 1183 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) |
1184 | return -1; | 1184 | return -1; |
1185 | 1185 | ||
1186 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) == | 1186 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1187 | WLAN_HT_CAP_SM_PS_STATIC) | ||
1188 | return -1; | 1187 | return -1; |
1189 | 1188 | ||
1190 | /* Need both Tx chains/antennas to support MIMO */ | 1189 | /* Need both Tx chains/antennas to support MIMO */ |
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index 1f598604a79c..4c9aafb1b0cd 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -1830,32 +1830,30 @@ il_set_ht_add_station(struct il_priv *il, u8 idx, struct ieee80211_sta *sta) | |||
1830 | { | 1830 | { |
1831 | struct ieee80211_sta_ht_cap *sta_ht_inf = &sta->ht_cap; | 1831 | struct ieee80211_sta_ht_cap *sta_ht_inf = &sta->ht_cap; |
1832 | __le32 sta_flags; | 1832 | __le32 sta_flags; |
1833 | u8 mimo_ps_mode; | ||
1834 | 1833 | ||
1835 | if (!sta || !sta_ht_inf->ht_supported) | 1834 | if (!sta || !sta_ht_inf->ht_supported) |
1836 | goto done; | 1835 | goto done; |
1837 | 1836 | ||
1838 | mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2; | ||
1839 | D_ASSOC("spatial multiplexing power save mode: %s\n", | 1837 | D_ASSOC("spatial multiplexing power save mode: %s\n", |
1840 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_STATIC) ? "static" : | 1838 | (sta->smps_mode == IEEE80211_SMPS_STATIC) ? "static" : |
1841 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_DYNAMIC) ? "dynamic" : | 1839 | (sta->smps_mode == IEEE80211_SMPS_DYNAMIC) ? "dynamic" : |
1842 | "disabled"); | 1840 | "disabled"); |
1843 | 1841 | ||
1844 | sta_flags = il->stations[idx].sta.station_flags; | 1842 | sta_flags = il->stations[idx].sta.station_flags; |
1845 | 1843 | ||
1846 | sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK); | 1844 | sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK); |
1847 | 1845 | ||
1848 | switch (mimo_ps_mode) { | 1846 | switch (sta->smps_mode) { |
1849 | case WLAN_HT_CAP_SM_PS_STATIC: | 1847 | case IEEE80211_SMPS_STATIC: |
1850 | sta_flags |= STA_FLG_MIMO_DIS_MSK; | 1848 | sta_flags |= STA_FLG_MIMO_DIS_MSK; |
1851 | break; | 1849 | break; |
1852 | case WLAN_HT_CAP_SM_PS_DYNAMIC: | 1850 | case IEEE80211_SMPS_DYNAMIC: |
1853 | sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; | 1851 | sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; |
1854 | break; | 1852 | break; |
1855 | case WLAN_HT_CAP_SM_PS_DISABLED: | 1853 | case IEEE80211_SMPS_OFF: |
1856 | break; | 1854 | break; |
1857 | default: | 1855 | default: |
1858 | IL_WARN("Invalid MIMO PS mode %d\n", mimo_ps_mode); | 1856 | IL_WARN("Invalid MIMO PS mode %d\n", sta->smps_mode); |
1859 | break; | 1857 | break; |
1860 | } | 1858 | } |
1861 | 1859 | ||
diff --git a/drivers/net/wireless/iwlwifi/dvm/rs.c b/drivers/net/wireless/iwlwifi/dvm/rs.c index b25de02964f9..abe304267261 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rs.c +++ b/drivers/net/wireless/iwlwifi/dvm/rs.c | |||
@@ -1289,8 +1289,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv, | |||
1289 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) | 1289 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) |
1290 | return -1; | 1290 | return -1; |
1291 | 1291 | ||
1292 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1292 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1293 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1294 | return -1; | 1293 | return -1; |
1295 | 1294 | ||
1296 | /* Need both Tx chains/antennas to support MIMO */ | 1295 | /* Need both Tx chains/antennas to support MIMO */ |
@@ -1345,8 +1344,7 @@ static int rs_switch_to_mimo3(struct iwl_priv *priv, | |||
1345 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) | 1344 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) |
1346 | return -1; | 1345 | return -1; |
1347 | 1346 | ||
1348 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1347 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1349 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1350 | return -1; | 1348 | return -1; |
1351 | 1349 | ||
1352 | /* Need both Tx chains/antennas to support MIMO */ | 1350 | /* Need both Tx chains/antennas to support MIMO */ |
diff --git a/drivers/net/wireless/iwlwifi/dvm/sta.c b/drivers/net/wireless/iwlwifi/dvm/sta.c index 6deab38c7aee..d5faf74c7991 100644 --- a/drivers/net/wireless/iwlwifi/dvm/sta.c +++ b/drivers/net/wireless/iwlwifi/dvm/sta.c | |||
@@ -196,7 +196,6 @@ static void iwl_sta_calc_ht_flags(struct iwl_priv *priv, | |||
196 | __le32 *flags, __le32 *mask) | 196 | __le32 *flags, __le32 *mask) |
197 | { | 197 | { |
198 | struct ieee80211_sta_ht_cap *sta_ht_inf = &sta->ht_cap; | 198 | struct ieee80211_sta_ht_cap *sta_ht_inf = &sta->ht_cap; |
199 | u8 mimo_ps_mode; | ||
200 | 199 | ||
201 | *mask = STA_FLG_RTS_MIMO_PROT_MSK | | 200 | *mask = STA_FLG_RTS_MIMO_PROT_MSK | |
202 | STA_FLG_MIMO_DIS_MSK | | 201 | STA_FLG_MIMO_DIS_MSK | |
@@ -208,26 +207,24 @@ static void iwl_sta_calc_ht_flags(struct iwl_priv *priv, | |||
208 | if (!sta || !sta_ht_inf->ht_supported) | 207 | if (!sta || !sta_ht_inf->ht_supported) |
209 | return; | 208 | return; |
210 | 209 | ||
211 | mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2; | ||
212 | |||
213 | IWL_DEBUG_INFO(priv, "STA %pM SM PS mode: %s\n", | 210 | IWL_DEBUG_INFO(priv, "STA %pM SM PS mode: %s\n", |
214 | sta->addr, | 211 | sta->addr, |
215 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_STATIC) ? | 212 | (sta->smps_mode == IEEE80211_SMPS_STATIC) ? |
216 | "static" : | 213 | "static" : |
217 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_DYNAMIC) ? | 214 | (sta->smps_mode == IEEE80211_SMPS_DYNAMIC) ? |
218 | "dynamic" : "disabled"); | 215 | "dynamic" : "disabled"); |
219 | 216 | ||
220 | switch (mimo_ps_mode) { | 217 | switch (sta->smps_mode) { |
221 | case WLAN_HT_CAP_SM_PS_STATIC: | 218 | case IEEE80211_SMPS_STATIC: |
222 | *flags |= STA_FLG_MIMO_DIS_MSK; | 219 | *flags |= STA_FLG_MIMO_DIS_MSK; |
223 | break; | 220 | break; |
224 | case WLAN_HT_CAP_SM_PS_DYNAMIC: | 221 | case IEEE80211_SMPS_DYNAMIC: |
225 | *flags |= STA_FLG_RTS_MIMO_PROT_MSK; | 222 | *flags |= STA_FLG_RTS_MIMO_PROT_MSK; |
226 | break; | 223 | break; |
227 | case WLAN_HT_CAP_SM_PS_DISABLED: | 224 | case IEEE80211_SMPS_OFF: |
228 | break; | 225 | break; |
229 | default: | 226 | default: |
230 | IWL_WARN(priv, "Invalid MIMO PS mode %d\n", mimo_ps_mode); | 227 | IWL_WARN(priv, "Invalid MIMO PS mode %d\n", sta->smps_mode); |
231 | break; | 228 | break; |
232 | } | 229 | } |
233 | 230 | ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index 8ba36e5e4b67..56b636d9ab30 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c | |||
@@ -1229,8 +1229,7 @@ static int rs_switch_to_mimo2(struct iwl_mvm *mvm, | |||
1229 | if (!sta->ht_cap.ht_supported) | 1229 | if (!sta->ht_cap.ht_supported) |
1230 | return -1; | 1230 | return -1; |
1231 | 1231 | ||
1232 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1232 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1233 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1234 | return -1; | 1233 | return -1; |
1235 | 1234 | ||
1236 | /* Need both Tx chains/antennas to support MIMO */ | 1235 | /* Need both Tx chains/antennas to support MIMO */ |
@@ -1282,8 +1281,7 @@ static int rs_switch_to_mimo3(struct iwl_mvm *mvm, | |||
1282 | if (!sta->ht_cap.ht_supported) | 1281 | if (!sta->ht_cap.ht_supported) |
1283 | return -1; | 1282 | return -1; |
1284 | 1283 | ||
1285 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1284 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1286 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1287 | return -1; | 1285 | return -1; |
1288 | 1286 | ||
1289 | /* Need both Tx chains/antennas to support MIMO */ | 1287 | /* Need both Tx chains/antennas to support MIMO */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index f35d85a71bbc..9503e6954b89 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -343,10 +343,7 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev, | |||
343 | * when using more then one tx stream (>MCS7). | 343 | * when using more then one tx stream (>MCS7). |
344 | */ | 344 | */ |
345 | if (sta && txdesc->u.ht.mcs > 7 && | 345 | if (sta && txdesc->u.ht.mcs > 7 && |
346 | ((sta->ht_cap.cap & | 346 | sta->smps_mode == IEEE80211_SMPS_DYNAMIC) |
347 | IEEE80211_HT_CAP_SM_PS) >> | ||
348 | IEEE80211_HT_CAP_SM_PS_SHIFT) == | ||
349 | WLAN_HT_CAP_SM_PS_DYNAMIC) | ||
350 | __set_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags); | 347 | __set_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags); |
351 | } else { | 348 | } else { |
352 | txdesc->u.ht.mcs = rt2x00_get_rate_mcs(hwrate->mcs); | 349 | txdesc->u.ht.mcs = rt2x00_get_rate_mcs(hwrate->mcs); |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 54e2add8429f..f7eba1300d82 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1245,6 +1245,7 @@ enum ieee80211_sta_rx_bandwidth { | |||
1245 | * station can receive at the moment, changed by operating mode | 1245 | * station can receive at the moment, changed by operating mode |
1246 | * notifications and capabilities. The value is only valid after | 1246 | * notifications and capabilities. The value is only valid after |
1247 | * the station moves to associated state. | 1247 | * the station moves to associated state. |
1248 | * @smps_mode: current SMPS mode (off, static or dynamic) | ||
1248 | */ | 1249 | */ |
1249 | struct ieee80211_sta { | 1250 | struct ieee80211_sta { |
1250 | u32 supp_rates[IEEE80211_NUM_BANDS]; | 1251 | u32 supp_rates[IEEE80211_NUM_BANDS]; |
@@ -1257,6 +1258,7 @@ struct ieee80211_sta { | |||
1257 | u8 max_sp; | 1258 | u8 max_sp; |
1258 | u8 rx_nss; | 1259 | u8 rx_nss; |
1259 | enum ieee80211_sta_rx_bandwidth bandwidth; | 1260 | enum ieee80211_sta_rx_bandwidth bandwidth; |
1261 | enum ieee80211_smps_mode smps_mode; | ||
1260 | 1262 | ||
1261 | /* must be last */ | 1263 | /* must be last */ |
1262 | u8 drv_priv[0] __aligned(sizeof(void *)); | 1264 | u8 drv_priv[0] __aligned(sizeof(void *)); |
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index b84147ac5b4c..0db25d4bb223 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -102,6 +102,7 @@ bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, | |||
102 | int i, max_tx_streams; | 102 | int i, max_tx_streams; |
103 | bool changed; | 103 | bool changed; |
104 | enum ieee80211_sta_rx_bandwidth bw; | 104 | enum ieee80211_sta_rx_bandwidth bw; |
105 | enum ieee80211_smps_mode smps_mode; | ||
105 | 106 | ||
106 | memset(&ht_cap, 0, sizeof(ht_cap)); | 107 | memset(&ht_cap, 0, sizeof(ht_cap)); |
107 | 108 | ||
@@ -216,6 +217,24 @@ bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, | |||
216 | ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 ? | 217 | ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 ? |
217 | IEEE80211_STA_RX_BW_40 : IEEE80211_STA_RX_BW_20; | 218 | IEEE80211_STA_RX_BW_40 : IEEE80211_STA_RX_BW_20; |
218 | 219 | ||
220 | switch ((ht_cap.cap & IEEE80211_HT_CAP_SM_PS) | ||
221 | >> IEEE80211_HT_CAP_SM_PS_SHIFT) { | ||
222 | case WLAN_HT_CAP_SM_PS_INVALID: | ||
223 | case WLAN_HT_CAP_SM_PS_STATIC: | ||
224 | smps_mode = IEEE80211_SMPS_STATIC; | ||
225 | break; | ||
226 | case WLAN_HT_CAP_SM_PS_DYNAMIC: | ||
227 | smps_mode = IEEE80211_SMPS_DYNAMIC; | ||
228 | break; | ||
229 | case WLAN_HT_CAP_SM_PS_DISABLED: | ||
230 | smps_mode = IEEE80211_SMPS_OFF; | ||
231 | break; | ||
232 | } | ||
233 | |||
234 | if (smps_mode != sta->sta.smps_mode) | ||
235 | changed = true; | ||
236 | sta->sta.smps_mode = smps_mode; | ||
237 | |||
219 | return changed; | 238 | return changed; |
220 | } | 239 | } |
221 | 240 | ||
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 | ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 296a4aeadedc..3acb70b73e22 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -2375,31 +2375,27 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
2375 | switch (mgmt->u.action.u.ht_smps.action) { | 2375 | switch (mgmt->u.action.u.ht_smps.action) { |
2376 | case WLAN_HT_ACTION_SMPS: { | 2376 | case WLAN_HT_ACTION_SMPS: { |
2377 | struct ieee80211_supported_band *sband; | 2377 | struct ieee80211_supported_band *sband; |
2378 | u8 smps; | 2378 | enum ieee80211_smps_mode smps_mode; |
2379 | 2379 | ||
2380 | /* convert to HT capability */ | 2380 | /* convert to HT capability */ |
2381 | switch (mgmt->u.action.u.ht_smps.smps_control) { | 2381 | switch (mgmt->u.action.u.ht_smps.smps_control) { |
2382 | case WLAN_HT_SMPS_CONTROL_DISABLED: | 2382 | case WLAN_HT_SMPS_CONTROL_DISABLED: |
2383 | smps = WLAN_HT_CAP_SM_PS_DISABLED; | 2383 | smps_mode = IEEE80211_SMPS_OFF; |
2384 | break; | 2384 | break; |
2385 | case WLAN_HT_SMPS_CONTROL_STATIC: | 2385 | case WLAN_HT_SMPS_CONTROL_STATIC: |
2386 | smps = WLAN_HT_CAP_SM_PS_STATIC; | 2386 | smps_mode = IEEE80211_SMPS_STATIC; |
2387 | break; | 2387 | break; |
2388 | case WLAN_HT_SMPS_CONTROL_DYNAMIC: | 2388 | case WLAN_HT_SMPS_CONTROL_DYNAMIC: |
2389 | smps = WLAN_HT_CAP_SM_PS_DYNAMIC; | 2389 | smps_mode = IEEE80211_SMPS_DYNAMIC; |
2390 | break; | 2390 | break; |
2391 | default: | 2391 | default: |
2392 | goto invalid; | 2392 | goto invalid; |
2393 | } | 2393 | } |
2394 | smps <<= IEEE80211_HT_CAP_SM_PS_SHIFT; | ||
2395 | 2394 | ||
2396 | /* if no change do nothing */ | 2395 | /* if no change do nothing */ |
2397 | if ((rx->sta->sta.ht_cap.cap & | 2396 | if (rx->sta->sta.smps_mode == smps_mode) |
2398 | IEEE80211_HT_CAP_SM_PS) == smps) | ||
2399 | goto handled; | 2397 | goto handled; |
2400 | 2398 | rx->sta->sta.smps_mode = smps_mode; | |
2401 | rx->sta->sta.ht_cap.cap &= ~IEEE80211_HT_CAP_SM_PS; | ||
2402 | rx->sta->sta.ht_cap.cap |= smps; | ||
2403 | 2399 | ||
2404 | sband = rx->local->hw.wiphy->bands[status->band]; | 2400 | sband = rx->local->hw.wiphy->bands[status->band]; |
2405 | 2401 | ||
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 0794b9018ed4..a79ce820cb50 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -375,6 +375,8 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, | |||
375 | for (i = 0; i < IEEE80211_NUM_TIDS; i++) | 375 | for (i = 0; i < IEEE80211_NUM_TIDS; i++) |
376 | sta->last_seq_ctrl[i] = cpu_to_le16(USHRT_MAX); | 376 | sta->last_seq_ctrl[i] = cpu_to_le16(USHRT_MAX); |
377 | 377 | ||
378 | sta->sta.smps_mode = IEEE80211_SMPS_OFF; | ||
379 | |||
378 | sta_dbg(sdata, "Allocated STA %pM\n", sta->sta.addr); | 380 | sta_dbg(sdata, "Allocated STA %pM\n", sta->sta.addr); |
379 | 381 | ||
380 | return sta; | 382 | return sta; |