|
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 |
@@ -147,7 +147,11 @@ static u16 rs_fw_get_config_flags(struct iwl_mvm *mvm, |
147 | 147 | (vht_ena && (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC)))) |
148 | 148 | flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK; |
149 | 149 |
|
150 | | - /* consider our LDPC support in case of HE */ |
| 150 | + /* consider LDPC support in case of HE */ |
| 151 | + if (he_cap->has_he && (he_cap->he_cap_elem.phy_cap_info[1] & |
| 152 | + IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD)) |
| 153 | + flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK; |
| 154 | + |
151 | 155 | if (sband->iftype_data && sband->iftype_data->he_cap.has_he && |
152 | 156 | !(sband->iftype_data->he_cap.he_cap_elem.phy_cap_info[1] & |
153 | 157 | IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD)) |
@@ -191,11 +195,13 @@ rs_fw_vht_set_enabled_rates(const struct ieee80211_sta *sta, |
191 | 195 | { |
192 | 196 | u16 supp; |
193 | 197 | int i, highest_mcs; |
| 198 | + u8 nss = sta->rx_nss; |
194 | 199 |
|
195 | | - for (i = 0; i < sta->rx_nss; i++) { |
196 | | - if (i == IWL_TLC_NSS_MAX) |
197 | | - break; |
| 200 | + /* the station support only a single receive chain */ |
| 201 | + if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
| 202 | + nss = 1; |
198 | 203 |
|
| 204 | + for (i = 0; i < nss && i < IWL_TLC_NSS_MAX; i++) { |
199 | 205 | highest_mcs = rs_fw_vht_highest_rx_mcs_index(vht_cap, i + 1); |
200 | 206 | if (!highest_mcs) |
201 | 207 | continue; |
@@ -241,8 +247,13 @@ rs_fw_he_set_enabled_rates(const struct ieee80211_sta *sta, |
241 | 247 | u16 tx_mcs_160 = |
242 | 248 | le16_to_cpu(sband->iftype_data->he_cap.he_mcs_nss_supp.tx_mcs_160); |
243 | 249 | int i; |
| 250 | + u8 nss = sta->rx_nss; |
| 251 | + |
| 252 | + /* the station support only a single receive chain */ |
| 253 | + if (sta->smps_mode == IEEE80211_SMPS_STATIC) |
| 254 | + nss = 1; |
244 | 255 |
|
245 | | - for (i = 0; i < sta->rx_nss && i < IWL_TLC_NSS_MAX; i++) { |
| 256 | + for (i = 0; i < nss && i < IWL_TLC_NSS_MAX; i++) { |
246 | 257 | u16 _mcs_160 = (mcs_160 >> (2 * i)) & 0x3; |
247 | 258 | u16 _mcs_80 = (mcs_80 >> (2 * i)) & 0x3; |
248 | 259 | u16 _tx_mcs_160 = (tx_mcs_160 >> (2 * i)) & 0x3; |
@@ -303,8 +314,14 @@ static void rs_fw_set_supp_rates(struct ieee80211_sta *sta, |
303 | 314 | cmd->mode = IWL_TLC_MNG_MODE_HT; |
304 | 315 | cmd->ht_rates[IWL_TLC_NSS_1][IWL_TLC_HT_BW_NONE_160] = |
305 | 316 | cpu_to_le16(ht_cap->mcs.rx_mask[0]); |
306 | | - cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] = |
307 | | - 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]); |
308 | 325 | } |
309 | 326 | } |
310 | 327 |
|
|
0 commit comments