|
|
deb259 |
From f6fa861cd23ef48520a150969c39f5315cda5165 Mon Sep 17 00:00:00 2001
|
|
|
deb259 |
From: Eugene Syromiatnikov <esyr@redhat.com>
|
|
|
deb259 |
Date: Thu, 5 Sep 2019 16:52:26 +0200
|
|
|
deb259 |
Subject: [PATCH 03/43] Revert "iwlwifi: mvm: limit TLC according to our HE
|
|
|
deb259 |
capabilities"
|
|
|
deb259 |
|
|
|
deb259 |
This reverts commit 529281bdf0fc6af56d15957e5b823cb1de564b82.
|
|
|
deb259 |
---
|
|
|
deb259 |
drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 34 ++++----------------------
|
|
|
deb259 |
1 file changed, 5 insertions(+), 29 deletions(-)
|
|
|
deb259 |
|
|
|
deb259 |
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
|
|
|
deb259 |
===================================================================
|
|
|
deb259 |
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c 2019-09-05 14:40:03.011478963 +0200
|
|
|
deb259 |
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c 2019-09-06 01:25:40.953350009 +0200
|
|
|
deb259 |
@@ -230,43 +230,19 @@
|
|
|
deb259 |
|
|
|
deb259 |
static void
|
|
|
deb259 |
rs_fw_he_set_enabled_rates(const struct ieee80211_sta *sta,
|
|
|
deb259 |
- struct ieee80211_supported_band *sband,
|
|
|
deb259 |
+ const struct ieee80211_sta_he_cap *he_cap,
|
|
|
deb259 |
struct iwl_tlc_config_cmd *cmd)
|
|
|
deb259 |
{
|
|
|
deb259 |
- const struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
|
|
|
deb259 |
- u16 mcs_160 = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
|
|
|
deb259 |
- u16 mcs_80 = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
|
|
|
deb259 |
- u16 tx_mcs_80 =
|
|
|
deb259 |
- le16_to_cpu(sband->iftype_data->he_cap.he_mcs_nss_supp.tx_mcs_80);
|
|
|
deb259 |
- u16 tx_mcs_160 =
|
|
|
deb259 |
- le16_to_cpu(sband->iftype_data->he_cap.he_mcs_nss_supp.tx_mcs_160);
|
|
|
deb259 |
+ u16 mcs_160 = le16_to_cpu(sta->he_cap.he_mcs_nss_supp.rx_mcs_160);
|
|
|
deb259 |
+ u16 mcs_80 = le16_to_cpu(sta->he_cap.he_mcs_nss_supp.rx_mcs_80);
|
|
|
deb259 |
int i;
|
|
|
deb259 |
|
|
|
deb259 |
for (i = 0; i < sta->rx_nss && i < MAX_NSS; i++) {
|
|
|
deb259 |
u16 _mcs_160 = (mcs_160 >> (2 * i)) & 0x3;
|
|
|
deb259 |
u16 _mcs_80 = (mcs_80 >> (2 * i)) & 0x3;
|
|
|
deb259 |
- u16 _tx_mcs_160 = (tx_mcs_160 >> (2 * i)) & 0x3;
|
|
|
deb259 |
- u16 _tx_mcs_80 = (tx_mcs_80 >> (2 * i)) & 0x3;
|
|
|
deb259 |
|
|
|
deb259 |
- /* If one side doesn't support - mark both as not supporting */
|
|
|
deb259 |
- if (_mcs_80 == IEEE80211_HE_MCS_NOT_SUPPORTED ||
|
|
|
deb259 |
- _tx_mcs_80 == IEEE80211_HE_MCS_NOT_SUPPORTED) {
|
|
|
deb259 |
- _mcs_80 = IEEE80211_HE_MCS_NOT_SUPPORTED;
|
|
|
deb259 |
- _tx_mcs_80 = IEEE80211_HE_MCS_NOT_SUPPORTED;
|
|
|
deb259 |
- }
|
|
|
deb259 |
- if (_mcs_80 > _tx_mcs_80)
|
|
|
deb259 |
- _mcs_80 = _tx_mcs_80;
|
|
|
deb259 |
cmd->ht_rates[i][0] =
|
|
|
deb259 |
cpu_to_le16(rs_fw_he_ieee80211_mcs_to_rs_mcs(_mcs_80));
|
|
|
deb259 |
-
|
|
|
deb259 |
- /* If one side doesn't support - mark both as not supporting */
|
|
|
deb259 |
- if (_mcs_160 == IEEE80211_HE_MCS_NOT_SUPPORTED ||
|
|
|
deb259 |
- _tx_mcs_160 == IEEE80211_HE_MCS_NOT_SUPPORTED) {
|
|
|
deb259 |
- _mcs_160 = IEEE80211_HE_MCS_NOT_SUPPORTED;
|
|
|
deb259 |
- _tx_mcs_160 = IEEE80211_HE_MCS_NOT_SUPPORTED;
|
|
|
deb259 |
- }
|
|
|
deb259 |
- if (_mcs_160 > _tx_mcs_160)
|
|
|
deb259 |
- _mcs_160 = _tx_mcs_160;
|
|
|
deb259 |
cmd->ht_rates[i][1] =
|
|
|
deb259 |
cpu_to_le16(rs_fw_he_ieee80211_mcs_to_rs_mcs(_mcs_160));
|
|
|
deb259 |
}
|
|
|
deb259 |
@@ -295,7 +271,7 @@
|
|
|
deb259 |
/* HT/VHT rates */
|
|
|
deb259 |
if (he_cap && he_cap->has_he) {
|
|
|
deb259 |
cmd->mode = IWL_TLC_MNG_MODE_HE;
|
|
|
deb259 |
- rs_fw_he_set_enabled_rates(sta, sband, cmd);
|
|
|
deb259 |
+ rs_fw_he_set_enabled_rates(sta, he_cap, cmd);
|
|
|
deb259 |
} else if (vht_cap && vht_cap->vht_supported) {
|
|
|
deb259 |
cmd->mode = IWL_TLC_MNG_MODE_VHT;
|
|
|
deb259 |
rs_fw_vht_set_enabled_rates(sta, vht_cap, cmd);
|