mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-08 05:32:09 -05:00
mac80211: update to version 6.16
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
d223d29feb
commit
e005cdea10
@ -10,13 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=6.14.11
|
||||
PKG_VERSION:=6.16
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
||||
PKG_HASH:=1f6620485f0b33046e87aa2c6ac04ae529e9b5e83e318652d89939b192c6e348
|
||||
PKG_HASH:=67f11320509dd18e5e2c58cb81e9f6c7d19b09f5229baa5880ed4dab71c19052
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)backports-$(PKG_VERSION)
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -3539,6 +3539,16 @@ int ath10k_core_register(struct ath10k *
|
||||
@@ -3546,6 +3546,16 @@ int ath10k_core_register(struct ath10k *
|
||||
|
||||
queue_work(ar->workqueue, &ar->register_work);
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -9934,6 +9934,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
@@ -9951,6 +9951,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
int ath10k_mac_register(struct ath10k *ar)
|
||||
{
|
||||
static const u32 cipher_suites[] = {
|
||||
@@ -10296,6 +10311,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10313,6 +10328,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
if (ret)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -10312,7 +10312,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10329,7 +10329,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
||||
@ -28,8 +28,8 @@ Forwarded: no
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -1022,6 +1022,40 @@ static inline int ath10k_vdev_setup_sync
|
||||
return ar->last_wmi_vdev_start_status;
|
||||
@@ -1043,6 +1043,40 @@ static inline int ath10k_vdev_delete_syn
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static u32 ath10k_get_max_antenna_gain(struct ath10k *ar,
|
||||
@ -69,7 +69,7 @@ Forwarded: no
|
||||
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
{
|
||||
struct cfg80211_chan_def *chandef = NULL;
|
||||
@@ -1054,7 +1088,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
@@ -1075,7 +1109,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = channel->max_power * 2;
|
||||
arg.channel.max_reg_power = channel->max_reg_power * 2;
|
||||
@ -79,7 +79,7 @@ Forwarded: no
|
||||
|
||||
reinit_completion(&ar->vdev_setup_done);
|
||||
reinit_completion(&ar->vdev_delete_done);
|
||||
@@ -1500,7 +1535,8 @@ static int ath10k_vdev_start_restart(str
|
||||
@@ -1521,7 +1556,8 @@ static int ath10k_vdev_start_restart(str
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = chandef->chan->max_power * 2;
|
||||
arg.channel.max_reg_power = chandef->chan->max_reg_power * 2;
|
||||
@ -89,7 +89,7 @@ Forwarded: no
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = arvif->u.ap.ssid;
|
||||
@@ -3431,7 +3467,8 @@ static int ath10k_update_channel_list(st
|
||||
@@ -3452,7 +3488,8 @@ static int ath10k_update_channel_list(st
|
||||
ch->min_power = 0;
|
||||
ch->max_power = channel->max_power * 2;
|
||||
ch->max_reg_power = channel->max_reg_power * 2;
|
||||
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
#include <linux/property.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ctype.h>
|
||||
@@ -3411,6 +3412,8 @@ static int ath10k_core_probe_fw(struct a
|
||||
@@ -3418,6 +3419,8 @@ static int ath10k_core_probe_fw(struct a
|
||||
|
||||
device_get_mac_address(ar->dev, ar->mac_addr);
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -10104,7 +10104,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10121,7 +10121,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||
|
||||
@ -136,11 +136,11 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
+#define QRTR_INSTANCE_MASK GENMASK(7, 0)
|
||||
+
|
||||
int ath11k_mhi_start(struct ath11k_pci *ar_pci);
|
||||
void ath11k_mhi_stop(struct ath11k_pci *ar_pci);
|
||||
void ath11k_mhi_stop(struct ath11k_pci *ar_pci, bool is_suspend);
|
||||
int ath11k_mhi_register(struct ath11k_pci *ar_pci);
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -374,13 +374,20 @@ static void ath11k_pci_sw_reset(struct a
|
||||
@@ -376,13 +376,20 @@ static void ath11k_pci_sw_reset(struct a
|
||||
static void ath11k_pci_init_qmi_ce_config(struct ath11k_base *ab)
|
||||
{
|
||||
struct ath11k_qmi_ce_cfg *cfg = &ab->qmi.ce_cfg;
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2030,6 +2030,7 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2041,6 +2041,7 @@ static int ath11k_qmi_assign_target_mem_
|
||||
struct device_node *hremote_node = NULL;
|
||||
struct resource res;
|
||||
u32 host_ddr_sz;
|
||||
@ -18,30 +18,30 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
int i, idx, ret;
|
||||
|
||||
for (i = 0, idx = 0; i < ab->qmi.mem_seg_count; i++) {
|
||||
@@ -2069,7 +2070,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2080,7 +2081,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
idx++;
|
||||
break;
|
||||
case BDF_MEM_REGION_TYPE:
|
||||
- ab->qmi.target_mem[idx].paddr = ab->hw_params.bdf_addr;
|
||||
+ if(of_property_read_u32(dev->of_node, "qcom,bdf-addr", &addr))
|
||||
+ if (of_property_read_u32(dev->of_node, "qcom,bdf-addr", &addr))
|
||||
+ addr = ab->hw_params.bdf_addr;
|
||||
+ ab->qmi.target_mem[idx].paddr = addr;
|
||||
ab->qmi.target_mem[idx].vaddr = NULL;
|
||||
ab->qmi.target_mem[idx].iaddr = NULL;
|
||||
ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size;
|
||||
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
|
||||
@@ -2091,8 +2094,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2102,8 +2105,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
if (!ab->qmi.target_mem[idx].iaddr)
|
||||
return -EIO;
|
||||
} else {
|
||||
- ab->qmi.target_mem[idx].paddr =
|
||||
- ATH11K_QMI_CALDB_ADDRESS;
|
||||
+ if(of_property_read_u32(dev->of_node, "qcom,caldb-addr", &addr))
|
||||
+ if (of_property_read_u32(dev->of_node, "qcom,caldb-addr", &addr))
|
||||
+ addr = ATH11K_QMI_CALDB_ADDRESS;
|
||||
+ ab->qmi.target_mem[idx].paddr = addr;
|
||||
ab->qmi.target_mem[idx].iaddr = NULL;
|
||||
}
|
||||
} else {
|
||||
ab->qmi.target_mem[idx].paddr = 0;
|
||||
@@ -2297,6 +2301,7 @@ static int ath11k_qmi_load_file_target_m
|
||||
@@ -2309,6 +2313,7 @@ static int ath11k_qmi_load_file_target_m
|
||||
struct qmi_wlanfw_bdf_download_resp_msg_v01 resp;
|
||||
struct qmi_txn txn;
|
||||
const u8 *temp = data;
|
||||
@ -49,7 +49,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
void __iomem *bdf_addr = NULL;
|
||||
int ret = 0;
|
||||
u32 remaining = len;
|
||||
@@ -2308,7 +2313,9 @@ static int ath11k_qmi_load_file_target_m
|
||||
@@ -2320,7 +2325,9 @@ static int ath11k_qmi_load_file_target_m
|
||||
memset(&resp, 0, sizeof(resp));
|
||||
|
||||
if (ab->hw_params.fixed_bdf_addr) {
|
||||
|
||||
@ -42,7 +42,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
+ath11k-$(CPTCFG_ATH11K_THERMAL) += thermal.o
|
||||
ath11k-$(CPTCFG_ATH11K_SPECTRAL) += spectral.o
|
||||
ath11k-$(CONFIG_PM) += wow.o
|
||||
|
||||
ath11k-$(CONFIG_DEV_COREDUMP) += coredump.o
|
||||
--- a/drivers/net/wireless/ath/ath11k/thermal.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/thermal.h
|
||||
@@ -26,7 +26,7 @@ struct ath11k_thermal {
|
||||
@ -62,5 +62,5 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
ATH11K_SPECTRAL=
|
||||
+ATH11K_THERMAL=
|
||||
ATH12K=
|
||||
ATH12K_AHB=
|
||||
ATH12K_DEBUG=
|
||||
ATH12K_DEBUGFS=
|
||||
|
||||
@ -31,7 +31,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
{
|
||||
.hw_rev = ATH11K_HW_IPQ8074,
|
||||
.name = "ipq8074 hw2.0",
|
||||
@@ -2280,7 +2280,8 @@ static void ath11k_core_reset(struct wor
|
||||
@@ -2481,7 +2481,8 @@ static void ath11k_core_reset(struct wor
|
||||
static int ath11k_init_hw_params(struct ath11k_base *ab)
|
||||
{
|
||||
const struct ath11k_hw_params *hw_params = NULL;
|
||||
@ -41,7 +41,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ath11k_hw_params); i++) {
|
||||
hw_params = &ath11k_hw_params[i];
|
||||
@@ -2296,7 +2297,31 @@ static int ath11k_init_hw_params(struct
|
||||
@@ -2497,7 +2498,31 @@ static int ath11k_init_hw_params(struct
|
||||
|
||||
ab->hw_params = *hw_params;
|
||||
|
||||
|
||||
@ -92,10 +92,10 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
+ },
|
||||
};
|
||||
|
||||
static inline struct ath11k_pdev *ath11k_core_get_single_pdev(struct ath11k_base *ab)
|
||||
static const struct dmi_system_id ath11k_pm_quirk_table[] = {
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
||||
@@ -149,6 +149,7 @@ enum ath11k_hw_rev {
|
||||
@@ -151,6 +151,7 @@ enum ath11k_hw_rev {
|
||||
ATH11K_HW_IPQ5018_HW10,
|
||||
ATH11K_HW_QCA2066_HW21,
|
||||
ATH11K_HW_QCA6698AQ_HW21,
|
||||
|
||||
@ -68,16 +68,16 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
return -EOPNOTSUPP;
|
||||
--- a/drivers/net/wireless/ath/ath11k/hif.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hif.h
|
||||
@@ -31,6 +31,7 @@ struct ath11k_hif_ops {
|
||||
void (*ce_irq_enable)(struct ath11k_base *ab);
|
||||
@@ -32,6 +32,7 @@ struct ath11k_hif_ops {
|
||||
void (*ce_irq_disable)(struct ath11k_base *ab);
|
||||
void (*get_ce_msi_idx)(struct ath11k_base *ab, u32 ce_id, u32 *msi_idx);
|
||||
void (*coredump_download)(struct ath11k_base *ab);
|
||||
+ void (*config_static_window)(struct ath11k_base *ab);
|
||||
};
|
||||
|
||||
static inline void ath11k_hif_ce_irq_enable(struct ath11k_base *ab)
|
||||
@@ -146,4 +147,12 @@ static inline void ath11k_get_ce_msi_idx
|
||||
*msi_data_idx = ce_id;
|
||||
@@ -159,4 +160,12 @@ static inline void ath11k_hif_coredump_d
|
||||
ab->hif.ops->coredump_download(ab);
|
||||
}
|
||||
|
||||
+static inline void ath11k_hif_config_static_window(struct ath11k_base *ab)
|
||||
@ -91,7 +91,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
#endif /* _HIF_H_ */
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2189,6 +2189,8 @@ static int ath11k_qmi_request_device_inf
|
||||
@@ -2201,6 +2201,8 @@ static int ath11k_qmi_request_device_inf
|
||||
if (!ab->hw_params.ce_remap)
|
||||
ab->mem_ce = ab->mem;
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
||||
@@ -45,6 +45,9 @@
|
||||
@@ -47,6 +47,9 @@
|
||||
#define ATH11K_INVALID_HW_MAC_ID 0xFF
|
||||
#define ATH11K_CONNECTION_LOSS_HZ (3 * HZ)
|
||||
|
||||
@ -89,7 +89,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
/* SMBIOS type containing Board Data File Name Extension */
|
||||
#define ATH11K_SMBIOS_BDF_EXT_TYPE 0xF8
|
||||
|
||||
@@ -952,6 +955,7 @@ struct ath11k_base {
|
||||
@@ -966,6 +969,7 @@ struct ath11k_base {
|
||||
struct list_head peers;
|
||||
wait_queue_head_t peer_mapping_wq;
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
@ -99,7 +99,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
||||
struct ath11k_targ_cap target_caps;
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -389,6 +389,8 @@ static void ath11k_pci_init_qmi_ce_confi
|
||||
@@ -391,6 +391,8 @@ static void ath11k_pci_init_qmi_ce_confi
|
||||
} else
|
||||
ab->qmi.service_ins_id = ab->hw_params.qmi_service_ins_id;
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2106,6 +2106,18 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2118,6 +2118,18 @@ static int ath11k_qmi_assign_target_mem_
|
||||
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
|
||||
idx++;
|
||||
break;
|
||||
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -4220,7 +4220,9 @@ static int ath11k_install_key(struct ath
|
||||
@@ -4232,7 +4232,9 @@ static int ath11k_install_key(struct ath
|
||||
return 0;
|
||||
|
||||
if (cmd == DISABLE_KEY) {
|
||||
|
||||
@ -1,924 +0,0 @@
|
||||
From patchwork Thu Sep 5 02:35:08 2024
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Kang Yang <quic_kangyang@quicinc.com>
|
||||
X-Patchwork-Id: 13791624
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com
|
||||
[205.220.180.131])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D313D33CFC
|
||||
for <linux-wireless@vger.kernel.org>; Thu, 5 Sep 2024 02:36:17 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.180.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1725503779; cv=none;
|
||||
b=blv4mH95IN2AR7Rt90gw/V7DnZRtr3upgAP50X6ew3jh0CusPG6/OTO9CSJVthJnqHU3Y3GT88jaeMzb9+f2xzqgl7+E35TmwN3uf6dFmbp7CD8LL0W6xu76ZZgFGxzRspv9YoVy/fydZY6I4JRc2faWqI540+n9bHEXdSJTZMM=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1725503779; c=relaxed/simple;
|
||||
bh=vjzfDc6UXtw2Li6Q3bAgcW0K1rcTpi3dAxkQgbT5ogI=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=VMgF0PfIOoXmfB6EARb/O+dooXutjAm/cnemJ0RC7uc8TSIAusH1ffc6jF1XndEp+nPTWnuMQ5/d1cE/bPeIvSTxrtWaUepnKNjQDrNKm4NrqmjR446CT9t0VHG16RZ1cmCmU74qXnfgus4XfTqD093lc1N5Q/YRh/kwmcCzxhY=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com;
|
||||
spf=pass smtp.mailfrom=quicinc.com;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b=E5hktrdm; arc=none smtp.client-ip=205.220.180.131
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b="E5hktrdm"
|
||||
Received: from pps.filterd (m0279869.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
484MRZwS008193;
|
||||
Thu, 5 Sep 2024 02:36:12 GMT
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
|
||||
cc:content-transfer-encoding:content-type:date:from:in-reply-to
|
||||
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
|
||||
No6X3gHpioHamjfMDccV8LJEZBGk/uDqbZ/fuGUTvJM=; b=E5hktrdmmOb3KcP6
|
||||
Qi3M5Y06Yd8RxNJTps8WMEoXZ7xzROVuhmRmlG/mw21NjBMTTMgtjcaen/n8Anj3
|
||||
Ash1VFK6s7PrLcwoUT/uui6hzleGE+X9Wh8DJXYnZKKWmeQ+8E0yEzNR0kt9FG0n
|
||||
S+asFc8VYEJHid6QDNAfM9e4JqJgU3NGXYJBTBM2lpdbqeWU7LEYnVTGCqvOPaH2
|
||||
K+QDwvNiNeXlqbaxnqCYimUrSDnTbSUoiVxSpTe9/muWWAB+6YuUbXRfTceqgcd1
|
||||
xFIOE1KrtAowMOk5mO3tn6Tjl7nJzewVUm9hncBRfynP8k2jt1xosMezL42dmb56
|
||||
a9VWLQ==
|
||||
Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41bt674mq1-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Thu, 05 Sep 2024 02:36:11 +0000 (GMT)
|
||||
Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com
|
||||
[10.47.209.197])
|
||||
by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
4852aAdV010181
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Thu, 5 Sep 2024 02:36:10 GMT
|
||||
Received: from kangyang.ap.qualcomm.com (10.80.80.8) by
|
||||
nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 4 Sep 2024 19:36:09 -0700
|
||||
From: Kang Yang <quic_kangyang@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>, <quic_kangyang@quicinc.com>
|
||||
Subject: [PATCH v3 1/4] wifi: ath12k: add configure country code for WCN7850
|
||||
Date: Thu, 5 Sep 2024 10:35:08 +0800
|
||||
Message-ID: <20240905023511.362-2-quic_kangyang@quicinc.com>
|
||||
X-Mailer: git-send-email 2.34.1.windows.1
|
||||
In-Reply-To: <20240905023511.362-1-quic_kangyang@quicinc.com>
|
||||
References: <20240905023511.362-1-quic_kangyang@quicinc.com>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
List-Id: <linux-wireless.vger.kernel.org>
|
||||
List-Subscribe: <mailto:linux-wireless+subscribe@vger.kernel.org>
|
||||
List-Unsubscribe: <mailto:linux-wireless+unsubscribe@vger.kernel.org>
|
||||
MIME-Version: 1.0
|
||||
X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To
|
||||
nalasex01b.na.qualcomm.com (10.47.209.197)
|
||||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-ORIG-GUID: FzfHe7cZy6IUVu8IKORVKLxkYG9f8WUl
|
||||
X-Proofpoint-GUID: FzfHe7cZy6IUVu8IKORVKLxkYG9f8WUl
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
|
||||
definitions=2024-09-05_01,2024-09-04_01,2024-09-02_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
malwarescore=0 adultscore=0
|
||||
bulkscore=0 mlxscore=0 impostorscore=0 suspectscore=0 phishscore=0
|
||||
mlxlogscore=999 lowpriorityscore=0 spamscore=0 clxscore=1015
|
||||
priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2407110000 definitions=main-2409050018
|
||||
|
||||
From: Wen Gong <quic_wgong@quicinc.com>
|
||||
|
||||
Add handler to send WMI_SET_CURRENT_COUNTRY_CMDID to firmware, which
|
||||
is used for WCN7850 to update country code.
|
||||
|
||||
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
|
||||
|
||||
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
|
||||
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 36 +++++++++++++++++++++++++++
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 13 ++++++++++
|
||||
2 files changed, 49 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -171,6 +171,8 @@ static const struct ath12k_wmi_tlv_polic
|
||||
.min_len = sizeof(struct ath12k_wmi_p2p_noa_info) },
|
||||
[WMI_TAG_P2P_NOA_EVENT] = {
|
||||
.min_len = sizeof(struct wmi_p2p_noa_event) },
|
||||
+ [WMI_TAG_11D_NEW_COUNTRY_EVENT] = {
|
||||
+ .min_len = sizeof(struct wmi_11d_new_cc_event) },
|
||||
};
|
||||
|
||||
static __le32 ath12k_wmi_tlv_hdr(u32 cmd, u32 len)
|
||||
@@ -2531,7 +2533,10 @@ int ath12k_wmi_send_scan_start_cmd(struc
|
||||
cmd->scan_id = cpu_to_le32(arg->scan_id);
|
||||
cmd->scan_req_id = cpu_to_le32(arg->scan_req_id);
|
||||
cmd->vdev_id = cpu_to_le32(arg->vdev_id);
|
||||
- cmd->scan_priority = cpu_to_le32(arg->scan_priority);
|
||||
+ if (ar->state_11d == ATH12K_11D_PREPARING)
|
||||
+ arg->scan_priority = WMI_SCAN_PRIORITY_MEDIUM;
|
||||
+ else
|
||||
+ arg->scan_priority = WMI_SCAN_PRIORITY_LOW;
|
||||
cmd->notify_scan_events = cpu_to_le32(arg->notify_scan_events);
|
||||
|
||||
ath12k_wmi_copy_scan_event_cntrl_flags(cmd, arg);
|
||||
@@ -3253,6 +3258,110 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+int ath12k_wmi_send_set_current_country_cmd(struct ath12k *ar,
|
||||
+ struct wmi_set_current_country_arg *arg)
|
||||
+{
|
||||
+ struct ath12k_wmi_pdev *wmi = ar->wmi;
|
||||
+ struct wmi_set_current_country_cmd *cmd;
|
||||
+ struct sk_buff *skb;
|
||||
+ int ret;
|
||||
+
|
||||
+ skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd));
|
||||
+ if (!skb)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ cmd = (struct wmi_set_current_country_cmd *)skb->data;
|
||||
+ cmd->tlv_header =
|
||||
+ ath12k_wmi_tlv_cmd_hdr(WMI_TAG_SET_CURRENT_COUNTRY_CMD,
|
||||
+ sizeof(*cmd));
|
||||
+
|
||||
+ cmd->pdev_id = cpu_to_le32(ar->pdev->pdev_id);
|
||||
+ memcpy(&cmd->new_alpha2, &arg->alpha2, sizeof(arg->alpha2));
|
||||
+ ret = ath12k_wmi_cmd_send(wmi, skb, WMI_SET_CURRENT_COUNTRY_CMDID);
|
||||
+
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_WMI,
|
||||
+ "set current country pdev id %d alpha2 %c%c\n",
|
||||
+ ar->pdev->pdev_id,
|
||||
+ arg->alpha2[0],
|
||||
+ arg->alpha2[1]);
|
||||
+
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab,
|
||||
+ "failed to send WMI_SET_CURRENT_COUNTRY_CMDID: %d\n", ret);
|
||||
+ dev_kfree_skb(skb);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+int ath12k_wmi_send_11d_scan_start_cmd(struct ath12k *ar,
|
||||
+ struct wmi_11d_scan_start_arg *arg)
|
||||
+{
|
||||
+ struct ath12k_wmi_pdev *wmi = ar->wmi;
|
||||
+ struct wmi_11d_scan_start_cmd *cmd;
|
||||
+ struct sk_buff *skb;
|
||||
+ int ret;
|
||||
+
|
||||
+ skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd));
|
||||
+ if (!skb)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ cmd = (struct wmi_11d_scan_start_cmd *)skb->data;
|
||||
+ cmd->tlv_header =
|
||||
+ ath12k_wmi_tlv_cmd_hdr(WMI_TAG_11D_SCAN_START_CMD,
|
||||
+ sizeof(*cmd));
|
||||
+
|
||||
+ cmd->vdev_id = cpu_to_le32(arg->vdev_id);
|
||||
+ cmd->scan_period_msec = cpu_to_le32(arg->scan_period_msec);
|
||||
+ cmd->start_interval_msec = cpu_to_le32(arg->start_interval_msec);
|
||||
+ ret = ath12k_wmi_cmd_send(wmi, skb, WMI_11D_SCAN_START_CMDID);
|
||||
+
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_WMI,
|
||||
+ "send 11d scan start vdev id %d period %d ms internal %d ms\n",
|
||||
+ arg->vdev_id, arg->scan_period_msec,
|
||||
+ arg->start_interval_msec);
|
||||
+
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab,
|
||||
+ "failed to send WMI_11D_SCAN_START_CMDID: %d\n", ret);
|
||||
+ dev_kfree_skb(skb);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+int ath12k_wmi_send_11d_scan_stop_cmd(struct ath12k *ar, u32 vdev_id)
|
||||
+{
|
||||
+ struct ath12k_wmi_pdev *wmi = ar->wmi;
|
||||
+ struct wmi_11d_scan_stop_cmd *cmd;
|
||||
+ struct sk_buff *skb;
|
||||
+ int ret;
|
||||
+
|
||||
+ skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd));
|
||||
+ if (!skb)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ cmd = (struct wmi_11d_scan_stop_cmd *)skb->data;
|
||||
+ cmd->tlv_header =
|
||||
+ ath12k_wmi_tlv_cmd_hdr(WMI_TAG_11D_SCAN_STOP_CMD,
|
||||
+ sizeof(*cmd));
|
||||
+
|
||||
+ cmd->vdev_id = cpu_to_le32(vdev_id);
|
||||
+ ret = ath12k_wmi_cmd_send(wmi, skb, WMI_11D_SCAN_STOP_CMDID);
|
||||
+
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_WMI,
|
||||
+ "send 11d scan stop vdev id %d\n",
|
||||
+ cmd->vdev_id);
|
||||
+
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab,
|
||||
+ "failed to send WMI_11D_SCAN_STOP_CMDID: %d\n", ret);
|
||||
+ dev_kfree_skb(skb);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
int
|
||||
ath12k_wmi_send_twt_enable_cmd(struct ath12k *ar, u32 pdev_id)
|
||||
{
|
||||
@@ -5873,6 +5982,50 @@ static void ath12k_wmi_op_ep_tx_credits(
|
||||
wake_up(&ab->wmi_ab.tx_credits_wq);
|
||||
}
|
||||
|
||||
+static int ath12k_reg_11d_new_cc_event(struct ath12k_base *ab, struct sk_buff *skb)
|
||||
+{
|
||||
+ const struct wmi_11d_new_cc_event *ev;
|
||||
+ struct ath12k *ar;
|
||||
+ struct ath12k_pdev *pdev;
|
||||
+ const void **tb;
|
||||
+ int ret, i;
|
||||
+
|
||||
+ tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC);
|
||||
+ if (IS_ERR(tb)) {
|
||||
+ ret = PTR_ERR(tb);
|
||||
+ ath12k_warn(ab, "failed to parse tlv: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ev = tb[WMI_TAG_11D_NEW_COUNTRY_EVENT];
|
||||
+ if (!ev) {
|
||||
+ kfree(tb);
|
||||
+ ath12k_warn(ab, "failed to fetch 11d new cc ev");
|
||||
+ return -EPROTO;
|
||||
+ }
|
||||
+
|
||||
+ spin_lock_bh(&ab->base_lock);
|
||||
+ memcpy(&ab->new_alpha2, &ev->new_alpha2, REG_ALPHA2_LEN);
|
||||
+ spin_unlock_bh(&ab->base_lock);
|
||||
+
|
||||
+ ath12k_dbg(ab, ATH12K_DBG_WMI, "wmi 11d new cc %c%c\n",
|
||||
+ ab->new_alpha2[0],
|
||||
+ ab->new_alpha2[1]);
|
||||
+
|
||||
+ kfree(tb);
|
||||
+
|
||||
+ for (i = 0; i < ab->num_radios; i++) {
|
||||
+ pdev = &ab->pdevs[i];
|
||||
+ ar = pdev->ar;
|
||||
+ ar->state_11d = ATH12K_11D_IDLE;
|
||||
+ complete(&ar->completed_11d_scan);
|
||||
+ }
|
||||
+
|
||||
+ queue_work(ab->workqueue, &ab->update_11d_work);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void ath12k_wmi_htc_tx_complete(struct ath12k_base *ab,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
@@ -7586,6 +7739,9 @@ static void ath12k_wmi_op_rx(struct ath1
|
||||
case WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID:
|
||||
/* debug might flood hence silently ignore (no-op) */
|
||||
break;
|
||||
+ case WMI_11D_NEW_COUNTRY_EVENTID:
|
||||
+ ath12k_reg_11d_new_cc_event(ab, skb);
|
||||
+ break;
|
||||
/* TODO: Add remaining events */
|
||||
default:
|
||||
ath12k_dbg(ab, ATH12K_DBG_WMI, "Unknown eventid: 0x%x\n", id);
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3990,6 +3990,28 @@ struct wmi_init_country_cmd {
|
||||
} cc_info;
|
||||
} __packed;
|
||||
|
||||
+struct wmi_11d_scan_start_arg {
|
||||
+ u32 vdev_id;
|
||||
+ u32 scan_period_msec;
|
||||
+ u32 start_interval_msec;
|
||||
+};
|
||||
+
|
||||
+struct wmi_11d_scan_start_cmd {
|
||||
+ __le32 tlv_header;
|
||||
+ __le32 vdev_id;
|
||||
+ __le32 scan_period_msec;
|
||||
+ __le32 start_interval_msec;
|
||||
+} __packed;
|
||||
+
|
||||
+struct wmi_11d_scan_stop_cmd {
|
||||
+ __le32 tlv_header;
|
||||
+ __le32 vdev_id;
|
||||
+} __packed;
|
||||
+
|
||||
+struct wmi_11d_new_cc_event {
|
||||
+ __le32 new_alpha2;
|
||||
+} __packed;
|
||||
+
|
||||
struct wmi_delba_send_cmd {
|
||||
__le32 tlv_header;
|
||||
__le32 vdev_id;
|
||||
@@ -4074,6 +4096,16 @@ struct ath12k_wmi_eht_rate_set_params {
|
||||
#define REG_ALPHA2_LEN 2
|
||||
#define MAX_6G_REG_RULES 5
|
||||
|
||||
+struct wmi_set_current_country_arg {
|
||||
+ u8 alpha2[REG_ALPHA2_LEN];
|
||||
+};
|
||||
+
|
||||
+struct wmi_set_current_country_cmd {
|
||||
+ __le32 tlv_header;
|
||||
+ __le32 pdev_id;
|
||||
+ __le32 new_alpha2;
|
||||
+} __packed;
|
||||
+
|
||||
enum wmi_start_event_param {
|
||||
WMI_VDEV_START_RESP_EVENT = 0,
|
||||
WMI_VDEV_RESTART_RESP_EVENT,
|
||||
@@ -5714,11 +5746,17 @@ int ath12k_wmi_send_bcn_offload_control_
|
||||
u32 vdev_id, u32 bcn_ctrl_op);
|
||||
int ath12k_wmi_send_init_country_cmd(struct ath12k *ar,
|
||||
struct ath12k_wmi_init_country_arg *arg);
|
||||
+int
|
||||
+ath12k_wmi_send_set_current_country_cmd(struct ath12k *ar,
|
||||
+ struct wmi_set_current_country_arg *arg);
|
||||
int ath12k_wmi_peer_rx_reorder_queue_setup(struct ath12k *ar,
|
||||
int vdev_id, const u8 *addr,
|
||||
dma_addr_t paddr, u8 tid,
|
||||
u8 ba_window_size_valid,
|
||||
u32 ba_window_size);
|
||||
+int ath12k_wmi_send_11d_scan_start_cmd(struct ath12k *ar,
|
||||
+ struct wmi_11d_scan_start_arg *arg);
|
||||
+int ath12k_wmi_send_11d_scan_stop_cmd(struct ath12k *ar, u32 vdev_id);
|
||||
int
|
||||
ath12k_wmi_rx_reord_queue_remove(struct ath12k *ar,
|
||||
struct ath12k_wmi_rx_reorder_queue_remove_arg *arg);
|
||||
--- a/drivers/net/wireless/ath/ath12k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/core.c
|
||||
@@ -1251,6 +1251,7 @@ void ath12k_core_halt(struct ath12k *ar)
|
||||
cancel_delayed_work_sync(&ar->scan.timeout);
|
||||
cancel_work_sync(&ar->regd_update_work);
|
||||
cancel_work_sync(&ab->rfkill_work);
|
||||
+ cancel_work_sync(&ab->update_11d_work);
|
||||
|
||||
rcu_assign_pointer(ab->pdevs_active[ar->pdev_idx], NULL);
|
||||
synchronize_rcu();
|
||||
@@ -1258,6 +1259,34 @@ void ath12k_core_halt(struct ath12k *ar)
|
||||
idr_init(&ar->txmgmt_idr);
|
||||
}
|
||||
|
||||
+static void ath12k_update_11d(struct work_struct *work)
|
||||
+{
|
||||
+ struct ath12k_base *ab = container_of(work, struct ath12k_base, update_11d_work);
|
||||
+ struct ath12k *ar;
|
||||
+ struct ath12k_pdev *pdev;
|
||||
+ struct wmi_set_current_country_arg arg = {};
|
||||
+ int ret, i;
|
||||
+
|
||||
+ spin_lock_bh(&ab->base_lock);
|
||||
+ memcpy(&arg.alpha2, &ab->new_alpha2, 2);
|
||||
+ spin_unlock_bh(&ab->base_lock);
|
||||
+
|
||||
+ ath12k_dbg(ab, ATH12K_DBG_WMI, "update 11d new cc %c%c\n",
|
||||
+ arg.alpha2[0], arg.alpha2[1]);
|
||||
+
|
||||
+ for (i = 0; i < ab->num_radios; i++) {
|
||||
+ pdev = &ab->pdevs[i];
|
||||
+ ar = pdev->ar;
|
||||
+
|
||||
+ memcpy(&ar->alpha2, &arg.alpha2, 2);
|
||||
+ ret = ath12k_wmi_send_set_current_country_cmd(ar, &arg);
|
||||
+ if (ret)
|
||||
+ ath12k_warn(ar->ab,
|
||||
+ "pdev id %d failed set current country code: %d\n",
|
||||
+ i, ret);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void ath12k_core_pre_reconfigure_recovery(struct ath12k_base *ab)
|
||||
{
|
||||
struct ath12k_hw_group *ag = ab->ag;
|
||||
@@ -1283,8 +1312,10 @@ static void ath12k_core_pre_reconfigure_
|
||||
ar = &ah->radio[j];
|
||||
|
||||
ath12k_mac_drain_tx(ar);
|
||||
+ ar->state_11d = ATH12K_11D_IDLE;
|
||||
+ complete(&ar->completed_11d_scan);
|
||||
complete(&ar->scan.started);
|
||||
- complete(&ar->scan.completed);
|
||||
+ complete_all(&ar->scan.completed);
|
||||
complete(&ar->scan.on_channel);
|
||||
complete(&ar->peer_assoc_done);
|
||||
complete(&ar->peer_delete_done);
|
||||
@@ -1953,6 +1984,7 @@ struct ath12k_base *ath12k_core_alloc(st
|
||||
INIT_WORK(&ab->reset_work, ath12k_core_reset);
|
||||
INIT_WORK(&ab->rfkill_work, ath12k_rfkill_work);
|
||||
INIT_WORK(&ab->dump_work, ath12k_coredump_upload);
|
||||
+ INIT_WORK(&ab->update_11d_work, ath12k_update_11d);
|
||||
|
||||
timer_setup(&ab->rx_replenish_retry, ath12k_ce_rx_replenish_retry, 0);
|
||||
init_completion(&ab->htc_suspend);
|
||||
--- a/drivers/net/wireless/ath/ath12k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/core.h
|
||||
@@ -224,6 +224,12 @@ enum ath12k_hw_group_flags {
|
||||
ATH12K_GROUP_FLAG_UNREGISTER,
|
||||
};
|
||||
|
||||
+enum ath12k_11d_state {
|
||||
+ ATH12K_11D_IDLE,
|
||||
+ ATH12K_11D_PREPARING,
|
||||
+ ATH12K_11D_RUNNING,
|
||||
+};
|
||||
+
|
||||
enum ath12k_dev_flags {
|
||||
ATH12K_FLAG_CAC_RUNNING,
|
||||
ATH12K_FLAG_CRASH_FLUSH,
|
||||
@@ -361,6 +367,8 @@ struct ath12k_vif_iter {
|
||||
#define ATH12K_RX_RATE_TABLE_11AX_NUM 576
|
||||
#define ATH12K_RX_RATE_TABLE_NUM 320
|
||||
|
||||
+#define ATH12K_SCAN_TIMEOUT_HZ (20 * HZ)
|
||||
+
|
||||
struct ath12k_rx_peer_rate_stats {
|
||||
u64 ht_mcs_count[HAL_RX_MAX_MCS_HT + 1];
|
||||
u64 vht_mcs_count[HAL_RX_MAX_MCS_VHT + 1];
|
||||
@@ -713,6 +721,13 @@ struct ath12k {
|
||||
|
||||
struct wiphy_radio_freq_range freq_range;
|
||||
|
||||
+ /* Protected by wiphy::mtx lock. */
|
||||
+ u32 vdev_id_11d_scan;
|
||||
+ struct completion completed_11d_scan;
|
||||
+ enum ath12k_11d_state state_11d;
|
||||
+ u8 alpha2[REG_ALPHA2_LEN];
|
||||
+ bool regdom_set_by_user;
|
||||
+
|
||||
bool nlo_enabled;
|
||||
|
||||
struct completion mlo_setup_done;
|
||||
@@ -985,6 +1000,8 @@ struct ath12k_base {
|
||||
/* continuous recovery fail count */
|
||||
atomic_t fail_cont_count;
|
||||
unsigned long reset_fail_timeout;
|
||||
+ struct work_struct update_11d_work;
|
||||
+ u8 new_alpha2[2];
|
||||
struct {
|
||||
/* protected by data_lock */
|
||||
u32 fw_crash_counter;
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -3340,6 +3340,11 @@ static void ath12k_bss_assoc(struct ath1
|
||||
if (ret)
|
||||
ath12k_warn(ar->ab, "failed to set vdev %i OBSS PD parameters: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
+
|
||||
+ if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ar->ab->wmi_ab.svc_map) &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE)
|
||||
+ ath12k_mac_11d_scan_stop_all(ar->ab);
|
||||
}
|
||||
|
||||
static void ath12k_bss_disassoc(struct ath12k *ar,
|
||||
@@ -4094,7 +4099,7 @@ void __ath12k_mac_scan_finish(struct ath
|
||||
fallthrough;
|
||||
case ATH12K_SCAN_STARTING:
|
||||
cancel_delayed_work(&ar->scan.timeout);
|
||||
- complete(&ar->scan.completed);
|
||||
+ complete_all(&ar->scan.completed);
|
||||
wiphy_work_queue(ar->ah->hw->wiphy, &ar->scan.vdev_clean_wk);
|
||||
break;
|
||||
}
|
||||
@@ -4438,7 +4443,12 @@ static int ath12k_mac_op_hw_scan(struct
|
||||
|
||||
ret = ath12k_start_scan(ar, arg);
|
||||
if (ret) {
|
||||
- ath12k_warn(ar->ab, "failed to start hw scan: %d\n", ret);
|
||||
+ if (ret == -EBUSY)
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
+ "scan engine is busy 11d state %d\n", ar->state_11d);
|
||||
+ else
|
||||
+ ath12k_warn(ar->ab, "failed to start hw scan: %d\n", ret);
|
||||
+
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
ar->scan.state = ATH12K_SCAN_IDLE;
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
@@ -4465,6 +4475,11 @@ exit:
|
||||
kfree(arg);
|
||||
}
|
||||
|
||||
+ if (ar->state_11d == ATH12K_11D_PREPARING &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE)
|
||||
+ ath12k_mac_11d_scan_start(ar, arvif->vdev_id);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -7383,7 +7398,7 @@ static int ath12k_mac_start(struct ath12
|
||||
|
||||
/* TODO: Do we need to enable ANI? */
|
||||
|
||||
- ath12k_reg_update_chan_list(ar);
|
||||
+ ath12k_reg_update_chan_list(ar, false);
|
||||
|
||||
ar->num_started_vdevs = 0;
|
||||
ar->num_created_vdevs = 0;
|
||||
@@ -7564,6 +7579,9 @@ static void ath12k_mac_stop(struct ath12
|
||||
wiphy_work_cancel(ath12k_ar_to_hw(ar)->wiphy, &ar->scan.vdev_clean_wk);
|
||||
cancel_work_sync(&ar->regd_update_work);
|
||||
cancel_work_sync(&ar->ab->rfkill_work);
|
||||
+ cancel_work_sync(&ar->ab->update_11d_work);
|
||||
+ ar->state_11d = ATH12K_11D_IDLE;
|
||||
+ complete(&ar->completed_11d_scan);
|
||||
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
list_for_each_entry_safe(ppdu_stats, tmp, &ar->ppdu_stats_info, list) {
|
||||
@@ -7857,6 +7875,117 @@ static void ath12k_mac_op_update_vif_off
|
||||
ath12k_mac_update_vif_offload(&ahvif->deflink);
|
||||
}
|
||||
|
||||
+static bool ath12k_mac_vif_ap_active_any(struct ath12k_base *ab)
|
||||
+{
|
||||
+ struct ath12k *ar;
|
||||
+ struct ath12k_pdev *pdev;
|
||||
+ struct ath12k_link_vif *arvif;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < ab->num_radios; i++) {
|
||||
+ pdev = &ab->pdevs[i];
|
||||
+ ar = pdev->ar;
|
||||
+ list_for_each_entry(arvif, &ar->arvifs, list) {
|
||||
+ if (arvif->is_up && arvif->ahvif->vdev_type == WMI_VDEV_TYPE_AP)
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+void ath12k_mac_11d_scan_start(struct ath12k *ar, u32 vdev_id)
|
||||
+{
|
||||
+ struct wmi_11d_scan_start_arg arg;
|
||||
+ int ret;
|
||||
+
|
||||
+ lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
+
|
||||
+ if (ar->regdom_set_by_user)
|
||||
+ goto fin;
|
||||
+
|
||||
+ if (ar->vdev_id_11d_scan != ATH12K_11D_INVALID_VDEV_ID)
|
||||
+ goto fin;
|
||||
+
|
||||
+ if (!test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ar->ab->wmi_ab.svc_map))
|
||||
+ goto fin;
|
||||
+
|
||||
+ if (ath12k_mac_vif_ap_active_any(ar->ab))
|
||||
+ goto fin;
|
||||
+
|
||||
+ arg.vdev_id = vdev_id;
|
||||
+ arg.start_interval_msec = 0;
|
||||
+ arg.scan_period_msec = ATH12K_SCAN_11D_INTERVAL;
|
||||
+
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
+ "mac start 11d scan for vdev %d\n", vdev_id);
|
||||
+
|
||||
+ ret = ath12k_wmi_send_11d_scan_start_cmd(ar, &arg);
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab, "failed to start 11d scan vdev %d ret: %d\n",
|
||||
+ vdev_id, ret);
|
||||
+ } else {
|
||||
+ ar->vdev_id_11d_scan = vdev_id;
|
||||
+ if (ar->state_11d == ATH12K_11D_PREPARING)
|
||||
+ ar->state_11d = ATH12K_11D_RUNNING;
|
||||
+ }
|
||||
+
|
||||
+fin:
|
||||
+ if (ar->state_11d == ATH12K_11D_PREPARING) {
|
||||
+ ar->state_11d = ATH12K_11D_IDLE;
|
||||
+ complete(&ar->completed_11d_scan);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void ath12k_mac_11d_scan_stop(struct ath12k *ar)
|
||||
+{
|
||||
+ int ret;
|
||||
+ u32 vdev_id;
|
||||
+
|
||||
+ lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
+
|
||||
+ if (!test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ar->ab->wmi_ab.svc_map))
|
||||
+ return;
|
||||
+
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "mac stop 11d for vdev %d\n",
|
||||
+ ar->vdev_id_11d_scan);
|
||||
+
|
||||
+ if (ar->state_11d == ATH12K_11D_PREPARING) {
|
||||
+ ar->state_11d = ATH12K_11D_IDLE;
|
||||
+ complete(&ar->completed_11d_scan);
|
||||
+ }
|
||||
+
|
||||
+ if (ar->vdev_id_11d_scan != ATH12K_11D_INVALID_VDEV_ID) {
|
||||
+ vdev_id = ar->vdev_id_11d_scan;
|
||||
+
|
||||
+ ret = ath12k_wmi_send_11d_scan_stop_cmd(ar, vdev_id);
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab,
|
||||
+ "failed to stopt 11d scan vdev %d ret: %d\n",
|
||||
+ vdev_id, ret);
|
||||
+ } else {
|
||||
+ ar->vdev_id_11d_scan = ATH12K_11D_INVALID_VDEV_ID;
|
||||
+ ar->state_11d = ATH12K_11D_IDLE;
|
||||
+ complete(&ar->completed_11d_scan);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void ath12k_mac_11d_scan_stop_all(struct ath12k_base *ab)
|
||||
+{
|
||||
+ struct ath12k *ar;
|
||||
+ struct ath12k_pdev *pdev;
|
||||
+ int i;
|
||||
+
|
||||
+ ath12k_dbg(ab, ATH12K_DBG_MAC, "mac stop soc 11d scan\n");
|
||||
+
|
||||
+ for (i = 0; i < ab->num_radios; i++) {
|
||||
+ pdev = &ab->pdevs[i];
|
||||
+ ar = pdev->ar;
|
||||
+
|
||||
+ ath12k_mac_11d_scan_stop(ar);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int ath12k_mac_vdev_create(struct ath12k *ar, struct ath12k_link_vif *arvif)
|
||||
{
|
||||
struct ath12k_hw *ah = ar->ah;
|
||||
@@ -7991,6 +8120,7 @@ int ath12k_mac_vdev_create(struct ath12k
|
||||
arvif->vdev_id, ret);
|
||||
goto err_peer_del;
|
||||
}
|
||||
+ ath12k_mac_11d_scan_stop_all(ar->ab);
|
||||
break;
|
||||
case WMI_VDEV_TYPE_STA:
|
||||
param_id = WMI_STA_PS_PARAM_RX_WAKE_POLICY;
|
||||
@@ -8029,6 +8159,13 @@ int ath12k_mac_vdev_create(struct ath12k
|
||||
arvif->vdev_id, ret);
|
||||
goto err_peer_del;
|
||||
}
|
||||
+
|
||||
+ if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ab->wmi_ab.svc_map) &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE) {
|
||||
+ reinit_completion(&ar->completed_11d_scan);
|
||||
+ ar->state_11d = ATH12K_11D_PREPARING;
|
||||
+ }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -8821,6 +8958,11 @@ ath12k_mac_vdev_start_restart(struct ath
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ab->wmi_ab.svc_map) &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE)
|
||||
+ ath12k_mac_11d_scan_stop(ar);
|
||||
+
|
||||
if (ahvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = ahvif->u.ap.ssid;
|
||||
arg.ssid_len = ahvif->u.ap.ssid_len;
|
||||
@@ -9395,6 +9537,14 @@ ath12k_mac_op_unassign_vif_chanctx(struc
|
||||
ar->num_started_vdevs == 1 && ar->monitor_vdev_created)
|
||||
ath12k_mac_monitor_stop(ar);
|
||||
|
||||
+ if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ab->wmi_ab.svc_map) &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
|
||||
+ ar->state_11d != ATH12K_11D_PREPARING) {
|
||||
+ reinit_completion(&ar->completed_11d_scan);
|
||||
+ ar->state_11d = ATH12K_11D_PREPARING;
|
||||
+ }
|
||||
+
|
||||
ath12k_mac_remove_link_interface(hw, arvif);
|
||||
ath12k_mac_unassign_link_vif(arvif);
|
||||
}
|
||||
@@ -9958,6 +10108,14 @@ ath12k_mac_op_reconfig_complete(struct i
|
||||
ath12k_warn(ar->ab, "pdev %d successfully recovered\n",
|
||||
ar->pdev->pdev_id);
|
||||
|
||||
+ if (ar->ab->hw_params->current_cc_support &&
|
||||
+ ar->alpha2[0] != 0 && ar->alpha2[1] != 0) {
|
||||
+ struct wmi_set_current_country_arg arg = {};
|
||||
+
|
||||
+ memcpy(&arg.alpha2, ar->alpha2, 2);
|
||||
+ ath12k_wmi_send_set_current_country_cmd(ar, &arg);
|
||||
+ }
|
||||
+
|
||||
if (ab->is_reset) {
|
||||
recovery_count = atomic_inc_return(&ab->recovery_count);
|
||||
|
||||
@@ -11173,6 +11331,9 @@ static void ath12k_mac_setup(struct ath1
|
||||
|
||||
wiphy_work_init(&ar->wmi_mgmt_tx_work, ath12k_mgmt_over_wmi_tx_work);
|
||||
skb_queue_head_init(&ar->wmi_mgmt_tx_queue);
|
||||
+
|
||||
+ ar->vdev_id_11d_scan = ATH12K_11D_INVALID_VDEV_ID;
|
||||
+ init_completion(&ar->completed_11d_scan);
|
||||
}
|
||||
|
||||
static int __ath12k_mac_mlo_setup(struct ath12k *ar)
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.h
|
||||
@@ -66,6 +66,13 @@ struct ath12k_mac_get_any_chanctx_conf_a
|
||||
|
||||
extern const struct htt_rx_ring_tlv_filter ath12k_mac_mon_status_filter_default;
|
||||
|
||||
+#define ATH12K_SCAN_11D_INTERVAL 600000
|
||||
+#define ATH12K_11D_INVALID_VDEV_ID 0xFFFF
|
||||
+
|
||||
+void ath12k_mac_11d_scan_start(struct ath12k *ar, u32 vdev_id);
|
||||
+void ath12k_mac_11d_scan_stop(struct ath12k *ar);
|
||||
+void ath12k_mac_11d_scan_stop_all(struct ath12k_base *ab);
|
||||
+
|
||||
void ath12k_mac_destroy(struct ath12k_hw_group *ag);
|
||||
void ath12k_mac_unregister(struct ath12k_hw_group *ag);
|
||||
int ath12k_mac_register(struct ath12k_hw_group *ag);
|
||||
--- a/drivers/net/wireless/ath/ath12k/reg.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/reg.c
|
||||
@@ -48,6 +48,7 @@ ath12k_reg_notifier(struct wiphy *wiphy,
|
||||
{
|
||||
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
|
||||
struct ath12k_wmi_init_country_arg arg;
|
||||
+ struct wmi_set_current_country_arg current_arg = {};
|
||||
struct ath12k_hw *ah = ath12k_hw_to_ah(hw);
|
||||
struct ath12k *ar = ath12k_ah_to_ar(ah, 0);
|
||||
int ret, i;
|
||||
@@ -77,27 +78,38 @@ ath12k_reg_notifier(struct wiphy *wiphy,
|
||||
return;
|
||||
}
|
||||
|
||||
- /* Set the country code to the firmware and wait for
|
||||
- * the WMI_REG_CHAN_LIST_CC EVENT for updating the
|
||||
- * reg info
|
||||
- */
|
||||
- arg.flags = ALPHA_IS_SET;
|
||||
- memcpy(&arg.cc_info.alpha2, request->alpha2, 2);
|
||||
- arg.cc_info.alpha2[2] = 0;
|
||||
-
|
||||
/* Allow fresh updates to wiphy regd */
|
||||
ah->regd_updated = false;
|
||||
|
||||
/* Send the reg change request to all the radios */
|
||||
for_each_ar(ah, ar, i) {
|
||||
- ret = ath12k_wmi_send_init_country_cmd(ar, &arg);
|
||||
- if (ret)
|
||||
- ath12k_warn(ar->ab,
|
||||
- "INIT Country code set to fw failed : %d\n", ret);
|
||||
+ if (ar->ab->hw_params->current_cc_support) {
|
||||
+ memcpy(¤t_arg.alpha2, request->alpha2, 2);
|
||||
+ memcpy(&ar->alpha2, ¤t_arg.alpha2, 2);
|
||||
+ ret = ath12k_wmi_send_set_current_country_cmd(ar, ¤t_arg);
|
||||
+ if (ret)
|
||||
+ ath12k_warn(ar->ab,
|
||||
+ "failed set current country code: %d\n", ret);
|
||||
+ } else {
|
||||
+ arg.flags = ALPHA_IS_SET;
|
||||
+ memcpy(&arg.cc_info.alpha2, request->alpha2, 2);
|
||||
+ arg.cc_info.alpha2[2] = 0;
|
||||
+
|
||||
+ ret = ath12k_wmi_send_init_country_cmd(ar, &arg);
|
||||
+ if (ret)
|
||||
+ ath12k_warn(ar->ab,
|
||||
+ "failed set INIT Country code: %d\n", ret);
|
||||
+ }
|
||||
+
|
||||
+ wiphy_lock(wiphy);
|
||||
+ ath12k_mac_11d_scan_stop(ar);
|
||||
+ wiphy_unlock(wiphy);
|
||||
+
|
||||
+ ar->regdom_set_by_user = true;
|
||||
}
|
||||
}
|
||||
|
||||
-int ath12k_reg_update_chan_list(struct ath12k *ar)
|
||||
+int ath12k_reg_update_chan_list(struct ath12k *ar, bool wait)
|
||||
{
|
||||
struct ieee80211_supported_band **bands;
|
||||
struct ath12k_wmi_scan_chan_list_arg *arg;
|
||||
@@ -106,7 +118,35 @@ int ath12k_reg_update_chan_list(struct a
|
||||
struct ath12k_wmi_channel_arg *ch;
|
||||
enum nl80211_band band;
|
||||
int num_channels = 0;
|
||||
- int i, ret;
|
||||
+ int i, ret, left;
|
||||
+
|
||||
+ if (wait && ar->state_11d != ATH12K_11D_IDLE) {
|
||||
+ left = wait_for_completion_timeout(&ar->completed_11d_scan,
|
||||
+ ATH12K_SCAN_TIMEOUT_HZ);
|
||||
+ if (!left) {
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_REG,
|
||||
+ "failed to receive 11d scan complete: timed out\n");
|
||||
+ ar->state_11d = ATH12K_11D_IDLE;
|
||||
+ }
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_REG,
|
||||
+ "reg 11d scan wait left time %d\n", left);
|
||||
+ }
|
||||
+
|
||||
+ if (wait &&
|
||||
+ (ar->scan.state == ATH12K_SCAN_STARTING ||
|
||||
+ ar->scan.state == ATH12K_SCAN_RUNNING)) {
|
||||
+ left = wait_for_completion_timeout(&ar->scan.completed,
|
||||
+ ATH12K_SCAN_TIMEOUT_HZ);
|
||||
+ if (!left)
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_REG,
|
||||
+ "failed to receive hw scan complete: timed out\n");
|
||||
+
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_REG,
|
||||
+ "reg hw scan wait left time %d\n", left);
|
||||
+ }
|
||||
+
|
||||
+ if (ar->ah->state == ATH12K_HW_STATE_RESTARTING)
|
||||
+ return 0;
|
||||
|
||||
bands = hw->wiphy->bands;
|
||||
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
||||
@@ -295,7 +335,7 @@ int ath12k_regd_update(struct ath12k *ar
|
||||
*/
|
||||
for_each_ar(ah, ar, i) {
|
||||
ab = ar->ab;
|
||||
- ret = ath12k_reg_update_chan_list(ar);
|
||||
+ ret = ath12k_reg_update_chan_list(ar, true);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath12k/reg.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/reg.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
/*
|
||||
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
|
||||
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef ATH12K_REG_H
|
||||
@@ -96,6 +96,6 @@ struct ieee80211_regdomain *ath12k_reg_b
|
||||
struct ath12k_reg_info *reg_info,
|
||||
bool intersect);
|
||||
int ath12k_regd_update(struct ath12k *ar, bool init);
|
||||
-int ath12k_reg_update_chan_list(struct ath12k *ar);
|
||||
+int ath12k_reg_update_chan_list(struct ath12k *ar, bool wait);
|
||||
|
||||
#endif
|
||||
--- a/drivers/net/wireless/ath/ath12k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/hw.c
|
||||
@@ -928,6 +928,7 @@ static const struct ath12k_hw_params ath
|
||||
.iova_mask = 0,
|
||||
|
||||
.supports_aspm = false,
|
||||
+ .current_cc_support = false,
|
||||
},
|
||||
{
|
||||
.name = "wcn7850 hw2.0",
|
||||
@@ -1008,6 +1009,7 @@ static const struct ath12k_hw_params ath
|
||||
.iova_mask = ATH12K_PCIE_MAX_PAYLOAD_SIZE - 1,
|
||||
|
||||
.supports_aspm = true,
|
||||
+ .current_cc_support = true,
|
||||
},
|
||||
{
|
||||
.name = "qcn9274 hw2.0",
|
||||
@@ -1084,6 +1086,7 @@ static const struct ath12k_hw_params ath
|
||||
.iova_mask = 0,
|
||||
|
||||
.supports_aspm = false,
|
||||
+ .current_cc_support = false,
|
||||
},
|
||||
};
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/hw.h
|
||||
@@ -190,6 +190,7 @@ struct ath12k_hw_params {
|
||||
bool reoq_lut_support:1;
|
||||
bool supports_shadow_regs:1;
|
||||
bool supports_aspm:1;
|
||||
+ bool current_cc_support:1;
|
||||
|
||||
u32 num_tcl_banks;
|
||||
u32 max_tx_ring;
|
||||
@ -1,53 +0,0 @@
|
||||
From b1b01e46a3db5ad44d1e4691ba37c1e0832cd5cf Mon Sep 17 00:00:00 2001
|
||||
From: Suraj P Kizhakkethil <quic_surapk@quicinc.com>
|
||||
Date: Tue, 4 Mar 2025 15:23:14 +0530
|
||||
Subject: [PATCH 1/2] wifi: ath12k: Pass correct values of center freq1 and
|
||||
center freq2 for 160 MHz
|
||||
|
||||
Currently, for 160 MHz bandwidth, center frequency1 and
|
||||
center frequency2 are not passed correctly to the firmware.
|
||||
Set center frequency1 as the center frequency
|
||||
of the primary 80 MHz channel segment and center frequency2 as
|
||||
the center frequency of the 160 MHz channel and pass the values
|
||||
to the firmware.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Suraj P Kizhakkethil <quic_surapk@quicinc.com>
|
||||
Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
|
||||
Link: https://patch.msgid.link/20250304095315.3050325-2-quic_surapk@quicinc.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 16 +++++++++++++---
|
||||
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -1000,14 +1000,24 @@ int ath12k_wmi_vdev_down(struct ath12k *
|
||||
static void ath12k_wmi_put_wmi_channel(struct ath12k_wmi_channel_params *chan,
|
||||
struct wmi_vdev_start_req_arg *arg)
|
||||
{
|
||||
+ u32 center_freq1 = arg->band_center_freq1;
|
||||
+
|
||||
memset(chan, 0, sizeof(*chan));
|
||||
|
||||
chan->mhz = cpu_to_le32(arg->freq);
|
||||
- chan->band_center_freq1 = cpu_to_le32(arg->band_center_freq1);
|
||||
- if (arg->mode == MODE_11AC_VHT80_80)
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1);
|
||||
+ if (arg->mode == MODE_11BE_EHT160) {
|
||||
+ if (arg->freq > center_freq1)
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40);
|
||||
+ else
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1 - 40);
|
||||
+
|
||||
+ chan->band_center_freq2 = cpu_to_le32(center_freq1);
|
||||
+ } else if (arg->mode == MODE_11BE_EHT80_80) {
|
||||
chan->band_center_freq2 = cpu_to_le32(arg->band_center_freq2);
|
||||
- else
|
||||
+ } else {
|
||||
chan->band_center_freq2 = 0;
|
||||
+ }
|
||||
|
||||
chan->info |= le32_encode_bits(arg->mode, WMI_CHAN_INFO_MODE);
|
||||
if (arg->passive)
|
||||
@ -1,43 +0,0 @@
|
||||
From 5e44b181bec8e2fe3826033360fc1a42bb432191 Mon Sep 17 00:00:00 2001
|
||||
From: Sriram R <quic_srirrama@quicinc.com>
|
||||
Date: Tue, 4 Mar 2025 15:23:15 +0530
|
||||
Subject: [PATCH 2/2] wifi: ath12k: Pass correct values of center freq1 and
|
||||
center freq2 for 320 MHz
|
||||
|
||||
Currently, for 320 MHz bandwidth, center frequency1 and
|
||||
center frequency2 are not passed correctly to the firmware.
|
||||
Set center frequency1 as the center frequency of the
|
||||
primary 160 MHz channel segment and center frequency2 as the center
|
||||
frequency of the 320 MHz channel and pass the values
|
||||
to the firmware.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
|
||||
Signed-off-by: Suraj P Kizhakkethil <quic_surapk@quicinc.com>
|
||||
Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
|
||||
Link: https://patch.msgid.link/20250304095315.3050325-3-quic_surapk@quicinc.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -1006,7 +1006,15 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
|
||||
chan->mhz = cpu_to_le32(arg->freq);
|
||||
chan->band_center_freq1 = cpu_to_le32(center_freq1);
|
||||
- if (arg->mode == MODE_11BE_EHT160) {
|
||||
+ if (arg->mode == MODE_11BE_EHT320) {
|
||||
+ if (arg->freq > center_freq1)
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1 + 80);
|
||||
+ else
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1 - 80);
|
||||
+
|
||||
+ chan->band_center_freq2 = cpu_to_le32(center_freq1);
|
||||
+
|
||||
+ } else if (arg->mode == MODE_11BE_EHT160) {
|
||||
if (arg->freq > center_freq1)
|
||||
chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40);
|
||||
else
|
||||
@ -130,7 +130,7 @@ Best regards,
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -2743,6 +2743,9 @@ int ath12k_wmi_send_scan_chan_list_cmd(s
|
||||
@@ -2832,6 +2832,9 @@ int ath12k_wmi_send_scan_chan_list_cmd(s
|
||||
max_chan_limit = (wmi->wmi_ab->max_msg_len[ar->pdev_idx] - len) /
|
||||
sizeof(*chan_info);
|
||||
|
||||
@ -142,7 +142,7 @@ Best regards,
|
||||
arg->nallchans -= num_send_chans;
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3873,6 +3873,8 @@ struct wmi_stop_scan_cmd {
|
||||
@@ -3947,6 +3947,8 @@ struct wmi_stop_scan_cmd {
|
||||
__le32 pdev_id;
|
||||
} __packed;
|
||||
|
||||
|
||||
@ -124,14 +124,14 @@ Best regards,
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -6432,9 +6432,7 @@ static void ath12k_mac_setup_ht_vht_cap(
|
||||
@@ -6985,9 +6985,7 @@ static void ath12k_mac_setup_ht_vht_cap(
|
||||
rate_cap_rx_chainmask);
|
||||
}
|
||||
|
||||
- if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
|
||||
- if (cap->supported_bands & WMI_HOST_WLAN_5GHZ_CAP &&
|
||||
- (ar->ab->hw_params->single_pdev_only ||
|
||||
- !ar->supports_6ghz)) {
|
||||
+ if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP) {
|
||||
+ if (cap->supported_bands & WMI_HOST_WLAN_5GHZ_CAP) {
|
||||
band = &ar->mac.sbands[NL80211_BAND_5GHZ];
|
||||
ht_cap = cap->band[NL80211_BAND_5GHZ].ht_cap_info;
|
||||
if (ht_cap_info)
|
||||
|
||||
@ -131,8 +131,8 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -3215,6 +3215,125 @@ static int ath12k_setup_peer_smps(struct
|
||||
ath12k_smps_map[smps]);
|
||||
@@ -3173,6 +3173,125 @@ static u32 ath12k_mac_ieee80211_sta_bw_t
|
||||
return bw;
|
||||
}
|
||||
|
||||
+static int ath12k_mac_set_he_txbf_conf(struct ath12k_link_vif *arvif)
|
||||
@ -257,7 +257,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
static void ath12k_bss_assoc(struct ath12k *ar,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
@@ -3229,6 +3348,7 @@ static void ath12k_bss_assoc(struct ath1
|
||||
@@ -3187,6 +3306,7 @@ static void ath12k_bss_assoc(struct ath1
|
||||
struct ath12k_sta *ahsta;
|
||||
struct ath12k_peer *peer;
|
||||
bool is_auth = false;
|
||||
@ -265,7 +265,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
int ret;
|
||||
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
@@ -3272,8 +3392,26 @@ static void ath12k_bss_assoc(struct ath1
|
||||
@@ -3230,8 +3350,26 @@ static void ath12k_bss_assoc(struct ath1
|
||||
|
||||
ath12k_peer_assoc_prepare(ar, arvif, arsta, peer_arg, false);
|
||||
|
||||
@ -292,7 +292,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
ret = ath12k_wmi_send_peer_assoc_cmd(ar, peer_arg);
|
||||
if (ret) {
|
||||
ath12k_warn(ar->ab, "failed to run peer assoc for %pM vdev %i: %d\n",
|
||||
@@ -3677,6 +3815,13 @@ static void ath12k_mac_bss_info_changed(
|
||||
@@ -3850,6 +3988,13 @@ static void ath12k_mac_bss_info_changed(
|
||||
ether_addr_copy(arvif->bssid, info->bssid);
|
||||
|
||||
if (changed & BSS_CHANGED_BEACON_ENABLED) {
|
||||
@ -306,7 +306,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
ath12k_control_beaconing(arvif, info);
|
||||
|
||||
if (arvif->is_up && info->he_support &&
|
||||
@@ -6598,11 +6743,14 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
@@ -7151,11 +7296,14 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
|
||||
he_cap_elem->mac_cap_info[1] &=
|
||||
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
|
||||
@ -324,7 +324,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
he_cap_elem->phy_cap_info[5] |= num_tx_chains - 1;
|
||||
|
||||
switch (iftype) {
|
||||
@@ -7734,72 +7882,6 @@ static int ath12k_mac_setup_vdev_create_
|
||||
@@ -8454,72 +8602,6 @@ static int ath12k_mac_setup_vdev_create_
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
- u32 *hecap_phy_ptr = NULL;
|
||||
- u32 hemode;
|
||||
-
|
||||
- if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP)
|
||||
- if (pdev->cap.supported_bands & WMI_HOST_WLAN_2GHZ_CAP)
|
||||
- cap_band = &pdev_cap->band[NL80211_BAND_2GHZ];
|
||||
- else
|
||||
- cap_band = &pdev_cap->band[NL80211_BAND_5GHZ];
|
||||
@ -397,7 +397,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
static void ath12k_mac_update_vif_offload(struct ath12k_link_vif *arvif)
|
||||
{
|
||||
struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
@@ -8978,14 +9060,6 @@ ath12k_mac_vdev_start_restart(struct ath
|
||||
@@ -9706,14 +9788,6 @@ ath12k_mac_vdev_start_restart(struct ath
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
||||
/* TODO: Notify if secondary 80Mhz also needs radar detection */
|
||||
@ -414,9 +414,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
arg.passive |= !!(chandef->chan->flags & IEEE80211_CHAN_NO_IR);
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.h
|
||||
@@ -51,6 +51,21 @@ struct ath12k_generic_iter {
|
||||
#define ATH12K_DEFAULT_SCAN_LINK IEEE80211_MLD_MAX_NUM_LINKS
|
||||
#define ATH12K_NUM_MAX_LINKS (IEEE80211_MLD_MAX_NUM_LINKS + 1)
|
||||
@@ -56,6 +56,21 @@ struct ath12k_generic_iter {
|
||||
|
||||
#define ATH12K_NUM_MAX_ACTIVE_LINKS_PER_DEVICE 2
|
||||
|
||||
+#define HECAP_PHY_SUBFMR_GET(hecap_phy) \
|
||||
+ u8_get_bits(hecap_phy[3], IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER)
|
||||
@ -438,7 +438,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
ATH12K_BW_40 = 1,
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3079,31 +3079,6 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
@@ -3131,31 +3131,6 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
#define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2)
|
||||
#define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3)
|
||||
|
||||
@ -470,7 +470,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
#define HE_MODE_SU_TX_BFEE BIT(0)
|
||||
#define HE_MODE_SU_TX_BFER BIT(1)
|
||||
#define HE_MODE_MU_TX_BFEE BIT(2)
|
||||
@@ -3115,8 +3090,11 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
@@ -3167,8 +3142,11 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
#define HE_DL_MUOFDMA_ENABLE 1
|
||||
#define HE_UL_MUOFDMA_ENABLE 1
|
||||
#define HE_DL_MUMIMO_ENABLE 1
|
||||
|
||||
@ -131,7 +131,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -3334,6 +3334,58 @@ static int ath12k_mac_vif_recalc_sta_he_
|
||||
@@ -3292,6 +3292,58 @@ static int ath12k_mac_vif_recalc_sta_he_
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
static void ath12k_bss_assoc(struct ath12k *ar,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
@@ -3821,6 +3873,12 @@ static void ath12k_mac_bss_info_changed(
|
||||
@@ -3994,6 +4046,12 @@ static void ath12k_mac_bss_info_changed(
|
||||
ath12k_warn(ar->ab,
|
||||
"failed to set HE TXBF config for vdev: %d\n",
|
||||
arvif->vdev_id);
|
||||
@ -205,7 +205,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -1152,6 +1152,7 @@ enum wmi_tlv_vdev_param {
|
||||
@@ -1176,6 +1176,7 @@ enum wmi_tlv_vdev_param {
|
||||
WMI_VDEV_PARAM_BSS_COLOR,
|
||||
WMI_VDEV_PARAM_SET_HEMU_MODE,
|
||||
WMI_VDEV_PARAM_HEOPS_0_31 = 0x8003,
|
||||
@ -213,7 +213,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
};
|
||||
|
||||
enum wmi_tlv_peer_flags {
|
||||
@@ -3096,6 +3097,26 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
@@ -3148,6 +3149,26 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
#define HE_MU_BFER_ENABLE 1
|
||||
#define HE_SU_BFER_ENABLE 1
|
||||
|
||||
|
||||
@ -130,7 +130,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -6786,12 +6786,24 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
@@ -7339,12 +7339,24 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
return cpu_to_le16(bcap->he_6ghz_capa);
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
he_cap->has_he = true;
|
||||
memcpy(he_cap_elem->mac_cap_info, band_cap->he_cap_info,
|
||||
@@ -6829,13 +6841,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
@@ -7384,13 +7396,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -6786,20 +6786,40 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
@@ -7339,20 +7339,40 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
return cpu_to_le16(bcap->he_6ghz_capa);
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
int iftype, u8 num_tx_chains,
|
||||
struct ieee80211_sta_he_cap *he_cap)
|
||||
{
|
||||
@@ -6841,7 +6861,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
@@ -7396,7 +7416,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
break;
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
memset(he_cap->ppe_thres, 0, sizeof(he_cap->ppe_thres));
|
||||
if (he_cap_elem->phy_cap_info[6] &
|
||||
IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT)
|
||||
@@ -7030,7 +7050,7 @@ static int ath12k_mac_copy_sband_iftype_
|
||||
@@ -7586,7 +7606,7 @@ static int ath12k_mac_copy_sband_iftype_
|
||||
|
||||
data[idx].types_mask = BIT(i);
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -2266,8 +2266,8 @@ int ath12k_wmi_send_peer_assoc_cmd(struc
|
||||
@@ -2333,8 +2333,8 @@ int ath12k_wmi_send_peer_assoc_cmd(struc
|
||||
he_mcs->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_HE_RATE_SET,
|
||||
sizeof(*he_mcs));
|
||||
|
||||
@ -140,7 +140,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -4083,7 +4083,9 @@ struct ath12k_wmi_vht_rate_set_params {
|
||||
@@ -4157,7 +4157,9 @@ struct ath12k_wmi_vht_rate_set_params {
|
||||
|
||||
struct ath12k_wmi_he_rate_set_params {
|
||||
__le32 tlv_header;
|
||||
|
||||
@ -127,7 +127,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -518,6 +518,18 @@ ath12k_mac_max_vht_nss(const u16 *vht_mc
|
||||
@@ -521,6 +521,18 @@ ath12k_mac_max_vht_nss(const u16 *vht_mc
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
static u8 ath12k_parse_mpdudensity(u8 mpdudensity)
|
||||
{
|
||||
/* From IEEE Std 802.11-2020 defined values for "Minimum MPDU Start Spacing":
|
||||
@@ -2135,9 +2147,15 @@ static void ath12k_peer_assoc_h_ht(struc
|
||||
@@ -2053,9 +2065,15 @@ static void ath12k_peer_assoc_h_ht(struc
|
||||
arg->peer_rate_caps |= WMI_HOST_RC_CW40_FLAG;
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
arg->peer_rate_caps |= WMI_HOST_RC_SGI_FLAG;
|
||||
}
|
||||
|
||||
@@ -2260,11 +2278,12 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
@@ -2178,11 +2196,12 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
struct ieee80211_link_sta *link_sta;
|
||||
struct cfg80211_chan_def def;
|
||||
enum nl80211_band band;
|
||||
@ -180,7 +180,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
|
||||
@@ -2317,6 +2336,25 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
@@ -2235,6 +2254,25 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_160)
|
||||
arg->bw_160 = true;
|
||||
|
||||
@ -206,7 +206,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
/* Calculate peer NSS capability from VHT capabilities if STA
|
||||
* supports VHT.
|
||||
*/
|
||||
@@ -2356,6 +2394,72 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
@@ -2274,6 +2312,72 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
/* TODO: rxnss_override */
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
static void ath12k_peer_assoc_h_he(struct ath12k *ar,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ath12k_link_sta *arsta,
|
||||
@@ -2366,18 +2470,28 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2284,18 +2388,28 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
const struct ieee80211_sta_he_cap *he_cap;
|
||||
struct ieee80211_bss_conf *link_conf;
|
||||
struct ieee80211_link_sta *link_sta;
|
||||
@ -310,7 +310,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2392,6 +2506,12 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2310,6 +2424,12 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
if (!he_cap->has_he)
|
||||
return;
|
||||
|
||||
@ -323,7 +323,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
arg->he_flag = true;
|
||||
|
||||
support_160 = !!(he_cap->he_cap_elem.phy_cap_info[0] &
|
||||
@@ -2497,25 +2617,47 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2415,25 +2535,47 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_REQ)
|
||||
arg->twt_requester = true;
|
||||
|
||||
@ -373,7 +373,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
fallthrough;
|
||||
|
||||
default:
|
||||
@@ -2523,11 +2665,36 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2441,11 +2583,36 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
|
||||
|
||||
v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80);
|
||||
@ -410,7 +410,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
}
|
||||
|
||||
static void ath12k_peer_assoc_h_he_6ghz(struct ath12k *ar,
|
||||
@@ -2863,6 +3030,7 @@ static void ath12k_peer_assoc_h_phymode(
|
||||
@@ -2781,6 +2948,7 @@ static void ath12k_peer_assoc_h_phymode(
|
||||
enum nl80211_band band;
|
||||
const u8 *ht_mcs_mask;
|
||||
const u16 *vht_mcs_mask;
|
||||
@ -418,7 +418,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
enum wmi_phy_mode phymode = MODE_UNKNOWN;
|
||||
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
@@ -2876,6 +3044,7 @@ static void ath12k_peer_assoc_h_phymode(
|
||||
@@ -2794,6 +2962,7 @@ static void ath12k_peer_assoc_h_phymode(
|
||||
band = def.chan->band;
|
||||
ht_mcs_mask = arvif->bitrate_mask.control[band].ht_mcs;
|
||||
vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs;
|
||||
@ -426,7 +426,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
|
||||
link_sta = ath12k_mac_get_link_sta(arsta);
|
||||
if (!link_sta) {
|
||||
@@ -2891,7 +3060,8 @@ static void ath12k_peer_assoc_h_phymode(
|
||||
@@ -2809,7 +2978,8 @@ static void ath12k_peer_assoc_h_phymode(
|
||||
phymode = MODE_11BE_EHT40_2G;
|
||||
else
|
||||
phymode = MODE_11BE_EHT20_2G;
|
||||
@ -436,7 +436,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
phymode = MODE_11AX_HE80_2G;
|
||||
else if (link_sta->bandwidth == IEEE80211_STA_RX_BW_40)
|
||||
@@ -2921,7 +3091,8 @@ static void ath12k_peer_assoc_h_phymode(
|
||||
@@ -2839,7 +3009,8 @@ static void ath12k_peer_assoc_h_phymode(
|
||||
/* Check EHT first */
|
||||
if (link_sta->eht_cap.has_eht) {
|
||||
phymode = ath12k_mac_get_phymode_eht(ar, link_sta);
|
||||
@ -446,7 +446,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
phymode = ath12k_mac_get_phymode_he(ar, link_sta);
|
||||
} else if (link_sta->vht_cap.vht_supported &&
|
||||
!ath12k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
|
||||
@@ -4190,10 +4361,13 @@ static struct ath12k_link_vif *ath12k_ma
|
||||
@@ -3623,10 +3794,13 @@ static void ath12k_mac_init_arvif(struct
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(arvif->bitrate_mask.control); i++) {
|
||||
arvif->bitrate_mask.control[i].legacy = 0xffffffff;
|
||||
@ -459,8 +459,8 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
+ sizeof(arvif->bitrate_mask.control[i].he_mcs));
|
||||
}
|
||||
|
||||
/* Allocate Default Queue now and reassign during actual vdev create */
|
||||
@@ -5083,6 +5257,20 @@ ath12k_mac_bitrate_mask_num_vht_rates(st
|
||||
/* Handle MLO related assignments */
|
||||
@@ -5282,6 +5456,20 @@ ath12k_mac_bitrate_mask_num_vht_rates(st
|
||||
}
|
||||
|
||||
static int
|
||||
@ -481,7 +481,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
ath12k_mac_set_peer_vht_fixed_rate(struct ath12k_link_vif *arvif,
|
||||
struct ath12k_link_sta *arsta,
|
||||
const struct cfg80211_bitrate_mask *mask,
|
||||
@@ -5128,6 +5316,60 @@ ath12k_mac_set_peer_vht_fixed_rate(struc
|
||||
@@ -5327,6 +5515,60 @@ ath12k_mac_set_peer_vht_fixed_rate(struc
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -542,7 +542,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
static int ath12k_mac_station_assoc(struct ath12k *ar,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ath12k_link_sta *arsta,
|
||||
@@ -5140,7 +5382,7 @@ static int ath12k_mac_station_assoc(stru
|
||||
@@ -5339,7 +5581,7 @@ static int ath12k_mac_station_assoc(stru
|
||||
struct cfg80211_chan_def def;
|
||||
enum nl80211_band band;
|
||||
struct cfg80211_bitrate_mask *mask;
|
||||
@ -551,7 +551,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
u8 link_id = arvif->link_id;
|
||||
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
@@ -5180,9 +5422,10 @@ static int ath12k_mac_station_assoc(stru
|
||||
@@ -5379,9 +5621,10 @@ static int ath12k_mac_station_assoc(stru
|
||||
}
|
||||
|
||||
num_vht_rates = ath12k_mac_bitrate_mask_num_vht_rates(ar, band, mask);
|
||||
@ -564,8 +564,8 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
* fixed param.
|
||||
* Note that all other rates and NSS will be disabled for this peer.
|
||||
*/
|
||||
@@ -5193,8 +5436,9 @@ static int ath12k_mac_station_assoc(stru
|
||||
}
|
||||
@@ -5397,8 +5640,9 @@ static int ath12k_mac_station_assoc(stru
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
if (link_sta->vht_cap.vht_supported && num_vht_rates == 1) {
|
||||
- ret = ath12k_mac_set_peer_vht_fixed_rate(arvif, arsta, mask,
|
||||
@ -576,7 +576,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
@@ -5258,8 +5502,9 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
@@ -5462,8 +5706,9 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
enum nl80211_band band;
|
||||
const u8 *ht_mcs_mask;
|
||||
const u16 *vht_mcs_mask;
|
||||
@ -588,7 +588,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
const struct cfg80211_bitrate_mask *mask;
|
||||
enum wmi_phy_mode peer_phymode;
|
||||
struct ath12k_link_sta *arsta;
|
||||
@@ -5279,6 +5524,7 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
@@ -5483,6 +5728,7 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
band = def.chan->band;
|
||||
ht_mcs_mask = arvif->bitrate_mask.control[band].ht_mcs;
|
||||
vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs;
|
||||
@ -596,7 +596,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
|
||||
@@ -5293,8 +5539,10 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
@@ -5497,8 +5743,10 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
nss = max_t(u32, 1, nss);
|
||||
@ -609,7 +609,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
|
||||
struct ath12k_wmi_peer_assoc_arg *peer_arg __free(kfree) =
|
||||
kzalloc(sizeof(*peer_arg), GFP_KERNEL);
|
||||
@@ -5377,6 +5625,8 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
@@ -5581,6 +5829,8 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
mask = &arvif->bitrate_mask;
|
||||
num_vht_rates = ath12k_mac_bitrate_mask_num_vht_rates(ar, band,
|
||||
mask);
|
||||
@ -618,7 +618,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
|
||||
/* Peer_assoc_prepare will reject vht rates in
|
||||
* bitrate_mask if its not available in range format and
|
||||
@@ -5399,11 +5649,24 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
@@ -5603,11 +5853,24 @@ static void ath12k_sta_rc_update_wk(stru
|
||||
if (link_sta->vht_cap.vht_supported && num_vht_rates == 1) {
|
||||
ath12k_mac_set_peer_vht_fixed_rate(arvif, arsta, mask,
|
||||
band);
|
||||
@ -645,7 +645,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
ath12k_peer_assoc_prepare(ar, arvif, arsta,
|
||||
peer_arg, true);
|
||||
|
||||
@@ -9903,19 +10166,40 @@ ath12k_mac_has_single_legacy_rate(struct
|
||||
@@ -11036,19 +11299,40 @@ ath12k_mac_has_single_legacy_rate(struct
|
||||
if (ath12k_mac_bitrate_mask_num_vht_rates(ar, band, mask))
|
||||
return false;
|
||||
|
||||
@ -686,7 +686,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
int i;
|
||||
|
||||
/* No need to consider legacy here. Basic rates are always present
|
||||
@@ -9942,7 +10226,24 @@ ath12k_mac_bitrate_mask_get_single_nss(s
|
||||
@@ -11075,7 +11359,24 @@ ath12k_mac_bitrate_mask_get_single_nss(s
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -712,7 +712,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
return false;
|
||||
|
||||
if (ht_nss_mask == 0)
|
||||
@@ -9989,54 +10290,182 @@ ath12k_mac_get_single_legacy_rate(struct
|
||||
@@ -11122,54 +11423,182 @@ ath12k_mac_get_single_legacy_rate(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -914,7 +914,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -10065,6 +10494,31 @@ ath12k_mac_vht_mcs_range_present(struct
|
||||
@@ -11198,6 +11627,31 @@ ath12k_mac_vht_mcs_range_present(struct
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -946,7 +946,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
static void ath12k_mac_set_bitrate_mask_iter(void *data,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
@@ -10073,7 +10527,10 @@ static void ath12k_mac_set_bitrate_mask_
|
||||
@@ -11206,7 +11660,10 @@ static void ath12k_mac_set_bitrate_mask_
|
||||
struct ath12k_link_sta *arsta;
|
||||
struct ath12k *ar = arvif->ar;
|
||||
|
||||
@ -958,7 +958,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
if (!arsta || arsta->arvif != arvif)
|
||||
return;
|
||||
|
||||
@@ -10111,6 +10568,61 @@ static void ath12k_mac_disable_peer_fixe
|
||||
@@ -11244,6 +11701,61 @@ static void ath12k_mac_disable_peer_fixe
|
||||
arsta->addr, ret);
|
||||
}
|
||||
|
||||
@ -1020,7 +1020,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
static int
|
||||
ath12k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
@@ -10123,13 +10635,17 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
@@ -11256,13 +11768,17 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
enum nl80211_band band;
|
||||
const u8 *ht_mcs_mask;
|
||||
const u16 *vht_mcs_mask;
|
||||
@ -1039,7 +1039,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
|
||||
lockdep_assert_wiphy(hw->wiphy);
|
||||
|
||||
@@ -10144,14 +10660,18 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
@@ -11277,14 +11793,18 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
band = def.chan->band;
|
||||
ht_mcs_mask = mask->control[band].ht_mcs;
|
||||
vht_mcs_mask = mask->control[band].vht_mcs;
|
||||
@ -1059,7 +1059,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
/* mac80211 doesn't support sending a fixed HT/VHT MCS alone, rather it
|
||||
* requires passing at least one of used basic rates along with them.
|
||||
* Fixed rate setting across different preambles(legacy, HT, VHT) is
|
||||
@@ -10168,18 +10688,31 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
@@ -11301,18 +11821,31 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
arvif->vdev_id, ret);
|
||||
goto out;
|
||||
}
|
||||
@ -1095,7 +1095,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
|
||||
/* If multiple rates across different preambles are given
|
||||
* we can reconfigure this info with all peers using PEER_ASSOC
|
||||
@@ -10211,9 +10744,21 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
@@ -11344,9 +11877,21 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
*/
|
||||
ath12k_warn(ar->ab,
|
||||
"Setting more than one MCS Value in bitrate mask not supported\n");
|
||||
@ -1118,7 +1118,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
ieee80211_iterate_stations_mtx(hw,
|
||||
ath12k_mac_disable_peer_fixed_rate,
|
||||
arvif);
|
||||
@@ -10224,9 +10769,10 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
@@ -11357,9 +11902,10 @@ ath12k_mac_op_set_bitrate_mask(struct ie
|
||||
arvif);
|
||||
}
|
||||
|
||||
@ -1133,8 +1133,8 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -220,6 +220,22 @@ enum WMI_HOST_WLAN_BAND {
|
||||
WMI_HOST_WLAN_2G_5G_CAP = 3,
|
||||
@@ -222,6 +222,22 @@ enum WMI_HOST_WLAN_BAND {
|
||||
WMI_HOST_WLAN_2GHZ_5GHZ_CAP = 3,
|
||||
};
|
||||
|
||||
+/* Parameters used for WMI_VDEV_PARAM_AUTORATE_MISC_CFG command.
|
||||
@ -1156,7 +1156,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
enum wmi_cmd_group {
|
||||
/* 0 to 2 are reserved */
|
||||
WMI_GRP_START = 0x3,
|
||||
@@ -1145,7 +1161,9 @@ enum wmi_tlv_vdev_param {
|
||||
@@ -1169,7 +1185,9 @@ enum wmi_tlv_vdev_param {
|
||||
WMI_VDEV_PARAM_HE_RANGE_EXT,
|
||||
WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE,
|
||||
WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME,
|
||||
@ -1166,7 +1166,7 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE = 0x87,
|
||||
WMI_VDEV_PARAM_6GHZ_PARAMS = 0x99,
|
||||
WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
|
||||
@@ -3579,6 +3597,15 @@ struct wmi_force_fw_hang_cmd {
|
||||
@@ -3631,6 +3649,15 @@ struct wmi_force_fw_hang_cmd {
|
||||
__le32 delay_time_ms;
|
||||
} __packed;
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -207,7 +207,7 @@ ath12k_phymodes[NUM_NL80211_BANDS][ATH12
|
||||
@@ -209,7 +209,7 @@ ath12k_phymodes[NUM_NL80211_BANDS][ATH12
|
||||
[NL80211_CHAN_WIDTH_40] = MODE_11BE_EHT40,
|
||||
[NL80211_CHAN_WIDTH_80] = MODE_11BE_EHT80,
|
||||
[NL80211_CHAN_WIDTH_160] = MODE_11BE_EHT160,
|
||||
@ -133,7 +133,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
[NL80211_CHAN_WIDTH_320] = MODE_11BE_EHT320,
|
||||
},
|
||||
[NL80211_BAND_6GHZ] = {
|
||||
@@ -218,7 +218,7 @@ ath12k_phymodes[NUM_NL80211_BANDS][ATH12
|
||||
@@ -220,7 +220,7 @@ ath12k_phymodes[NUM_NL80211_BANDS][ATH12
|
||||
[NL80211_CHAN_WIDTH_40] = MODE_11BE_EHT40,
|
||||
[NL80211_CHAN_WIDTH_80] = MODE_11BE_EHT80,
|
||||
[NL80211_CHAN_WIDTH_160] = MODE_11BE_EHT160,
|
||||
@ -142,7 +142,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
[NL80211_CHAN_WIDTH_320] = MODE_11BE_EHT320,
|
||||
},
|
||||
|
||||
@@ -2638,17 +2638,6 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2556,17 +2556,6 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
|
||||
switch (link_sta->bandwidth) {
|
||||
case IEEE80211_STA_RX_BW_160:
|
||||
@ -160,7 +160,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
|
||||
arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
|
||||
|
||||
@@ -2935,16 +2924,11 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
@@ -2853,16 +2842,11 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
struct ieee80211_link_sta *link_sta)
|
||||
{
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_160) {
|
||||
@ -181,7 +181,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
}
|
||||
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -2966,11 +2950,8 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
@@ -2884,11 +2868,8 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
if (link_sta->he_cap.he_cap_elem.phy_cap_info[0] &
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G)
|
||||
return MODE_11AX_HE160;
|
||||
@ -195,7 +195,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
}
|
||||
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -2998,14 +2979,10 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
@@ -2916,14 +2897,10 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G)
|
||||
return MODE_11BE_EHT160;
|
||||
|
||||
@ -211,7 +211,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
}
|
||||
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -7077,8 +7054,6 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
@@ -7630,8 +7607,6 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
mcs_nss->tx_mcs_80 = cpu_to_le16(txmcs_map & 0xffff);
|
||||
mcs_nss->rx_mcs_160 = cpu_to_le16(rxmcs_map & 0xffff);
|
||||
mcs_nss->tx_mcs_160 = cpu_to_le16(txmcs_map & 0xffff);
|
||||
@ -220,7 +220,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
}
|
||||
|
||||
static void ath12k_mac_copy_he_cap(struct ath12k *ar,
|
||||
@@ -7100,6 +7075,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
@@ -7653,6 +7628,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G |
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
|
||||
@ -228,7 +228,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
he_cap_elem->phy_cap_info[0] &=
|
||||
~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G;
|
||||
he_cap_elem->phy_cap_info[5] &=
|
||||
@@ -10176,10 +10152,6 @@ static __le16
|
||||
@@ -11309,10 +11285,6 @@ static __le16
|
||||
ath12k_mac_get_tx_mcs_map(const struct ieee80211_sta_he_cap *he_cap)
|
||||
{
|
||||
if (he_cap->he_cap_elem.phy_cap_info[0] &
|
||||
@ -241,7 +241,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -1021,8 +1021,6 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
@@ -1066,8 +1066,6 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
chan->band_center_freq1 = cpu_to_le32(center_freq1 - 40);
|
||||
|
||||
chan->band_center_freq2 = cpu_to_le32(center_freq1);
|
||||
@ -252,7 +252,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3726,7 +3726,6 @@ struct wmi_vdev_install_key_arg {
|
||||
@@ -3798,7 +3798,6 @@ struct wmi_vdev_install_key_arg {
|
||||
#define WMI_HOST_MAX_HE_RATE_SET 3
|
||||
#define WMI_HECAP_TXRX_MCS_NSS_IDX_80 0
|
||||
#define WMI_HECAP_TXRX_MCS_NSS_IDX_160 1
|
||||
|
||||
@ -139,7 +139,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/core.h
|
||||
@@ -789,6 +789,8 @@ struct ath12k_pdev_cap {
|
||||
@@ -879,6 +879,8 @@ struct ath12k_pdev_cap {
|
||||
struct ath12k_band_cap band[NUM_NL80211_BANDS];
|
||||
u32 eml_cap;
|
||||
u32 mld_cap;
|
||||
@ -150,7 +150,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
struct mlo_timestamp {
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -2267,6 +2267,34 @@ ath12k_peer_assoc_h_vht_limit(u16 tx_mcs
|
||||
@@ -2185,6 +2185,34 @@ ath12k_peer_assoc_h_vht_limit(u16 tx_mcs
|
||||
return tx_mcs_set;
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
static void ath12k_peer_assoc_h_vht(struct ath12k *ar,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ath12k_link_sta *arsta,
|
||||
@@ -2284,6 +2312,7 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
@@ -2202,6 +2230,7 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
u8 max_nss, vht_mcs;
|
||||
int i, vht_nss, nss_idx;
|
||||
bool user_rate_valid = true;
|
||||
@ -193,7 +193,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
|
||||
@@ -2388,10 +2417,24 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
@@ -2306,10 +2335,24 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
/* TODO: Check */
|
||||
arg->tx_max_mcs_nss = 0xFF;
|
||||
|
||||
@ -221,7 +221,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
}
|
||||
|
||||
static int ath12k_mac_get_max_he_mcs_map(u16 mcs_map, int nss)
|
||||
@@ -2484,6 +2527,7 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2402,6 +2445,7 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
u16 he_tx_mcs = 0, v = 0;
|
||||
int he_nss, nss_idx;
|
||||
bool user_rate_valid = true;
|
||||
@ -229,7 +229,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
if (WARN_ON(ath12k_mac_vif_link_chan(vif, link_id, &def)))
|
||||
return;
|
||||
@@ -2681,9 +2725,25 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2599,9 +2643,25 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
max_nss = min(max_nss, ar->num_tx_chains);
|
||||
arg->peer_nss = min(link_sta->rx_nss, max_nss);
|
||||
|
||||
@ -257,7 +257,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
}
|
||||
|
||||
static void ath12k_peer_assoc_h_he_6ghz(struct ath12k *ar,
|
||||
@@ -2924,10 +2984,13 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
@@ -2842,10 +2902,13 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
struct ieee80211_link_sta *link_sta)
|
||||
{
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_160) {
|
||||
@ -273,7 +273,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
return MODE_11AC_VHT160;
|
||||
}
|
||||
|
||||
@@ -6826,10 +6889,8 @@ ath12k_create_vht_cap(struct ath12k *ar,
|
||||
@@ -7379,10 +7442,8 @@ ath12k_create_vht_cap(struct ath12k *ar,
|
||||
|
||||
ath12k_set_vht_txbf_cap(ar, &vht_cap.cap);
|
||||
|
||||
@ -286,19 +286,19 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
rxmcs_map = 0;
|
||||
txmcs_map = 0;
|
||||
@@ -11437,7 +11498,8 @@ ath12k_mac_setup_radio_iface_comb(struct
|
||||
comb[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
|
||||
BIT(NL80211_CHAN_WIDTH_20) |
|
||||
BIT(NL80211_CHAN_WIDTH_40) |
|
||||
- BIT(NL80211_CHAN_WIDTH_80);
|
||||
+ BIT(NL80211_CHAN_WIDTH_80) |
|
||||
+ BIT(NL80211_CHAN_WIDTH_160);
|
||||
@@ -12654,7 +12715,8 @@ ath12k_mac_setup_radio_iface_comb(struct
|
||||
comb[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
|
||||
BIT(NL80211_CHAN_WIDTH_20) |
|
||||
BIT(NL80211_CHAN_WIDTH_40) |
|
||||
- BIT(NL80211_CHAN_WIDTH_80);
|
||||
+ BIT(NL80211_CHAN_WIDTH_80) |
|
||||
+ BIT(NL80211_CHAN_WIDTH_160);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -11811,6 +11873,9 @@ static int ath12k_mac_hw_register(struct
|
||||
ieee80211_hw_set(hw, SUPPORTS_TX_FRAG);
|
||||
@@ -13031,6 +13093,9 @@ static int ath12k_mac_hw_register(struct
|
||||
ieee80211_hw_set(hw, REPORTS_LOW_ACK);
|
||||
ieee80211_hw_set(hw, NO_VIRTUAL_MONITOR);
|
||||
|
||||
+ if (cap->nss_ratio_enabled)
|
||||
+ ieee80211_hw_set(hw, SUPPORTS_VHT_EXT_NSS_BW);
|
||||
@ -308,7 +308,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
ieee80211_hw_set(hw, TX_AMPDU_SETUP_IN_HW);
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.h
|
||||
@@ -38,6 +38,8 @@ struct ath12k_generic_iter {
|
||||
@@ -41,6 +41,8 @@ struct ath12k_generic_iter {
|
||||
#define IEEE80211_DISABLE_VHT_MCS_SUPPORT_0_11 BIT(24)
|
||||
|
||||
#define ATH12K_CHAN_WIDTH_NUM 14
|
||||
@ -319,7 +319,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
#define ATH12K_TX_POWER_MIN_VAL 0
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -525,6 +525,10 @@ ath12k_pull_mac_phy_cap_svc_ready_ext(st
|
||||
@@ -537,6 +537,10 @@ ath12k_pull_mac_phy_cap_svc_ready_ext(st
|
||||
pdev_cap->he_mcs = le32_to_cpu(mac_caps->he_supp_mcs_5g);
|
||||
pdev_cap->tx_chain_mask = le32_to_cpu(mac_caps->tx_chain_mask_5g);
|
||||
pdev_cap->rx_chain_mask = le32_to_cpu(mac_caps->rx_chain_mask_5g);
|
||||
@ -330,7 +330,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1014,7 +1018,8 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
@@ -1059,7 +1063,8 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
|
||||
chan->band_center_freq2 = cpu_to_le32(center_freq1);
|
||||
|
||||
@ -342,7 +342,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
else
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -2290,6 +2290,21 @@ enum wmi_direct_buffer_module {
|
||||
@@ -2328,6 +2328,21 @@ enum wmi_direct_buffer_module {
|
||||
WMI_DIRECT_BUF_MAX
|
||||
};
|
||||
|
||||
@ -364,7 +364,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
struct ath12k_wmi_pdev_band_arg {
|
||||
u32 pdev_id;
|
||||
u32 start_freq;
|
||||
@@ -2606,6 +2621,12 @@ struct ath12k_wmi_hw_mode_cap_params {
|
||||
@@ -2647,6 +2662,12 @@ struct ath12k_wmi_hw_mode_cap_params {
|
||||
} __packed;
|
||||
|
||||
#define WMI_MAX_HECAP_PHY_SIZE (3)
|
||||
@ -377,17 +377,3 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
/* pdev_id is present in lower 16 bits of pdev_and_hw_link_ids in
|
||||
* ath12k_wmi_mac_phy_caps_params & ath12k_wmi_caps_ext_params.
|
||||
@@ -2647,6 +2668,13 @@ struct ath12k_wmi_mac_phy_caps_params {
|
||||
__le32 he_cap_info_2g_ext;
|
||||
__le32 he_cap_info_5g_ext;
|
||||
__le32 he_cap_info_internal;
|
||||
+ __le32 wireless_modes;
|
||||
+ __le32 low_2ghz_chan_freq;
|
||||
+ __le32 high_2ghz_chan_freq;
|
||||
+ __le32 low_5ghz_chan_freq;
|
||||
+ __le32 high_5ghz_chan_freq;
|
||||
+ __le32 nss_ratio;
|
||||
+
|
||||
} __packed;
|
||||
|
||||
struct ath12k_wmi_hal_reg_caps_ext_params {
|
||||
|
||||
@ -132,7 +132,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -2726,8 +2726,10 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2644,8 +2644,10 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
arg->peer_nss = min(link_sta->rx_nss, max_nss);
|
||||
|
||||
if (arg->peer_phymode == MODE_11AX_HE160) {
|
||||
@ -144,7 +144,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
arg->peer_bw_rxnss_override = ATH12K_BW_NSS_MAP_ENABLE;
|
||||
|
||||
if (!rx_nss) {
|
||||
@@ -6912,6 +6914,12 @@ ath12k_create_vht_cap(struct ath12k *ar,
|
||||
@@ -7465,6 +7467,12 @@ ath12k_create_vht_cap(struct ath12k *ar,
|
||||
vht_cap.vht_mcs.rx_mcs_map = cpu_to_le16(rxmcs_map);
|
||||
vht_cap.vht_mcs.tx_mcs_map = cpu_to_le16(txmcs_map);
|
||||
|
||||
@ -157,7 +157,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
return vht_cap;
|
||||
}
|
||||
|
||||
@@ -7092,11 +7100,12 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
@@ -7645,11 +7653,12 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
struct ieee80211_sta_he_cap *he_cap)
|
||||
{
|
||||
struct ieee80211_he_mcs_nss_supp *mcs_nss = &he_cap->he_mcs_nss_supp;
|
||||
@ -173,7 +173,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (i < ar->num_tx_chains &&
|
||||
(ar->cfg_tx_chainmask >> cap->tx_chain_mask_shift) & BIT(i))
|
||||
@@ -7109,12 +7118,24 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
@@ -7662,12 +7671,24 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
rxmcs_map |= IEEE80211_HE_MCS_SUPPORT_0_11 << (i * 2);
|
||||
else
|
||||
rxmcs_map |= IEEE80211_HE_MCS_NOT_SUPPORTED << (i * 2);
|
||||
|
||||
@ -12,7 +12,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27.
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/ce.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/ce.h
|
||||
@@ -148,7 +148,7 @@ struct ath12k_ce_pipe {
|
||||
@@ -159,7 +159,7 @@ struct ath12k_ce_pipe {
|
||||
void (*send_cb)(struct ath12k_ce_pipe *pipe);
|
||||
void (*recv_cb)(struct ath12k_base *ab, struct sk_buff *skb);
|
||||
|
||||
@ -44,7 +44,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27.
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
@@ -683,7 +683,7 @@ static int ath12k_pci_config_irq(struct
|
||||
@@ -684,7 +684,7 @@ static int ath12k_pci_config_irq(struct
|
||||
|
||||
irq_idx = ATH12K_PCI_IRQ_CE0_OFFSET + i;
|
||||
|
||||
@ -53,7 +53,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27.
|
||||
|
||||
ret = request_irq(irq, ath12k_pci_ce_interrupt_handler,
|
||||
ab_pci->irq_flags, irq_name[irq_idx],
|
||||
@@ -970,7 +970,7 @@ static void ath12k_pci_aspm_restore(stru
|
||||
@@ -967,7 +967,7 @@ static void ath12k_pci_aspm_restore(stru
|
||||
PCI_EXP_LNKCTL_ASPMC);
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27.
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -980,7 +980,7 @@ static void ath12k_pci_cancel_workqueue(
|
||||
@@ -977,7 +977,7 @@ static void ath12k_pci_cancel_workqueue(
|
||||
if (ath12k_ce_get_attr_flags(ab, i) & CE_ATTR_DIS_INTR)
|
||||
continue;
|
||||
|
||||
@ -71,7 +71,7 @@ This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -988,7 +988,7 @@ static void ath12k_pci_ce_irq_disable_sy
|
||||
@@ -985,7 +985,7 @@ static void ath12k_pci_ce_irq_disable_sy
|
||||
{
|
||||
ath12k_pci_ce_irqs_disable(ab);
|
||||
ath12k_pci_sync_ce_irqs(ab);
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
From 454255e44bf48d8498ac3413389513138ab57bf6 Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Sat, 4 Jan 2025 14:24:46 -0800
|
||||
Subject: [PATCH] wifi: ath9k: ahb: do ioremap resource in one step
|
||||
|
||||
Simplifies probe slightly and adds extra error codes.
|
||||
|
||||
Switching from devm_ioremap to the platform variant ends up calling
|
||||
devm_request_mem_region, which reserves the memory region for the
|
||||
various wmacs. Per board, there is only one wmac and after some fairly
|
||||
thorough analysis, there are no overlapping memory regions between wmacs
|
||||
and other devices on the ahb.
|
||||
|
||||
Tested on a TP-Link Archer C7v2.
|
||||
|
||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/ahb.c | 13 +++----------
|
||||
1 file changed, 3 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
@@ -74,7 +74,6 @@ static int ath_ahb_probe(struct platform
|
||||
void __iomem *mem;
|
||||
struct ath_softc *sc;
|
||||
struct ieee80211_hw *hw;
|
||||
- struct resource *res;
|
||||
const struct platform_device_id *id = platform_get_device_id(pdev);
|
||||
int irq;
|
||||
int ret = 0;
|
||||
@@ -86,16 +85,10 @@ static int ath_ahb_probe(struct platform
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
- if (res == NULL) {
|
||||
- dev_err(&pdev->dev, "no memory resource found\n");
|
||||
- return -ENXIO;
|
||||
- }
|
||||
-
|
||||
- mem = devm_ioremap(&pdev->dev, res->start, resource_size(res));
|
||||
- if (mem == NULL) {
|
||||
+ mem = devm_platform_ioremap_resource(pdev, 0);
|
||||
+ if (IS_ERR(mem)) {
|
||||
dev_err(&pdev->dev, "ioremap failed\n");
|
||||
- return -ENOMEM;
|
||||
+ return PTR_ERR(mem);
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -845,6 +845,9 @@ static inline int ath9k_dump_btcoex(stru
|
||||
@@ -844,6 +844,9 @@ static inline int ath9k_dump_btcoex(stru
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
void ath_init_leds(struct ath_softc *sc);
|
||||
void ath_deinit_leds(struct ath_softc *sc);
|
||||
@ -10,7 +10,7 @@
|
||||
#else
|
||||
static inline void ath_init_leds(struct ath_softc *sc)
|
||||
{
|
||||
@@ -981,6 +984,13 @@ void ath_ant_comb_scan(struct ath_softc
|
||||
@@ -980,6 +983,13 @@ void ath_ant_comb_scan(struct ath_softc
|
||||
|
||||
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
@@ -1036,9 +1046,8 @@ struct ath_softc {
|
||||
@@ -1035,9 +1045,8 @@ struct ath_softc {
|
||||
spinlock_t chan_lock;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
@@ -1048,6 +1050,10 @@ struct ath_softc {
|
||||
@@ -1047,6 +1049,10 @@ struct ath_softc {
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
const char *led_default_trigger;
|
||||
struct list_head leds;
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -984,8 +984,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
@@ -983,8 +983,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
struct wireless_dev *wdev;
|
||||
|
||||
@ -22,7 +22,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/netlink.h>
|
||||
#include <uapi/linux/if_arp.h>
|
||||
@@ -8215,31 +8216,45 @@ static void brcmf_cfg80211_reg_notifier(
|
||||
@@ -8223,31 +8224,45 @@ static void brcmf_cfg80211_reg_notifier(
|
||||
struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
struct brcmf_fil_country_le ccreq;
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -3342,6 +3342,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
@@ -3343,6 +3343,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
bphy_err(drvr, "error (%d)\n", err);
|
||||
}
|
||||
|
||||
|
||||
@ -121,9 +121,9 @@ JIRA: SWWLAN-136577
|
||||
{
|
||||
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
|
||||
struct brcmf_pub *drvr = bus_if->drvr;
|
||||
@@ -1363,10 +1363,13 @@ int brcmf_attach(struct device *dev)
|
||||
brcmf_fweh_register(drvr, BRCMF_E_PSM_WATCHDOG,
|
||||
brcmf_psm_watchdog_notify);
|
||||
@@ -1365,10 +1365,13 @@ int brcmf_attach(struct device *dev)
|
||||
|
||||
brcmf_fwvid_get_cfg80211_ops(drvr);
|
||||
|
||||
- ret = brcmf_bus_started(drvr, drvr->ops);
|
||||
- if (ret != 0) {
|
||||
@ -151,17 +151,17 @@ JIRA: SWWLAN-136577
|
||||
#undef pr_fmt
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h
|
||||
@@ -94,7 +94,8 @@ struct brcmf_cfg80211_info;
|
||||
BRCMF_ENUM_DEF(FIFO_CREDIT_MAP, 74) \
|
||||
BRCMF_ENUM_DEF(ACTION_FRAME_RX, 75) \
|
||||
BRCMF_ENUM_DEF(TDLS_PEER_EVENT, 92) \
|
||||
- BRCMF_ENUM_DEF(BCMC_CREDIT_SUPPORT, 127)
|
||||
+ BRCMF_ENUM_DEF(BCMC_CREDIT_SUPPORT, 127) \
|
||||
@@ -98,7 +98,8 @@ struct brcmf_cfg80211_info;
|
||||
BRCMF_ABSTRACT_ENUM_DEF(EXT_AUTH_REQ, 0) \
|
||||
BRCMF_ABSTRACT_ENUM_DEF(EXT_AUTH_FRAME_RX, 1) \
|
||||
BRCMF_ABSTRACT_ENUM_DEF(MGMT_FRAME_TXSTATUS, 2) \
|
||||
- BRCMF_ABSTRACT_ENUM_DEF(MGMT_FRAME_OFFCHAN_DONE, 3)
|
||||
+ BRCMF_ABSTRACT_ENUM_DEF(MGMT_FRAME_OFFCHAN_DONE, 3) \
|
||||
+ BRCMF_ENUM_DEF(ULP, 146)
|
||||
|
||||
#define BRCMF_ENUM_DEF(id, val) \
|
||||
BRCMF_E_##id = (val),
|
||||
@@ -102,6 +103,12 @@ struct brcmf_cfg80211_info;
|
||||
@@ -106,6 +107,12 @@ struct brcmf_cfg80211_info;
|
||||
/* firmware event codes sent by the dongle */
|
||||
enum brcmf_fweh_event_code {
|
||||
BRCMF_FWEH_EVENT_ENUM_DEFLIST
|
||||
@ -174,7 +174,7 @@ JIRA: SWWLAN-136577
|
||||
};
|
||||
#undef BRCMF_ENUM_DEF
|
||||
|
||||
@@ -280,6 +287,28 @@ struct brcmf_if_event {
|
||||
@@ -284,6 +291,28 @@ struct brcmf_if_event {
|
||||
u8 role;
|
||||
};
|
||||
|
||||
@ -692,7 +692,7 @@ JIRA: SWWLAN-136577
|
||||
#endif /* BRCMFMAC_SDIO_H */
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
@@ -1202,7 +1202,7 @@ static void brcmf_usb_probe_phase2(struc
|
||||
@@ -1211,7 +1211,7 @@ static void brcmf_usb_probe_phase2(struc
|
||||
goto error;
|
||||
|
||||
/* Attach to the common driver interface */
|
||||
@ -701,7 +701,7 @@ JIRA: SWWLAN-136577
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
@@ -1282,7 +1282,7 @@ static int brcmf_usb_probe_cb(struct brc
|
||||
@@ -1291,7 +1291,7 @@ static int brcmf_usb_probe_cb(struct brc
|
||||
ret = brcmf_alloc(devinfo->dev, devinfo->settings);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -2495,43 +2495,50 @@ brcmf_cfg80211_connect(struct wiphy *wip
|
||||
@@ -2496,43 +2496,50 @@ brcmf_cfg80211_connect(struct wiphy *wip
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -7994,6 +7994,7 @@ static s32 brcmf_translate_country_code(
|
||||
@@ -8002,6 +8002,7 @@ static s32 brcmf_translate_country_code(
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
static int
|
||||
brcmf_parse_dump_obss(char *buf, struct brcmf_dump_survey *survey)
|
||||
{
|
||||
@@ -8216,6 +8217,7 @@ exit:
|
||||
@@ -8224,6 +8225,7 @@ exit:
|
||||
brcmf_set_mpc(ifp, 1);
|
||||
return err;
|
||||
}
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
|
||||
static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy,
|
||||
struct regulatory_request *req)
|
||||
@@ -8382,8 +8384,10 @@ struct brcmf_cfg80211_info *brcmf_cfg802
|
||||
@@ -8390,8 +8392,10 @@ struct brcmf_cfg80211_info *brcmf_cfg802
|
||||
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_GTK))
|
||||
ops->set_rekey_data = brcmf_cfg80211_set_rekey_data;
|
||||
#endif
|
||||
|
||||
@ -54,7 +54,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
+ depends on MHI_BUS
|
||||
+ depends on QRTR
|
||||
+ depends on QRTR_MHI
|
||||
select PCI_PWRCTL_PWRSEQ if HAVE_PWRCTL
|
||||
select PCI_PWRCTRL_PWRSEQ if HAVE_PWRCTRL
|
||||
help
|
||||
This module adds support for PCIE bus
|
||||
--- a/local-symbols
|
||||
|
||||
@ -634,7 +634,7 @@
|
||||
TP_printk("%s", __get_str(msg))
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h
|
||||
@@ -87,7 +87,11 @@ static inline void trace_ ## name(proto)
|
||||
@@ -88,7 +88,11 @@ static inline void trace_ ## name(proto)
|
||||
#endif
|
||||
|
||||
#define DEV_ENTRY __string(dev, dev_name(dev))
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/snoc.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
|
||||
@@ -1635,10 +1635,10 @@ static int ath10k_fw_init(struct ath10k
|
||||
@@ -1638,10 +1638,10 @@ static int ath10k_fw_init(struct ath10k
|
||||
|
||||
ar_snoc->fw.dev = &pdev->dev;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
|
||||
@@ -638,8 +638,13 @@ static int iwl_mvm_tzone_get_temp(struct
|
||||
@@ -626,8 +626,13 @@ static int iwl_mvm_tzone_get_temp(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
{
|
||||
struct iwl_mvm *mvm = thermal_zone_device_priv(device);
|
||||
|
||||
@@ -682,13 +687,23 @@ static void iwl_mvm_thermal_zone_registe
|
||||
@@ -670,13 +675,23 @@ static void iwl_mvm_thermal_zone_registe
|
||||
for (i = 0 ; i < IWL_MAX_DTS_TRIPS; i++) {
|
||||
mvm->tz_device.trips[i].temperature = THERMAL_TEMP_INVALID;
|
||||
mvm->tz_device.trips[i].type = THERMAL_TRIP_PASSIVE;
|
||||
|
||||
@ -1,43 +1,54 @@
|
||||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -162,11 +162,15 @@ int cfg80211_switch_netns(struct cfg8021
|
||||
@@ -162,11 +162,19 @@ int cfg80211_switch_netns(struct cfg8021
|
||||
list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
|
||||
if (!wdev->netdev)
|
||||
continue;
|
||||
+#if LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
wdev->netdev->netns_local = false;
|
||||
- wdev->netdev->netns_immutable = false;
|
||||
+#if LINUX_VERSION_IS_GEQ(6,15,0)
|
||||
+ wdev->netdev->netns_immutable = true;
|
||||
+#elif LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
+ wdev->netdev->netns_local = true;
|
||||
+#endif
|
||||
err = dev_change_net_namespace(wdev->netdev, net, "wlan%d");
|
||||
if (err)
|
||||
break;
|
||||
+#if LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
wdev->netdev->netns_local = true;
|
||||
+#if LINUX_VERSION_IS_GEQ(6,15,0)
|
||||
wdev->netdev->netns_immutable = true;
|
||||
+#elif LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
+ wdev->netdev->netns_local = true;
|
||||
+#endif
|
||||
}
|
||||
|
||||
if (err) {
|
||||
@@ -178,11 +182,15 @@ int cfg80211_switch_netns(struct cfg8021
|
||||
@@ -178,11 +186,19 @@ int cfg80211_switch_netns(struct cfg8021
|
||||
list) {
|
||||
if (!wdev->netdev)
|
||||
continue;
|
||||
+#if LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
wdev->netdev->netns_local = false;
|
||||
+#if LINUX_VERSION_IS_GEQ(6,15,0)
|
||||
wdev->netdev->netns_immutable = false;
|
||||
+#elif LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
+ wdev->netdev->netns_local = false;
|
||||
+#endif
|
||||
err = dev_change_net_namespace(wdev->netdev, net,
|
||||
"wlan%d");
|
||||
WARN_ON(err);
|
||||
+#if LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
wdev->netdev->netns_local = true;
|
||||
+#if LINUX_VERSION_IS_GEQ(6,15,0)
|
||||
wdev->netdev->netns_immutable = true;
|
||||
+#elif LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
+ wdev->netdev->netns_local = true;
|
||||
+#endif
|
||||
}
|
||||
|
||||
return err;
|
||||
@@ -1520,7 +1528,9 @@ static int cfg80211_netdev_notifier_call
|
||||
@@ -1521,7 +1537,11 @@ static int cfg80211_netdev_notifier_call
|
||||
SET_NETDEV_DEVTYPE(dev, &wiphy_type);
|
||||
wdev->netdev = dev;
|
||||
/* can only change netns with wiphy */
|
||||
+#if LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
dev->netns_local = true;
|
||||
+#if LINUX_VERSION_IS_GEQ(6,15,0)
|
||||
dev->netns_immutable = true;
|
||||
+#elif LINUX_VERSION_IS_GEQ(6,12,0)
|
||||
+ dev->netns_local = true;
|
||||
+#endif
|
||||
|
||||
cfg80211_init_wdev(wdev);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
@@ -1579,7 +1579,11 @@ static int brcmf_usb_reset_device(struct
|
||||
@@ -1588,7 +1588,11 @@ static int brcmf_usb_reset_device(struct
|
||||
|
||||
void brcmf_usb_exit(void)
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
|
||||
@@ -6670,6 +6670,7 @@ static void hwsim_virtio_rx_done(struct
|
||||
@@ -6672,6 +6672,7 @@ static void hwsim_virtio_rx_done(struct
|
||||
|
||||
static int init_vqs(struct virtio_device *vdev)
|
||||
{
|
||||
@ -8,7 +8,7 @@
|
||||
struct virtqueue_info vqs_info[HWSIM_NUM_VQS] = {
|
||||
[HWSIM_VQ_TX] = { "tx", hwsim_virtio_tx_done },
|
||||
[HWSIM_VQ_RX] = { "rx", hwsim_virtio_rx_done },
|
||||
@@ -6677,6 +6678,19 @@ static int init_vqs(struct virtio_device
|
||||
@@ -6679,6 +6680,19 @@ static int init_vqs(struct virtio_device
|
||||
|
||||
return virtio_find_vqs(vdev, HWSIM_NUM_VQS,
|
||||
hwsim_vqs, vqs_info, NULL);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -909,7 +909,11 @@ static int rtw_usb_init_rx(struct rtw_de
|
||||
@@ -965,7 +965,11 @@ static int rtw_usb_init_rx(struct rtw_de
|
||||
struct sk_buff *rx_skb;
|
||||
int i;
|
||||
|
||||
|
||||
@ -17,8 +17,8 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/backport-include/net/genetlink.h
|
||||
+++ b/backport-include/net/genetlink.h
|
||||
@@ -172,4 +172,15 @@ static inline int genlmsg_parse(const st
|
||||
}
|
||||
@@ -192,4 +192,15 @@ int backport_genlmsg_multicast_allns(con
|
||||
#define genlmsg_multicast_allns LINUX_BACKPORT(genlmsg_multicast_allns)
|
||||
#endif /* LINUX_VERSION_IS_LESS(5,2,0) */
|
||||
|
||||
+#if LINUX_VERSION_IN_RANGE(5,15,0,5,15,169) || \
|
||||
|
||||
@ -173,7 +173,7 @@
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
@@ -448,8 +450,9 @@ STA_OPS_RW(agg_status);
|
||||
@@ -442,8 +444,9 @@ STA_OPS_RW(agg_status);
|
||||
|
||||
/* link sta attributes */
|
||||
#define LINK_STA_OPS(name) \
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
err_wiphy_new:
|
||||
--- a/drivers/net/wireless/marvell/libertas/main.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/main.c
|
||||
@@ -935,6 +935,7 @@ struct lbs_private *lbs_add_card(void *c
|
||||
@@ -852,6 +852,7 @@ struct lbs_private *lbs_add_card(void *c
|
||||
goto err_adapter;
|
||||
}
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ Signed-off-by: Pali Rohár <pali@kernel.org>
|
||||
/*
|
||||
* This function initializes a command node.
|
||||
*
|
||||
@@ -193,8 +272,8 @@ static int mwifiex_dnld_cmd_to_fw(struct
|
||||
@@ -191,8 +270,8 @@ static int mwifiex_dnld_cmd_to_fw(struct
|
||||
cmd_code != HostCmd_CMD_FUNC_SHUTDOWN &&
|
||||
cmd_code != HostCmd_CMD_FUNC_INIT) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
@ -116,7 +116,7 @@ Signed-off-by: Pali Rohár <pali@kernel.org>
|
||||
mwifiex_recycle_cmd_node(adapter, cmd_node);
|
||||
queue_work(adapter->workqueue, &adapter->main_work);
|
||||
return -1;
|
||||
@@ -655,8 +734,8 @@ int mwifiex_send_cmd(struct mwifiex_priv
|
||||
@@ -651,8 +730,8 @@ int mwifiex_send_cmd(struct mwifiex_priv
|
||||
/* Return error, since the command preparation failed */
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
@ -127,19 +127,7 @@ Signed-off-by: Pali Rohár <pali@kernel.org>
|
||||
mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
|
||||
return -1;
|
||||
}
|
||||
@@ -904,8 +983,9 @@ int mwifiex_process_cmdresp(struct mwifi
|
||||
if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "%s: cmd %#x failed during\t"
|
||||
- "initialization\n", __func__, cmdresp_no);
|
||||
+ "%s: cmd %s (%#x) failed during\t"
|
||||
+ "initialization\n", __func__,
|
||||
+ mwifiex_cmd_to_str(cmdresp_no), cmdresp_no);
|
||||
mwifiex_init_fw_complete(adapter);
|
||||
return -1;
|
||||
} else if (adapter->last_init_cmd == cmdresp_no)
|
||||
@@ -1287,8 +1367,8 @@ mwifiex_process_sleep_confirm_resp(struc
|
||||
@@ -1262,8 +1341,8 @@ mwifiex_process_sleep_confirm_resp(struc
|
||||
|
||||
if (command != HostCmd_CMD_802_11_PS_MODE_ENH) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
@ -152,7 +140,7 @@ Signed-off-by: Pali Rohár <pali@kernel.org>
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
@@ -1096,6 +1096,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
@@ -1090,6 +1090,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
void mwifiex_cancel_pending_scan_cmd(struct mwifiex_adapter *adapter);
|
||||
void mwifiex_cancel_scan(struct mwifiex_adapter *adapter);
|
||||
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sun, 6 Jul 2025 11:15:13 +0200
|
||||
Subject: [PATCH] wifi: rt2x00: fix remove callback type mismatch
|
||||
|
||||
The function is used as remove callback for a platform driver.
|
||||
It was missed during the conversion from int to void
|
||||
|
||||
Fixes: 0edb555a65d1 ("platform: Make platform_driver::remove() return void")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
|
||||
@@ -108,7 +108,7 @@ exit_free_device:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00soc_probe);
|
||||
|
||||
-int rt2x00soc_remove(struct platform_device *pdev)
|
||||
+void rt2x00soc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ieee80211_hw *hw = platform_get_drvdata(pdev);
|
||||
struct rt2x00_dev *rt2x00dev = hw->priv;
|
||||
@@ -119,8 +119,6 @@ int rt2x00soc_remove(struct platform_dev
|
||||
rt2x00lib_remove_dev(rt2x00dev);
|
||||
rt2x00soc_free_reg(rt2x00dev);
|
||||
ieee80211_free_hw(hw);
|
||||
-
|
||||
- return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00soc_remove);
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.h
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.h
|
||||
@@ -17,7 +17,7 @@
|
||||
* SoC driver handlers.
|
||||
*/
|
||||
int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops);
|
||||
-int rt2x00soc_remove(struct platform_device *pdev);
|
||||
+void rt2x00soc_remove(struct platform_device *pdev);
|
||||
#ifdef CONFIG_PM
|
||||
int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state);
|
||||
int rt2x00soc_resume(struct platform_device *pdev);
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -334,6 +334,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
@@ -336,6 +336,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
RT2X00_LIB_CRYPTO=
|
||||
RT2X00_LIB_LEDS=
|
||||
RT2X00_LIB_DEBUGFS=
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
From 0d1d165eff9d6cfad51113e18d9d8c9a8de27d6d Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Sun, 26 Jan 2025 16:04:21 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Don't use static local variable in
|
||||
rtw8821c_set_tx_power_index_by_rate
|
||||
|
||||
Some users want to plug two identical USB devices at the same time.
|
||||
This static variable could theoretically cause them to use incorrect
|
||||
TX power values.
|
||||
|
||||
Move the variable to the caller and pass a pointer to it to
|
||||
rtw8821c_set_tx_power_index_by_rate().
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/fe42858c-9b9f-4f03-9aaa-737472c2cd90@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 14 ++++++++------
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -680,11 +680,11 @@ static void query_phy_status(struct rtw_
|
||||
}
|
||||
|
||||
static void
|
||||
-rtw8821c_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
|
||||
+rtw8821c_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path,
|
||||
+ u8 rs, u32 *phy_pwr_idx)
|
||||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
static const u32 offset_txagc[2] = {0x1d00, 0x1d80};
|
||||
- static u32 phy_pwr_idx;
|
||||
u8 rate, rate_idx, pwr_index, shift;
|
||||
int j;
|
||||
|
||||
@@ -692,12 +692,12 @@ rtw8821c_set_tx_power_index_by_rate(stru
|
||||
rate = rtw_rate_section[rs][j];
|
||||
pwr_index = hal->tx_pwr_tbl[path][rate];
|
||||
shift = rate & 0x3;
|
||||
- phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
|
||||
+ *phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
|
||||
if (shift == 0x3 || rate == DESC_RATEVHT1SS_MCS9) {
|
||||
rate_idx = rate & 0xfc;
|
||||
rtw_write32(rtwdev, offset_txagc[path] + rate_idx,
|
||||
- phy_pwr_idx);
|
||||
- phy_pwr_idx = 0;
|
||||
+ *phy_pwr_idx);
|
||||
+ *phy_pwr_idx = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -705,6 +705,7 @@ rtw8821c_set_tx_power_index_by_rate(stru
|
||||
static void rtw8821c_set_tx_power_index(struct rtw_dev *rtwdev)
|
||||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
+ u32 phy_pwr_idx = 0;
|
||||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
@@ -712,7 +713,8 @@ static void rtw8821c_set_tx_power_index(
|
||||
if (rs == RTW_RATE_SECTION_HT_2S ||
|
||||
rs == RTW_RATE_SECTION_VHT_2S)
|
||||
continue;
|
||||
- rtw8821c_set_tx_power_index_by_rate(rtwdev, path, rs);
|
||||
+ rtw8821c_set_tx_power_index_by_rate(rtwdev, path, rs,
|
||||
+ &phy_pwr_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
From 105dc94233e48ff30e572a50fb39d7e3dec810fa Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Kreimer <algonell@gmail.com>
|
||||
Date: Mon, 3 Feb 2025 20:08:27 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Fix a typo of debug message in
|
||||
rtw8723d_iqk_check_tx_failed()
|
||||
|
||||
There is a typo in debug messages:
|
||||
- afer -> after
|
||||
|
||||
Fix it via codespell.
|
||||
|
||||
Signed-off-by: Andrew Kreimer <algonell@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250203180913.5435-1-algonell@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -444,7 +444,7 @@ static u8 rtw8723d_iqk_check_tx_failed(s
|
||||
rtw_read32(rtwdev, REG_IQK_RES_TX),
|
||||
rtw_read32(rtwdev, REG_IQK_RES_TY));
|
||||
rtw_dbg(rtwdev, RTW_DBG_RFK,
|
||||
- "[IQK] 0xe90(before IQK)= 0x%x, 0xe98(afer IQK) = 0x%x\n",
|
||||
+ "[IQK] 0xe90(before IQK)= 0x%x, 0xe98(after IQK) = 0x%x\n",
|
||||
rtw_read32(rtwdev, 0xe90),
|
||||
rtw_read32(rtwdev, 0xe98));
|
||||
|
||||
@@ -472,7 +472,7 @@ static u8 rtw8723d_iqk_check_rx_failed(s
|
||||
rtw_read32(rtwdev, REG_IQK_RES_RY));
|
||||
|
||||
rtw_dbg(rtwdev, RTW_DBG_RFK,
|
||||
- "[IQK] 0xea0(before IQK)= 0x%x, 0xea8(afer IQK) = 0x%x\n",
|
||||
+ "[IQK] 0xea0(before IQK)= 0x%x, 0xea8(after IQK) = 0x%x\n",
|
||||
rtw_read32(rtwdev, 0xea0),
|
||||
rtw_read32(rtwdev, 0xea8));
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
From 62f726848da42554e6d270dfda17ed19bfa3456f Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 4 Feb 2025 20:38:17 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Extend struct rtw_pwr_track_tbl for RTL8814AU
|
||||
|
||||
Currently this struct has the members required for chips with 2 RF
|
||||
paths. Add more members to support chips with 4 RF paths, like the
|
||||
RTL8814AU.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/be5a73f4-a0fe-43d6-9457-930cde199284@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1131,14 +1131,26 @@ struct rtw_rfe_def {
|
||||
* For 2G there are cck rate and ofdm rate with different settings.
|
||||
*/
|
||||
struct rtw_pwr_track_tbl {
|
||||
+ const u8 *pwrtrk_5gd_n[RTW_PWR_TRK_5G_NUM];
|
||||
+ const u8 *pwrtrk_5gd_p[RTW_PWR_TRK_5G_NUM];
|
||||
+ const u8 *pwrtrk_5gc_n[RTW_PWR_TRK_5G_NUM];
|
||||
+ const u8 *pwrtrk_5gc_p[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5gb_n[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5gb_p[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5ga_n[RTW_PWR_TRK_5G_NUM];
|
||||
const u8 *pwrtrk_5ga_p[RTW_PWR_TRK_5G_NUM];
|
||||
+ const u8 *pwrtrk_2gd_n;
|
||||
+ const u8 *pwrtrk_2gd_p;
|
||||
+ const u8 *pwrtrk_2gc_n;
|
||||
+ const u8 *pwrtrk_2gc_p;
|
||||
const u8 *pwrtrk_2gb_n;
|
||||
const u8 *pwrtrk_2gb_p;
|
||||
const u8 *pwrtrk_2ga_n;
|
||||
const u8 *pwrtrk_2ga_p;
|
||||
+ const u8 *pwrtrk_2g_cckd_n;
|
||||
+ const u8 *pwrtrk_2g_cckd_p;
|
||||
+ const u8 *pwrtrk_2g_cckc_n;
|
||||
+ const u8 *pwrtrk_2g_cckc_p;
|
||||
const u8 *pwrtrk_2g_cckb_n;
|
||||
const u8 *pwrtrk_2g_cckb_p;
|
||||
const u8 *pwrtrk_2g_ccka_n;
|
||||
@ -1,32 +0,0 @@
|
||||
From d80e7d9b6ba38102f92559dbb647330216ea290b Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 4 Feb 2025 20:38:43 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Extend rf_base_addr and rf_sipi_addr for
|
||||
RTL8814AU
|
||||
|
||||
These members of struct rtw_chip_info each have a size of 2. Increase
|
||||
their size to 4, which is the number of RF paths the RTL8814AU has.
|
||||
|
||||
This is required to read and write the RF registers of the RTL8814AU.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/7a4d8209-b8af-4943-b5de-f53d6edf591a@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1240,8 +1240,8 @@ struct rtw_chip_info {
|
||||
|
||||
const struct rtw_hw_reg *dig;
|
||||
const struct rtw_hw_reg *dig_cck;
|
||||
- u32 rf_base_addr[2];
|
||||
- u32 rf_sipi_addr[2];
|
||||
+ u32 rf_base_addr[RTW_RF_PATH_MAX];
|
||||
+ u32 rf_sipi_addr[RTW_RF_PATH_MAX];
|
||||
const struct rtw_rf_sipi_addr *rf_sipi_read_addr;
|
||||
u8 fix_rf_phy_num;
|
||||
const struct rtw_ltecoex_addr *ltecoex_addr;
|
||||
@ -1,213 +0,0 @@
|
||||
From e66f3b5c7535bb508e9c561a047b32de4ddc1cda Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 4 Feb 2025 20:40:22 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Constify some more structs and arrays
|
||||
|
||||
These structs and arrays are never modified, so make them const:
|
||||
|
||||
rtw_band_2ghz
|
||||
rtw_band_5ghz
|
||||
rtw_pci_tx_queue_idx_addr
|
||||
rtw_pci_ops
|
||||
rtw_cck_rates
|
||||
rtw_ofdm_rates
|
||||
rtw_ht_1s_rates
|
||||
rtw_ht_2s_rates
|
||||
rtw_vht_1s_rates
|
||||
rtw_vht_2s_rates
|
||||
rtw_rate_section
|
||||
rtw_rate_size
|
||||
rtw_sdio_ops
|
||||
rtw_usb_ops
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/502f124e-ccf3-4c09-80a4-1e5c5304822b@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.c | 4 ++--
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/pci.c | 4 ++--
|
||||
drivers/net/wireless/realtek/rtw88/phy.c | 26 ++++++++++++++---------
|
||||
drivers/net/wireless/realtek/rtw88/phy.h | 16 +++++++-------
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/usb.c | 2 +-
|
||||
7 files changed, 31 insertions(+), 25 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.c
|
||||
@@ -136,7 +136,7 @@ u16 rtw_desc_to_bitrate(u8 desc_rate)
|
||||
return rate.bitrate;
|
||||
}
|
||||
|
||||
-static struct ieee80211_supported_band rtw_band_2ghz = {
|
||||
+static const struct ieee80211_supported_band rtw_band_2ghz = {
|
||||
.band = NL80211_BAND_2GHZ,
|
||||
|
||||
.channels = rtw_channeltable_2g,
|
||||
@@ -149,7 +149,7 @@ static struct ieee80211_supported_band r
|
||||
.vht_cap = {0},
|
||||
};
|
||||
|
||||
-static struct ieee80211_supported_band rtw_band_5ghz = {
|
||||
+static const struct ieee80211_supported_band rtw_band_5ghz = {
|
||||
.band = NL80211_BAND_5GHZ,
|
||||
|
||||
.channels = rtw_channeltable_5g,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -61,7 +61,7 @@ enum rtw_hci_type {
|
||||
};
|
||||
|
||||
struct rtw_hci {
|
||||
- struct rtw_hci_ops *ops;
|
||||
+ const struct rtw_hci_ops *ops;
|
||||
enum rtw_hci_type type;
|
||||
|
||||
u32 rpwm_addr;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/pci.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
|
||||
@@ -20,7 +20,7 @@ module_param_named(disable_aspm, rtw_pci
|
||||
MODULE_PARM_DESC(disable_msi, "Set Y to disable MSI interrupt support");
|
||||
MODULE_PARM_DESC(disable_aspm, "Set Y to disable PCI ASPM support");
|
||||
|
||||
-static u32 rtw_pci_tx_queue_idx_addr[] = {
|
||||
+static const u32 rtw_pci_tx_queue_idx_addr[] = {
|
||||
[RTW_TX_QUEUE_BK] = RTK_PCI_TXBD_IDX_BKQ,
|
||||
[RTW_TX_QUEUE_BE] = RTK_PCI_TXBD_IDX_BEQ,
|
||||
[RTW_TX_QUEUE_VI] = RTK_PCI_TXBD_IDX_VIQ,
|
||||
@@ -1591,7 +1591,7 @@ static void rtw_pci_destroy(struct rtw_d
|
||||
rtw_pci_io_unmapping(rtwdev, pdev);
|
||||
}
|
||||
|
||||
-static struct rtw_hci_ops rtw_pci_ops = {
|
||||
+static const struct rtw_hci_ops rtw_pci_ops = {
|
||||
.tx_write = rtw_pci_tx_write,
|
||||
.tx_kick_off = rtw_pci_tx_kick_off,
|
||||
.flush_queues = rtw_pci_flush_queues,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
@@ -52,44 +52,50 @@ static const u32 db_invert_table[12][8]
|
||||
1995262315, 2511886432U, 3162277660U, 3981071706U}
|
||||
};
|
||||
|
||||
-u8 rtw_cck_rates[] = { DESC_RATE1M, DESC_RATE2M, DESC_RATE5_5M, DESC_RATE11M };
|
||||
-u8 rtw_ofdm_rates[] = {
|
||||
+const u8 rtw_cck_rates[] = { DESC_RATE1M, DESC_RATE2M, DESC_RATE5_5M, DESC_RATE11M };
|
||||
+
|
||||
+const u8 rtw_ofdm_rates[] = {
|
||||
DESC_RATE6M, DESC_RATE9M, DESC_RATE12M,
|
||||
DESC_RATE18M, DESC_RATE24M, DESC_RATE36M,
|
||||
DESC_RATE48M, DESC_RATE54M
|
||||
};
|
||||
-u8 rtw_ht_1s_rates[] = {
|
||||
+
|
||||
+const u8 rtw_ht_1s_rates[] = {
|
||||
DESC_RATEMCS0, DESC_RATEMCS1, DESC_RATEMCS2,
|
||||
DESC_RATEMCS3, DESC_RATEMCS4, DESC_RATEMCS5,
|
||||
DESC_RATEMCS6, DESC_RATEMCS7
|
||||
};
|
||||
-u8 rtw_ht_2s_rates[] = {
|
||||
+
|
||||
+const u8 rtw_ht_2s_rates[] = {
|
||||
DESC_RATEMCS8, DESC_RATEMCS9, DESC_RATEMCS10,
|
||||
DESC_RATEMCS11, DESC_RATEMCS12, DESC_RATEMCS13,
|
||||
DESC_RATEMCS14, DESC_RATEMCS15
|
||||
};
|
||||
-u8 rtw_vht_1s_rates[] = {
|
||||
+
|
||||
+const u8 rtw_vht_1s_rates[] = {
|
||||
DESC_RATEVHT1SS_MCS0, DESC_RATEVHT1SS_MCS1,
|
||||
DESC_RATEVHT1SS_MCS2, DESC_RATEVHT1SS_MCS3,
|
||||
DESC_RATEVHT1SS_MCS4, DESC_RATEVHT1SS_MCS5,
|
||||
DESC_RATEVHT1SS_MCS6, DESC_RATEVHT1SS_MCS7,
|
||||
DESC_RATEVHT1SS_MCS8, DESC_RATEVHT1SS_MCS9
|
||||
};
|
||||
-u8 rtw_vht_2s_rates[] = {
|
||||
+
|
||||
+const u8 rtw_vht_2s_rates[] = {
|
||||
DESC_RATEVHT2SS_MCS0, DESC_RATEVHT2SS_MCS1,
|
||||
DESC_RATEVHT2SS_MCS2, DESC_RATEVHT2SS_MCS3,
|
||||
DESC_RATEVHT2SS_MCS4, DESC_RATEVHT2SS_MCS5,
|
||||
DESC_RATEVHT2SS_MCS6, DESC_RATEVHT2SS_MCS7,
|
||||
DESC_RATEVHT2SS_MCS8, DESC_RATEVHT2SS_MCS9
|
||||
};
|
||||
-u8 *rtw_rate_section[RTW_RATE_SECTION_MAX] = {
|
||||
+
|
||||
+const u8 * const rtw_rate_section[RTW_RATE_SECTION_MAX] = {
|
||||
rtw_cck_rates, rtw_ofdm_rates,
|
||||
rtw_ht_1s_rates, rtw_ht_2s_rates,
|
||||
rtw_vht_1s_rates, rtw_vht_2s_rates
|
||||
};
|
||||
EXPORT_SYMBOL(rtw_rate_section);
|
||||
|
||||
-u8 rtw_rate_size[RTW_RATE_SECTION_MAX] = {
|
||||
+const u8 rtw_rate_size[RTW_RATE_SECTION_MAX] = {
|
||||
ARRAY_SIZE(rtw_cck_rates),
|
||||
ARRAY_SIZE(rtw_ofdm_rates),
|
||||
ARRAY_SIZE(rtw_ht_1s_rates),
|
||||
@@ -2214,7 +2220,7 @@ static void rtw_phy_set_tx_power_index_b
|
||||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
u8 regd = rtw_regd_get(rtwdev);
|
||||
- u8 *rates;
|
||||
+ const u8 *rates;
|
||||
u8 size;
|
||||
u8 rate;
|
||||
u8 pwr_idx;
|
||||
@@ -2274,7 +2280,7 @@ EXPORT_SYMBOL(rtw_phy_set_tx_power_level
|
||||
|
||||
static void
|
||||
rtw_phy_tx_power_by_rate_config_by_path(struct rtw_hal *hal, u8 path,
|
||||
- u8 rs, u8 size, u8 *rates)
|
||||
+ u8 rs, u8 size, const u8 *rates)
|
||||
{
|
||||
u8 rate;
|
||||
u8 base_idx, rate_idx;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.h
|
||||
@@ -7,14 +7,14 @@
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
-extern u8 rtw_cck_rates[];
|
||||
-extern u8 rtw_ofdm_rates[];
|
||||
-extern u8 rtw_ht_1s_rates[];
|
||||
-extern u8 rtw_ht_2s_rates[];
|
||||
-extern u8 rtw_vht_1s_rates[];
|
||||
-extern u8 rtw_vht_2s_rates[];
|
||||
-extern u8 *rtw_rate_section[];
|
||||
-extern u8 rtw_rate_size[];
|
||||
+extern const u8 rtw_cck_rates[];
|
||||
+extern const u8 rtw_ofdm_rates[];
|
||||
+extern const u8 rtw_ht_1s_rates[];
|
||||
+extern const u8 rtw_ht_2s_rates[];
|
||||
+extern const u8 rtw_vht_1s_rates[];
|
||||
+extern const u8 rtw_vht_2s_rates[];
|
||||
+extern const u8 * const rtw_rate_section[];
|
||||
+extern const u8 rtw_rate_size[];
|
||||
|
||||
void rtw_phy_init(struct rtw_dev *rtwdev);
|
||||
void rtw_phy_dynamic_mechanism(struct rtw_dev *rtwdev);
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -1147,7 +1147,7 @@ static void rtw_sdio_declaim(struct rtw_
|
||||
sdio_release_host(sdio_func);
|
||||
}
|
||||
|
||||
-static struct rtw_hci_ops rtw_sdio_ops = {
|
||||
+static const struct rtw_hci_ops rtw_sdio_ops = {
|
||||
.tx_write = rtw_sdio_tx_write,
|
||||
.tx_kick_off = rtw_sdio_tx_kick_off,
|
||||
.setup = rtw_sdio_setup,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -881,7 +881,7 @@ static void rtw_usb_dynamic_rx_agg(struc
|
||||
}
|
||||
}
|
||||
|
||||
-static struct rtw_hci_ops rtw_usb_ops = {
|
||||
+static const struct rtw_hci_ops rtw_usb_ops = {
|
||||
.tx_write = rtw_usb_tx_write,
|
||||
.tx_kick_off = rtw_usb_tx_kick_off,
|
||||
.setup = rtw_usb_setup,
|
||||
@ -1,227 +0,0 @@
|
||||
From ad815f3920035a0c5b6ffe45bddc9fb308194b49 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 4 Feb 2025 20:40:58 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Rename RTW_RATE_SECTION_MAX to
|
||||
RTW_RATE_SECTION_NUM
|
||||
|
||||
It fits the meaning of the enum better.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/5a1c5a46-8ebb-43b0-9ab1-b78e2a22b3d2@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 12 +++++-----
|
||||
drivers/net/wireless/realtek/rtw88/phy.c | 24 +++++++++----------
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw88xxa.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/sar.c | 2 +-
|
||||
7 files changed, 23 insertions(+), 23 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -168,7 +168,7 @@ enum rtw_rate_section {
|
||||
RTW_RATE_SECTION_VHT_2S,
|
||||
|
||||
/* keep last */
|
||||
- RTW_RATE_SECTION_MAX,
|
||||
+ RTW_RATE_SECTION_NUM,
|
||||
};
|
||||
|
||||
enum rtw_wireless_set {
|
||||
@@ -1937,7 +1937,7 @@ union rtw_sar_cfg {
|
||||
|
||||
struct rtw_sar {
|
||||
enum rtw_sar_sources src;
|
||||
- union rtw_sar_cfg cfg[RTW_RF_PATH_MAX][RTW_RATE_SECTION_MAX];
|
||||
+ union rtw_sar_cfg cfg[RTW_RF_PATH_MAX][RTW_RATE_SECTION_NUM];
|
||||
};
|
||||
|
||||
struct rtw_hal {
|
||||
@@ -1981,16 +1981,16 @@ struct rtw_hal {
|
||||
s8 tx_pwr_by_rate_offset_5g[RTW_RF_PATH_MAX]
|
||||
[DESC_RATE_MAX];
|
||||
s8 tx_pwr_by_rate_base_2g[RTW_RF_PATH_MAX]
|
||||
- [RTW_RATE_SECTION_MAX];
|
||||
+ [RTW_RATE_SECTION_NUM];
|
||||
s8 tx_pwr_by_rate_base_5g[RTW_RF_PATH_MAX]
|
||||
- [RTW_RATE_SECTION_MAX];
|
||||
+ [RTW_RATE_SECTION_NUM];
|
||||
s8 tx_pwr_limit_2g[RTW_REGD_MAX]
|
||||
[RTW_CHANNEL_WIDTH_MAX]
|
||||
- [RTW_RATE_SECTION_MAX]
|
||||
+ [RTW_RATE_SECTION_NUM]
|
||||
[RTW_MAX_CHANNEL_NUM_2G];
|
||||
s8 tx_pwr_limit_5g[RTW_REGD_MAX]
|
||||
[RTW_CHANNEL_WIDTH_MAX]
|
||||
- [RTW_RATE_SECTION_MAX]
|
||||
+ [RTW_RATE_SECTION_NUM]
|
||||
[RTW_MAX_CHANNEL_NUM_5G];
|
||||
s8 tx_pwr_tbl[RTW_RF_PATH_MAX]
|
||||
[DESC_RATE_MAX];
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
@@ -88,14 +88,14 @@ const u8 rtw_vht_2s_rates[] = {
|
||||
DESC_RATEVHT2SS_MCS8, DESC_RATEVHT2SS_MCS9
|
||||
};
|
||||
|
||||
-const u8 * const rtw_rate_section[RTW_RATE_SECTION_MAX] = {
|
||||
+const u8 * const rtw_rate_section[RTW_RATE_SECTION_NUM] = {
|
||||
rtw_cck_rates, rtw_ofdm_rates,
|
||||
rtw_ht_1s_rates, rtw_ht_2s_rates,
|
||||
rtw_vht_1s_rates, rtw_vht_2s_rates
|
||||
};
|
||||
EXPORT_SYMBOL(rtw_rate_section);
|
||||
|
||||
-const u8 rtw_rate_size[RTW_RATE_SECTION_MAX] = {
|
||||
+const u8 rtw_rate_size[RTW_RATE_SECTION_NUM] = {
|
||||
ARRAY_SIZE(rtw_cck_rates),
|
||||
ARRAY_SIZE(rtw_ofdm_rates),
|
||||
ARRAY_SIZE(rtw_ht_1s_rates),
|
||||
@@ -1596,7 +1596,7 @@ static void rtw_phy_set_tx_power_limit(s
|
||||
ch_idx = rtw_channel_to_idx(band, ch);
|
||||
|
||||
if (regd >= RTW_REGD_MAX || bw >= RTW_CHANNEL_WIDTH_MAX ||
|
||||
- rs >= RTW_RATE_SECTION_MAX || ch_idx < 0) {
|
||||
+ rs >= RTW_RATE_SECTION_NUM || ch_idx < 0) {
|
||||
WARN(1,
|
||||
"wrong txpwr_lmt regd=%u, band=%u bw=%u, rs=%u, ch_idx=%u, pwr_limit=%d\n",
|
||||
regd, band, bw, rs, ch_idx, pwr_limit);
|
||||
@@ -1701,7 +1701,7 @@ rtw_cfg_txpwr_lmt_by_alt(struct rtw_dev
|
||||
u8 bw, rs;
|
||||
|
||||
for (bw = 0; bw < RTW_CHANNEL_WIDTH_MAX; bw++)
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
+ for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
__cfg_txpwr_lmt_by_alt(&rtwdev->hal, regd, regd_alt,
|
||||
bw, rs);
|
||||
}
|
||||
@@ -2060,7 +2060,7 @@ static u8 rtw_phy_get_5g_tx_power_index(
|
||||
return tx_power;
|
||||
}
|
||||
|
||||
-/* return RTW_RATE_SECTION_MAX to indicate rate is invalid */
|
||||
+/* return RTW_RATE_SECTION_NUM to indicate rate is invalid */
|
||||
static u8 rtw_phy_rate_to_rate_section(u8 rate)
|
||||
{
|
||||
if (rate >= DESC_RATE1M && rate <= DESC_RATE11M)
|
||||
@@ -2076,7 +2076,7 @@ static u8 rtw_phy_rate_to_rate_section(u
|
||||
else if (rate >= DESC_RATEVHT2SS_MCS0 && rate <= DESC_RATEVHT2SS_MCS9)
|
||||
return RTW_RATE_SECTION_VHT_2S;
|
||||
else
|
||||
- return RTW_RATE_SECTION_MAX;
|
||||
+ return RTW_RATE_SECTION_NUM;
|
||||
}
|
||||
|
||||
static s8 rtw_phy_get_tx_power_limit(struct rtw_dev *rtwdev, u8 band,
|
||||
@@ -2094,7 +2094,7 @@ static s8 rtw_phy_get_tx_power_limit(str
|
||||
if (regd > RTW_REGD_WW)
|
||||
return power_limit;
|
||||
|
||||
- if (rs == RTW_RATE_SECTION_MAX)
|
||||
+ if (rs == RTW_RATE_SECTION_NUM)
|
||||
goto err;
|
||||
|
||||
/* only 20M BW with cck and ofdm */
|
||||
@@ -2138,7 +2138,7 @@ static s8 rtw_phy_get_tx_power_sar(struc
|
||||
.rs = rs,
|
||||
};
|
||||
|
||||
- if (rs == RTW_RATE_SECTION_MAX)
|
||||
+ if (rs == RTW_RATE_SECTION_NUM)
|
||||
goto err;
|
||||
|
||||
return rtw_query_sar(rtwdev, &arg);
|
||||
@@ -2227,7 +2227,7 @@ static void rtw_phy_set_tx_power_index_b
|
||||
u8 bw;
|
||||
int i;
|
||||
|
||||
- if (rs >= RTW_RATE_SECTION_MAX)
|
||||
+ if (rs >= RTW_RATE_SECTION_NUM)
|
||||
return;
|
||||
|
||||
rates = rtw_rate_section[rs];
|
||||
@@ -2258,7 +2258,7 @@ static void rtw_phy_set_tx_power_level_b
|
||||
else
|
||||
rs = RTW_RATE_SECTION_OFDM;
|
||||
|
||||
- for (; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
+ for (; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
rtw_phy_set_tx_power_index_by_rs(rtwdev, ch, path, rs);
|
||||
}
|
||||
|
||||
@@ -2353,7 +2353,7 @@ void rtw_phy_tx_power_limit_config(struc
|
||||
|
||||
for (regd = 0; regd < RTW_REGD_MAX; regd++)
|
||||
for (bw = 0; bw < RTW_CHANNEL_WIDTH_MAX; bw++)
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
+ for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
__rtw_phy_tx_power_limit_config(hal, regd, bw, rs);
|
||||
}
|
||||
|
||||
@@ -2389,7 +2389,7 @@ void rtw_phy_init_tx_power(struct rtw_de
|
||||
/* init tx power limit */
|
||||
for (regd = 0; regd < RTW_REGD_MAX; regd++)
|
||||
for (bw = 0; bw < RTW_CHANNEL_WIDTH_MAX; bw++)
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
+ for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
rtw_phy_init_tx_power_limit(rtwdev, regd, bw,
|
||||
rs);
|
||||
}
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -709,7 +709,7 @@ static void rtw8821c_set_tx_power_index(
|
||||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++) {
|
||||
+ for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++) {
|
||||
if (rs == RTW_RATE_SECTION_HT_2S ||
|
||||
rs == RTW_RATE_SECTION_VHT_2S)
|
||||
continue;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -964,7 +964,7 @@ static void rtw8822b_set_tx_power_index(
|
||||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
|
||||
+ for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs,
|
||||
&phy_pwr_idx);
|
||||
}
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -2746,7 +2746,7 @@ static void rtw8822c_set_tx_power_index(
|
||||
s8 diff_idx[4];
|
||||
|
||||
rtw8822c_set_write_tx_power_ref(rtwdev, pwr_ref_cck, pwr_ref_ofdm);
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++) {
|
||||
+ for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++) {
|
||||
for (j = 0; j < rtw_rate_size[rs]; j++) {
|
||||
rate = rtw_rate_section[rs][j];
|
||||
pwr_a = hal->tx_pwr_tbl[RF_PATH_A][rate];
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw88xxa.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw88xxa.c
|
||||
@@ -1637,7 +1637,7 @@ void rtw88xxa_set_tx_power_index(struct
|
||||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++) {
|
||||
+ for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++) {
|
||||
if (hal->rf_path_num == 1 &&
|
||||
(rs == RTW_RATE_SECTION_HT_2S ||
|
||||
rs == RTW_RATE_SECTION_VHT_2S))
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sar.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sar.c
|
||||
@@ -97,7 +97,7 @@ int rtw_set_sar_specs(struct rtw_dev *rt
|
||||
power, BIT(RTW_COMMON_SAR_FCT));
|
||||
|
||||
for (j = 0; j < RTW_RF_PATH_MAX; j++) {
|
||||
- for (k = 0; k < RTW_RATE_SECTION_MAX; k++) {
|
||||
+ for (k = 0; k < RTW_RATE_SECTION_NUM; k++) {
|
||||
arg = (struct rtw_sar_arg){
|
||||
.sar_band = idx,
|
||||
.path = j,
|
||||
@ -1,369 +0,0 @@
|
||||
From 0f98a59596579b34932c06aec7d52c1e835fa1f0 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 4 Feb 2025 20:41:43 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Extend TX power stuff for 3-4 spatial streams
|
||||
|
||||
Although the RTL8814AU only has 3 spatial streams, maybe some other chip
|
||||
has 4.
|
||||
|
||||
Correct the TX power index and TX power limit calculations for 3SS and
|
||||
4SS HT/VHT rates.
|
||||
|
||||
With this the RTL8814AU can set the TX power correctly.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/d0c0e126-0794-4c4e-9203-ea39a707b673@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 5 +
|
||||
drivers/net/wireless/realtek/rtw88/phy.c | 145 ++++++++++++------
|
||||
drivers/net/wireless/realtek/rtw88/phy.h | 4 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw88xxa.c | 2 +-
|
||||
7 files changed, 111 insertions(+), 51 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -166,6 +166,11 @@ enum rtw_rate_section {
|
||||
RTW_RATE_SECTION_HT_2S,
|
||||
RTW_RATE_SECTION_VHT_1S,
|
||||
RTW_RATE_SECTION_VHT_2S,
|
||||
+ __RTW_RATE_SECTION_2SS_MAX = RTW_RATE_SECTION_VHT_2S,
|
||||
+ RTW_RATE_SECTION_HT_3S,
|
||||
+ RTW_RATE_SECTION_HT_4S,
|
||||
+ RTW_RATE_SECTION_VHT_3S,
|
||||
+ RTW_RATE_SECTION_VHT_4S,
|
||||
|
||||
/* keep last */
|
||||
RTW_RATE_SECTION_NUM,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
@@ -88,10 +88,40 @@ const u8 rtw_vht_2s_rates[] = {
|
||||
DESC_RATEVHT2SS_MCS8, DESC_RATEVHT2SS_MCS9
|
||||
};
|
||||
|
||||
+const u8 rtw_ht_3s_rates[] = {
|
||||
+ DESC_RATEMCS16, DESC_RATEMCS17, DESC_RATEMCS18,
|
||||
+ DESC_RATEMCS19, DESC_RATEMCS20, DESC_RATEMCS21,
|
||||
+ DESC_RATEMCS22, DESC_RATEMCS23
|
||||
+};
|
||||
+
|
||||
+const u8 rtw_ht_4s_rates[] = {
|
||||
+ DESC_RATEMCS24, DESC_RATEMCS25, DESC_RATEMCS26,
|
||||
+ DESC_RATEMCS27, DESC_RATEMCS28, DESC_RATEMCS29,
|
||||
+ DESC_RATEMCS30, DESC_RATEMCS31
|
||||
+};
|
||||
+
|
||||
+const u8 rtw_vht_3s_rates[] = {
|
||||
+ DESC_RATEVHT3SS_MCS0, DESC_RATEVHT3SS_MCS1,
|
||||
+ DESC_RATEVHT3SS_MCS2, DESC_RATEVHT3SS_MCS3,
|
||||
+ DESC_RATEVHT3SS_MCS4, DESC_RATEVHT3SS_MCS5,
|
||||
+ DESC_RATEVHT3SS_MCS6, DESC_RATEVHT3SS_MCS7,
|
||||
+ DESC_RATEVHT3SS_MCS8, DESC_RATEVHT3SS_MCS9
|
||||
+};
|
||||
+
|
||||
+const u8 rtw_vht_4s_rates[] = {
|
||||
+ DESC_RATEVHT4SS_MCS0, DESC_RATEVHT4SS_MCS1,
|
||||
+ DESC_RATEVHT4SS_MCS2, DESC_RATEVHT4SS_MCS3,
|
||||
+ DESC_RATEVHT4SS_MCS4, DESC_RATEVHT4SS_MCS5,
|
||||
+ DESC_RATEVHT4SS_MCS6, DESC_RATEVHT4SS_MCS7,
|
||||
+ DESC_RATEVHT4SS_MCS8, DESC_RATEVHT4SS_MCS9
|
||||
+};
|
||||
+
|
||||
const u8 * const rtw_rate_section[RTW_RATE_SECTION_NUM] = {
|
||||
rtw_cck_rates, rtw_ofdm_rates,
|
||||
rtw_ht_1s_rates, rtw_ht_2s_rates,
|
||||
- rtw_vht_1s_rates, rtw_vht_2s_rates
|
||||
+ rtw_vht_1s_rates, rtw_vht_2s_rates,
|
||||
+ rtw_ht_3s_rates, rtw_ht_4s_rates,
|
||||
+ rtw_vht_3s_rates, rtw_vht_4s_rates
|
||||
};
|
||||
EXPORT_SYMBOL(rtw_rate_section);
|
||||
|
||||
@@ -101,17 +131,14 @@ const u8 rtw_rate_size[RTW_RATE_SECTION_
|
||||
ARRAY_SIZE(rtw_ht_1s_rates),
|
||||
ARRAY_SIZE(rtw_ht_2s_rates),
|
||||
ARRAY_SIZE(rtw_vht_1s_rates),
|
||||
- ARRAY_SIZE(rtw_vht_2s_rates)
|
||||
+ ARRAY_SIZE(rtw_vht_2s_rates),
|
||||
+ ARRAY_SIZE(rtw_ht_3s_rates),
|
||||
+ ARRAY_SIZE(rtw_ht_4s_rates),
|
||||
+ ARRAY_SIZE(rtw_vht_3s_rates),
|
||||
+ ARRAY_SIZE(rtw_vht_4s_rates)
|
||||
};
|
||||
EXPORT_SYMBOL(rtw_rate_size);
|
||||
|
||||
-static const u8 rtw_cck_size = ARRAY_SIZE(rtw_cck_rates);
|
||||
-static const u8 rtw_ofdm_size = ARRAY_SIZE(rtw_ofdm_rates);
|
||||
-static const u8 rtw_ht_1s_size = ARRAY_SIZE(rtw_ht_1s_rates);
|
||||
-static const u8 rtw_ht_2s_size = ARRAY_SIZE(rtw_ht_2s_rates);
|
||||
-static const u8 rtw_vht_1s_size = ARRAY_SIZE(rtw_vht_1s_rates);
|
||||
-static const u8 rtw_vht_2s_size = ARRAY_SIZE(rtw_vht_2s_rates);
|
||||
-
|
||||
enum rtw_phy_band_type {
|
||||
PHY_BAND_2G = 0,
|
||||
PHY_BAND_5G = 1,
|
||||
@@ -1640,11 +1667,15 @@ rtw_xref_5g_txpwr_lmt(struct rtw_dev *rt
|
||||
static void
|
||||
rtw_xref_txpwr_lmt_by_rs(struct rtw_dev *rtwdev, u8 regd, u8 bw, u8 ch_idx)
|
||||
{
|
||||
+ static const u8 rs_cmp[4][2] = {
|
||||
+ {RTW_RATE_SECTION_HT_1S, RTW_RATE_SECTION_VHT_1S},
|
||||
+ {RTW_RATE_SECTION_HT_2S, RTW_RATE_SECTION_VHT_2S},
|
||||
+ {RTW_RATE_SECTION_HT_3S, RTW_RATE_SECTION_VHT_3S},
|
||||
+ {RTW_RATE_SECTION_HT_4S, RTW_RATE_SECTION_VHT_4S}
|
||||
+ };
|
||||
u8 rs_idx, rs_ht, rs_vht;
|
||||
- u8 rs_cmp[2][2] = {{RTW_RATE_SECTION_HT_1S, RTW_RATE_SECTION_VHT_1S},
|
||||
- {RTW_RATE_SECTION_HT_2S, RTW_RATE_SECTION_VHT_2S} };
|
||||
|
||||
- for (rs_idx = 0; rs_idx < 2; rs_idx++) {
|
||||
+ for (rs_idx = 0; rs_idx < 4; rs_idx++) {
|
||||
rs_ht = rs_cmp[rs_idx][0];
|
||||
rs_vht = rs_cmp[rs_idx][1];
|
||||
|
||||
@@ -1965,10 +1996,10 @@ static u8 rtw_phy_get_2g_tx_power_index(
|
||||
u8 rate, u8 group)
|
||||
{
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
- u8 tx_power;
|
||||
- bool mcs_rate;
|
||||
- bool above_2ss;
|
||||
+ bool above_2ss, above_3ss, above_4ss;
|
||||
u8 factor = chip->txgi_factor;
|
||||
+ bool mcs_rate;
|
||||
+ u8 tx_power;
|
||||
|
||||
if (rate <= DESC_RATE11M)
|
||||
tx_power = pwr_idx_2g->cck_base[group];
|
||||
@@ -1978,11 +2009,15 @@ static u8 rtw_phy_get_2g_tx_power_index(
|
||||
if (rate >= DESC_RATE6M && rate <= DESC_RATE54M)
|
||||
tx_power += pwr_idx_2g->ht_1s_diff.ofdm * factor;
|
||||
|
||||
- mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS15) ||
|
||||
+ mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT1SS_MCS0 &&
|
||||
- rate <= DESC_RATEVHT2SS_MCS9);
|
||||
- above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS15) ||
|
||||
+ rate <= DESC_RATEVHT4SS_MCS9);
|
||||
+ above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT2SS_MCS0);
|
||||
+ above_3ss = (rate >= DESC_RATEMCS16 && rate <= DESC_RATEMCS31) ||
|
||||
+ (rate >= DESC_RATEVHT3SS_MCS0);
|
||||
+ above_4ss = (rate >= DESC_RATEMCS24 && rate <= DESC_RATEMCS31) ||
|
||||
+ (rate >= DESC_RATEVHT4SS_MCS0);
|
||||
|
||||
if (!mcs_rate)
|
||||
return tx_power;
|
||||
@@ -1995,11 +2030,19 @@ static u8 rtw_phy_get_2g_tx_power_index(
|
||||
tx_power += pwr_idx_2g->ht_1s_diff.bw20 * factor;
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_2g->ht_2s_diff.bw20 * factor;
|
||||
+ if (above_3ss)
|
||||
+ tx_power += pwr_idx_2g->ht_3s_diff.bw20 * factor;
|
||||
+ if (above_4ss)
|
||||
+ tx_power += pwr_idx_2g->ht_4s_diff.bw20 * factor;
|
||||
break;
|
||||
case RTW_CHANNEL_WIDTH_40:
|
||||
/* bw40 is the base power */
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_2g->ht_2s_diff.bw40 * factor;
|
||||
+ if (above_3ss)
|
||||
+ tx_power += pwr_idx_2g->ht_3s_diff.bw40 * factor;
|
||||
+ if (above_4ss)
|
||||
+ tx_power += pwr_idx_2g->ht_4s_diff.bw40 * factor;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2012,19 +2055,23 @@ static u8 rtw_phy_get_5g_tx_power_index(
|
||||
u8 rate, u8 group)
|
||||
{
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
- u8 tx_power;
|
||||
+ bool above_2ss, above_3ss, above_4ss;
|
||||
+ u8 factor = chip->txgi_factor;
|
||||
u8 upper, lower;
|
||||
bool mcs_rate;
|
||||
- bool above_2ss;
|
||||
- u8 factor = chip->txgi_factor;
|
||||
+ u8 tx_power;
|
||||
|
||||
tx_power = pwr_idx_5g->bw40_base[group];
|
||||
|
||||
- mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS15) ||
|
||||
+ mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT1SS_MCS0 &&
|
||||
- rate <= DESC_RATEVHT2SS_MCS9);
|
||||
- above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS15) ||
|
||||
+ rate <= DESC_RATEVHT4SS_MCS9);
|
||||
+ above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS31) ||
|
||||
(rate >= DESC_RATEVHT2SS_MCS0);
|
||||
+ above_3ss = (rate >= DESC_RATEMCS16 && rate <= DESC_RATEMCS31) ||
|
||||
+ (rate >= DESC_RATEVHT3SS_MCS0);
|
||||
+ above_4ss = (rate >= DESC_RATEMCS24 && rate <= DESC_RATEMCS31) ||
|
||||
+ (rate >= DESC_RATEVHT4SS_MCS0);
|
||||
|
||||
if (!mcs_rate) {
|
||||
tx_power += pwr_idx_5g->ht_1s_diff.ofdm * factor;
|
||||
@@ -2039,11 +2086,19 @@ static u8 rtw_phy_get_5g_tx_power_index(
|
||||
tx_power += pwr_idx_5g->ht_1s_diff.bw20 * factor;
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_5g->ht_2s_diff.bw20 * factor;
|
||||
+ if (above_3ss)
|
||||
+ tx_power += pwr_idx_5g->ht_3s_diff.bw20 * factor;
|
||||
+ if (above_4ss)
|
||||
+ tx_power += pwr_idx_5g->ht_4s_diff.bw20 * factor;
|
||||
break;
|
||||
case RTW_CHANNEL_WIDTH_40:
|
||||
/* bw40 is the base power */
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_5g->ht_2s_diff.bw40 * factor;
|
||||
+ if (above_3ss)
|
||||
+ tx_power += pwr_idx_5g->ht_3s_diff.bw40 * factor;
|
||||
+ if (above_4ss)
|
||||
+ tx_power += pwr_idx_5g->ht_4s_diff.bw40 * factor;
|
||||
break;
|
||||
case RTW_CHANNEL_WIDTH_80:
|
||||
/* the base idx of bw80 is the average of bw40+/bw40- */
|
||||
@@ -2054,6 +2109,10 @@ static u8 rtw_phy_get_5g_tx_power_index(
|
||||
tx_power += pwr_idx_5g->vht_1s_diff.bw80 * factor;
|
||||
if (above_2ss)
|
||||
tx_power += pwr_idx_5g->vht_2s_diff.bw80 * factor;
|
||||
+ if (above_3ss)
|
||||
+ tx_power += pwr_idx_5g->vht_3s_diff.bw80 * factor;
|
||||
+ if (above_4ss)
|
||||
+ tx_power += pwr_idx_5g->vht_4s_diff.bw80 * factor;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2071,10 +2130,18 @@ static u8 rtw_phy_rate_to_rate_section(u
|
||||
return RTW_RATE_SECTION_HT_1S;
|
||||
else if (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS15)
|
||||
return RTW_RATE_SECTION_HT_2S;
|
||||
+ else if (rate >= DESC_RATEMCS16 && rate <= DESC_RATEMCS23)
|
||||
+ return RTW_RATE_SECTION_HT_3S;
|
||||
+ else if (rate >= DESC_RATEMCS24 && rate <= DESC_RATEMCS31)
|
||||
+ return RTW_RATE_SECTION_HT_4S;
|
||||
else if (rate >= DESC_RATEVHT1SS_MCS0 && rate <= DESC_RATEVHT1SS_MCS9)
|
||||
return RTW_RATE_SECTION_VHT_1S;
|
||||
else if (rate >= DESC_RATEVHT2SS_MCS0 && rate <= DESC_RATEVHT2SS_MCS9)
|
||||
return RTW_RATE_SECTION_VHT_2S;
|
||||
+ else if (rate >= DESC_RATEVHT3SS_MCS0 && rate <= DESC_RATEVHT3SS_MCS9)
|
||||
+ return RTW_RATE_SECTION_VHT_3S;
|
||||
+ else if (rate >= DESC_RATEVHT4SS_MCS0 && rate <= DESC_RATEVHT4SS_MCS9)
|
||||
+ return RTW_RATE_SECTION_VHT_4S;
|
||||
else
|
||||
return RTW_RATE_SECTION_NUM;
|
||||
}
|
||||
@@ -2102,7 +2169,7 @@ static s8 rtw_phy_get_tx_power_limit(str
|
||||
bw = RTW_CHANNEL_WIDTH_20;
|
||||
|
||||
/* only 20/40M BW with ht */
|
||||
- if (rs == RTW_RATE_SECTION_HT_1S || rs == RTW_RATE_SECTION_HT_2S)
|
||||
+ if (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS31)
|
||||
bw = min_t(u8, bw, RTW_CHANNEL_WIDTH_40);
|
||||
|
||||
/* select min power limit among [20M BW ~ current BW] */
|
||||
@@ -2286,7 +2353,7 @@ rtw_phy_tx_power_by_rate_config_by_path(
|
||||
u8 base_idx, rate_idx;
|
||||
s8 base_2g, base_5g;
|
||||
|
||||
- if (rs >= RTW_RATE_SECTION_VHT_1S)
|
||||
+ if (size == 10) /* VHT rates */
|
||||
base_idx = rates[size - 3];
|
||||
else
|
||||
base_idx = rates[size - 1];
|
||||
@@ -2303,28 +2370,12 @@ rtw_phy_tx_power_by_rate_config_by_path(
|
||||
|
||||
void rtw_phy_tx_power_by_rate_config(struct rtw_hal *hal)
|
||||
{
|
||||
- u8 path;
|
||||
+ u8 path, rs;
|
||||
|
||||
- for (path = 0; path < RTW_RF_PATH_MAX; path++) {
|
||||
- rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
- RTW_RATE_SECTION_CCK,
|
||||
- rtw_cck_size, rtw_cck_rates);
|
||||
- rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
- RTW_RATE_SECTION_OFDM,
|
||||
- rtw_ofdm_size, rtw_ofdm_rates);
|
||||
- rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
- RTW_RATE_SECTION_HT_1S,
|
||||
- rtw_ht_1s_size, rtw_ht_1s_rates);
|
||||
- rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
- RTW_RATE_SECTION_HT_2S,
|
||||
- rtw_ht_2s_size, rtw_ht_2s_rates);
|
||||
- rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
- RTW_RATE_SECTION_VHT_1S,
|
||||
- rtw_vht_1s_size, rtw_vht_1s_rates);
|
||||
- rtw_phy_tx_power_by_rate_config_by_path(hal, path,
|
||||
- RTW_RATE_SECTION_VHT_2S,
|
||||
- rtw_vht_2s_size, rtw_vht_2s_rates);
|
||||
- }
|
||||
+ for (path = 0; path < RTW_RF_PATH_MAX; path++)
|
||||
+ for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
+ rtw_phy_tx_power_by_rate_config_by_path(hal, path, rs,
|
||||
+ rtw_rate_size[rs], rtw_rate_section[rs]);
|
||||
}
|
||||
|
||||
static void
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.h
|
||||
@@ -13,6 +13,10 @@ extern const u8 rtw_ht_1s_rates[];
|
||||
extern const u8 rtw_ht_2s_rates[];
|
||||
extern const u8 rtw_vht_1s_rates[];
|
||||
extern const u8 rtw_vht_2s_rates[];
|
||||
+extern const u8 rtw_ht_3s_rates[];
|
||||
+extern const u8 rtw_ht_4s_rates[];
|
||||
+extern const u8 rtw_vht_3s_rates[];
|
||||
+extern const u8 rtw_vht_4s_rates[];
|
||||
extern const u8 * const rtw_rate_section[];
|
||||
extern const u8 rtw_rate_size[];
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -709,7 +709,7 @@ static void rtw8821c_set_tx_power_index(
|
||||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++) {
|
||||
+ for (rs = 0; rs <= __RTW_RATE_SECTION_2SS_MAX; rs++) {
|
||||
if (rs == RTW_RATE_SECTION_HT_2S ||
|
||||
rs == RTW_RATE_SECTION_VHT_2S)
|
||||
continue;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -964,7 +964,7 @@ static void rtw8822b_set_tx_power_index(
|
||||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++)
|
||||
+ for (rs = 0; rs <= __RTW_RATE_SECTION_2SS_MAX; rs++)
|
||||
rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs,
|
||||
&phy_pwr_idx);
|
||||
}
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -2746,7 +2746,7 @@ static void rtw8822c_set_tx_power_index(
|
||||
s8 diff_idx[4];
|
||||
|
||||
rtw8822c_set_write_tx_power_ref(rtwdev, pwr_ref_cck, pwr_ref_ofdm);
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++) {
|
||||
+ for (rs = 0; rs <= __RTW_RATE_SECTION_2SS_MAX; rs++) {
|
||||
for (j = 0; j < rtw_rate_size[rs]; j++) {
|
||||
rate = rtw_rate_section[rs][j];
|
||||
pwr_a = hal->tx_pwr_tbl[RF_PATH_A][rate];
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw88xxa.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw88xxa.c
|
||||
@@ -1637,7 +1637,7 @@ void rtw88xxa_set_tx_power_index(struct
|
||||
int rs, path;
|
||||
|
||||
for (path = 0; path < hal->rf_path_num; path++) {
|
||||
- for (rs = 0; rs < RTW_RATE_SECTION_NUM; rs++) {
|
||||
+ for (rs = 0; rs <= __RTW_RATE_SECTION_2SS_MAX; rs++) {
|
||||
if (hal->rf_path_num == 1 &&
|
||||
(rs == RTW_RATE_SECTION_HT_2S ||
|
||||
rs == RTW_RATE_SECTION_VHT_2S))
|
||||
@ -1,54 +0,0 @@
|
||||
From 053a7aace0207593776c729f229d87f1be464b98 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 01:31:13 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Fix rtw_rx_phy_stat() for RTL8814AU
|
||||
|
||||
Record statistics for the 3SS rates too.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/39e3c7cf-37ed-4c0e-af00-dcd9eab351f0@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 7 +++++++
|
||||
drivers/net/wireless/realtek/rtw88/rx.c | 6 ++++++
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -386,6 +386,9 @@ enum rtw_evm {
|
||||
RTW_EVM_1SS,
|
||||
RTW_EVM_2SS_A,
|
||||
RTW_EVM_2SS_B,
|
||||
+ RTW_EVM_3SS_A,
|
||||
+ RTW_EVM_3SS_B,
|
||||
+ RTW_EVM_3SS_C,
|
||||
/* keep it last */
|
||||
RTW_EVM_NUM
|
||||
};
|
||||
@@ -403,6 +406,10 @@ enum rtw_snr {
|
||||
RTW_SNR_2SS_B,
|
||||
RTW_SNR_2SS_C,
|
||||
RTW_SNR_2SS_D,
|
||||
+ RTW_SNR_3SS_A,
|
||||
+ RTW_SNR_3SS_B,
|
||||
+ RTW_SNR_3SS_C,
|
||||
+ RTW_SNR_3SS_D,
|
||||
/* keep it last */
|
||||
RTW_SNR_NUM
|
||||
};
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rx.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rx.c
|
||||
@@ -73,6 +73,12 @@ static void rtw_rx_phy_stat(struct rtw_d
|
||||
rate_ss_evm = 2;
|
||||
evm_id = RTW_EVM_2SS_A;
|
||||
break;
|
||||
+ case DESC_RATEMCS16...DESC_RATEMCS23:
|
||||
+ case DESC_RATEVHT3SS_MCS0...DESC_RATEVHT3SS_MCS9:
|
||||
+ rate_ss = 3;
|
||||
+ rate_ss_evm = 3;
|
||||
+ evm_id = RTW_EVM_3SS_A;
|
||||
+ break;
|
||||
default:
|
||||
rtw_warn(rtwdev, "unknown pkt rate = %d\n", pkt_stat->rate);
|
||||
return;
|
||||
@ -1,75 +0,0 @@
|
||||
From 8b42c46cf6656ef3c2f6d1ec0f113753c6875712 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 01:31:51 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Extend rtw_phy_config_swing_table() for
|
||||
RTL8814AU
|
||||
|
||||
Select the TX power tracking tables for RF paths C and D as well.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/e1e532c9-8733-4ec8-84fe-ced4af6c08da@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/phy.c | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
@@ -2458,32 +2458,56 @@ void rtw_phy_config_swing_table(struct r
|
||||
swing_table->n[RF_PATH_A] = tbl->pwrtrk_2g_ccka_n;
|
||||
swing_table->p[RF_PATH_B] = tbl->pwrtrk_2g_cckb_p;
|
||||
swing_table->n[RF_PATH_B] = tbl->pwrtrk_2g_cckb_n;
|
||||
+ swing_table->p[RF_PATH_C] = tbl->pwrtrk_2g_cckc_p;
|
||||
+ swing_table->n[RF_PATH_C] = tbl->pwrtrk_2g_cckc_n;
|
||||
+ swing_table->p[RF_PATH_D] = tbl->pwrtrk_2g_cckd_p;
|
||||
+ swing_table->n[RF_PATH_D] = tbl->pwrtrk_2g_cckd_n;
|
||||
} else {
|
||||
swing_table->p[RF_PATH_A] = tbl->pwrtrk_2ga_p;
|
||||
swing_table->n[RF_PATH_A] = tbl->pwrtrk_2ga_n;
|
||||
swing_table->p[RF_PATH_B] = tbl->pwrtrk_2gb_p;
|
||||
swing_table->n[RF_PATH_B] = tbl->pwrtrk_2gb_n;
|
||||
+ swing_table->p[RF_PATH_C] = tbl->pwrtrk_2gc_p;
|
||||
+ swing_table->n[RF_PATH_C] = tbl->pwrtrk_2gc_n;
|
||||
+ swing_table->p[RF_PATH_D] = tbl->pwrtrk_2gd_p;
|
||||
+ swing_table->n[RF_PATH_D] = tbl->pwrtrk_2gd_n;
|
||||
}
|
||||
} else if (IS_CH_5G_BAND_1(channel) || IS_CH_5G_BAND_2(channel)) {
|
||||
swing_table->p[RF_PATH_A] = tbl->pwrtrk_5ga_p[RTW_PWR_TRK_5G_1];
|
||||
swing_table->n[RF_PATH_A] = tbl->pwrtrk_5ga_n[RTW_PWR_TRK_5G_1];
|
||||
swing_table->p[RF_PATH_B] = tbl->pwrtrk_5gb_p[RTW_PWR_TRK_5G_1];
|
||||
swing_table->n[RF_PATH_B] = tbl->pwrtrk_5gb_n[RTW_PWR_TRK_5G_1];
|
||||
+ swing_table->p[RF_PATH_C] = tbl->pwrtrk_5gc_p[RTW_PWR_TRK_5G_1];
|
||||
+ swing_table->n[RF_PATH_C] = tbl->pwrtrk_5gc_n[RTW_PWR_TRK_5G_1];
|
||||
+ swing_table->p[RF_PATH_D] = tbl->pwrtrk_5gd_p[RTW_PWR_TRK_5G_1];
|
||||
+ swing_table->n[RF_PATH_D] = tbl->pwrtrk_5gd_n[RTW_PWR_TRK_5G_1];
|
||||
} else if (IS_CH_5G_BAND_3(channel)) {
|
||||
swing_table->p[RF_PATH_A] = tbl->pwrtrk_5ga_p[RTW_PWR_TRK_5G_2];
|
||||
swing_table->n[RF_PATH_A] = tbl->pwrtrk_5ga_n[RTW_PWR_TRK_5G_2];
|
||||
swing_table->p[RF_PATH_B] = tbl->pwrtrk_5gb_p[RTW_PWR_TRK_5G_2];
|
||||
swing_table->n[RF_PATH_B] = tbl->pwrtrk_5gb_n[RTW_PWR_TRK_5G_2];
|
||||
+ swing_table->p[RF_PATH_C] = tbl->pwrtrk_5gc_p[RTW_PWR_TRK_5G_2];
|
||||
+ swing_table->n[RF_PATH_C] = tbl->pwrtrk_5gc_n[RTW_PWR_TRK_5G_2];
|
||||
+ swing_table->p[RF_PATH_D] = tbl->pwrtrk_5gd_p[RTW_PWR_TRK_5G_2];
|
||||
+ swing_table->n[RF_PATH_D] = tbl->pwrtrk_5gd_n[RTW_PWR_TRK_5G_2];
|
||||
} else if (IS_CH_5G_BAND_4(channel)) {
|
||||
swing_table->p[RF_PATH_A] = tbl->pwrtrk_5ga_p[RTW_PWR_TRK_5G_3];
|
||||
swing_table->n[RF_PATH_A] = tbl->pwrtrk_5ga_n[RTW_PWR_TRK_5G_3];
|
||||
swing_table->p[RF_PATH_B] = tbl->pwrtrk_5gb_p[RTW_PWR_TRK_5G_3];
|
||||
swing_table->n[RF_PATH_B] = tbl->pwrtrk_5gb_n[RTW_PWR_TRK_5G_3];
|
||||
+ swing_table->p[RF_PATH_C] = tbl->pwrtrk_5gc_p[RTW_PWR_TRK_5G_3];
|
||||
+ swing_table->n[RF_PATH_C] = tbl->pwrtrk_5gc_n[RTW_PWR_TRK_5G_3];
|
||||
+ swing_table->p[RF_PATH_D] = tbl->pwrtrk_5gd_p[RTW_PWR_TRK_5G_3];
|
||||
+ swing_table->n[RF_PATH_D] = tbl->pwrtrk_5gd_n[RTW_PWR_TRK_5G_3];
|
||||
} else {
|
||||
swing_table->p[RF_PATH_A] = tbl->pwrtrk_2ga_p;
|
||||
swing_table->n[RF_PATH_A] = tbl->pwrtrk_2ga_n;
|
||||
swing_table->p[RF_PATH_B] = tbl->pwrtrk_2gb_p;
|
||||
swing_table->n[RF_PATH_B] = tbl->pwrtrk_2gb_n;
|
||||
+ swing_table->p[RF_PATH_C] = tbl->pwrtrk_2gc_p;
|
||||
+ swing_table->n[RF_PATH_C] = tbl->pwrtrk_2gc_n;
|
||||
+ swing_table->p[RF_PATH_D] = tbl->pwrtrk_2gd_p;
|
||||
+ swing_table->n[RF_PATH_D] = tbl->pwrtrk_2gd_n;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(rtw_phy_config_swing_table);
|
||||
@ -1,86 +0,0 @@
|
||||
From cfebabdd351e9cbafdc99cb198db482208ec5ad9 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 01:32:15 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Extend rtw_debugfs_get_phy_info() for RTL8814AU
|
||||
|
||||
Print information about the 3rd and 4th RF paths and about the 3rd
|
||||
spatial stream.
|
||||
|
||||
Also, fix a small bug: don't show the average SNR and EVM for the OFDM
|
||||
and HT/VHT rates when the rate is actually CCK 11M.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/7c8e94e2-e034-40f3-bdaf-b000018b5573@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/debug.c | 37 +++++++++++++++-------
|
||||
1 file changed, 26 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/debug.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/debug.c
|
||||
@@ -654,10 +654,10 @@ static void rtw_print_rate(struct seq_fi
|
||||
case DESC_RATE6M...DESC_RATE54M:
|
||||
rtw_print_ofdm_rate_txt(m, rate);
|
||||
break;
|
||||
- case DESC_RATEMCS0...DESC_RATEMCS15:
|
||||
+ case DESC_RATEMCS0...DESC_RATEMCS31:
|
||||
rtw_print_ht_rate_txt(m, rate);
|
||||
break;
|
||||
- case DESC_RATEVHT1SS_MCS0...DESC_RATEVHT2SS_MCS9:
|
||||
+ case DESC_RATEVHT1SS_MCS0...DESC_RATEVHT4SS_MCS9:
|
||||
rtw_print_vht_rate_txt(m, rate);
|
||||
break;
|
||||
default:
|
||||
@@ -849,20 +849,28 @@ static int rtw_debugfs_get_phy_info(stru
|
||||
last_cnt->num_qry_pkt[rate_id + 9]);
|
||||
}
|
||||
|
||||
- seq_printf(m, "[RSSI(dBm)] = {%d, %d}\n",
|
||||
+ seq_printf(m, "[RSSI(dBm)] = {%d, %d, %d, %d}\n",
|
||||
dm_info->rssi[RF_PATH_A] - 100,
|
||||
- dm_info->rssi[RF_PATH_B] - 100);
|
||||
- seq_printf(m, "[Rx EVM(dB)] = {-%d, -%d}\n",
|
||||
+ dm_info->rssi[RF_PATH_B] - 100,
|
||||
+ dm_info->rssi[RF_PATH_C] - 100,
|
||||
+ dm_info->rssi[RF_PATH_D] - 100);
|
||||
+ seq_printf(m, "[Rx EVM(dB)] = {-%d, -%d, -%d, -%d}\n",
|
||||
dm_info->rx_evm_dbm[RF_PATH_A],
|
||||
- dm_info->rx_evm_dbm[RF_PATH_B]);
|
||||
- seq_printf(m, "[Rx SNR] = {%d, %d}\n",
|
||||
+ dm_info->rx_evm_dbm[RF_PATH_B],
|
||||
+ dm_info->rx_evm_dbm[RF_PATH_C],
|
||||
+ dm_info->rx_evm_dbm[RF_PATH_D]);
|
||||
+ seq_printf(m, "[Rx SNR] = {%d, %d, %d, %d}\n",
|
||||
dm_info->rx_snr[RF_PATH_A],
|
||||
- dm_info->rx_snr[RF_PATH_B]);
|
||||
- seq_printf(m, "[CFO_tail(KHz)] = {%d, %d}\n",
|
||||
+ dm_info->rx_snr[RF_PATH_B],
|
||||
+ dm_info->rx_snr[RF_PATH_C],
|
||||
+ dm_info->rx_snr[RF_PATH_D]);
|
||||
+ seq_printf(m, "[CFO_tail(KHz)] = {%d, %d, %d, %d}\n",
|
||||
dm_info->cfo_tail[RF_PATH_A],
|
||||
- dm_info->cfo_tail[RF_PATH_B]);
|
||||
+ dm_info->cfo_tail[RF_PATH_B],
|
||||
+ dm_info->cfo_tail[RF_PATH_C],
|
||||
+ dm_info->cfo_tail[RF_PATH_D]);
|
||||
|
||||
- if (dm_info->curr_rx_rate >= DESC_RATE11M) {
|
||||
+ if (dm_info->curr_rx_rate >= DESC_RATE6M) {
|
||||
seq_puts(m, "[Rx Average Status]:\n");
|
||||
seq_printf(m, " * OFDM, EVM: {-%d}, SNR: {%d}\n",
|
||||
(u8)ewma_evm_read(&ewma_evm[RTW_EVM_OFDM]),
|
||||
@@ -875,6 +883,13 @@ static int rtw_debugfs_get_phy_info(stru
|
||||
(u8)ewma_evm_read(&ewma_evm[RTW_EVM_2SS_B]),
|
||||
(u8)ewma_snr_read(&ewma_snr[RTW_SNR_2SS_A]),
|
||||
(u8)ewma_snr_read(&ewma_snr[RTW_SNR_2SS_B]));
|
||||
+ seq_printf(m, " * 3SS, EVM: {-%d, -%d, -%d}, SNR: {%d, %d, %d}\n",
|
||||
+ (u8)ewma_evm_read(&ewma_evm[RTW_EVM_3SS_A]),
|
||||
+ (u8)ewma_evm_read(&ewma_evm[RTW_EVM_3SS_B]),
|
||||
+ (u8)ewma_evm_read(&ewma_evm[RTW_EVM_3SS_C]),
|
||||
+ (u8)ewma_snr_read(&ewma_snr[RTW_SNR_3SS_A]),
|
||||
+ (u8)ewma_snr_read(&ewma_snr[RTW_SNR_3SS_B]),
|
||||
+ (u8)ewma_snr_read(&ewma_snr[RTW_SNR_3SS_C]));
|
||||
}
|
||||
|
||||
seq_puts(m, "[Rx Counter]:\n");
|
||||
@ -1,65 +0,0 @@
|
||||
From c374281f828545b3698cf936b584249c2f9e40c5 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 18 Feb 2025 01:32:49 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Extend rtw_debugfs_get_tx_pwr_tbl() for
|
||||
RTL8814AU
|
||||
|
||||
Make it print the TX power details for all RF paths, not just A and B,
|
||||
and for all the rates supported by the chip, not just 1SS and 2SS
|
||||
rates.
|
||||
|
||||
Also skip the RF paths and rates not supported by the chip.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/ea65a978-a735-4c97-af82-d7fe26f95da1@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/debug.c | 20 +++++++++++++-------
|
||||
1 file changed, 13 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/debug.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/debug.c
|
||||
@@ -692,9 +692,11 @@ static int rtw_debugfs_get_tx_pwr_tbl(st
|
||||
{
|
||||
struct rtw_debugfs_priv *debugfs_priv = m->private;
|
||||
struct rtw_dev *rtwdev = debugfs_priv->rtwdev;
|
||||
+ struct rtw_power_params pwr_param = {0};
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
+ u8 nss = rtwdev->efuse.hw_cap.nss;
|
||||
u8 path, rate, bw, ch, regd;
|
||||
- struct rtw_power_params pwr_param = {0};
|
||||
+ u8 max_ht_rate, max_rate;
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
bw = hal->current_band_width;
|
||||
@@ -707,19 +709,23 @@ static int rtw_debugfs_get_tx_pwr_tbl(st
|
||||
seq_printf(m, "%-4s %-10s %-9s %-9s (%-4s %-4s %-4s) %-4s\n",
|
||||
"path", "rate", "pwr", "base", "byr", "lmt", "sar", "rem");
|
||||
|
||||
+ max_ht_rate = DESC_RATEMCS0 + nss * 8 - 1;
|
||||
+
|
||||
+ if (rtwdev->chip->vht_supported)
|
||||
+ max_rate = DESC_RATEVHT1SS_MCS0 + nss * 10 - 1;
|
||||
+ else
|
||||
+ max_rate = max_ht_rate;
|
||||
+
|
||||
mutex_lock(&hal->tx_power_mutex);
|
||||
- for (path = RF_PATH_A; path <= RF_PATH_B; path++) {
|
||||
+ for (path = RF_PATH_A; path < hal->rf_path_num; path++) {
|
||||
/* there is no CCK rates used in 5G */
|
||||
if (hal->current_band_type == RTW_BAND_5G)
|
||||
rate = DESC_RATE6M;
|
||||
else
|
||||
rate = DESC_RATE1M;
|
||||
|
||||
- /* now, not support vht 3ss and vht 4ss*/
|
||||
- for (; rate <= DESC_RATEVHT2SS_MCS9; rate++) {
|
||||
- /* now, not support ht 3ss and ht 4ss*/
|
||||
- if (rate > DESC_RATEMCS15 &&
|
||||
- rate < DESC_RATEVHT1SS_MCS0)
|
||||
+ for (; rate <= max_rate; rate++) {
|
||||
+ if (rate > max_ht_rate && rate <= DESC_RATEMCS31)
|
||||
continue;
|
||||
|
||||
rtw_get_tx_power_params(rtwdev, path, rate, bw,
|
||||
@ -1,200 +0,0 @@
|
||||
From 679ec431477cdb68d1cab068c008da0de7f842ef Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Fri, 7 Mar 2025 02:22:17 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Add some definitions for RTL8814AU
|
||||
|
||||
Add various register definitions which will be used by the new driver.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/1dcb5abb-26f8-4db5-be36-057de56465e5@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/reg.h | 66 ++++++++++++++++++++++--
|
||||
1 file changed, 62 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/reg.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/reg.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#define REG_SYS_FUNC_EN 0x0002
|
||||
#define BIT_FEN_EN_25_1 BIT(13)
|
||||
#define BIT_FEN_ELDR BIT(12)
|
||||
+#define BIT_FEN_PCIEA BIT(6)
|
||||
#define BIT_FEN_CPUEN BIT(2)
|
||||
#define BIT_FEN_USBA BIT(2)
|
||||
#define BIT_FEN_BB_GLB_RST BIT(1)
|
||||
@@ -39,6 +40,9 @@
|
||||
#define BIT_RF_RSTB BIT(1)
|
||||
#define BIT_RF_EN BIT(0)
|
||||
|
||||
+#define REG_RF_CTRL1 0x0020
|
||||
+#define REG_RF_CTRL2 0x0021
|
||||
+
|
||||
#define REG_AFE_CTRL1 0x0024
|
||||
#define BIT_MAC_CLK_SEL (BIT(20) | BIT(21))
|
||||
#define REG_EFUSE_CTRL 0x0030
|
||||
@@ -73,6 +77,8 @@
|
||||
#define BIT_BT_PTA_EN BIT(5)
|
||||
#define BIT_WLRFE_4_5_EN BIT(2)
|
||||
|
||||
+#define REG_GPIO_PIN_CTRL 0x0044
|
||||
+
|
||||
#define REG_LED_CFG 0x004C
|
||||
#define BIT_LNAON_SEL_EN BIT(26)
|
||||
#define BIT_PAPE_SEL_EN BIT(25)
|
||||
@@ -110,6 +116,7 @@
|
||||
#define BIT_SDIO_PAD_E5 BIT(18)
|
||||
|
||||
#define REG_RF_B_CTRL 0x76
|
||||
+#define REG_RF_CTRL3 0x0076
|
||||
|
||||
#define REG_AFE_CTRL_4 0x0078
|
||||
#define BIT_CK320M_AFE_EN BIT(4)
|
||||
@@ -603,15 +610,25 @@
|
||||
#define REG_CCA2ND 0x0838
|
||||
#define REG_L1PKTH 0x0848
|
||||
#define REG_CLKTRK 0x0860
|
||||
+#define REG_CSI_MASK_SETTING1 0x0874
|
||||
+#define REG_NBI_SETTING 0x087c
|
||||
+#define BIT_NBI_ENABLE BIT(13)
|
||||
+#define REG_CSI_FIX_MASK0 0x0880
|
||||
+#define REG_CSI_FIX_MASK1 0x0884
|
||||
+#define REG_CSI_FIX_MASK6 0x0898
|
||||
+#define REG_CSI_FIX_MASK7 0x089c
|
||||
#define REG_ADCCLK 0x08AC
|
||||
#define REG_HSSI_READ 0x08B0
|
||||
#define REG_FPGA0_XCD_RF_PARA 0x08B4
|
||||
#define REG_RX_MCS_LIMIT 0x08BC
|
||||
#define REG_ADC160 0x08C4
|
||||
+#define REG_DBGSEL 0x08fc
|
||||
#define REG_ANTSEL_SW 0x0900
|
||||
#define REG_DAC_RSTB 0x090c
|
||||
+#define REG_PSD 0x0910
|
||||
+#define BIT_PSD_INI GENMASK(23, 22)
|
||||
#define REG_SINGLE_TONE_CONT_TX 0x0914
|
||||
-
|
||||
+#define REG_AGC_TABLE 0x0958
|
||||
#define REG_RFE_CTRL_E 0x0974
|
||||
#define REG_2ND_CCA_CTRL 0x0976
|
||||
#define REG_IQK_COM00 0x0978
|
||||
@@ -621,10 +638,18 @@
|
||||
|
||||
#define REG_FAS 0x09a4
|
||||
#define REG_RXSB 0x0a00
|
||||
+#define BIT_RXSB_ANA_DIV BIT(15)
|
||||
#define REG_CCK_RX 0x0a04
|
||||
#define REG_CCK_PD_TH 0x0a0a
|
||||
-
|
||||
-#define REG_CCK0_FAREPORT 0xa2c
|
||||
+#define REG_PRECTRL 0x0a14
|
||||
+#define BIT_DIS_CO_PATHSEL BIT(7)
|
||||
+#define BIT_IQ_WGT GENMASK(9, 8)
|
||||
+#define REG_CCA_MF 0x0a20
|
||||
+#define BIT_MBC_WIN GENMASK(5, 4)
|
||||
+#define REG_CCK0_TX_FILTER1 0x0a20
|
||||
+#define REG_CCK0_TX_FILTER2 0x0a24
|
||||
+#define REG_CCK0_DEBUG_PORT 0x0a28
|
||||
+#define REG_CCK0_FAREPORT 0x0a2c
|
||||
#define BIT_CCK0_2RX BIT(18)
|
||||
#define BIT_CCK0_MRC BIT(22)
|
||||
#define REG_FA_CCK 0x0a5c
|
||||
@@ -643,10 +668,18 @@
|
||||
#define DIS_DPD_RATEVHT2SS_MCS1 BIT(9)
|
||||
#define DIS_DPD_RATEALL GENMASK(9, 0)
|
||||
|
||||
+#define REG_CCA 0x0a70
|
||||
+#define BIT_CCA_CO BIT(7)
|
||||
+#define REG_ANTSEL 0x0a74
|
||||
+#define BIT_ANT_BYCO BIT(8)
|
||||
+#define REG_CCKTX 0x0a84
|
||||
+#define BIT_CMB_CCA_2R BIT(28)
|
||||
+
|
||||
#define REG_CNTRST 0x0b58
|
||||
|
||||
#define REG_3WIRE_SWA 0x0c00
|
||||
#define REG_RX_IQC_AB_A 0x0c10
|
||||
+#define REG_RX_IQC_CD_A 0x0c14
|
||||
#define REG_TXSCALE_A 0x0c1c
|
||||
#define BB_SWING_MASK GENMASK(31, 21)
|
||||
#define REG_TX_AGC_A_CCK_11_CCK_1 0xc20
|
||||
@@ -674,7 +707,7 @@
|
||||
#define REG_LSSI_WRITE_A 0x0c90
|
||||
#define REG_PREDISTA 0x0c90
|
||||
#define REG_TXAGCIDX 0x0c94
|
||||
-
|
||||
+#define REG_TX_AGC_A 0x0c94
|
||||
#define REG_RFE_PINMUX_A 0x0cb0
|
||||
#define REG_RFE_INV_A 0x0cb4
|
||||
#define REG_RFE_CTRL8 0x0cb4
|
||||
@@ -683,6 +716,7 @@
|
||||
#define DPDT_CTRL_PIN 0x77
|
||||
#define RFE_INV_MASK 0x3ff00000
|
||||
#define REG_RFECTL_A 0x0cb8
|
||||
+#define REG_RFE_INV0 0x0cbc
|
||||
#define REG_RFE_INV8 0x0cbd
|
||||
#define BIT_MASK_RFE_INV89 GENMASK(1, 0)
|
||||
#define REG_RFE_INV16 0x0cbe
|
||||
@@ -703,6 +737,7 @@
|
||||
|
||||
#define REG_3WIRE_SWB 0x0e00
|
||||
#define REG_RX_IQC_AB_B 0x0e10
|
||||
+#define REG_RX_IQC_CD_B 0x0e14
|
||||
#define REG_TXSCALE_B 0x0e1c
|
||||
#define REG_TX_AGC_B_CCK_11_CCK_1 0xe20
|
||||
#define REG_TX_AGC_B_OFDM18_OFDM6 0xe24
|
||||
@@ -729,6 +764,7 @@
|
||||
#define REG_LSSI_WRITE_B 0x0e90
|
||||
#define REG_PREDISTB 0x0e90
|
||||
#define REG_INIDLYB 0x0e94
|
||||
+#define REG_TX_AGC_B 0x0e94
|
||||
#define REG_RFE_PINMUX_B 0x0eb0
|
||||
#define REG_RFE_INV_B 0x0eb4
|
||||
#define REG_RFECTL_B 0x0eb8
|
||||
@@ -744,8 +780,11 @@
|
||||
#define REG_CRC_HT 0x0f10
|
||||
#define REG_CRC_OFDM 0x0f14
|
||||
#define REG_FA_OFDM 0x0f48
|
||||
+#define REG_DBGRPT 0x0fa0
|
||||
#define REG_CCA_CCK 0x0fcc
|
||||
|
||||
+#define REG_SYS_CFG3_8814A 0x1000
|
||||
+
|
||||
#define REG_ANAPARSW_MAC_0 0x1010
|
||||
#define BIT_CF_L_V2 GENMASK(29, 28)
|
||||
|
||||
@@ -863,9 +902,27 @@
|
||||
#define LTECOEX_WRITE_DATA REG_WL2LTECOEX_INDIRECT_ACCESS_WRITE_DATA_V1
|
||||
#define LTECOEX_READ_DATA REG_WL2LTECOEX_INDIRECT_ACCESS_READ_DATA_V1
|
||||
|
||||
+#define REG_RX_IQC_AB_C 0x1810
|
||||
+#define REG_RX_IQC_CD_C 0x1814
|
||||
+#define REG_TXSCALE_C 0x181c
|
||||
+#define REG_CK_MONHC 0x185c
|
||||
+#define REG_AFE_PWR1_C 0x1860
|
||||
#define REG_IGN_GNT_BT1 0x1860
|
||||
+#define REG_TX_AGC_C 0x1894
|
||||
+#define REG_RFE_PINMUX_C 0x18b4
|
||||
|
||||
#define REG_RFESEL_CTRL 0x1990
|
||||
+#define REG_AGC_TBL 0x1998
|
||||
+
|
||||
+#define REG_RX_IQC_AB_D 0x1a10
|
||||
+#define REG_RX_IQC_CD_D 0x1a14
|
||||
+#define REG_TXSCALE_D 0x1a1c
|
||||
+#define REG_CK_MONHD 0x1a5c
|
||||
+#define REG_AFE_PWR1_D 0x1a60
|
||||
+#define REG_TX_AGC_D 0x1a94
|
||||
+#define REG_RFE_PINMUX_D 0x1ab4
|
||||
+#define REG_RFE_INVSEL_D 0x1abc
|
||||
+#define BIT_RFE_SELSW0_D GENMASK(27, 20)
|
||||
|
||||
#define REG_NOMASK_TXBT 0x1ca7
|
||||
#define REG_ANAPAR 0x1c30
|
||||
@@ -906,6 +963,7 @@
|
||||
#define RF18_BAND_MASK (BIT(16) | BIT(9) | BIT(8))
|
||||
#define RF18_CHANNEL_MASK (MASKBYTE0)
|
||||
#define RF18_RFSI_MASK (BIT(18) | BIT(17))
|
||||
+#define RF_RCK1_V1 0x1c
|
||||
#define RF_RCK 0x1d
|
||||
#define RF_MODE_TABLE_ADDR 0x30
|
||||
#define RF_MODE_TABLE_DATA0 0x31
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,50 +0,0 @@
|
||||
From dad8e879310211c1e02f09c35f169388bccbfa42 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Fri, 7 Mar 2025 02:25:09 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Add rtw8814ae.c
|
||||
|
||||
This is the entry point for the new module rtw88_8814ae.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/74ebab2f-a23e-4d87-935f-0af2b5cba672@gmail.com
|
||||
---
|
||||
.../net/wireless/realtek/rtw88/rtw8814ae.c | 31 +++++++++++++++++++
|
||||
1 file changed, 31 insertions(+)
|
||||
create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8814ae.c
|
||||
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8814ae.c
|
||||
@@ -0,0 +1,31 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
+/* Copyright(c) 2025 Realtek Corporation
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/pci.h>
|
||||
+#include "pci.h"
|
||||
+#include "rtw8814a.h"
|
||||
+
|
||||
+static const struct pci_device_id rtw_8814ae_id_table[] = {
|
||||
+ {
|
||||
+ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8813),
|
||||
+ .driver_data = (kernel_ulong_t)&rtw8814a_hw_spec
|
||||
+ },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(pci, rtw_8814ae_id_table);
|
||||
+
|
||||
+static struct pci_driver rtw_8814ae_driver = {
|
||||
+ .name = "rtw_8814ae",
|
||||
+ .id_table = rtw_8814ae_id_table,
|
||||
+ .probe = rtw_pci_probe,
|
||||
+ .remove = rtw_pci_remove,
|
||||
+ .driver.pm = &rtw_pm_ops,
|
||||
+ .shutdown = rtw_pci_shutdown,
|
||||
+};
|
||||
+module_pci_driver(rtw_8814ae_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Bitterblue Smith <rtl8821cerfe2@gmail.com>");
|
||||
+MODULE_DESCRIPTION("Realtek 802.11ac wireless 8814ae driver");
|
||||
+MODULE_LICENSE("Dual BSD/GPL");
|
||||
@ -1,73 +0,0 @@
|
||||
From bad060e8a425182809bfc2586a2e7f5ccd1a994d Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Fri, 7 Mar 2025 02:25:37 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Add rtw8814au.c
|
||||
|
||||
This is the entry point for the new module rtw88_8814au.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/71457787-5a9e-4ead-a62c-22ca44e00b89@gmail.com
|
||||
---
|
||||
.../net/wireless/realtek/rtw88/rtw8814au.c | 54 +++++++++++++++++++
|
||||
1 file changed, 54 insertions(+)
|
||||
create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8814au.c
|
||||
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8814au.c
|
||||
@@ -0,0 +1,54 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
+/* Copyright(c) 2025 Realtek Corporation
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/usb.h>
|
||||
+#include "main.h"
|
||||
+#include "rtw8814a.h"
|
||||
+#include "usb.h"
|
||||
+
|
||||
+static const struct usb_device_id rtw_8814au_id_table[] = {
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x8813, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x056e, 0x400b, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x056e, 0x400d, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x0846, 0x9054, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x1817, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x1852, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x1853, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x0e66, 0x0026, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331a, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x20f4, 0x809a, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x20f4, 0x809b, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0106, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xa834, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xa833, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8814a_hw_spec) },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(usb, rtw_8814au_id_table);
|
||||
+
|
||||
+static struct usb_driver rtw_8814au_driver = {
|
||||
+ .name = "rtw_8814au",
|
||||
+ .id_table = rtw_8814au_id_table,
|
||||
+ .probe = rtw_usb_probe,
|
||||
+ .disconnect = rtw_usb_disconnect,
|
||||
+};
|
||||
+module_usb_driver(rtw_8814au_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Bitterblue Smith <rtl8821cerfe2@gmail.com>");
|
||||
+MODULE_DESCRIPTION("Realtek 802.11ac wireless 8814au driver");
|
||||
+MODULE_LICENSE("Dual BSD/GPL");
|
||||
@ -1,34 +0,0 @@
|
||||
From d58ad77d5cc2a6d04db622a898e54d93fc7002a2 Mon Sep 17 00:00:00 2001
|
||||
From: Kees Cook <kees@kernel.org>
|
||||
Date: Mon, 10 Mar 2025 15:22:58 -0700
|
||||
Subject: [PATCH] wifi: rtw88: Add __nonstring annotations for unterminated
|
||||
strings
|
||||
|
||||
When a character array without a terminating NUL character has a static
|
||||
initializer, GCC 15's -Wunterminated-string-initialization will only
|
||||
warn if the array lacks the "nonstring" attribute[1]. Mark the arrays
|
||||
with __nonstring to and correctly identify the char array as "not a C
|
||||
string" and thereby eliminate the warning.
|
||||
|
||||
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1]
|
||||
Cc: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Cc: Johannes Berg <johannes@sipsolutions.net>
|
||||
Cc: linux-wireless@vger.kernel.org
|
||||
Signed-off-by: Kees Cook <kees@kernel.org>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250310222257.work.866-kees@kernel.org
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -835,7 +835,7 @@ struct rtw_vif {
|
||||
};
|
||||
|
||||
struct rtw_regulatory {
|
||||
- char alpha2[2];
|
||||
+ char alpha2[2] __nonstring;
|
||||
u8 txpwr_regd_2g;
|
||||
u8 txpwr_regd_5g;
|
||||
};
|
||||
@ -1,130 +0,0 @@
|
||||
From deb3ddeb18652118956fb581a39ac299e1ee5623 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Fri, 7 Mar 2025 02:26:25 +0200
|
||||
Subject: [PATCH] wifi: rtw88: Enable the new RTL8814AE/RTL8814AU drivers
|
||||
|
||||
RTL8814A is a wifi 5 chip with 4 RF paths (chains), 3 spatial streams,
|
||||
and probably no Bluetooth.
|
||||
|
||||
The USB-based RTL8814AU can reach 800 Mbps in the 5 GHz band in USB 3
|
||||
mode. In USB 2 mode it only uses 2 spatial streams.
|
||||
|
||||
The PCI-based RTL8814AE is not as popular and didn't get as much
|
||||
testing so it's unclear how fast it goes. It's more like a bonus on top
|
||||
of the RTL8814AU support.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/5795b0a7-511e-40b5-ac36-476b63f174c7@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/Kconfig | 25 +++++++++++++++++++++
|
||||
drivers/net/wireless/realtek/rtw88/Makefile | 9 ++++++++
|
||||
2 files changed, 34 insertions(+)
|
||||
|
||||
--- a/Kconfig.local
|
||||
+++ b/Kconfig.local
|
||||
@@ -1138,6 +1138,9 @@ config BACKPORTED_RTW88_8821A
|
||||
config BACKPORTED_RTW88_8812A
|
||||
tristate
|
||||
default RTW88_8812A
|
||||
+config BACKPORTED_RTW88_8814A
|
||||
+ tristate
|
||||
+ default RTW88_8814A
|
||||
config BACKPORTED_RTW88_8822BE
|
||||
tristate
|
||||
default RTW88_8822BE
|
||||
@@ -1183,6 +1186,12 @@ config BACKPORTED_RTW88_8821AU
|
||||
config BACKPORTED_RTW88_8812AU
|
||||
tristate
|
||||
default RTW88_8812AU
|
||||
+config BACKPORTED_RTW88_8814AE
|
||||
+ tristate
|
||||
+ default RTW88_8814AE
|
||||
+config BACKPORTED_RTW88_8814AU
|
||||
+ tristate
|
||||
+ default RTW88_8814AU
|
||||
config BACKPORTED_RTW88_DEBUG
|
||||
tristate
|
||||
default RTW88_DEBUG
|
||||
--- a/drivers/net/wireless/realtek/rtw88/Kconfig
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/Kconfig
|
||||
@@ -68,6 +68,10 @@ config RTW88_8812A
|
||||
depends on m
|
||||
select RTW88_88XXA
|
||||
|
||||
+config RTW88_8814A
|
||||
+ tristate
|
||||
+ depends on m
|
||||
+
|
||||
config RTW88_8822BE
|
||||
tristate "Realtek 8822BE PCI wireless network adapter"
|
||||
depends on m
|
||||
@@ -251,6 +255,30 @@ config RTW88_8812AU
|
||||
|
||||
802.11ac USB wireless network adapter
|
||||
|
||||
+config RTW88_8814AE
|
||||
+ tristate "Realtek 8814AE PCI wireless network adapter"
|
||||
+ depends on m
|
||||
+ depends on PCI
|
||||
+ select RTW88_CORE
|
||||
+ select RTW88_PCI
|
||||
+ select RTW88_8814A
|
||||
+ help
|
||||
+ Select this option will enable support for 8814AE chipset
|
||||
+
|
||||
+ 802.11ac PCIe wireless network adapter
|
||||
+
|
||||
+config RTW88_8814AU
|
||||
+ tristate "Realtek 8814AU USB wireless network adapter"
|
||||
+ depends on m
|
||||
+ depends on USB
|
||||
+ select RTW88_CORE
|
||||
+ select RTW88_USB
|
||||
+ select RTW88_8814A
|
||||
+ help
|
||||
+ Select this option will enable support for 8814AU chipset
|
||||
+
|
||||
+ 802.11ac USB wireless network adapter
|
||||
+
|
||||
config RTW88_DEBUG
|
||||
bool "Realtek rtw88 debug support"
|
||||
depends on RTW88_CORE
|
||||
--- a/drivers/net/wireless/realtek/rtw88/Makefile
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/Makefile
|
||||
@@ -94,6 +94,15 @@ rtw88_8821au-objs := rtw8821au.o
|
||||
obj-$(CPTCFG_RTW88_8812AU) += rtw88_8812au.o
|
||||
rtw88_8812au-objs := rtw8812au.o
|
||||
|
||||
+obj-$(CPTCFG_RTW88_8814A) += rtw88_8814a.o
|
||||
+rtw88_8814a-objs := rtw8814a.o rtw8814a_table.o
|
||||
+
|
||||
+obj-$(CPTCFG_RTW88_8814AE) += rtw88_8814ae.o
|
||||
+rtw88_8814ae-objs := rtw8814ae.o
|
||||
+
|
||||
+obj-$(CPTCFG_RTW88_8814AU) += rtw88_8814au.o
|
||||
+rtw88_8814au-objs := rtw8814au.o
|
||||
+
|
||||
obj-$(CPTCFG_RTW88_PCI) += rtw88_pci.o
|
||||
rtw88_pci-objs := pci.o
|
||||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -375,6 +375,7 @@ RTW88_8821C=
|
||||
RTW88_88XXA=
|
||||
RTW88_8821A=
|
||||
RTW88_8812A=
|
||||
+RTW88_8814A=
|
||||
RTW88_8822BE=
|
||||
RTW88_8822BS=
|
||||
RTW88_8822BU=
|
||||
@@ -390,6 +391,8 @@ RTW88_8821CS=
|
||||
RTW88_8821CU=
|
||||
RTW88_8821AU=
|
||||
RTW88_8812AU=
|
||||
+RTW88_8814AE=
|
||||
+RTW88_8814AU=
|
||||
RTW88_DEBUG=
|
||||
RTW88_DEBUGFS=
|
||||
RTW88_LEDS=
|
||||
@ -1,36 +0,0 @@
|
||||
From 5c4cf36c538bb2714e43654e365cb77b19c4a93e Mon Sep 17 00:00:00 2001
|
||||
From: Chen Ni <nichen@iscas.ac.cn>
|
||||
Date: Mon, 24 Mar 2025 15:59:10 +0800
|
||||
Subject: [PATCH] wifi: rtw88: sdio: Remove redundant 'flush_workqueue()' calls
|
||||
|
||||
'destroy_workqueue()' already drains the queue before destroying it, so
|
||||
there is no need to flush it explicitly.
|
||||
|
||||
Remove the redundant 'flush_workqueue()' calls.
|
||||
|
||||
This was generated with coccinelle:
|
||||
|
||||
@@
|
||||
expression E;
|
||||
@@
|
||||
|
||||
- flush_workqueue(E);
|
||||
destroy_workqueue(E);
|
||||
|
||||
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250324075910.407999-1-nichen@iscas.ac.cn
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -1298,7 +1298,6 @@ static void rtw_sdio_deinit_tx(struct rt
|
||||
struct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;
|
||||
int i;
|
||||
|
||||
- flush_workqueue(rtwsdio->txwq);
|
||||
destroy_workqueue(rtwsdio->txwq);
|
||||
kfree(rtwsdio->tx_handler_data);
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
From 625fbc16524a45488f6eb8561d98b3328efe79cd Mon Sep 17 00:00:00 2001
|
||||
From: Chen Ni <nichen@iscas.ac.cn>
|
||||
Date: Mon, 24 Mar 2025 16:03:03 +0800
|
||||
Subject: [PATCH] wifi: rtw88: usb: Remove redundant 'flush_workqueue()' calls
|
||||
|
||||
'destroy_workqueue()' already drains the queue before destroying it, so
|
||||
there is no need to flush it explicitly.
|
||||
|
||||
Remove the redundant 'flush_workqueue()' calls.
|
||||
|
||||
This was generated with coccinelle:
|
||||
|
||||
@@
|
||||
expression E;
|
||||
@@
|
||||
|
||||
- flush_workqueue(E);
|
||||
destroy_workqueue(E);
|
||||
|
||||
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250324080303.408084-1-nichen@iscas.ac.cn
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/usb.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -952,7 +952,6 @@ static void rtw_usb_deinit_rx(struct rtw
|
||||
|
||||
skb_queue_purge(&rtwusb->rx_queue);
|
||||
|
||||
- flush_workqueue(rtwusb->rxwq);
|
||||
destroy_workqueue(rtwusb->rxwq);
|
||||
|
||||
skb_queue_purge(&rtwusb->rx_free_queue);
|
||||
@@ -981,7 +980,6 @@ static void rtw_usb_deinit_tx(struct rtw
|
||||
{
|
||||
struct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);
|
||||
|
||||
- flush_workqueue(rtwusb->txwq);
|
||||
destroy_workqueue(rtwusb->txwq);
|
||||
rtw_usb_tx_queue_purge(rtwusb);
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
From bf1103654df99d50724a022c8b9fca8908a86f50 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 2 Apr 2025 18:30:02 +0300
|
||||
Subject: [PATCH] wifi: rtw88: usb: Enable switching the RTL8814AU to USB 3
|
||||
|
||||
The Realtek wifi 5 devices which support USB 3 are weird: when first
|
||||
plugged in, they pretend to be USB 2. The driver needs to send some
|
||||
commands to the device, which make it disappear and come back as a
|
||||
USB 3 device.
|
||||
|
||||
The method used to switch the RTL8812AU also works for the RTL8814AU.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/d3608f70-e04f-4f6b-987a-022c8e317165@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/usb.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -1096,7 +1096,8 @@ static int rtw_usb_switch_mode_new(struc
|
||||
|
||||
static bool rtw_usb3_chip_old(u8 chip_id)
|
||||
{
|
||||
- return chip_id == RTW_CHIP_TYPE_8812A;
|
||||
+ return chip_id == RTW_CHIP_TYPE_8812A ||
|
||||
+ chip_id == RTW_CHIP_TYPE_8814A;
|
||||
}
|
||||
|
||||
static bool rtw_usb3_chip_new(u8 chip_id)
|
||||
@ -1,28 +0,0 @@
|
||||
From dcbb7bb3a364f218411761e2e5ee2f6818d9bdfc Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 2 Apr 2025 18:30:28 +0300
|
||||
Subject: [PATCH] wifi: rtw88: usb: Enable RX aggregation for RTL8814AU
|
||||
|
||||
Let the chip transfer several frames in a single USB Request Block.
|
||||
This is supposed to improve the RX speed.
|
||||
|
||||
It can use the same code used for RTL8822CU, RTL8822BU, and RTL8821CU.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/672397ac-dd4d-4420-8b3e-7011578e2243@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/usb.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -866,6 +866,7 @@ static void rtw_usb_dynamic_rx_agg(struc
|
||||
case RTW_CHIP_TYPE_8822C:
|
||||
case RTW_CHIP_TYPE_8822B:
|
||||
case RTW_CHIP_TYPE_8821C:
|
||||
+ case RTW_CHIP_TYPE_8814A:
|
||||
rtw_usb_dynamic_rx_agg_v1(rtwdev, enable);
|
||||
break;
|
||||
case RTW_CHIP_TYPE_8821A:
|
||||
@ -1,192 +0,0 @@
|
||||
From 0d2a88690e583168effb03c64fd217a323b2c444 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 2 Apr 2025 18:31:12 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Set AMPDU factor to hardware for RTL8814A
|
||||
|
||||
Tell the chip the maximum AMPDU size supported by the AP. This greatly
|
||||
improves the TX speed of RTL8814AU in the 2.4 GHz band. Before: ~90
|
||||
Mbps. After: ~300 Mbps.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/4edc2a63-81b3-431c-9a37-5a7d899a6cc2@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/mac80211.c | 2 ++
|
||||
drivers/net/wireless/realtek/rtw88/main.c | 32 +++++++++++++++++++
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 3 ++
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8812a.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8814a.c | 11 +++++++
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821a.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 1 +
|
||||
11 files changed, 55 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
|
||||
@@ -396,6 +396,8 @@ static void rtw_ops_bss_info_changed(str
|
||||
if (rtw_bf_support)
|
||||
rtw_bf_assoc(rtwdev, vif, conf);
|
||||
|
||||
+ rtw_set_ampdu_factor(rtwdev, vif, conf);
|
||||
+
|
||||
rtw_fw_beacon_filter_config(rtwdev, true, vif);
|
||||
} else {
|
||||
rtw_leave_lps(rtwdev);
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.c
|
||||
@@ -2447,6 +2447,38 @@ void rtw_core_enable_beacon(struct rtw_d
|
||||
}
|
||||
}
|
||||
|
||||
+void rtw_set_ampdu_factor(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
|
||||
+ struct ieee80211_bss_conf *bss_conf)
|
||||
+{
|
||||
+ const struct rtw_chip_ops *ops = rtwdev->chip->ops;
|
||||
+ struct ieee80211_sta *sta;
|
||||
+ u8 factor = 0xff;
|
||||
+
|
||||
+ if (!ops->set_ampdu_factor)
|
||||
+ return;
|
||||
+
|
||||
+ rcu_read_lock();
|
||||
+
|
||||
+ sta = ieee80211_find_sta(vif, bss_conf->bssid);
|
||||
+ if (!sta) {
|
||||
+ rcu_read_unlock();
|
||||
+ rtw_warn(rtwdev, "%s: failed to find station %pM\n",
|
||||
+ __func__, bss_conf->bssid);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (sta->deflink.vht_cap.vht_supported)
|
||||
+ factor = u32_get_bits(sta->deflink.vht_cap.cap,
|
||||
+ IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK);
|
||||
+ else if (sta->deflink.ht_cap.ht_supported)
|
||||
+ factor = sta->deflink.ht_cap.ampdu_factor;
|
||||
+
|
||||
+ rcu_read_unlock();
|
||||
+
|
||||
+ if (factor != 0xff)
|
||||
+ ops->set_ampdu_factor(rtwdev, factor);
|
||||
+}
|
||||
+
|
||||
MODULE_AUTHOR("Realtek Corporation");
|
||||
MODULE_DESCRIPTION("Realtek 802.11ac wireless core module");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -878,6 +878,7 @@ struct rtw_chip_ops {
|
||||
u32 antenna_rx);
|
||||
void (*cfg_ldo25)(struct rtw_dev *rtwdev, bool enable);
|
||||
void (*efuse_grant)(struct rtw_dev *rtwdev, bool enable);
|
||||
+ void (*set_ampdu_factor)(struct rtw_dev *rtwdev, u8 factor);
|
||||
void (*false_alarm_statistics)(struct rtw_dev *rtwdev);
|
||||
void (*phy_calibration)(struct rtw_dev *rtwdev);
|
||||
void (*dpk_track)(struct rtw_dev *rtwdev);
|
||||
@@ -2272,4 +2273,6 @@ void rtw_update_channel(struct rtw_dev *
|
||||
void rtw_core_port_switch(struct rtw_dev *rtwdev, struct ieee80211_vif *vif);
|
||||
bool rtw_core_check_sta_active(struct rtw_dev *rtwdev);
|
||||
void rtw_core_enable_beacon(struct rtw_dev *rtwdev, bool enable);
|
||||
+void rtw_set_ampdu_factor(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
|
||||
+ struct ieee80211_bss_conf *bss_conf);
|
||||
#endif
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -1904,6 +1904,7 @@ static const struct rtw_chip_ops rtw8703
|
||||
.set_antenna = NULL,
|
||||
.cfg_ldo25 = rtw8723x_cfg_ldo25,
|
||||
.efuse_grant = rtw8723x_efuse_grant,
|
||||
+ .set_ampdu_factor = NULL,
|
||||
.false_alarm_statistics = rtw8723x_false_alarm_statistics,
|
||||
.phy_calibration = rtw8703b_phy_calibration,
|
||||
.dpk_track = NULL,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -1404,6 +1404,7 @@ static const struct rtw_chip_ops rtw8723
|
||||
.set_antenna = NULL,
|
||||
.cfg_ldo25 = rtw8723x_cfg_ldo25,
|
||||
.efuse_grant = rtw8723x_efuse_grant,
|
||||
+ .set_ampdu_factor = NULL,
|
||||
.false_alarm_statistics = rtw8723x_false_alarm_statistics,
|
||||
.phy_calibration = rtw8723d_phy_calibration,
|
||||
.cck_pd_set = rtw8723d_phy_cck_pd_set,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8812a.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8812a.c
|
||||
@@ -925,6 +925,7 @@ static const struct rtw_chip_ops rtw8812
|
||||
.set_tx_power_index = rtw88xxa_set_tx_power_index,
|
||||
.cfg_ldo25 = rtw8812a_cfg_ldo25,
|
||||
.efuse_grant = rtw88xxa_efuse_grant,
|
||||
+ .set_ampdu_factor = NULL,
|
||||
.false_alarm_statistics = rtw88xxa_false_alarm_statistics,
|
||||
.phy_calibration = rtw8812a_phy_calibration,
|
||||
.cck_pd_set = rtw88xxa_phy_cck_pd_set,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8814a.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8814a.c
|
||||
@@ -1332,6 +1332,16 @@ static void rtw8814a_cfg_ldo25(struct rt
|
||||
{
|
||||
}
|
||||
|
||||
+/* Without this RTL8814A sends too many frames and (some?) 11n AP
|
||||
+ * can't handle it, resulting in low TX speed. Other chips seem fine.
|
||||
+ */
|
||||
+static void rtw8814a_set_ampdu_factor(struct rtw_dev *rtwdev, u8 factor)
|
||||
+{
|
||||
+ factor = min_t(u8, factor, IEEE80211_VHT_MAX_AMPDU_256K);
|
||||
+
|
||||
+ rtw_write32(rtwdev, REG_AMPDU_MAX_LENGTH, (8192 << factor) - 1);
|
||||
+}
|
||||
+
|
||||
static void rtw8814a_false_alarm_statistics(struct rtw_dev *rtwdev)
|
||||
{
|
||||
struct rtw_dm_info *dm_info = &rtwdev->dm_info;
|
||||
@@ -2051,6 +2061,7 @@ static const struct rtw_chip_ops rtw8814
|
||||
.set_antenna = NULL,
|
||||
.cfg_ldo25 = rtw8814a_cfg_ldo25,
|
||||
.efuse_grant = rtw8814a_efuse_grant,
|
||||
+ .set_ampdu_factor = rtw8814a_set_ampdu_factor,
|
||||
.false_alarm_statistics = rtw8814a_false_alarm_statistics,
|
||||
.phy_calibration = rtw8814a_phy_calibration,
|
||||
.cck_pd_set = rtw8814a_phy_cck_pd_set,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821a.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821a.c
|
||||
@@ -871,6 +871,7 @@ static const struct rtw_chip_ops rtw8821
|
||||
.set_tx_power_index = rtw88xxa_set_tx_power_index,
|
||||
.cfg_ldo25 = rtw8821a_cfg_ldo25,
|
||||
.efuse_grant = rtw88xxa_efuse_grant,
|
||||
+ .set_ampdu_factor = NULL,
|
||||
.false_alarm_statistics = rtw88xxa_false_alarm_statistics,
|
||||
.phy_calibration = rtw8821a_phy_calibration,
|
||||
.cck_pd_set = rtw88xxa_phy_cck_pd_set,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -1668,6 +1668,7 @@ static const struct rtw_chip_ops rtw8821
|
||||
.set_antenna = NULL,
|
||||
.set_tx_power_index = rtw8821c_set_tx_power_index,
|
||||
.cfg_ldo25 = rtw8821c_cfg_ldo25,
|
||||
+ .set_ampdu_factor = NULL,
|
||||
.false_alarm_statistics = rtw8821c_false_alarm_statistics,
|
||||
.phy_calibration = rtw8821c_phy_calibration,
|
||||
.cck_pd_set = rtw8821c_phy_cck_pd_set,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -2158,6 +2158,7 @@ static const struct rtw_chip_ops rtw8822
|
||||
.set_tx_power_index = rtw8822b_set_tx_power_index,
|
||||
.set_antenna = rtw8822b_set_antenna,
|
||||
.cfg_ldo25 = rtw8822b_cfg_ldo25,
|
||||
+ .set_ampdu_factor = NULL,
|
||||
.false_alarm_statistics = rtw8822b_false_alarm_statistics,
|
||||
.phy_calibration = rtw8822b_phy_calibration,
|
||||
.pwr_track = rtw8822b_pwr_track,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -4968,6 +4968,7 @@ static const struct rtw_chip_ops rtw8822
|
||||
.set_tx_power_index = rtw8822c_set_tx_power_index,
|
||||
.set_antenna = rtw8822c_set_antenna,
|
||||
.cfg_ldo25 = rtw8822c_cfg_ldo25,
|
||||
+ .set_ampdu_factor = NULL,
|
||||
.false_alarm_statistics = rtw8822c_false_alarm_statistics,
|
||||
.dpk_track = rtw8822c_dpk_track,
|
||||
.phy_calibration = rtw8822c_phy_calibration,
|
||||
@ -1,169 +0,0 @@
|
||||
From b8d49bb8d16ae7dde8e05b275d6e3b8bbf27f011 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 2 Apr 2025 18:31:36 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Don't set SUPPORTS_AMSDU_IN_AMPDU for RTL8814AU
|
||||
|
||||
RTL8814AU doesn't work well with SUPPORTS_AMSDU_IN_AMPDU. The RX speed
|
||||
is noticeably lower and the VHT RX statistics are strange. Typical
|
||||
values with SUPPORTS_AMSDU_IN_AMPDU:
|
||||
|
||||
Reverse mode, remote host 192.168.0.1 is sending
|
||||
[ 5] local 192.168.0.50 port 60710 connected to 192.168.0.1 port 5201
|
||||
[ ID] Interval Transfer Bitrate
|
||||
[ 5] 0.00-1.00 sec 74.6 MBytes 626 Mbits/sec
|
||||
[ 5] 1.00-2.00 sec 79.2 MBytes 665 Mbits/sec
|
||||
[ 5] 2.00-3.00 sec 84.9 MBytes 712 Mbits/sec
|
||||
[ 5] 3.00-4.00 sec 83.8 MBytes 703 Mbits/sec
|
||||
[ 5] 4.00-5.00 sec 85.9 MBytes 720 Mbits/sec
|
||||
[ 5] 5.00-6.00 sec 78.9 MBytes 662 Mbits/sec
|
||||
[ 5] 6.00-7.00 sec 81.2 MBytes 682 Mbits/sec
|
||||
[ 5] 7.00-8.00 sec 80.5 MBytes 675 Mbits/sec
|
||||
[ 5] 8.00-9.00 sec 79.4 MBytes 666 Mbits/sec
|
||||
[ 5] 9.00-10.00 sec 82.2 MBytes 689 Mbits/sec
|
||||
[ 5] 10.00-11.00 sec 82.0 MBytes 688 Mbits/sec
|
||||
[ 5] 11.00-12.00 sec 84.2 MBytes 707 Mbits/sec
|
||||
[ 5] 12.00-13.00 sec 71.0 MBytes 596 Mbits/sec
|
||||
[ 5] 13.00-14.00 sec 69.4 MBytes 582 Mbits/sec
|
||||
[ 5] 14.00-15.00 sec 80.2 MBytes 673 Mbits/sec
|
||||
[ 5] 15.00-16.00 sec 74.5 MBytes 625 Mbits/sec
|
||||
|
||||
[Rx Counter]:
|
||||
* CCA (CCK, OFDM, Total) = (0, 2455, 2455)
|
||||
* False Alarm (CCK, OFDM, Total) = (0, 69, 69)
|
||||
* CCK cnt (ok, err) = (0, 0)
|
||||
* OFDM cnt (ok, err) = (1239, 2)
|
||||
* HT cnt (ok, err) = (0, 0)
|
||||
* VHT cnt (ok, err) = (21, 12109)
|
||||
|
||||
The "VHT ok" number is not believable.
|
||||
|
||||
And without SUPPORTS_AMSDU_IN_AMPDU:
|
||||
|
||||
Reverse mode, remote host 192.168.0.1 is sending
|
||||
[ 5] local 192.168.0.50 port 50030 connected to 192.168.0.1 port 5201
|
||||
[ ID] Interval Transfer Bitrate
|
||||
[ 5] 0.00-1.00 sec 70.5 MBytes 591 Mbits/sec
|
||||
[ 5] 1.00-2.00 sec 86.9 MBytes 729 Mbits/sec
|
||||
[ 5] 2.00-3.00 sec 98.6 MBytes 827 Mbits/sec
|
||||
[ 5] 3.00-4.00 sec 97.4 MBytes 817 Mbits/sec
|
||||
[ 5] 4.00-5.00 sec 98.6 MBytes 827 Mbits/sec
|
||||
[ 5] 5.00-6.00 sec 96.9 MBytes 813 Mbits/sec
|
||||
[ 5] 6.00-7.00 sec 98.2 MBytes 824 Mbits/sec
|
||||
[ 5] 7.00-8.00 sec 98.0 MBytes 822 Mbits/sec
|
||||
[ 5] 8.00-9.00 sec 99.9 MBytes 838 Mbits/sec
|
||||
[ 5] 9.00-10.00 sec 99.2 MBytes 833 Mbits/sec
|
||||
[ 5] 10.00-11.00 sec 98.0 MBytes 822 Mbits/sec
|
||||
[ 5] 11.00-12.00 sec 98.1 MBytes 823 Mbits/sec
|
||||
[ 5] 12.00-13.00 sec 97.0 MBytes 814 Mbits/sec
|
||||
[ 5] 13.00-14.00 sec 98.2 MBytes 824 Mbits/sec
|
||||
[ 5] 14.00-15.00 sec 98.5 MBytes 826 Mbits/sec
|
||||
[ 5] 15.00-16.00 sec 97.4 MBytes 817 Mbits/sec
|
||||
|
||||
[Rx Counter]:
|
||||
* CCA (CCK, OFDM, Total) = (0, 3860, 3860)
|
||||
* False Alarm (CCK, OFDM, Total) = (0, 2, 2)
|
||||
* CCK cnt (ok, err) = (0, 0)
|
||||
* OFDM cnt (ok, err) = (1486, 0)
|
||||
* HT cnt (ok, err) = (0, 0)
|
||||
* VHT cnt (ok, err) = (7399, 9118)
|
||||
|
||||
Add a new member "amsdu_in_ampdu" in struct rtw_chip_info and use it
|
||||
to set SUPPORTS_AMSDU_IN_AMPDU only for the other chips.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/6202ccfb-feb0-4107-a08d-db2699e179f0@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.c | 3 ++-
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8812a.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8814a.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821a.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 1 +
|
||||
8 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.c
|
||||
@@ -2242,7 +2242,8 @@ int rtw_register_hw(struct rtw_dev *rtwd
|
||||
ieee80211_hw_set(hw, SUPPORTS_PS);
|
||||
ieee80211_hw_set(hw, SUPPORTS_DYNAMIC_PS);
|
||||
ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
|
||||
- ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
|
||||
+ if (rtwdev->chip->amsdu_in_ampdu)
|
||||
+ ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
|
||||
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
|
||||
ieee80211_hw_set(hw, TX_AMSDU);
|
||||
ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS);
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1230,6 +1230,7 @@ struct rtw_chip_info {
|
||||
u16 fw_fifo_addr[RTW_FW_FIFO_MAX];
|
||||
const struct rtw_fwcd_segs *fwcd_segs;
|
||||
|
||||
+ bool amsdu_in_ampdu;
|
||||
u8 usb_tx_agg_desc_num;
|
||||
bool hw_feature_report;
|
||||
u8 c2h_ra_report_size;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8812a.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8812a.c
|
||||
@@ -1076,6 +1076,7 @@ const struct rtw_chip_info rtw8812a_hw_s
|
||||
.rfe_defs = rtw8812a_rfe_defs,
|
||||
.rfe_defs_size = ARRAY_SIZE(rtw8812a_rfe_defs),
|
||||
.rx_ldpc = false,
|
||||
+ .amsdu_in_ampdu = true,
|
||||
.hw_feature_report = false,
|
||||
.c2h_ra_report_size = 4,
|
||||
.old_datarate_fb_limit = true,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8814a.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8814a.c
|
||||
@@ -2200,6 +2200,7 @@ const struct rtw_chip_info rtw8814a_hw_s
|
||||
.rx_ldpc = true,
|
||||
.max_power_index = 0x3f,
|
||||
.ampdu_density = IEEE80211_HT_MPDU_DENSITY_2,
|
||||
+ .amsdu_in_ampdu = false, /* RX speed is better without AMSDU */
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = false,
|
||||
.c2h_ra_report_size = 6,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821a.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821a.c
|
||||
@@ -1176,6 +1176,7 @@ const struct rtw_chip_info rtw8821a_hw_s
|
||||
.rfe_defs = rtw8821a_rfe_defs,
|
||||
.rfe_defs_size = ARRAY_SIZE(rtw8821a_rfe_defs),
|
||||
.rx_ldpc = false,
|
||||
+ .amsdu_in_ampdu = true,
|
||||
.hw_feature_report = false,
|
||||
.c2h_ra_report_size = 4,
|
||||
.old_datarate_fb_limit = true,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -1991,6 +1991,7 @@ const struct rtw_chip_info rtw8821c_hw_s
|
||||
.band = RTW_BAND_2G | RTW_BAND_5G,
|
||||
.page_size = TX_PAGE_SIZE,
|
||||
.dig_min = 0x1c,
|
||||
+ .amsdu_in_ampdu = true,
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = true,
|
||||
.c2h_ra_report_size = 7,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -2532,6 +2532,7 @@ const struct rtw_chip_info rtw8822b_hw_s
|
||||
.band = RTW_BAND_2G | RTW_BAND_5G,
|
||||
.page_size = TX_PAGE_SIZE,
|
||||
.dig_min = 0x1c,
|
||||
+ .amsdu_in_ampdu = true,
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = true,
|
||||
.c2h_ra_report_size = 7,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -5350,6 +5350,7 @@ const struct rtw_chip_info rtw8822c_hw_s
|
||||
.band = RTW_BAND_2G | RTW_BAND_5G,
|
||||
.page_size = TX_PAGE_SIZE,
|
||||
.dig_min = 0x20,
|
||||
+ .amsdu_in_ampdu = true,
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = true,
|
||||
.c2h_ra_report_size = 7,
|
||||
@ -1,230 +0,0 @@
|
||||
From 581cf3a9cb61daae1009c2380b228f40177046d8 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 2 Apr 2025 20:54:30 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Fix the module names printed in dmesg
|
||||
|
||||
The rtw88 module names all start with the "rtw88_" prefix, but the
|
||||
messages in dmesg mostly use the "rtw_" prefix. The messages from
|
||||
rtw88_8723cs don't even have the underscore.
|
||||
|
||||
Use the KBUILD_MODNAME macro in every driver. This ensures that the
|
||||
messages in dmesg will always use the module name.
|
||||
|
||||
Before:
|
||||
|
||||
Mar 17 15:54:19 ideapad2 kernel: rtw_8814au 2-4:1.0: Firmware version 33.6.0, H2C version 6
|
||||
|
||||
After:
|
||||
|
||||
Mar 17 16:33:35 ideapad2 kernel: rtw88_8814au 2-4:1.0: Firmware version 33.6.0, H2C version 6
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/29cd29ba-bc51-4d5b-ad48-a43c6ce72d56@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723cs.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723de.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723ds.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723du.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8812au.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8814ae.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8814au.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821au.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821ce.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821cs.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821cu.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822be.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822bs.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822bu.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822ce.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822cs.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822cu.c | 2 +-
|
||||
17 files changed, 17 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723cs.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723cs.c
|
||||
@@ -19,7 +19,7 @@ static const struct sdio_device_id rtw_8
|
||||
MODULE_DEVICE_TABLE(sdio, rtw_8723cs_id_table);
|
||||
|
||||
static struct sdio_driver rtw_8723cs_driver = {
|
||||
- .name = "rtw8723cs",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8723cs_id_table,
|
||||
.probe = rtw_sdio_probe,
|
||||
.remove = rtw_sdio_remove,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723de.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723de.c
|
||||
@@ -17,7 +17,7 @@ static const struct pci_device_id rtw_87
|
||||
MODULE_DEVICE_TABLE(pci, rtw_8723de_id_table);
|
||||
|
||||
static struct pci_driver rtw_8723de_driver = {
|
||||
- .name = "rtw_8723de",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8723de_id_table,
|
||||
.probe = rtw_pci_probe,
|
||||
.remove = rtw_pci_remove,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723ds.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723ds.c
|
||||
@@ -25,7 +25,7 @@ static const struct sdio_device_id rtw_8
|
||||
MODULE_DEVICE_TABLE(sdio, rtw_8723ds_id_table);
|
||||
|
||||
static struct sdio_driver rtw_8723ds_driver = {
|
||||
- .name = "rtw_8723ds",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.probe = rtw_sdio_probe,
|
||||
.remove = rtw_sdio_remove,
|
||||
.id_table = rtw_8723ds_id_table,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723du.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723du.c
|
||||
@@ -24,7 +24,7 @@ static int rtw8723du_probe(struct usb_in
|
||||
}
|
||||
|
||||
static struct usb_driver rtw_8723du_driver = {
|
||||
- .name = "rtw_8723du",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8723du_id_table,
|
||||
.probe = rtw8723du_probe,
|
||||
.disconnect = rtw_usb_disconnect,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8812au.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8812au.c
|
||||
@@ -82,7 +82,7 @@ static const struct usb_device_id rtw_88
|
||||
MODULE_DEVICE_TABLE(usb, rtw_8812au_id_table);
|
||||
|
||||
static struct usb_driver rtw_8812au_driver = {
|
||||
- .name = "rtw_8812au",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8812au_id_table,
|
||||
.probe = rtw_usb_probe,
|
||||
.disconnect = rtw_usb_disconnect,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8814ae.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8814ae.c
|
||||
@@ -17,7 +17,7 @@ static const struct pci_device_id rtw_88
|
||||
MODULE_DEVICE_TABLE(pci, rtw_8814ae_id_table);
|
||||
|
||||
static struct pci_driver rtw_8814ae_driver = {
|
||||
- .name = "rtw_8814ae",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8814ae_id_table,
|
||||
.probe = rtw_pci_probe,
|
||||
.remove = rtw_pci_remove,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8814au.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8814au.c
|
||||
@@ -42,7 +42,7 @@ static const struct usb_device_id rtw_88
|
||||
MODULE_DEVICE_TABLE(usb, rtw_8814au_id_table);
|
||||
|
||||
static struct usb_driver rtw_8814au_driver = {
|
||||
- .name = "rtw_8814au",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8814au_id_table,
|
||||
.probe = rtw_usb_probe,
|
||||
.disconnect = rtw_usb_disconnect,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821au.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821au.c
|
||||
@@ -66,7 +66,7 @@ static const struct usb_device_id rtw_88
|
||||
MODULE_DEVICE_TABLE(usb, rtw_8821au_id_table);
|
||||
|
||||
static struct usb_driver rtw_8821au_driver = {
|
||||
- .name = "rtw_8821au",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8821au_id_table,
|
||||
.probe = rtw_usb_probe,
|
||||
.disconnect = rtw_usb_disconnect,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821ce.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821ce.c
|
||||
@@ -21,7 +21,7 @@ static const struct pci_device_id rtw_88
|
||||
MODULE_DEVICE_TABLE(pci, rtw_8821ce_id_table);
|
||||
|
||||
static struct pci_driver rtw_8821ce_driver = {
|
||||
- .name = "rtw_8821ce",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8821ce_id_table,
|
||||
.probe = rtw_pci_probe,
|
||||
.remove = rtw_pci_remove,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821cs.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821cs.c
|
||||
@@ -20,7 +20,7 @@ static const struct sdio_device_id rtw_8
|
||||
MODULE_DEVICE_TABLE(sdio, rtw_8821cs_id_table);
|
||||
|
||||
static struct sdio_driver rtw_8821cs_driver = {
|
||||
- .name = "rtw_8821cs",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.probe = rtw_sdio_probe,
|
||||
.remove = rtw_sdio_remove,
|
||||
.id_table = rtw_8821cs_id_table,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821cu.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821cu.c
|
||||
@@ -48,7 +48,7 @@ static int rtw_8821cu_probe(struct usb_i
|
||||
}
|
||||
|
||||
static struct usb_driver rtw_8821cu_driver = {
|
||||
- .name = "rtw_8821cu",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8821cu_id_table,
|
||||
.probe = rtw_8821cu_probe,
|
||||
.disconnect = rtw_usb_disconnect,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822be.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822be.c
|
||||
@@ -17,7 +17,7 @@ static const struct pci_device_id rtw_88
|
||||
MODULE_DEVICE_TABLE(pci, rtw_8822be_id_table);
|
||||
|
||||
static struct pci_driver rtw_8822be_driver = {
|
||||
- .name = "rtw_8822be",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8822be_id_table,
|
||||
.probe = rtw_pci_probe,
|
||||
.remove = rtw_pci_remove,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822bs.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822bs.c
|
||||
@@ -20,7 +20,7 @@ static const struct sdio_device_id rtw_8
|
||||
MODULE_DEVICE_TABLE(sdio, rtw_8822bs_id_table);
|
||||
|
||||
static struct sdio_driver rtw_8822bs_driver = {
|
||||
- .name = "rtw_8822bs",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.probe = rtw_sdio_probe,
|
||||
.remove = rtw_sdio_remove,
|
||||
.id_table = rtw_8822bs_id_table,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822bu.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822bu.c
|
||||
@@ -88,7 +88,7 @@ static int rtw8822bu_probe(struct usb_in
|
||||
}
|
||||
|
||||
static struct usb_driver rtw_8822bu_driver = {
|
||||
- .name = "rtw_8822bu",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8822bu_id_table,
|
||||
.probe = rtw8822bu_probe,
|
||||
.disconnect = rtw_usb_disconnect,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c
|
||||
@@ -21,7 +21,7 @@ static const struct pci_device_id rtw_88
|
||||
MODULE_DEVICE_TABLE(pci, rtw_8822ce_id_table);
|
||||
|
||||
static struct pci_driver rtw_8822ce_driver = {
|
||||
- .name = "rtw_8822ce",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8822ce_id_table,
|
||||
.probe = rtw_pci_probe,
|
||||
.remove = rtw_pci_remove,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822cs.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822cs.c
|
||||
@@ -20,7 +20,7 @@ static const struct sdio_device_id rtw_8
|
||||
MODULE_DEVICE_TABLE(sdio, rtw_8822cs_id_table);
|
||||
|
||||
static struct sdio_driver rtw_8822cs_driver = {
|
||||
- .name = "rtw_8822cs",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.probe = rtw_sdio_probe,
|
||||
.remove = rtw_sdio_remove,
|
||||
.id_table = rtw_8822cs_id_table,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822cu.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822cu.c
|
||||
@@ -32,7 +32,7 @@ static int rtw8822cu_probe(struct usb_in
|
||||
}
|
||||
|
||||
static struct usb_driver rtw_8822cu_driver = {
|
||||
- .name = "rtw_8822cu",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.id_table = rtw_8822cu_id_table,
|
||||
.probe = rtw8822cu_probe,
|
||||
.disconnect = rtw_usb_disconnect,
|
||||
@ -1,36 +0,0 @@
|
||||
From b2effcdc237979dcc533d446a792fc54fd0e1213 Mon Sep 17 00:00:00 2001
|
||||
From: Zhen XIN <zhen.xin@nokia-sbell.com>
|
||||
Date: Thu, 10 Apr 2025 15:42:17 +0000
|
||||
Subject: [PATCH] wifi: rtw88: sdio: map mgmt frames to queue TX_DESC_QSEL_MGMT
|
||||
|
||||
The rtw88-sdio do not work in AP mode due to the lack of TX status report
|
||||
for management frames.
|
||||
|
||||
Map the management frames to queue TX_DESC_QSEL_MGMT, which enables the
|
||||
chip to generate TX reports for these frames
|
||||
|
||||
Tested-on: rtl8723ds
|
||||
|
||||
Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets")
|
||||
Signed-off-by: Zhen XIN <zhen.xin@nokia-sbell.com>
|
||||
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250410154217.1849977-3-zhen.xin@nokia-sbell.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -718,10 +718,7 @@ static u8 rtw_sdio_get_tx_qsel(struct rt
|
||||
case RTW_TX_QUEUE_H2C:
|
||||
return TX_DESC_QSEL_H2C;
|
||||
case RTW_TX_QUEUE_MGMT:
|
||||
- if (rtw_chip_wcpu_11n(rtwdev))
|
||||
- return TX_DESC_QSEL_HIGH;
|
||||
- else
|
||||
- return TX_DESC_QSEL_MGMT;
|
||||
+ return TX_DESC_QSEL_MGMT;
|
||||
case RTW_TX_QUEUE_HI0:
|
||||
return TX_DESC_QSEL_HIGH;
|
||||
default:
|
||||
@ -1,37 +0,0 @@
|
||||
From fc5f5a0ec463ae6a07850428bd3082947e01d276 Mon Sep 17 00:00:00 2001
|
||||
From: Zhen XIN <zhen.xin@nokia-sbell.com>
|
||||
Date: Thu, 10 Apr 2025 15:42:16 +0000
|
||||
Subject: [PATCH] wifi: rtw88: sdio: call rtw_sdio_indicate_tx_status
|
||||
unconditionally
|
||||
|
||||
The rtw88-sdio do not work in AP mode due to the lack of TX status report
|
||||
for management frames.
|
||||
|
||||
Make the invocation of rtw_sdio_indicate_tx_status unconditional and cover
|
||||
all packet queues
|
||||
|
||||
Tested-on: rtl8723ds
|
||||
|
||||
Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets")
|
||||
Signed-off-by: Zhen XIN <zhen.xin@nokia-sbell.com>
|
||||
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250410154217.1849977-2-zhen.xin@nokia-sbell.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -1224,10 +1224,7 @@ static void rtw_sdio_process_tx_queue(st
|
||||
return;
|
||||
}
|
||||
|
||||
- if (queue <= RTW_TX_QUEUE_VO)
|
||||
- rtw_sdio_indicate_tx_status(rtwdev, skb);
|
||||
- else
|
||||
- dev_kfree_skb_any(skb);
|
||||
+ rtw_sdio_indicate_tx_status(rtwdev, skb);
|
||||
}
|
||||
|
||||
static void rtw_sdio_tx_handler(struct work_struct *work)
|
||||
@ -1,32 +0,0 @@
|
||||
From 20d3c19bd8f9b498173c198eadf54580c8caa336 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Antipov <dmantipov@yandex.ru>
|
||||
Date: Tue, 15 Apr 2025 12:07:20 +0300
|
||||
Subject: [PATCH] wifi: rtw88: do not ignore hardware read error during DPK
|
||||
|
||||
In 'rtw8822c_dpk_cal_coef1()', do not ignore error returned
|
||||
by 'check_hw_ready()' but issue a warning to denote possible
|
||||
DPK issue. Compile tested only.
|
||||
|
||||
Found by Linux Verification Center (linuxtesting.org) with SVACE.
|
||||
|
||||
Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support")
|
||||
Suggested-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250415090720.194048-1-dmantipov@yandex.ru
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -3951,7 +3951,8 @@ static void rtw8822c_dpk_cal_coef1(struc
|
||||
rtw_write32(rtwdev, REG_NCTL0, 0x00001148);
|
||||
rtw_write32(rtwdev, REG_NCTL0, 0x00001149);
|
||||
|
||||
- check_hw_ready(rtwdev, 0x2d9c, MASKBYTE0, 0x55);
|
||||
+ if (!check_hw_ready(rtwdev, 0x2d9c, MASKBYTE0, 0x55))
|
||||
+ rtw_warn(rtwdev, "DPK stuck, performance may be suboptimal");
|
||||
|
||||
rtw_write8(rtwdev, 0x1b10, 0x0);
|
||||
rtw_write32_mask(rtwdev, REG_NCTL0, BIT_SUBPAGE, 0x0000000c);
|
||||
@ -1,44 +0,0 @@
|
||||
From 0ffa1ba81b35ba147c9df6206a61499a156b0128 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Fri, 2 May 2025 14:49:01 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Fix RX aggregation settings for RTL8723DS
|
||||
|
||||
Use the same RX aggregation size and timeout used by the out-of-tree
|
||||
RTL8723DS driver. Also set mystery bit 31 of REG_RXDMA_AGG_PG_TH. This
|
||||
improves the RX speed from ~44 Mbps to ~67 Mbps.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/4c79fdc1-54bc-4986-9931-bb3ceb418b97@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -677,12 +677,22 @@ static void rtw_sdio_enable_rx_aggregati
|
||||
{
|
||||
u8 size, timeout;
|
||||
|
||||
- if (rtw_chip_wcpu_11n(rtwdev)) {
|
||||
+ switch (rtwdev->chip->id) {
|
||||
+ case RTW_CHIP_TYPE_8703B:
|
||||
+ case RTW_CHIP_TYPE_8821A:
|
||||
+ case RTW_CHIP_TYPE_8812A:
|
||||
size = 0x6;
|
||||
timeout = 0x6;
|
||||
- } else {
|
||||
+ break;
|
||||
+ case RTW_CHIP_TYPE_8723D:
|
||||
+ size = 0xa;
|
||||
+ timeout = 0x3;
|
||||
+ rtw_write8_set(rtwdev, REG_RXDMA_AGG_PG_TH + 3, BIT(7));
|
||||
+ break;
|
||||
+ default:
|
||||
size = 0xff;
|
||||
timeout = 0x1;
|
||||
+ break;
|
||||
}
|
||||
|
||||
/* Make the firmware honor the size limit configured below */
|
||||
@ -1,198 +0,0 @@
|
||||
From 2c17afde9ff6713f3e080ed1ea1a4bd7480be9aa Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Fri, 2 May 2025 14:49:34 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Handle RTL8723D(S) with blank efuse
|
||||
|
||||
Some users have RTL8723DS chips with nearly blank efuse. Currently these
|
||||
chips cannot connect when using rtw88, but they do work using the old
|
||||
out-of-tree driver.
|
||||
|
||||
Use reasonable default values for TX power, antenna configuration, and
|
||||
crystal cap if the chip's efuse is missing these things.
|
||||
|
||||
RTL8723D can use the same default values as RTL8703B, so simply move
|
||||
the code from rtl8703b_read_efuse() to the shared function
|
||||
__rtl8723x_read_efuse().
|
||||
|
||||
Link: https://github.com/lwfinger/rtw88/issues/157
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/5734afe7-0870-40b2-acd4-5657a02d7c56@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 60 -------------------
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723x.c | 59 ++++++++++++++++++
|
||||
2 files changed, 59 insertions(+), 60 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -519,15 +519,6 @@ static const struct rtw_rqpn rqpn_table_
|
||||
RTW_DMA_MAPPING_EXTRA, RTW_DMA_MAPPING_HIGH},
|
||||
};
|
||||
|
||||
-/* Default power index table for RTL8703B, used if EFUSE does not
|
||||
- * contain valid data. Replaces EFUSE data from offset 0x10 (start of
|
||||
- * txpwr_idx_table).
|
||||
- */
|
||||
-static const u8 rtw8703b_txpwr_idx_table[] = {
|
||||
- 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D,
|
||||
- 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x02
|
||||
-};
|
||||
-
|
||||
static void try_mac_from_devicetree(struct rtw_dev *rtwdev)
|
||||
{
|
||||
struct device_node *node = rtwdev->dev->of_node;
|
||||
@@ -544,15 +535,9 @@ static void try_mac_from_devicetree(stru
|
||||
}
|
||||
}
|
||||
|
||||
-#define DBG_EFUSE_FIX(rtwdev, name) \
|
||||
- rtw_dbg(rtwdev, RTW_DBG_EFUSE, "Fixed invalid EFUSE value: " \
|
||||
- # name "=0x%x\n", rtwdev->efuse.name)
|
||||
-
|
||||
static int rtw8703b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)
|
||||
{
|
||||
struct rtw_efuse *efuse = &rtwdev->efuse;
|
||||
- u8 *pwr = (u8 *)efuse->txpwr_idx_table;
|
||||
- bool valid = false;
|
||||
int ret;
|
||||
|
||||
ret = rtw8723x_read_efuse(rtwdev, log_map);
|
||||
@@ -562,51 +547,6 @@ static int rtw8703b_read_efuse(struct rt
|
||||
if (!is_valid_ether_addr(efuse->addr))
|
||||
try_mac_from_devicetree(rtwdev);
|
||||
|
||||
- /* If TX power index table in EFUSE is invalid, fall back to
|
||||
- * built-in table.
|
||||
- */
|
||||
- for (int i = 0; i < ARRAY_SIZE(rtw8703b_txpwr_idx_table); i++)
|
||||
- if (pwr[i] != 0xff) {
|
||||
- valid = true;
|
||||
- break;
|
||||
- }
|
||||
- if (!valid) {
|
||||
- for (int i = 0; i < ARRAY_SIZE(rtw8703b_txpwr_idx_table); i++)
|
||||
- pwr[i] = rtw8703b_txpwr_idx_table[i];
|
||||
- rtw_dbg(rtwdev, RTW_DBG_EFUSE,
|
||||
- "Replaced invalid EFUSE TX power index table.");
|
||||
- rtw8723x_debug_txpwr_limit(rtwdev,
|
||||
- efuse->txpwr_idx_table, 2);
|
||||
- }
|
||||
-
|
||||
- /* Override invalid antenna settings. */
|
||||
- if (efuse->bt_setting == 0xff) {
|
||||
- /* shared antenna */
|
||||
- efuse->bt_setting |= BIT(0);
|
||||
- /* RF path A */
|
||||
- efuse->bt_setting &= ~BIT(6);
|
||||
- DBG_EFUSE_FIX(rtwdev, bt_setting);
|
||||
- }
|
||||
-
|
||||
- /* Override invalid board options: The coex code incorrectly
|
||||
- * assumes that if bits 6 & 7 are set the board doesn't
|
||||
- * support coex. Regd is also derived from rf_board_option and
|
||||
- * should be 0 if there's no valid data.
|
||||
- */
|
||||
- if (efuse->rf_board_option == 0xff) {
|
||||
- efuse->regd = 0;
|
||||
- efuse->rf_board_option &= GENMASK(5, 0);
|
||||
- DBG_EFUSE_FIX(rtwdev, rf_board_option);
|
||||
- }
|
||||
-
|
||||
- /* Override invalid crystal cap setting, default comes from
|
||||
- * vendor driver. Chip specific.
|
||||
- */
|
||||
- if (efuse->crystal_cap == 0xff) {
|
||||
- efuse->crystal_cap = 0x20;
|
||||
- DBG_EFUSE_FIX(rtwdev, crystal_cap);
|
||||
- }
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723x.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723x.c
|
||||
@@ -69,6 +69,9 @@ static void __rtw8723x_lck(struct rtw_de
|
||||
#define DBG_EFUSE_2BYTE(rtwdev, map, name) \
|
||||
rtw_dbg(rtwdev, RTW_DBG_EFUSE, # name "=0x%02x%02x\n", \
|
||||
(map)->name[0], (map)->name[1])
|
||||
+#define DBG_EFUSE_FIX(rtwdev, name) \
|
||||
+ rtw_dbg(rtwdev, RTW_DBG_EFUSE, "Fixed invalid EFUSE value: " \
|
||||
+ # name "=0x%x\n", rtwdev->efuse.name)
|
||||
|
||||
static void rtw8723xe_efuse_debug(struct rtw_dev *rtwdev,
|
||||
struct rtw8723x_efuse *map)
|
||||
@@ -238,10 +241,21 @@ static void rtw8723xs_efuse_parsing(stru
|
||||
ether_addr_copy(efuse->addr, map->s.mac_addr);
|
||||
}
|
||||
|
||||
+/* Default power index table for RTL8703B/RTL8723D, used if EFUSE does
|
||||
+ * not contain valid data. Replaces EFUSE data from offset 0x10 (start
|
||||
+ * of txpwr_idx_table).
|
||||
+ */
|
||||
+static const u8 rtw8723x_txpwr_idx_table[] = {
|
||||
+ 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D,
|
||||
+ 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x02
|
||||
+};
|
||||
+
|
||||
static int __rtw8723x_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)
|
||||
{
|
||||
struct rtw_efuse *efuse = &rtwdev->efuse;
|
||||
+ u8 *pwr = (u8 *)efuse->txpwr_idx_table;
|
||||
struct rtw8723x_efuse *map;
|
||||
+ bool valid = false;
|
||||
int i;
|
||||
|
||||
map = (struct rtw8723x_efuse *)log_map;
|
||||
@@ -279,6 +293,51 @@ static int __rtw8723x_read_efuse(struct
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
+ /* If TX power index table in EFUSE is invalid, fall back to
|
||||
+ * built-in table.
|
||||
+ */
|
||||
+ for (i = 0; i < ARRAY_SIZE(rtw8723x_txpwr_idx_table); i++)
|
||||
+ if (pwr[i] != 0xff) {
|
||||
+ valid = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (!valid) {
|
||||
+ for (i = 0; i < ARRAY_SIZE(rtw8723x_txpwr_idx_table); i++)
|
||||
+ pwr[i] = rtw8723x_txpwr_idx_table[i];
|
||||
+ rtw_dbg(rtwdev, RTW_DBG_EFUSE,
|
||||
+ "Replaced invalid EFUSE TX power index table.");
|
||||
+ rtw8723x_debug_txpwr_limit(rtwdev,
|
||||
+ efuse->txpwr_idx_table, 2);
|
||||
+ }
|
||||
+
|
||||
+ /* Override invalid antenna settings. */
|
||||
+ if (efuse->bt_setting == 0xff) {
|
||||
+ /* shared antenna */
|
||||
+ efuse->bt_setting |= BIT(0);
|
||||
+ /* RF path A */
|
||||
+ efuse->bt_setting &= ~BIT(6);
|
||||
+ DBG_EFUSE_FIX(rtwdev, bt_setting);
|
||||
+ }
|
||||
+
|
||||
+ /* Override invalid board options: The coex code incorrectly
|
||||
+ * assumes that if bits 6 & 7 are set the board doesn't
|
||||
+ * support coex. Regd is also derived from rf_board_option and
|
||||
+ * should be 0 if there's no valid data.
|
||||
+ */
|
||||
+ if (efuse->rf_board_option == 0xff) {
|
||||
+ efuse->regd = 0;
|
||||
+ efuse->rf_board_option &= GENMASK(5, 0);
|
||||
+ DBG_EFUSE_FIX(rtwdev, rf_board_option);
|
||||
+ }
|
||||
+
|
||||
+ /* Override invalid crystal cap setting, default comes from
|
||||
+ * vendor driver. Chip specific.
|
||||
+ */
|
||||
+ if (efuse->crystal_cap == 0xff) {
|
||||
+ efuse->crystal_cap = 0x20;
|
||||
+ DBG_EFUSE_FIX(rtwdev, crystal_cap);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
From b7f0cc647e52296a3d4dd727b6479dcd6d7e364e Mon Sep 17 00:00:00 2001
|
||||
From: Yuuki NAGAO <wf.yn386@gmail.com>
|
||||
Date: Sat, 3 May 2025 09:32:27 +0900
|
||||
Subject: [PATCH] wifi: rtw88: rtw8822bu VID/PID for BUFFALO WI-U2-866DM
|
||||
|
||||
Add VID/PID 0411/03d1 for recently released
|
||||
BUFFALO WI-U2-866DM USB WiFi adapter.
|
||||
|
||||
Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250503003227.6673-1-wf.yn386@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822bu.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822bu.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822bu.c
|
||||
@@ -77,6 +77,8 @@ static const struct usb_device_id rtw_88
|
||||
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Mercusys MA30N */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x3322, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* D-Link DWA-T185 rev. A1 */
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(0x0411, 0x03d1, 0xff, 0xff, 0xff),
|
||||
+ .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* BUFFALO WI-U2-866DM */
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, rtw_8822bu_id_table);
|
||||
@ -1,52 +0,0 @@
|
||||
From 490340faddea461319652ce36dbc7c1b4482c35e Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Sat, 10 May 2025 15:21:25 +0300
|
||||
Subject: [PATCH] wifi: rtw88: usb: Reduce control message timeout to 500 ms
|
||||
|
||||
RTL8811AU stops responding during the firmware download on some systems:
|
||||
|
||||
[ 809.256440] rtw_8821au 5-2.1:1.0: Firmware version 42.4.0, H2C version 0
|
||||
[ 812.759142] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: renamed from wlan0
|
||||
[ 837.315388] rtw_8821au 1-4:1.0: write register 0x1ef4 failed with -110
|
||||
[ 867.524259] rtw_8821au 1-4:1.0: write register 0x1ef8 failed with -110
|
||||
[ 868.930976] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: entered promiscuous mode
|
||||
[ 897.730952] rtw_8821au 1-4:1.0: write register 0x1efc failed with -110
|
||||
|
||||
Each write takes 30 seconds to fail because that's the timeout currently
|
||||
used for control messages in rtw_usb_write().
|
||||
|
||||
In this scenario the firmware download takes at least 2000 seconds.
|
||||
Because this is done from the USB probe function, the long delay makes
|
||||
other things in the system hang.
|
||||
|
||||
Reduce the timeout to 500 ms. This is the value used by the official USB
|
||||
wifi drivers from Realtek.
|
||||
|
||||
Of course this only makes things hang for ~30 seconds instead of ~30
|
||||
minutes. It doesn't fix the firmware download.
|
||||
|
||||
Tested with RTL8822CU, RTL8812BU, RTL8811CU, RTL8814AU, RTL8811AU,
|
||||
RTL8812AU, RTL8821AU, RTL8723DU.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: a82dfd33d123 ("wifi: rtw88: Add common USB chip support")
|
||||
Link: https://github.com/lwfinger/rtw88/issues/344
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/1e35dd26-3f10-40b1-b2b4-f72184a26611@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/usb.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -139,7 +139,7 @@ static void rtw_usb_write(struct rtw_dev
|
||||
|
||||
ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTW_USB_CMD_REQ, RTW_USB_CMD_WRITE,
|
||||
- addr, 0, data, len, 30000);
|
||||
+ addr, 0, data, len, 500);
|
||||
if (ret < 0 && ret != -ENODEV && count++ < 4)
|
||||
rtw_err(rtwdev, "write register 0x%x failed with %d\n",
|
||||
addr, ret);
|
||||
@ -1,214 +0,0 @@
|
||||
From 80fe0bc1659c0ccc79d082e426fa376be5df9c04 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Sat, 10 May 2025 15:22:24 +0300
|
||||
Subject: [PATCH] wifi: rtw88: usb: Upload the firmware in bigger chunks
|
||||
|
||||
RTL8811AU stops responding during the firmware download on some systems:
|
||||
|
||||
[ 809.256440] rtw_8821au 5-2.1:1.0: Firmware version 42.4.0, H2C version 0
|
||||
[ 812.759142] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: renamed from wlan0
|
||||
[ 837.315388] rtw_8821au 1-4:1.0: write register 0x1ef4 failed with -110
|
||||
[ 867.524259] rtw_8821au 1-4:1.0: write register 0x1ef8 failed with -110
|
||||
[ 868.930976] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: entered promiscuous mode
|
||||
[ 897.730952] rtw_8821au 1-4:1.0: write register 0x1efc failed with -110
|
||||
|
||||
Maybe it takes too long when writing the firmware 4 bytes at a time.
|
||||
|
||||
Write 196 bytes at a time for RTL8821AU, RTL8811AU, and RTL8812AU,
|
||||
and 254 bytes at a time for RTL8723DU. These are the sizes used in
|
||||
their official drivers. Tested with all these chips.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Link: https://github.com/lwfinger/rtw88/issues/344
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/43f1daad-3ec0-4a3b-a50c-9cd9eb2c2f52@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/hci.h | 8 ++++
|
||||
drivers/net/wireless/realtek/rtw88/mac.c | 11 +++--
|
||||
drivers/net/wireless/realtek/rtw88/mac.h | 2 +
|
||||
drivers/net/wireless/realtek/rtw88/pci.c | 2 +
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 2 +
|
||||
drivers/net/wireless/realtek/rtw88/usb.c | 55 +++++++++++++++++++++++
|
||||
6 files changed, 76 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/hci.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/hci.h
|
||||
@@ -19,6 +19,8 @@ struct rtw_hci_ops {
|
||||
void (*link_ps)(struct rtw_dev *rtwdev, bool enter);
|
||||
void (*interface_cfg)(struct rtw_dev *rtwdev);
|
||||
void (*dynamic_rx_agg)(struct rtw_dev *rtwdev, bool enable);
|
||||
+ void (*write_firmware_page)(struct rtw_dev *rtwdev, u32 page,
|
||||
+ const u8 *data, u32 size);
|
||||
|
||||
int (*write_data_rsvd_page)(struct rtw_dev *rtwdev, u8 *buf, u32 size);
|
||||
int (*write_data_h2c)(struct rtw_dev *rtwdev, u8 *buf, u32 size);
|
||||
@@ -79,6 +81,12 @@ static inline void rtw_hci_dynamic_rx_ag
|
||||
rtwdev->hci.ops->dynamic_rx_agg(rtwdev, enable);
|
||||
}
|
||||
|
||||
+static inline void rtw_hci_write_firmware_page(struct rtw_dev *rtwdev, u32 page,
|
||||
+ const u8 *data, u32 size)
|
||||
+{
|
||||
+ rtwdev->hci.ops->write_firmware_page(rtwdev, page, data, size);
|
||||
+}
|
||||
+
|
||||
static inline int
|
||||
rtw_hci_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf, u32 size)
|
||||
{
|
||||
--- a/drivers/net/wireless/realtek/rtw88/mac.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/mac.c
|
||||
@@ -856,8 +856,8 @@ fwdl_ready:
|
||||
}
|
||||
}
|
||||
|
||||
-static void
|
||||
-write_firmware_page(struct rtw_dev *rtwdev, u32 page, const u8 *data, u32 size)
|
||||
+void rtw_write_firmware_page(struct rtw_dev *rtwdev, u32 page,
|
||||
+ const u8 *data, u32 size)
|
||||
{
|
||||
u32 val32;
|
||||
u32 block_nr;
|
||||
@@ -887,6 +887,7 @@ write_firmware_page(struct rtw_dev *rtwd
|
||||
rtw_write32(rtwdev, write_addr, le32_to_cpu(remain_data));
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_write_firmware_page);
|
||||
|
||||
static int
|
||||
download_firmware_legacy(struct rtw_dev *rtwdev, const u8 *data, u32 size)
|
||||
@@ -904,11 +905,13 @@ download_firmware_legacy(struct rtw_dev
|
||||
rtw_write8_set(rtwdev, REG_MCUFW_CTRL, BIT_FWDL_CHK_RPT);
|
||||
|
||||
for (page = 0; page < total_page; page++) {
|
||||
- write_firmware_page(rtwdev, page, data, DLFW_PAGE_SIZE_LEGACY);
|
||||
+ rtw_hci_write_firmware_page(rtwdev, page, data,
|
||||
+ DLFW_PAGE_SIZE_LEGACY);
|
||||
data += DLFW_PAGE_SIZE_LEGACY;
|
||||
}
|
||||
if (last_page_size)
|
||||
- write_firmware_page(rtwdev, page, data, last_page_size);
|
||||
+ rtw_hci_write_firmware_page(rtwdev, page, data,
|
||||
+ last_page_size);
|
||||
|
||||
if (!check_hw_ready(rtwdev, REG_MCUFW_CTRL, BIT_FWDL_CHK_RPT, 1)) {
|
||||
rtw_err(rtwdev, "failed to check download firmware report\n");
|
||||
--- a/drivers/net/wireless/realtek/rtw88/mac.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/mac.h
|
||||
@@ -34,6 +34,8 @@ int rtw_pwr_seq_parser(struct rtw_dev *r
|
||||
const struct rtw_pwr_seq_cmd * const *cmd_seq);
|
||||
int rtw_mac_power_on(struct rtw_dev *rtwdev);
|
||||
void rtw_mac_power_off(struct rtw_dev *rtwdev);
|
||||
+void rtw_write_firmware_page(struct rtw_dev *rtwdev, u32 page,
|
||||
+ const u8 *data, u32 size);
|
||||
int rtw_download_firmware(struct rtw_dev *rtwdev, struct rtw_fw_state *fw);
|
||||
int rtw_mac_init(struct rtw_dev *rtwdev);
|
||||
void rtw_mac_flush_queues(struct rtw_dev *rtwdev, u32 queues, bool drop);
|
||||
--- a/drivers/net/wireless/realtek/rtw88/pci.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "fw.h"
|
||||
#include "ps.h"
|
||||
#include "debug.h"
|
||||
+#include "mac.h"
|
||||
|
||||
static bool rtw_disable_msi;
|
||||
static bool rtw_pci_disable_aspm;
|
||||
@@ -1602,6 +1603,7 @@ static const struct rtw_hci_ops rtw_pci_
|
||||
.link_ps = rtw_pci_link_ps,
|
||||
.interface_cfg = rtw_pci_interface_cfg,
|
||||
.dynamic_rx_agg = NULL,
|
||||
+ .write_firmware_page = rtw_write_firmware_page,
|
||||
|
||||
.read8 = rtw_pci_read8,
|
||||
.read16 = rtw_pci_read16,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mmc/sdio_func.h>
|
||||
#include "main.h"
|
||||
+#include "mac.h"
|
||||
#include "debug.h"
|
||||
#include "fw.h"
|
||||
#include "ps.h"
|
||||
@@ -1164,6 +1165,7 @@ static const struct rtw_hci_ops rtw_sdio
|
||||
.link_ps = rtw_sdio_link_ps,
|
||||
.interface_cfg = rtw_sdio_interface_cfg,
|
||||
.dynamic_rx_agg = NULL,
|
||||
+ .write_firmware_page = rtw_write_firmware_page,
|
||||
|
||||
.read8 = rtw_sdio_read8,
|
||||
.read16 = rtw_sdio_read16,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -165,6 +165,60 @@ static void rtw_usb_write32(struct rtw_d
|
||||
rtw_usb_write(rtwdev, addr, val, 4);
|
||||
}
|
||||
|
||||
+static void rtw_usb_write_firmware_page(struct rtw_dev *rtwdev, u32 page,
|
||||
+ const u8 *data, u32 size)
|
||||
+{
|
||||
+ struct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);
|
||||
+ struct usb_device *udev = rtwusb->udev;
|
||||
+ u32 addr = FW_START_ADDR_LEGACY;
|
||||
+ u8 *data_dup, *buf;
|
||||
+ u32 n, block_size;
|
||||
+ int ret;
|
||||
+
|
||||
+ switch (rtwdev->chip->id) {
|
||||
+ case RTW_CHIP_TYPE_8723D:
|
||||
+ block_size = 254;
|
||||
+ break;
|
||||
+ default:
|
||||
+ block_size = 196;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ data_dup = kmemdup(data, size, GFP_KERNEL);
|
||||
+ if (!data_dup)
|
||||
+ return;
|
||||
+
|
||||
+ buf = data_dup;
|
||||
+
|
||||
+ rtw_write32_mask(rtwdev, REG_MCUFW_CTRL, BIT_ROM_PGE, page);
|
||||
+
|
||||
+ while (size > 0) {
|
||||
+ if (size >= block_size)
|
||||
+ n = block_size;
|
||||
+ else if (size >= 8)
|
||||
+ n = 8;
|
||||
+ else
|
||||
+ n = 1;
|
||||
+
|
||||
+ ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
+ RTW_USB_CMD_REQ, RTW_USB_CMD_WRITE,
|
||||
+ addr, 0, buf, n, 500);
|
||||
+ if (ret != n) {
|
||||
+ if (ret != -ENODEV)
|
||||
+ rtw_err(rtwdev,
|
||||
+ "write 0x%x len %d failed: %d\n",
|
||||
+ addr, n, ret);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ addr += n;
|
||||
+ buf += n;
|
||||
+ size -= n;
|
||||
+ }
|
||||
+
|
||||
+ kfree(data_dup);
|
||||
+}
|
||||
+
|
||||
static int dma_mapping_to_ep(enum rtw_dma_mapping dma_mapping)
|
||||
{
|
||||
switch (dma_mapping) {
|
||||
@@ -892,6 +946,7 @@ static const struct rtw_hci_ops rtw_usb_
|
||||
.link_ps = rtw_usb_link_ps,
|
||||
.interface_cfg = rtw_usb_interface_cfg,
|
||||
.dynamic_rx_agg = rtw_usb_dynamic_rx_agg,
|
||||
+ .write_firmware_page = rtw_usb_write_firmware_page,
|
||||
|
||||
.write8 = rtw_usb_write8,
|
||||
.write16 = rtw_usb_write16,
|
||||
@ -1,73 +0,0 @@
|
||||
From f24d0d8c3cd7e4237f802c4d2f3bd4ac04572948 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Sat, 10 May 2025 16:12:34 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Fix the random "error beacon valid" messages for
|
||||
USB
|
||||
|
||||
All the USB devices have a problem in AP mode: uploading the updated
|
||||
beacon to the chip's reserved page can randomly fail:
|
||||
|
||||
[34996.474304] rtw88_8723du 1-2:1.2: error beacon valid
|
||||
[34996.474788] rtw88_8723du 1-2:1.2: failed to download drv rsvd page
|
||||
[34999.956369] rtw88_8723du 1-2:1.2: error beacon valid
|
||||
[34999.956846] rtw88_8723du 1-2:1.2: failed to download drv rsvd page
|
||||
[34999.956855] rtw88_8723du 1-2:1.2: failed to download beacon
|
||||
[35017.978296] rtw88_8723du 1-2:1.2: error beacon valid
|
||||
[35017.978805] rtw88_8723du 1-2:1.2: failed to download drv rsvd page
|
||||
[35017.978823] rtw88_8723du 1-2:1.2: failed to download beacon
|
||||
[35023.200395] rtw88_8723du 1-2:1.2: error beacon valid
|
||||
[35023.200869] rtw88_8723du 1-2:1.2: failed to download drv rsvd page
|
||||
[35023.200875] rtw88_8723du 1-2:1.2: failed to download beacon
|
||||
[35478.680547] rtw88_8723du 1-2:1.2: error beacon valid
|
||||
[35478.681023] rtw88_8723du 1-2:1.2: failed to download drv rsvd page
|
||||
|
||||
Disable some beacon-related hardware functions before uploading the
|
||||
beacon and enable them again after.
|
||||
|
||||
Tested with RTL8723DU, RTL8812BU, RTL8822CE.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/c248c40a-d432-47ed-90e0-d81ee6c32464@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/fw.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
@@ -1466,7 +1466,7 @@ void rtw_add_rsvd_page_sta(struct rtw_de
|
||||
int rtw_fw_write_data_rsvd_page(struct rtw_dev *rtwdev, u16 pg_addr,
|
||||
u8 *buf, u32 size)
|
||||
{
|
||||
- u8 bckp[2];
|
||||
+ u8 bckp[3];
|
||||
u8 val;
|
||||
u16 rsvd_pg_head;
|
||||
u32 bcn_valid_addr;
|
||||
@@ -1478,6 +1478,8 @@ int rtw_fw_write_data_rsvd_page(struct r
|
||||
if (!size)
|
||||
return -EINVAL;
|
||||
|
||||
+ bckp[2] = rtw_read8(rtwdev, REG_BCN_CTRL);
|
||||
+
|
||||
if (rtw_chip_wcpu_11n(rtwdev)) {
|
||||
rtw_write32_set(rtwdev, REG_DWBCN0_CTRL, BIT_BCN_VALID);
|
||||
} else {
|
||||
@@ -1491,6 +1493,9 @@ int rtw_fw_write_data_rsvd_page(struct r
|
||||
val |= BIT_ENSWBCN >> 8;
|
||||
rtw_write8(rtwdev, REG_CR + 1, val);
|
||||
|
||||
+ rtw_write8(rtwdev, REG_BCN_CTRL,
|
||||
+ (bckp[2] & ~BIT_EN_BCN_FUNCTION) | BIT_DIS_TSF_UDT);
|
||||
+
|
||||
if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_PCIE) {
|
||||
val = rtw_read8(rtwdev, REG_FWHW_TXQ_CTRL + 2);
|
||||
bckp[1] = val;
|
||||
@@ -1521,6 +1526,7 @@ restore:
|
||||
rsvd_pg_head = rtwdev->fifo.rsvd_boundary;
|
||||
rtw_write16(rtwdev, REG_FIFOPAGE_CTRL_2,
|
||||
rsvd_pg_head | BIT_BCN_VALID_V1);
|
||||
+ rtw_write8(rtwdev, REG_BCN_CTRL, bckp[2]);
|
||||
if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_PCIE)
|
||||
rtw_write8(rtwdev, REG_FWHW_TXQ_CTRL + 2, bckp[1]);
|
||||
rtw_write8(rtwdev, REG_CR + 1, bckp[0]);
|
||||
@ -1,38 +0,0 @@
|
||||
From 4c2c372de2e108319236203cce6de44d70ae15cd Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
|
||||
Date: Tue, 13 May 2025 12:13:04 +0000
|
||||
Subject: [PATCH] wifi: rtw88: fix the 'para' buffer size to avoid reading out
|
||||
of bounds
|
||||
|
||||
Set the size to 6 instead of 2, since 'para' array is passed to
|
||||
'rtw_fw_bt_wifi_control(rtwdev, para[0], ¶[1])', which reads
|
||||
5 bytes:
|
||||
|
||||
void rtw_fw_bt_wifi_control(struct rtw_dev *rtwdev, u8 op_code, u8 *data)
|
||||
{
|
||||
...
|
||||
SET_BT_WIFI_CONTROL_DATA1(h2c_pkt, *data);
|
||||
SET_BT_WIFI_CONTROL_DATA2(h2c_pkt, *(data + 1));
|
||||
...
|
||||
SET_BT_WIFI_CONTROL_DATA5(h2c_pkt, *(data + 4));
|
||||
|
||||
Detected using the static analysis tool - Svace.
|
||||
Fixes: 4136214f7c46 ("rtw88: add BT co-existence support")
|
||||
Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250513121304.124141-1-aleksei.kodanev@bell-sw.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/coex.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/coex.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
|
||||
@@ -309,7 +309,7 @@ static void rtw_coex_tdma_timer_base(str
|
||||
{
|
||||
struct rtw_coex *coex = &rtwdev->coex;
|
||||
struct rtw_coex_stat *coex_stat = &coex->stat;
|
||||
- u8 para[2] = {0};
|
||||
+ u8 para[6] = {};
|
||||
u8 times;
|
||||
u16 tbtt_interval = coex_stat->wl_beacon_interval;
|
||||
|
||||
@ -9,7 +9,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnect
|
||||
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1677,12 +1677,6 @@ static int ieee80211_stop_ap(struct wiph
|
||||
@@ -1691,12 +1691,6 @@ static int ieee80211_stop_ap(struct wiph
|
||||
|
||||
__sta_info_flush(sdata, true, link_id, NULL);
|
||||
|
||||
@ -19,6 +19,6 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnect
|
||||
- ieee80211_free_key_list(local, &keys);
|
||||
- }
|
||||
-
|
||||
link_conf->enable_beacon = false;
|
||||
sdata->beacon_rate_set = false;
|
||||
sdata->vif.cfg.ssid_len = 0;
|
||||
ieee80211_stop_mbssid(sdata);
|
||||
RCU_INIT_POINTER(link_conf->tx_bss_conf, NULL);
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ Subject: [PATCH] mac80211: allow scans in access point mode (for site survey)
|
||||
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2891,6 +2891,8 @@ static int ieee80211_scan(struct wiphy *
|
||||
@@ -2925,6 +2925,8 @@ static int ieee80211_scan(struct wiphy *
|
||||
*/
|
||||
fallthrough;
|
||||
case NL80211_IFTYPE_AP:
|
||||
|
||||
@ -16,7 +16,7 @@ and we should ignore this.
|
||||
|
||||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -671,21 +671,6 @@ int wiphy_verify_iface_combinations(stru
|
||||
@@ -679,21 +679,6 @@ int wiphy_verify_iface_combinations(stru
|
||||
c->limits[j].max > 1))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -2474,6 +2474,13 @@ static void sta_stats_decode_rate(struct
|
||||
@@ -2468,6 +2468,13 @@ static void sta_stats_decode_rate(struct
|
||||
|
||||
sband = local->hw.wiphy->bands[band];
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -583,6 +583,7 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
@@ -582,6 +582,7 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
spin_lock_init(&sta->ps_lock);
|
||||
INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
|
||||
wiphy_work_init(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
|
||||
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -4083,7 +4083,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
@@ -4066,7 +4066,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
|
||||
if (deficit < 0)
|
||||
sta->airtime[txqi->txq.ac].deficit +=
|
||||
@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (deficit < 0 || !aql_check) {
|
||||
list_move_tail(&txqi->schedule_order,
|
||||
@@ -4226,7 +4226,8 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
@@ -4209,7 +4209,8 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
}
|
||||
sta = container_of(iter->txq.sta, struct sta_info, sta);
|
||||
if (ieee80211_sta_deficit(sta, ac) < 0)
|
||||
@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
list_move_tail(&iter->schedule_order, &local->active_txqs[ac]);
|
||||
}
|
||||
|
||||
@@ -4234,7 +4235,7 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
@@ -4217,7 +4218,7 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
if (sta->airtime[ac].deficit >= 0)
|
||||
goto out;
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/wireless/chan.c
|
||||
+++ b/net/wireless/chan.c
|
||||
@@ -648,6 +648,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
@@ -643,6 +643,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
|
||||
c->dfs_state = dfs_state;
|
||||
c->dfs_state_entered = jiffies;
|
||||
@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -995,6 +997,53 @@ bool cfg80211_any_wiphy_oper_chan(struct
|
||||
@@ -990,6 +992,53 @@ bool cfg80211_any_wiphy_oper_chan(struct
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
{
|
||||
--- a/net/wireless/core.h
|
||||
+++ b/net/wireless/core.h
|
||||
@@ -475,6 +475,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
@@ -474,6 +474,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
enum nl80211_dfs_state dfs_state);
|
||||
|
||||
void cfg80211_dfs_channels_update_work(struct work_struct *work);
|
||||
|
||||
@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -3438,6 +3438,7 @@ enum wiphy_params_flags {
|
||||
@@ -3437,6 +3437,7 @@ enum wiphy_params_flags {
|
||||
/* The per TXQ device queue limit in airtime */
|
||||
#define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_L 5000
|
||||
#define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_H 12000
|
||||
@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1360,10 +1360,12 @@ struct ieee80211_local {
|
||||
@@ -1377,10 +1377,12 @@ struct ieee80211_local {
|
||||
spinlock_t handle_wake_tx_queue_lock;
|
||||
|
||||
u16 airtime_flags;
|
||||
@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
spin_lock_init(&local->active_txq_lock[i]);
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -2388,13 +2388,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre
|
||||
@@ -2382,13 +2382,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre
|
||||
|
||||
void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local,
|
||||
struct sta_info *sta, u8 ac,
|
||||
@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
atomic_add(tx_airtime,
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -2555,7 +2555,7 @@ static u16 ieee80211_store_ack_skb(struc
|
||||
@@ -2539,7 +2539,7 @@ static u16 ieee80211_store_ack_skb(struc
|
||||
|
||||
spin_lock_irqsave(&local->ack_status_lock, flags);
|
||||
id = idr_alloc(&local->ack_status_frames, ack_skb,
|
||||
@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
spin_unlock_irqrestore(&local->ack_status_lock, flags);
|
||||
|
||||
if (id >= 0) {
|
||||
@@ -3984,20 +3984,20 @@ begin:
|
||||
@@ -3967,20 +3967,20 @@ begin:
|
||||
encap_out:
|
||||
info->control.vif = vif;
|
||||
|
||||
@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
return skb;
|
||||
@@ -4049,6 +4049,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
@@ -4032,6 +4032,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
struct ieee80211_txq *ret = NULL;
|
||||
struct txq_info *txqi = NULL, *head = NULL;
|
||||
bool found_eligible_txq = false;
|
||||
@ -175,7 +175,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
spin_lock_bh(&local->active_txq_lock[ac]);
|
||||
|
||||
@@ -4072,26 +4073,26 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
@@ -4055,26 +4056,26 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
if (!head)
|
||||
head = txqi;
|
||||
|
||||
@ -214,7 +214,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (txqi->schedule_round == local->schedule_round[ac])
|
||||
goto out;
|
||||
|
||||
@@ -4156,7 +4157,8 @@ bool ieee80211_txq_airtime_check(struct
|
||||
@@ -4139,7 +4140,8 @@ bool ieee80211_txq_airtime_check(struct
|
||||
return true;
|
||||
|
||||
if (!txq->sta)
|
||||
@ -224,7 +224,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (unlikely(txq->tid == IEEE80211_NUM_TIDS))
|
||||
return true;
|
||||
@@ -4205,15 +4207,15 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
@@ -4188,15 +4190,15 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
|
||||
spin_lock_bh(&local->active_txq_lock[ac]);
|
||||
|
||||
@ -245,7 +245,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (iter == txqi)
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -1237,8 +1237,8 @@ struct ieee80211_tx_info {
|
||||
@@ -1245,8 +1245,8 @@ struct ieee80211_tx_info {
|
||||
status_data_idr:1,
|
||||
status_data:13,
|
||||
hw_queue:4,
|
||||
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -4116,7 +4116,9 @@ void __ieee80211_schedule_txq(struct iee
|
||||
@@ -4099,7 +4099,9 @@ void __ieee80211_schedule_txq(struct iee
|
||||
|
||||
spin_lock_bh(&local->active_txq_lock[txq->ac]);
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1444,7 +1444,7 @@ static void ieee80211_txq_enqueue(struct
|
||||
@@ -1428,7 +1428,7 @@ static void ieee80211_txq_enqueue(struct
|
||||
{
|
||||
struct fq *fq = &local->fq;
|
||||
struct fq_tin *tin = &txqi->tin;
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
ieee80211_set_skb_enqueue_time(skb);
|
||||
|
||||
@@ -1460,6 +1460,7 @@ static void ieee80211_txq_enqueue(struct
|
||||
@@ -1444,6 +1444,7 @@ static void ieee80211_txq_enqueue(struct
|
||||
IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
||||
__skb_queue_tail(&txqi->frags, skb);
|
||||
} else {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user