mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-04 04:54:18 +00:00
323e249ce8
This updates mac80211 to version 6.1.97-1. This code is based on Linux 6.1.97 and contains all fixes included in the upstream wireless subsystem from that kernel version. This includes many bugfixes and also some security fixes. The removed patches are already integrated in upstream Linux 6.1.97 or in backports. The following patches were integrated in upstream Linux: ath11k/0013-wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_.patch ath11k/0035-wifi-ath11k-Use-platform_get_irq-to-get-the-interrup.patch ath11k/0036-wifi-ath11k-fix-SAC-bug-on-peer-addition-with-sta-ba.patch ath11k/0047-wifi-ath11k-fix-deinitialization-of-firmware-resourc.patch ath11k/0053-wifi-ath11k-fix-writing-to-unintended-memory-region.patch ath11k/0060-wifi-ath11k-Ignore-frags-from-uninitialized-peer-in-.patch ath11k/0065-wifi-ath11k-fix-tx-status-reporting-in-encap-offload.patch ath11k/0067-wifi-ath11k-Fix-SKB-corruption-in-REO-destination-ri.patch ath11k/0069-wifi-ath11k-fix-registration-of-6Ghz-only-phy-withou.patch ath11k/0080-wifi-ath11k-add-support-default-regdb-while-searchin.patch ath11k/0085-wifi-ath11k-fix-memory-leak-in-WMI-firmware-stats.patch ath11k/0086-wifi-ath11k-Add-missing-check-for-ioremap.patch ath11k/0096-wifi-ath11k-fix-boot-failure-with-one-MSI-vector.patch subsys/337-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch The following patches were integrated in upstream backports: ath11k/901-wifi-ath11k-pci-fix-compilation-in-5.16-and-older.patch build/080-resv_start_op.patch build/110-backport_napi_build_skb.patch The following files are missing in backports, we do not have to remove them any more. Some were already missing before some were removed in this update: include/linux/cordic.h include/linux/crc8.h include/linux/eeprom_93cx6.h include/linux/wl12xx.h include/net/ieee80211.h backport-include/linux/bcm47xx_nvram.h include/linux/ath9k_platform.h include/net/bluetooth/ backports ships a dummy Mediatek wed header for older kernel versions. We backported the feature in our kernel, remove the dummy header: backport-include/linux/soc/mediatek/mtk_wed.h Remove header files for subsystems used form the mainline kernel: include/trace/events/qrtr.h include/net/rsi_91x.h backport-include/linux/platform_data/brcmnand.h Link: https://github.com/openwrt/openwrt/pull/15827 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
142 lines
4.9 KiB
Diff
142 lines
4.9 KiB
Diff
From df8e3729ffc0aa645839693f74ee7b6d999cdf64 Mon Sep 17 00:00:00 2001
|
|
From: Maharaja Kennadyrajan <quic_mkenna@quicinc.com>
|
|
Date: Tue, 9 May 2023 20:07:24 +0300
|
|
Subject: [PATCH] wifi: ath11k: Send HT fixed rate in WMI peer fixed param
|
|
|
|
Due to the firmware behavior with HT fixed rate setting,
|
|
HT fixed rate MCS with NSS > 1 are treated as NSS = 1
|
|
HT rates in the firmware and enables the HT fixed rate of
|
|
NSS = 1.
|
|
|
|
This leads to HT fixed rate is always configured for NSS = 1
|
|
even though the user sets NSS = 2 or > 1 HT fixed MCS in the
|
|
set bitrate command.
|
|
|
|
Currently HT fixed MCS is sent via WMI peer assoc command.
|
|
Fix this issue, by sending the HT fixed rate MCS in WMI peer
|
|
fixed param instead of sending in peer assoc command.
|
|
|
|
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
|
|
|
Signed-off-by: Maharaja Kennadyrajan <quic_mkenna@quicinc.com>
|
|
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
|
Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
|
---
|
|
drivers/net/wireless/ath/ath11k/mac.c | 63 ++++++++++++++++++++++++++-
|
|
1 file changed, 61 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
@@ -4477,6 +4477,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct
|
|
return ret;
|
|
}
|
|
|
|
+static int
|
|
+ath11k_mac_set_peer_ht_fixed_rate(struct ath11k_vif *arvif,
|
|
+ struct ieee80211_sta *sta,
|
|
+ const struct cfg80211_bitrate_mask *mask,
|
|
+ enum nl80211_band band)
|
|
+{
|
|
+ struct ath11k *ar = arvif->ar;
|
|
+ u8 ht_rate, nss = 0;
|
|
+ u32 rate_code;
|
|
+ int ret, i;
|
|
+
|
|
+ lockdep_assert_held(&ar->conf_mutex);
|
|
+
|
|
+ for (i = 0; i < ARRAY_SIZE(mask->control[band].ht_mcs); i++) {
|
|
+ if (hweight8(mask->control[band].ht_mcs[i]) == 1) {
|
|
+ nss = i + 1;
|
|
+ ht_rate = ffs(mask->control[band].ht_mcs[i]) - 1;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ if (!nss) {
|
|
+ ath11k_warn(ar->ab, "No single HT Fixed rate found to set for %pM",
|
|
+ sta->addr);
|
|
+ return -EINVAL;
|
|
+ }
|
|
+
|
|
+ /* Avoid updating invalid nss as fixed rate*/
|
|
+ if (nss > sta->deflink.rx_nss)
|
|
+ return -EINVAL;
|
|
+
|
|
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
|
+ "Setting Fixed HT Rate for peer %pM. Device will not switch to any other selected rates",
|
|
+ sta->addr);
|
|
+
|
|
+ rate_code = ATH11K_HW_RATE_CODE(ht_rate, nss - 1,
|
|
+ WMI_RATE_PREAMBLE_HT);
|
|
+ ret = ath11k_wmi_set_peer_param(ar, sta->addr,
|
|
+ arvif->vdev_id,
|
|
+ WMI_PEER_PARAM_FIXED_RATE,
|
|
+ rate_code);
|
|
+ if (ret)
|
|
+ ath11k_warn(ar->ab,
|
|
+ "failed to update STA %pM HT Fixed Rate %d: %d\n",
|
|
+ sta->addr, rate_code, ret);
|
|
+
|
|
+ return ret;
|
|
+}
|
|
+
|
|
static int ath11k_station_assoc(struct ath11k *ar,
|
|
struct ieee80211_vif *vif,
|
|
struct ieee80211_sta *sta,
|
|
@@ -4488,7 +4536,7 @@ static int ath11k_station_assoc(struct a
|
|
struct cfg80211_chan_def def;
|
|
enum nl80211_band band;
|
|
struct cfg80211_bitrate_mask *mask;
|
|
- u8 num_vht_rates, num_he_rates;
|
|
+ u8 num_ht_rates, num_vht_rates, num_he_rates;
|
|
|
|
lockdep_assert_held(&ar->conf_mutex);
|
|
|
|
@@ -4516,6 +4564,7 @@ static int ath11k_station_assoc(struct a
|
|
|
|
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band, mask);
|
|
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band, mask);
|
|
+ num_ht_rates = ath11k_mac_bitrate_mask_num_ht_rates(ar, band, mask);
|
|
|
|
/* If single VHT/HE rate is configured (by set_bitrate_mask()),
|
|
* peer_assoc will disable VHT/HE. This is now enabled by a peer specific
|
|
@@ -4532,6 +4581,11 @@ static int ath11k_station_assoc(struct a
|
|
band);
|
|
if (ret)
|
|
return ret;
|
|
+ } else if (sta->deflink.ht_cap.ht_supported && num_ht_rates == 1) {
|
|
+ ret = ath11k_mac_set_peer_ht_fixed_rate(arvif, sta, mask,
|
|
+ band);
|
|
+ if (ret)
|
|
+ return ret;
|
|
}
|
|
|
|
/* Re-assoc is run only to update supported rates for given station. It
|
|
@@ -4605,7 +4659,7 @@ static void ath11k_sta_rc_update_wk(stru
|
|
const u16 *vht_mcs_mask;
|
|
const u16 *he_mcs_mask;
|
|
u32 changed, bw, nss, smps, bw_prev;
|
|
- int err, num_vht_rates, num_he_rates;
|
|
+ int err, num_ht_rates, num_vht_rates, num_he_rates;
|
|
const struct cfg80211_bitrate_mask *mask;
|
|
struct peer_assoc_params peer_arg;
|
|
enum wmi_phy_mode peer_phymode;
|
|
@@ -4721,6 +4775,8 @@ static void ath11k_sta_rc_update_wk(stru
|
|
|
|
if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
|
|
mask = &arvif->bitrate_mask;
|
|
+ num_ht_rates = ath11k_mac_bitrate_mask_num_ht_rates(ar, band,
|
|
+ mask);
|
|
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band,
|
|
mask);
|
|
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band,
|
|
@@ -4743,6 +4799,9 @@ static void ath11k_sta_rc_update_wk(stru
|
|
} else if (sta->deflink.he_cap.has_he && num_he_rates == 1) {
|
|
ath11k_mac_set_peer_he_fixed_rate(arvif, sta, mask,
|
|
band);
|
|
+ } else if (sta->deflink.ht_cap.ht_supported && num_ht_rates == 1) {
|
|
+ ath11k_mac_set_peer_ht_fixed_rate(arvif, sta, mask,
|
|
+ band);
|
|
} else {
|
|
/* If the peer is non-VHT/HE or no fixed VHT/HE rate
|
|
* is provided in the new bitrate mask we set the
|