|
6 | 6 | * GPL LICENSE SUMMARY
|
7 | 7 | *
|
8 | 8 | * Copyright(c) 2017 Intel Deutschland GmbH
|
9 |
| - * Copyright(c) 2018 - 2019 Intel Corporation |
| 9 | + * Copyright(c) 2018 - 2020 Intel Corporation |
10 | 10 | *
|
11 | 11 | * This program is free software; you can redistribute it and/or modify
|
12 | 12 | * it under the terms of version 2 of the GNU General Public License as
|
|
27 | 27 | * BSD LICENSE
|
28 | 28 | *
|
29 | 29 | * Copyright(c) 2017 Intel Deutschland GmbH
|
30 |
| - * Copyright(c) 2018 - 2019 Intel Corporation |
| 30 | + * Copyright(c) 2018 - 2020 Intel Corporation |
31 | 31 | * All rights reserved.
|
32 | 32 | *
|
33 | 33 | * Redistribution and use in source and binary forms, with or without
|
@@ -195,11 +195,13 @@ rs_fw_vht_set_enabled_rates(const struct ieee80211_sta *sta,
|
195 | 195 | {
|
196 | 196 | u16 supp;
|
197 | 197 | int i, highest_mcs;
|
| 198 | + u8 nss = sta->rx_nss; |
198 | 199 |
|
199 |
| - for (i = 0; i < sta->rx_nss; i++) { |
200 |
| - if (i == IWL_TLC_NSS_MAX) |
201 |
| - break; |
| 200 | + /* the station support only a single receive chain */ |
| 201 | + if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
| 202 | + nss = 1; |
202 | 203 |
|
| 204 | + for (i = 0; i < nss && i < IWL_TLC_NSS_MAX; i++) { |
203 | 205 | highest_mcs = rs_fw_vht_highest_rx_mcs_index(vht_cap, i + 1);
|
204 | 206 | if (!highest_mcs)
|
205 | 207 | continue;
|
@@ -245,8 +247,13 @@ rs_fw_he_set_enabled_rates(const struct ieee80211_sta *sta,
|
245 | 247 | u16 tx_mcs_160 =
|
246 | 248 | le16_to_cpu(sband->iftype_data->he_cap.he_mcs_nss_supp.tx_mcs_160);
|
247 | 249 | int i;
|
| 250 | + u8 nss = sta->rx_nss; |
248 | 251 |
|
249 |
| - for (i = 0; i < sta->rx_nss && i < IWL_TLC_NSS_MAX; i++) { |
| 252 | + /* the station support only a single receive chain */ |
| 253 | + if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
| 254 | + nss = 1; |
| 255 | + |
| 256 | + for (i = 0; i < nss && i < IWL_TLC_NSS_MAX; i++) { |
250 | 257 | u16 _mcs_160 = (mcs_160 >> (2 * i)) & 0x3;
|
251 | 258 | u16 _mcs_80 = (mcs_80 >> (2 * i)) & 0x3;
|
252 | 259 | u16 _tx_mcs_160 = (tx_mcs_160 >> (2 * i)) & 0x3;
|
@@ -307,8 +314,14 @@ static void rs_fw_set_supp_rates(struct ieee80211_sta *sta,
|
307 | 314 | cmd->mode = IWL_TLC_MNG_MODE_HT;
|
308 | 315 | cmd->ht_rates[IWL_TLC_NSS_1][IWL_TLC_HT_BW_NONE_160] =
|
309 | 316 | cpu_to_le16(ht_cap->mcs.rx_mask[0]);
|
310 |
| - cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] = |
311 |
| - cpu_to_le16(ht_cap->mcs.rx_mask[1]); |
| 317 | + |
| 318 | + /* the station support only a single receive chain */ |
| 319 | + if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
| 320 | + cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] = |
| 321 | + 0; |
| 322 | + else |
| 323 | + cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] = |
| 324 | + cpu_to_le16(ht_cap->mcs.rx_mask[1]); |
312 | 325 | }
|
313 | 326 | }
|
314 | 327 |
|
|
0 commit comments