diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/rs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rs.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index 60a4291ca221..56b636d9ab30 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c | |||
@@ -1209,23 +1209,9 @@ static s32 rs_get_best_rate(struct iwl_mvm *mvm, | |||
1209 | return new_rate; | 1209 | return new_rate; |
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | static bool iwl_is_ht40_tx_allowed(struct iwl_mvm *mvm, | 1212 | static bool iwl_is_ht40_tx_allowed(struct ieee80211_sta *sta) |
1213 | struct ieee80211_sta_ht_cap *ht_cap) | ||
1214 | { | 1213 | { |
1215 | /* | 1214 | return sta->bandwidth >= IEEE80211_STA_RX_BW_40; |
1216 | * Remainder of this function checks ht_cap, but if it's | ||
1217 | * NULL then we can do HT40 (special case for RXON) | ||
1218 | */ | ||
1219 | if (!ht_cap) | ||
1220 | return true; | ||
1221 | |||
1222 | if (!ht_cap->ht_supported) | ||
1223 | return false; | ||
1224 | |||
1225 | if (!(ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)) | ||
1226 | return false; | ||
1227 | |||
1228 | return true; | ||
1229 | } | 1215 | } |
1230 | 1216 | ||
1231 | /* | 1217 | /* |
@@ -1243,8 +1229,7 @@ static int rs_switch_to_mimo2(struct iwl_mvm *mvm, | |||
1243 | if (!sta->ht_cap.ht_supported) | 1229 | if (!sta->ht_cap.ht_supported) |
1244 | return -1; | 1230 | return -1; |
1245 | 1231 | ||
1246 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1232 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1247 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1248 | return -1; | 1233 | return -1; |
1249 | 1234 | ||
1250 | /* Need both Tx chains/antennas to support MIMO */ | 1235 | /* Need both Tx chains/antennas to support MIMO */ |
@@ -1258,7 +1243,7 @@ static int rs_switch_to_mimo2(struct iwl_mvm *mvm, | |||
1258 | tbl->max_search = IWL_MAX_SEARCH; | 1243 | tbl->max_search = IWL_MAX_SEARCH; |
1259 | rate_mask = lq_sta->active_mimo2_rate; | 1244 | rate_mask = lq_sta->active_mimo2_rate; |
1260 | 1245 | ||
1261 | if (iwl_is_ht40_tx_allowed(mvm, &sta->ht_cap)) | 1246 | if (iwl_is_ht40_tx_allowed(sta)) |
1262 | tbl->is_ht40 = 1; | 1247 | tbl->is_ht40 = 1; |
1263 | else | 1248 | else |
1264 | tbl->is_ht40 = 0; | 1249 | tbl->is_ht40 = 0; |
@@ -1296,8 +1281,7 @@ static int rs_switch_to_mimo3(struct iwl_mvm *mvm, | |||
1296 | if (!sta->ht_cap.ht_supported) | 1281 | if (!sta->ht_cap.ht_supported) |
1297 | return -1; | 1282 | return -1; |
1298 | 1283 | ||
1299 | if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) | 1284 | if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
1300 | == WLAN_HT_CAP_SM_PS_STATIC) | ||
1301 | return -1; | 1285 | return -1; |
1302 | 1286 | ||
1303 | /* Need both Tx chains/antennas to support MIMO */ | 1287 | /* Need both Tx chains/antennas to support MIMO */ |
@@ -1311,7 +1295,7 @@ static int rs_switch_to_mimo3(struct iwl_mvm *mvm, | |||
1311 | tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; | 1295 | tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; |
1312 | rate_mask = lq_sta->active_mimo3_rate; | 1296 | rate_mask = lq_sta->active_mimo3_rate; |
1313 | 1297 | ||
1314 | if (iwl_is_ht40_tx_allowed(mvm, &sta->ht_cap)) | 1298 | if (iwl_is_ht40_tx_allowed(sta)) |
1315 | tbl->is_ht40 = 1; | 1299 | tbl->is_ht40 = 1; |
1316 | else | 1300 | else |
1317 | tbl->is_ht40 = 0; | 1301 | tbl->is_ht40 = 0; |
@@ -1356,7 +1340,7 @@ static int rs_switch_to_siso(struct iwl_mvm *mvm, | |||
1356 | tbl->max_search = IWL_MAX_SEARCH; | 1340 | tbl->max_search = IWL_MAX_SEARCH; |
1357 | rate_mask = lq_sta->active_siso_rate; | 1341 | rate_mask = lq_sta->active_siso_rate; |
1358 | 1342 | ||
1359 | if (iwl_is_ht40_tx_allowed(mvm, &sta->ht_cap)) | 1343 | if (iwl_is_ht40_tx_allowed(sta)) |
1360 | tbl->is_ht40 = 1; | 1344 | tbl->is_ht40 = 1; |
1361 | else | 1345 | else |
1362 | tbl->is_ht40 = 0; | 1346 | tbl->is_ht40 = 0; |