mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 07:34:40 +01:00
mac80211: update to version 6.18
Drop all upstreamed patch and refresh all affected patch.
Minor changes were needed to the
350-mac80211-allow-scanning-while-on-radar-channel due to changes in
6.18.
Also some changes were needed to downstream patch due to upstream commit
b74947b4f6ff ("wifi: cfg80211/mac80211: Add support to get radio index")
Link: https://github.com/openwrt/openwrt/pull/20964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
63e2b17c01
commit
52a0873742
108 changed files with 315 additions and 4964 deletions
|
|
@ -10,15 +10,15 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=6.16
|
||||
PKG_VERSION:=6.18
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_SOURCE_URL:=@OPENWRT
|
||||
PKG_HASH:=67f11320509dd18e5e2c58cb81e9f6c7d19b09f5229baa5880ed4dab71c19052
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/backports/releases/download/backports-v$(PKG_VERSION)
|
||||
PKG_HASH:=3bd5d84b1e56cf8addff0d1e4bcf06753c51feee88c4d7925fb7b67784529436
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.zst
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)backports-$(PKG_VERSION)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
help
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -90,6 +90,7 @@ ADM8211=
|
||||
@@ -91,6 +91,7 @@ ADM8211=
|
||||
ATH_COMMON=
|
||||
WLAN_VENDOR_ATH=
|
||||
ATH_DEBUG=
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3365,6 +3365,8 @@ void regulatory_hint_country_ie(struct w
|
||||
@@ -3335,6 +3335,8 @@ void regulatory_hint_country_ie(struct w
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3614,6 +3616,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
@@ -3584,6 +3586,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -150,6 +150,7 @@ ATH10K_DEBUG=
|
||||
@@ -151,6 +151,7 @@ ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_LEDS=
|
||||
ATH10K_SPECTRAL=
|
||||
|
|
|
|||
|
|
@ -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
|
||||
@@ -3546,6 +3546,16 @@ int ath10k_core_register(struct ath10k *
|
||||
@@ -3586,6 +3586,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
|
||||
@@ -9951,6 +9951,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
@@ -9970,6 +9970,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[] = {
|
||||
@@ -10313,6 +10328,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10332,6 +10347,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||
@@ -1315,6 +1315,10 @@ struct ath10k {
|
||||
@@ -1320,6 +1320,10 @@ struct ath10k {
|
||||
s32 tx_power_2g_limit;
|
||||
s32 tx_power_5g_limit;
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|||
};
|
||||
--- a/drivers/net/wireless/ath/ath10k/leds.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/leds.c
|
||||
@@ -70,7 +70,7 @@ int ath10k_leds_register(struct ath10k *
|
||||
@@ -69,7 +69,7 @@ int ath10k_leds_register(struct ath10k *
|
||||
|
||||
ar->leds.cdev.name = ar->leds.label;
|
||||
ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking;
|
||||
|
|
@ -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
|
||||
@@ -10329,7 +10329,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10348,7 +10348,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Forwarded: no
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -1043,6 +1043,40 @@ static inline int ath10k_vdev_delete_syn
|
||||
@@ -1052,6 +1052,40 @@ static inline int ath10k_vdev_delete_syn
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ Forwarded: no
|
|||
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
{
|
||||
struct cfg80211_chan_def *chandef = NULL;
|
||||
@@ -1075,7 +1109,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
@@ -1084,7 +1118,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);
|
||||
@@ -1521,7 +1556,8 @@ static int ath10k_vdev_start_restart(str
|
||||
@@ -1530,7 +1565,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;
|
||||
@@ -3452,7 +3488,8 @@ static int ath10k_update_channel_list(st
|
||||
@@ -3461,7 +3497,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;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -9,6 +9,7 @@
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/of.h>
|
||||
|
|
@ -26,7 +26,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|||
#include <linux/property.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ctype.h>
|
||||
@@ -3418,6 +3419,8 @@ static int ath10k_core_probe_fw(struct a
|
||||
@@ -3458,6 +3459,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
|
||||
@@ -10121,7 +10121,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10140,7 +10140,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);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
|
||||
--- a/drivers/net/wireless/ath/ath10k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
@@ -132,7 +132,11 @@ static const struct ce_attr pci_host_ce_
|
||||
@@ -133,7 +133,11 @@ static const struct ce_attr pci_host_ce_
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 2048,
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
.recv_cb = ath10k_pci_htt_htc_rx_cb,
|
||||
},
|
||||
|
||||
@@ -141,7 +145,11 @@ static const struct ce_attr pci_host_ce_
|
||||
@@ -142,7 +146,11 @@ static const struct ce_attr pci_host_ce_
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 2048,
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
.recv_cb = ath10k_pci_htc_rx_cb,
|
||||
},
|
||||
|
||||
@@ -168,7 +176,11 @@ static const struct ce_attr pci_host_ce_
|
||||
@@ -169,7 +177,11 @@ static const struct ce_attr pci_host_ce_
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 512,
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
.recv_cb = ath10k_pci_htt_rx_cb,
|
||||
},
|
||||
|
||||
@@ -193,7 +205,11 @@ static const struct ce_attr pci_host_ce_
|
||||
@@ -194,7 +206,11 @@ static const struct ce_attr pci_host_ce_
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 2048,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Tested-by: Florian Maurer <maurer@fh-aachen.de>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -8166,6 +8166,20 @@ static void ath10k_flush(struct ieee8021
|
||||
@@ -8180,6 +8180,20 @@ static void ath10k_flush(struct ieee8021
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
}
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ Tested-by: Florian Maurer <maurer@fh-aachen.de>
|
|||
/* TODO: Implement this function properly
|
||||
* For now it is needed to reply to Probe Requests in IBSS mode.
|
||||
* Probably we need this information from FW.
|
||||
@@ -9513,6 +9527,7 @@ static const struct ieee80211_ops ath10k
|
||||
@@ -9532,6 +9546,7 @@ static const struct ieee80211_ops ath10k
|
||||
.set_rts_threshold = ath10k_set_rts_threshold,
|
||||
.set_frag_threshold = ath10k_mac_op_set_frag_threshold,
|
||||
.flush = ath10k_flush,
|
||||
|
|
@ -58,7 +58,7 @@ Tested-by: Florian Maurer <maurer@fh-aachen.de>
|
|||
.tx_last_beacon = ath10k_tx_last_beacon,
|
||||
.set_antenna = ath10k_set_antenna,
|
||||
.get_antenna = ath10k_get_antenna,
|
||||
@@ -10334,6 +10349,9 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10353,6 +10368,9 @@ int ath10k_mac_register(struct ath10k *a
|
||||
if (!ar->hw_params.hw_ops->set_coverage_class)
|
||||
ar->ops->set_coverage_class = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2041,6 +2041,7 @@ static int ath11k_qmi_assign_target_mem_
|
||||
struct device_node *hremote_node = NULL;
|
||||
struct resource res;
|
||||
@@ -2042,6 +2042,7 @@ static int ath11k_qmi_assign_target_mem_
|
||||
struct device *dev = ab->dev;
|
||||
struct resource res = {};
|
||||
u32 host_ddr_sz;
|
||||
+ u32 addr;
|
||||
int i, idx, ret;
|
||||
|
||||
for (i = 0, idx = 0; i < ab->qmi.mem_seg_count; i++) {
|
||||
@@ -2080,7 +2081,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2073,7 +2074,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
idx++;
|
||||
break;
|
||||
case BDF_MEM_REGION_TYPE:
|
||||
|
|
@ -29,7 +29,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
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;
|
||||
@@ -2102,8 +2105,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2095,8 +2098,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
if (!ab->qmi.target_mem[idx].iaddr)
|
||||
return -EIO;
|
||||
} else {
|
||||
|
|
@ -41,7 +41,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
ab->qmi.target_mem[idx].iaddr = NULL;
|
||||
}
|
||||
} else {
|
||||
@@ -2309,6 +2313,7 @@ static int ath11k_qmi_load_file_target_m
|
||||
@@ -2302,6 +2306,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;
|
||||
@@ -2320,7 +2325,9 @@ static int ath11k_qmi_load_file_target_m
|
||||
@@ -2313,7 +2318,9 @@ static int ath11k_qmi_load_file_target_m
|
||||
memset(&resp, 0, sizeof(resp));
|
||||
|
||||
if (ab->hw_params.fixed_bdf_addr) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Signed-off-by: Florian Maurer <f.maurer@outlook.de>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -8248,6 +8248,23 @@ static void ath11k_mac_op_flush(struct i
|
||||
@@ -8330,6 +8330,23 @@ static void ath11k_mac_op_flush(struct i
|
||||
ath11k_mac_flush_tx_complete(ar);
|
||||
}
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ Signed-off-by: Florian Maurer <f.maurer@outlook.de>
|
|||
static bool
|
||||
ath11k_mac_has_single_legacy_rate(struct ath11k *ar,
|
||||
enum nl80211_band band,
|
||||
@@ -9823,6 +9840,7 @@ static const struct ieee80211_ops ath11k
|
||||
@@ -9920,6 +9937,7 @@ static const struct ieee80211_ops ath11k
|
||||
.set_bitrate_mask = ath11k_mac_op_set_bitrate_mask,
|
||||
.get_survey = ath11k_mac_op_get_survey,
|
||||
.flush = ath11k_mac_op_flush,
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state);
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -162,6 +162,7 @@ ATH11K_DEBUG=
|
||||
@@ -163,6 +163,7 @@ ATH11K_DEBUG=
|
||||
ATH11K_DEBUGFS=
|
||||
ATH11K_TRACING=
|
||||
ATH11K_SPECTRAL=
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -37,7 +37,7 @@ bool ath11k_ftm_mode;
|
||||
@@ -39,7 +39,7 @@ bool ath11k_ftm_mode;
|
||||
module_param_named(ftm_mode, ath11k_ftm_mode, bool, 0444);
|
||||
MODULE_PARM_DESC(ftm_mode, "Boots up in factory test mode");
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
{
|
||||
.hw_rev = ATH11K_HW_IPQ8074,
|
||||
.name = "ipq8074 hw2.0",
|
||||
@@ -2481,7 +2481,8 @@ static void ath11k_core_reset(struct wor
|
||||
@@ -2521,7 +2521,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];
|
||||
@@ -2497,7 +2498,31 @@ static int ath11k_init_hw_params(struct
|
||||
@@ -2537,7 +2538,31 @@ static int ath11k_init_hw_params(struct
|
||||
|
||||
ab->hw_params = *hw_params;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -171,8 +171,8 @@ static struct ath11k_hw_params ath11k_hw
|
||||
@@ -173,8 +173,8 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.supports_shadow_regs = false,
|
||||
.idle_ps = false,
|
||||
.supports_sta_ps = false,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -698,8 +698,8 @@ static struct ath11k_hw_params ath11k_hw
|
||||
@@ -700,8 +700,8 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.supports_suspend = false,
|
||||
.hal_params = &ath11k_hw_hal_params_ipq8074,
|
||||
.single_pdev_only = false,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
if (ce_attr->src_nentries)
|
||||
--- a/drivers/net/wireless/ath/ath11k/hal.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hal.c
|
||||
@@ -1247,20 +1247,16 @@ static int ath11k_hal_srng_create_config
|
||||
@@ -1274,20 +1274,16 @@ static int ath11k_hal_srng_create_config
|
||||
s->reg_start[1] = HAL_SEQ_WCSS_UMAC_TCL_REG + HAL_TCL_STATUS_RING_HP;
|
||||
|
||||
s = &hal->srng_config[HAL_CE_SRC];
|
||||
|
|
@ -90,7 +90,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
s->reg_size[0] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) -
|
||||
HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab);
|
||||
s->reg_size[1] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) -
|
||||
@@ -1268,9 +1264,8 @@ static int ath11k_hal_srng_create_config
|
||||
@@ -1295,9 +1291,8 @@ static int ath11k_hal_srng_create_config
|
||||
|
||||
s = &hal->srng_config[HAL_CE_DST_STATUS];
|
||||
s->reg_start[0] = HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab) +
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -905,6 +905,67 @@ static struct ath11k_hw_params ath11k_hw
|
||||
@@ -907,6 +907,67 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.support_dual_stations = true,
|
||||
.pdev_suspend = false,
|
||||
},
|
||||
|
|
@ -95,7 +95,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
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
|
||||
@@ -151,6 +151,7 @@ enum ath11k_hw_rev {
|
||||
@@ -152,6 +152,7 @@ enum ath11k_hw_rev {
|
||||
ATH11K_HW_IPQ5018_HW10,
|
||||
ATH11K_HW_QCA2066_HW21,
|
||||
ATH11K_HW_QCA6698AQ_HW21,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
---
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -918,6 +918,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
@@ -920,6 +920,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.bdf_addr = 0x4D200000,
|
||||
.hw_ops = &ipq5018_ops,
|
||||
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
---
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -917,6 +917,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
@@ -919,6 +919,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.max_radios = MAX_RADIOS_5018,
|
||||
.bdf_addr = 0x4D200000,
|
||||
.hw_ops = &ipq5018_ops,
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
static int ath11k_core_get_rproc(struct ath11k_base *ab)
|
||||
{
|
||||
struct ath11k_ahb *ab_ahb = ath11k_ahb_priv(ab);
|
||||
@@ -1144,6 +1174,10 @@ static int ath11k_ahb_probe(struct platf
|
||||
@@ -1133,6 +1163,10 @@ static int ath11k_ahb_probe(struct platf
|
||||
hif_ops = &ath11k_ahb_hif_ops_wcn6750;
|
||||
pci_ops = &ath11k_ahb_pci_ops_wcn6750;
|
||||
break;
|
||||
|
|
@ -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
|
||||
@@ -2201,6 +2201,8 @@ static int ath11k_qmi_request_device_inf
|
||||
@@ -2194,6 +2194,8 @@ static int ath11k_qmi_request_device_inf
|
||||
if (!ab->hw_params.ce_remap)
|
||||
ab->mem_ce = ab->mem;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
}
|
||||
|
||||
static void ath11k_ahb_free_ext_irq(struct ath11k_base *ab)
|
||||
@@ -1118,6 +1119,27 @@ err_unregister:
|
||||
@@ -1107,6 +1108,27 @@ err_unregister:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab)
|
||||
{
|
||||
struct ath11k_ahb *ab_ahb = ath11k_ahb_priv(ab);
|
||||
@@ -1159,7 +1181,7 @@ static int ath11k_ahb_probe(struct platf
|
||||
@@ -1148,7 +1170,7 @@ static int ath11k_ahb_probe(struct platf
|
||||
const struct ath11k_hif_ops *hif_ops;
|
||||
const struct ath11k_pci_ops *pci_ops;
|
||||
enum ath11k_hw_rev hw_rev;
|
||||
|
|
@ -61,7 +61,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
|
||||
hw_rev = (uintptr_t)device_get_match_data(&pdev->dev);
|
||||
|
||||
@@ -1183,6 +1205,7 @@ static int ath11k_ahb_probe(struct platf
|
||||
@@ -1172,6 +1194,7 @@ static int ath11k_ahb_probe(struct platf
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to set 32-bit consistent dma\n");
|
||||
@@ -1199,6 +1222,7 @@ static int ath11k_ahb_probe(struct platf
|
||||
@@ -1188,6 +1211,7 @@ static int ath11k_ahb_probe(struct platf
|
||||
ab->hif.ops = hif_ops;
|
||||
ab->pdev = pdev;
|
||||
ab->hw_rev = hw_rev;
|
||||
|
|
@ -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
|
||||
@@ -47,6 +47,9 @@
|
||||
@@ -48,6 +48,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
|
||||
|
||||
@@ -966,6 +969,7 @@ struct ath11k_base {
|
||||
@@ -969,6 +972,7 @@ struct ath11k_base {
|
||||
struct list_head peers;
|
||||
wait_queue_head_t peer_mapping_wq;
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
@@ -137,6 +137,15 @@ static const struct ath11k_msi_config at
|
||||
@@ -139,6 +139,15 @@ static const struct ath11k_msi_config at
|
||||
},
|
||||
.hw_rev = ATH11K_HW_QCA6698AQ_HW21,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
@@ -2118,6 +2118,18 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2111,6 +2111,18 @@ static int ath11k_qmi_assign_target_mem_
|
||||
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
|
||||
idx++;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|||
---
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -727,6 +727,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
@@ -729,6 +729,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.support_fw_mac_sequence = false,
|
||||
.support_dual_stations = false,
|
||||
.pdev_suspend = false,
|
||||
|
|
@ -34,7 +34,7 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|||
.name = "qca2066 hw2.1",
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp.c
|
||||
@@ -348,12 +348,66 @@ void ath11k_dp_stop_shadow_timers(struct
|
||||
@@ -350,12 +350,66 @@ void ath11k_dp_stop_shadow_timers(struct
|
||||
ath11k_dp_shadow_stop_timer(ab, &ab->dp.reo_cmd_timer);
|
||||
}
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|||
ath11k_dp_srng_cleanup(ab, &dp->wbm_desc_rel_ring);
|
||||
ath11k_dp_srng_cleanup(ab, &dp->tcl_cmd_ring);
|
||||
ath11k_dp_srng_cleanup(ab, &dp->tcl_status_ring);
|
||||
@@ -375,6 +429,8 @@ static int ath11k_dp_srng_common_setup(s
|
||||
@@ -377,6 +431,8 @@ static int ath11k_dp_srng_common_setup(s
|
||||
int i, ret;
|
||||
u8 tcl_num, wbm_num;
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|||
#endif
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
||||
@@ -787,6 +787,10 @@ int ath11k_dp_tx_send_reo_cmd(struct ath
|
||||
@@ -788,6 +788,10 @@ int ath11k_dp_tx_send_reo_cmd(struct ath
|
||||
if (cmd_num == 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,92 +0,0 @@
|
|||
From 16872194c80f2724472fc207991712895ac8a230 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Senozhatsky <senozhatsky@chromium.org>
|
||||
Date: Thu, 12 Jun 2025 17:45:06 +0900
|
||||
Subject: wifi: ath11k: clear initialized flag for deinit-ed srng lists
|
||||
|
||||
[ Upstream commit a5b46aa7cf5f05c213316a018e49a8e086efd98e ]
|
||||
|
||||
In a number of cases we see kernel panics on resume due
|
||||
to ath11k kernel page fault, which happens under the
|
||||
following circumstances:
|
||||
|
||||
1) First ath11k_hal_dump_srng_stats() call
|
||||
|
||||
Last interrupt received for each group:
|
||||
ath11k_pci 0000:01:00.0: group_id 0 22511ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 1 14440788ms before
|
||||
[..]
|
||||
ath11k_pci 0000:01:00.0: failed to receive control response completion, polling..
|
||||
ath11k_pci 0000:01:00.0: Service connect timeout
|
||||
ath11k_pci 0000:01:00.0: failed to connect to HTT: -110
|
||||
ath11k_pci 0000:01:00.0: failed to start core: -110
|
||||
ath11k_pci 0000:01:00.0: firmware crashed: MHI_CB_EE_RDDM
|
||||
ath11k_pci 0000:01:00.0: already resetting count 2
|
||||
ath11k_pci 0000:01:00.0: failed to wait wlan mode request (mode 4): -110
|
||||
ath11k_pci 0000:01:00.0: qmi failed to send wlan mode off: -110
|
||||
ath11k_pci 0000:01:00.0: failed to reconfigure driver on crash recovery
|
||||
[..]
|
||||
|
||||
2) At this point reconfiguration fails (we have 2 resets) and
|
||||
ath11k_core_reconfigure_on_crash() calls ath11k_hal_srng_deinit()
|
||||
which destroys srng lists. However, it does not reset per-list
|
||||
->initialized flag.
|
||||
|
||||
3) Second ath11k_hal_dump_srng_stats() call sees stale ->initialized
|
||||
flag and attempts to dump srng stats:
|
||||
|
||||
Last interrupt received for each group:
|
||||
ath11k_pci 0000:01:00.0: group_id 0 66785ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 1 14485062ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 2 14485062ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 3 14485062ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 4 14780845ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 5 14780845ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 6 14485062ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 7 66814ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 8 68997ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 9 67588ms before
|
||||
ath11k_pci 0000:01:00.0: group_id 10 69511ms before
|
||||
BUG: unable to handle page fault for address: ffffa007404eb010
|
||||
#PF: supervisor read access in kernel mode
|
||||
#PF: error_code(0x0000) - not-present page
|
||||
PGD 100000067 P4D 100000067 PUD 10022d067 PMD 100b01067 PTE 0
|
||||
Oops: 0000 [#1] PREEMPT SMP NOPTI
|
||||
RIP: 0010:ath11k_hal_dump_srng_stats+0x2b4/0x3b0 [ath11k]
|
||||
Call Trace:
|
||||
<TASK>
|
||||
? __die_body+0xae/0xb0
|
||||
? page_fault_oops+0x381/0x3e0
|
||||
? exc_page_fault+0x69/0xa0
|
||||
? asm_exc_page_fault+0x22/0x30
|
||||
? ath11k_hal_dump_srng_stats+0x2b4/0x3b0 [ath11k (HASH:6cea 4)]
|
||||
ath11k_qmi_driver_event_work+0xbd/0x1050 [ath11k (HASH:6cea 4)]
|
||||
worker_thread+0x389/0x930
|
||||
kthread+0x149/0x170
|
||||
|
||||
Clear per-list ->initialized flag in ath11k_hal_srng_deinit().
|
||||
|
||||
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
|
||||
Reviewed-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Fixes: 5118935b1bc2 ("ath11k: dump SRNG stats during FW assert")
|
||||
Link: https://patch.msgid.link/20250612084551.702803-1-senozhatsky@chromium.org
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/hal.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/hal.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hal.c
|
||||
@@ -1341,6 +1341,10 @@ EXPORT_SYMBOL(ath11k_hal_srng_init);
|
||||
void ath11k_hal_srng_deinit(struct ath11k_base *ab)
|
||||
{
|
||||
struct ath11k_hal *hal = &ab->hal;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < HAL_SRNG_RING_ID_MAX; i++)
|
||||
+ ab->hal.srng_list[i].initialized = 0;
|
||||
|
||||
ath11k_hal_unregister_srng_key(ab);
|
||||
ath11k_hal_free_cont_rdp(ab);
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
From 6bdef22d540258ca06f079f7b6ae100669a19b47 Mon Sep 17 00:00:00 2001
|
||||
From: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Date: Tue, 3 Jun 2025 10:25:28 +0800
|
||||
Subject: wifi: ath11k: fix sleeping-in-atomic in
|
||||
ath11k_mac_op_set_bitrate_mask()
|
||||
|
||||
[ Upstream commit 65c12b104cb942d588a1a093acc4537fb3d3b129 ]
|
||||
|
||||
ath11k_mac_disable_peer_fixed_rate() is passed as the iterator to
|
||||
ieee80211_iterate_stations_atomic(). Note in this case the iterator is
|
||||
required to be atomic, however ath11k_mac_disable_peer_fixed_rate() does
|
||||
not follow it as it might sleep. Consequently below warning is seen:
|
||||
|
||||
BUG: sleeping function called from invalid context at wmi.c:304
|
||||
Call Trace:
|
||||
<TASK>
|
||||
dump_stack_lvl
|
||||
__might_resched.cold
|
||||
ath11k_wmi_cmd_send
|
||||
ath11k_wmi_set_peer_param
|
||||
ath11k_mac_disable_peer_fixed_rate
|
||||
ieee80211_iterate_stations_atomic
|
||||
ath11k_mac_op_set_bitrate_mask.cold
|
||||
|
||||
Change to ieee80211_iterate_stations_mtx() to fix this issue.
|
||||
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
|
||||
|
||||
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
|
||||
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Link: https://patch.msgid.link/20250603-ath11k-use-non-atomic-iterator-v1-1-d75762068d56@quicinc.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -8757,9 +8757,9 @@ ath11k_mac_op_set_bitrate_mask(struct ie
|
||||
arvif->vdev_id, ret);
|
||||
return ret;
|
||||
}
|
||||
- ieee80211_iterate_stations_atomic(ar->hw,
|
||||
- ath11k_mac_disable_peer_fixed_rate,
|
||||
- arvif);
|
||||
+ ieee80211_iterate_stations_mtx(ar->hw,
|
||||
+ ath11k_mac_disable_peer_fixed_rate,
|
||||
+ arvif);
|
||||
} else if (ath11k_mac_bitrate_mask_get_single_nss(ar, arvif, band, mask,
|
||||
&single_nss)) {
|
||||
rate = WMI_FIXED_RATE_NONE;
|
||||
@@ -8826,9 +8826,9 @@ ath11k_mac_op_set_bitrate_mask(struct ie
|
||||
}
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
- ieee80211_iterate_stations_atomic(ar->hw,
|
||||
- ath11k_mac_disable_peer_fixed_rate,
|
||||
- arvif);
|
||||
+ ieee80211_iterate_stations_mtx(ar->hw,
|
||||
+ ath11k_mac_disable_peer_fixed_rate,
|
||||
+ arvif);
|
||||
|
||||
arvif->bitrate_mask = *mask;
|
||||
ieee80211_iterate_stations_atomic(ar->hw,
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
From 0f708ced89758247f5d2d70def00e7c1c80ff557 Mon Sep 17 00:00:00 2001
|
||||
From: Johan Hovold <johan+linaro@kernel.org>
|
||||
Date: Wed, 4 Jun 2025 16:34:53 +0200
|
||||
Subject: wifi: ath11k: fix dest ring-buffer corruption
|
||||
|
||||
commit 8c1ba5091fa9a2d1478da63173b16a701bdf86bb upstream.
|
||||
|
||||
Add the missing memory barrier to make sure that destination ring
|
||||
descriptors are read after the head pointers to avoid using stale data
|
||||
on weakly ordered architectures like aarch64.
|
||||
|
||||
The barrier is added to the ath11k_hal_srng_access_begin() helper for
|
||||
symmetry with follow-on fixes for source ring buffer corruption which
|
||||
will add barriers to ath11k_hal_srng_access_end().
|
||||
|
||||
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
|
||||
|
||||
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
|
||||
Cc: stable@vger.kernel.org # 5.6
|
||||
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
|
||||
Reviewed-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Link: https://patch.msgid.link/20250604143457.26032-2-johan+linaro@kernel.org
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/ce.c | 3 ---
|
||||
drivers/net/wireless/ath/ath11k/dp_rx.c | 3 ---
|
||||
drivers/net/wireless/ath/ath11k/hal.c | 12 +++++++++++-
|
||||
3 files changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/ce.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/ce.c
|
||||
@@ -393,9 +393,6 @@ static int ath11k_ce_completed_recv_next
|
||||
goto err;
|
||||
}
|
||||
|
||||
- /* Make sure descriptor is read after the head pointer. */
|
||||
- dma_rmb();
|
||||
-
|
||||
*nbytes = ath11k_hal_ce_dst_status_get_length(desc);
|
||||
|
||||
*skb = pipe->dest_ring->skb[sw_index];
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -2650,9 +2650,6 @@ int ath11k_dp_process_rx(struct ath11k_b
|
||||
try_again:
|
||||
ath11k_hal_srng_access_begin(ab, srng);
|
||||
|
||||
- /* Make sure descriptor is read after the head pointer. */
|
||||
- dma_rmb();
|
||||
-
|
||||
while (likely(desc =
|
||||
(struct hal_reo_dest_ring *)ath11k_hal_srng_dst_get_next_entry(ab,
|
||||
srng))) {
|
||||
--- a/drivers/net/wireless/ath/ath11k/hal.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hal.c
|
||||
@@ -823,13 +823,23 @@ u32 *ath11k_hal_srng_src_peek(struct ath
|
||||
|
||||
void ath11k_hal_srng_access_begin(struct ath11k_base *ab, struct hal_srng *srng)
|
||||
{
|
||||
+ u32 hp;
|
||||
+
|
||||
lockdep_assert_held(&srng->lock);
|
||||
|
||||
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
|
||||
srng->u.src_ring.cached_tp =
|
||||
*(volatile u32 *)srng->u.src_ring.tp_addr;
|
||||
} else {
|
||||
- srng->u.dst_ring.cached_hp = READ_ONCE(*srng->u.dst_ring.hp_addr);
|
||||
+ hp = READ_ONCE(*srng->u.dst_ring.hp_addr);
|
||||
+
|
||||
+ if (hp != srng->u.dst_ring.cached_hp) {
|
||||
+ srng->u.dst_ring.cached_hp = hp;
|
||||
+ /* Make sure descriptor is read after the head
|
||||
+ * pointer.
|
||||
+ */
|
||||
+ dma_rmb();
|
||||
+ }
|
||||
|
||||
/* Try to prefetch the next descriptor in the ring */
|
||||
if (srng->flags & HAL_SRNG_FLAGS_CACHED)
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
From eed5fcf4a3d20fdbd9af2e602eab2b581264822f Mon Sep 17 00:00:00 2001
|
||||
From: Johan Hovold <johan+linaro@kernel.org>
|
||||
Date: Wed, 4 Jun 2025 16:34:56 +0200
|
||||
Subject: wifi: ath11k: fix source ring-buffer corruption
|
||||
|
||||
commit 6efa0df54022c6c9fd4d294b87622c7fcdc418c8 upstream.
|
||||
|
||||
Add the missing memory barrier to make sure that LMAC source ring
|
||||
descriptors are written before updating the head pointer to avoid
|
||||
passing stale data to the firmware on weakly ordered architectures like
|
||||
aarch64.
|
||||
|
||||
Note that non-LMAC rings use MMIO write accessors which have the
|
||||
required write memory barrier.
|
||||
|
||||
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
|
||||
|
||||
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
|
||||
Cc: stable@vger.kernel.org # 5.6
|
||||
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
|
||||
Reviewed-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Link: https://patch.msgid.link/20250604143457.26032-5-johan+linaro@kernel.org
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/hal.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/hal.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hal.c
|
||||
@@ -862,7 +862,11 @@ void ath11k_hal_srng_access_end(struct a
|
||||
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
|
||||
srng->u.src_ring.last_tp =
|
||||
*(volatile u32 *)srng->u.src_ring.tp_addr;
|
||||
- *srng->u.src_ring.hp_addr = srng->u.src_ring.hp;
|
||||
+ /* Make sure descriptor is written before updating the
|
||||
+ * head pointer.
|
||||
+ */
|
||||
+ dma_wmb();
|
||||
+ WRITE_ONCE(*srng->u.src_ring.hp_addr, srng->u.src_ring.hp);
|
||||
} else {
|
||||
srng->u.dst_ring.last_hp = *srng->u.dst_ring.hp_addr;
|
||||
*srng->u.dst_ring.tp_addr = srng->u.dst_ring.tp;
|
||||
@@ -871,6 +875,10 @@ void ath11k_hal_srng_access_end(struct a
|
||||
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
|
||||
srng->u.src_ring.last_tp =
|
||||
*(volatile u32 *)srng->u.src_ring.tp_addr;
|
||||
+ /* Assume implementation use an MMIO write accessor
|
||||
+ * which has the required wmb() so that the descriptor
|
||||
+ * is written before the updating the head pointer.
|
||||
+ */
|
||||
ath11k_hif_write32(ab,
|
||||
(unsigned long)srng->u.src_ring.hp_addr -
|
||||
(unsigned long)ab->mem,
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
From 6fc2589aae91818dd1183a589ab97d8e5c25364e Mon Sep 17 00:00:00 2001
|
||||
From: Johan Hovold <johan+linaro@kernel.org>
|
||||
Date: Wed, 4 Jun 2025 16:34:57 +0200
|
||||
Subject: wifi: ath11k: fix dest ring-buffer corruption when ring is full
|
||||
|
||||
commit aa6956150f820e6a6deba44be325ddfcb5b10f88 upstream.
|
||||
|
||||
Add the missing memory barriers to make sure that destination ring
|
||||
descriptors are read before updating the tail pointer (and passing
|
||||
ownership to the device) to avoid memory corruption on weakly ordered
|
||||
architectures like aarch64 when the ring is full.
|
||||
|
||||
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
|
||||
|
||||
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
|
||||
Cc: stable@vger.kernel.org # 5.6
|
||||
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
|
||||
Reviewed-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Link: https://patch.msgid.link/20250604143457.26032-6-johan+linaro@kernel.org
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/hal.c | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/hal.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hal.c
|
||||
@@ -854,7 +854,6 @@ void ath11k_hal_srng_access_end(struct a
|
||||
{
|
||||
lockdep_assert_held(&srng->lock);
|
||||
|
||||
- /* TODO: See if we need a write memory barrier here */
|
||||
if (srng->flags & HAL_SRNG_FLAGS_LMAC_RING) {
|
||||
/* For LMAC rings, ring pointer updates are done through FW and
|
||||
* hence written to a shared memory location that is read by FW
|
||||
@@ -869,7 +868,11 @@ void ath11k_hal_srng_access_end(struct a
|
||||
WRITE_ONCE(*srng->u.src_ring.hp_addr, srng->u.src_ring.hp);
|
||||
} else {
|
||||
srng->u.dst_ring.last_hp = *srng->u.dst_ring.hp_addr;
|
||||
- *srng->u.dst_ring.tp_addr = srng->u.dst_ring.tp;
|
||||
+ /* Make sure descriptor is read before updating the
|
||||
+ * tail pointer.
|
||||
+ */
|
||||
+ dma_mb();
|
||||
+ WRITE_ONCE(*srng->u.dst_ring.tp_addr, srng->u.dst_ring.tp);
|
||||
}
|
||||
} else {
|
||||
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
|
||||
@@ -885,6 +888,10 @@ void ath11k_hal_srng_access_end(struct a
|
||||
srng->u.src_ring.hp);
|
||||
} else {
|
||||
srng->u.dst_ring.last_hp = *srng->u.dst_ring.hp_addr;
|
||||
+ /* Make sure descriptor is read before updating the
|
||||
+ * tail pointer.
|
||||
+ */
|
||||
+ mb();
|
||||
ath11k_hif_write32(ab,
|
||||
(unsigned long)srng->u.dst_ring.tp_addr -
|
||||
(unsigned long)ab->mem,
|
||||
|
|
@ -1,237 +0,0 @@
|
|||
From 9a394fd149502394c20dc2ebecb8acfde6f6aeac Mon Sep 17 00:00:00 2001
|
||||
From: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
|
||||
Date: Sun, 10 Aug 2025 22:30:18 +0530
|
||||
Subject: wifi: ath11k: fix group data packet drops during rekey
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
[ Upstream commit 97acb0259cc9cbfbd7ab689e25684f3d8ce10e26 ]
|
||||
|
||||
During GTK rekey, mac80211 issues a clear key (if the old key exists)
|
||||
followed by an install key operation in the same context. This causes
|
||||
ath11k to send two WMI commands in quick succession: one to clear the
|
||||
old key and another to install the new key in the same slot.
|
||||
|
||||
Under certain conditions—especially under high load or time sensitive
|
||||
scenarios, firmware may process these commands asynchronously in a way
|
||||
that firmware assumes the key is cleared whereas hardware has a valid key.
|
||||
This inconsistency between hardware and firmware leads to group addressed
|
||||
packet drops. Only setting the same key again can restore a valid key in
|
||||
firmware and allow packets to be transmitted.
|
||||
|
||||
This issue remained latent because the host's clear key commands were
|
||||
not effective in firmware until commit 436a4e886598 ("ath11k: clear the
|
||||
keys properly via DISABLE_KEY"). That commit enabled the host to
|
||||
explicitly clear group keys, which inadvertently exposed the race.
|
||||
|
||||
To mitigate this, restrict group key clearing across all modes (AP, STA,
|
||||
MESH). During rekey, the new key can simply be set on top of the previous
|
||||
one, avoiding the need for a clear followed by a set.
|
||||
|
||||
However, in AP mode specifically, permit group key clearing when no
|
||||
stations are associated. This exception supports transitions from secure
|
||||
modes (e.g., WPA2/WPA3) to open mode, during which all associated peers
|
||||
are removed and the group key is cleared as part of the transition.
|
||||
|
||||
Add a per-BSS station counter to track the presence of stations during
|
||||
set key operations. Also add a reset_group_keys flag to track the key
|
||||
re-installation state and avoid repeated installation of the same key
|
||||
when the number of connected stations transitions to non-zero within a
|
||||
rekey period.
|
||||
|
||||
Additionally, for AP and Mesh modes, when the first station associates,
|
||||
reinstall the same group key that was last set. This ensures that the
|
||||
firmware recovers from any race that may have occurred during a previous
|
||||
key clear when no stations were associated.
|
||||
|
||||
This change ensures that key clearing is permitted only when no clients
|
||||
are connected, avoiding packet loss while enabling dynamic security mode
|
||||
transitions.
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
|
||||
Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
|
||||
|
||||
Reported-by: Steffen Moser <lists@steffen-moser.de>
|
||||
Closes: https://lore.kernel.org/linux-wireless/c6366409-9928-4dd7-bf7b-ba7fcf20eabf@steffen-moser.de
|
||||
Fixes: 436a4e886598 ("ath11k: clear the keys properly via DISABLE_KEY")
|
||||
Signed-off-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
|
||||
Tested-by: Nicolas Escande <nico.escande@gmail.com>
|
||||
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
|
||||
Link: https://patch.msgid.link/20250810170018.1124014-1-rameshkumar.sundaram@oss.qualcomm.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/core.h | 2 +
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 111 ++++++++++++++++++++++++++++++---
|
||||
2 files changed, 104 insertions(+), 9 deletions(-)
|
||||
|
||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
||||
@@ -414,6 +414,8 @@ struct ath11k_vif {
|
||||
bool do_not_send_tmpl;
|
||||
struct ath11k_arp_ns_offload arp_ns_offload;
|
||||
struct ath11k_rekey_data rekey_data;
|
||||
+ u32 num_stations;
|
||||
+ bool reinstall_group_keys;
|
||||
|
||||
struct ath11k_reg_tpc_power_info reg_tpc_info;
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -4317,6 +4317,40 @@ static int ath11k_clear_peer_keys(struct
|
||||
return first_errno;
|
||||
}
|
||||
|
||||
+static int ath11k_set_group_keys(struct ath11k_vif *arvif)
|
||||
+{
|
||||
+ struct ath11k *ar = arvif->ar;
|
||||
+ struct ath11k_base *ab = ar->ab;
|
||||
+ const u8 *addr = arvif->bssid;
|
||||
+ int i, ret, first_errno = 0;
|
||||
+ struct ath11k_peer *peer;
|
||||
+
|
||||
+ spin_lock_bh(&ab->base_lock);
|
||||
+ peer = ath11k_peer_find(ab, arvif->vdev_id, addr);
|
||||
+ spin_unlock_bh(&ab->base_lock);
|
||||
+
|
||||
+ if (!peer)
|
||||
+ return -ENOENT;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(peer->keys); i++) {
|
||||
+ struct ieee80211_key_conf *key = peer->keys[i];
|
||||
+
|
||||
+ if (!key || (key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
|
||||
+ continue;
|
||||
+
|
||||
+ ret = ath11k_install_key(arvif, key, SET_KEY, addr,
|
||||
+ WMI_KEY_GROUP);
|
||||
+ if (ret < 0 && first_errno == 0)
|
||||
+ first_errno = ret;
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ ath11k_warn(ab, "failed to set group key of idx %d for vdev %d: %d\n",
|
||||
+ i, arvif->vdev_id, ret);
|
||||
+ }
|
||||
+
|
||||
+ return first_errno;
|
||||
+}
|
||||
+
|
||||
static int ath11k_mac_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
||||
struct ieee80211_vif *vif, struct ieee80211_sta *sta,
|
||||
struct ieee80211_key_conf *key)
|
||||
@@ -4326,6 +4360,7 @@ static int ath11k_mac_op_set_key(struct
|
||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
||||
struct ath11k_peer *peer;
|
||||
struct ath11k_sta *arsta;
|
||||
+ bool is_ap_with_no_sta;
|
||||
const u8 *peer_addr;
|
||||
int ret = 0;
|
||||
u32 flags = 0;
|
||||
@@ -4386,16 +4421,57 @@ static int ath11k_mac_op_set_key(struct
|
||||
else
|
||||
flags |= WMI_KEY_GROUP;
|
||||
|
||||
- ret = ath11k_install_key(arvif, key, cmd, peer_addr, flags);
|
||||
- if (ret) {
|
||||
- ath11k_warn(ab, "ath11k_install_key failed (%d)\n", ret);
|
||||
- goto exit;
|
||||
- }
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
+ "%s for peer %pM on vdev %d flags 0x%X, type = %d, num_sta %d\n",
|
||||
+ cmd == SET_KEY ? "SET_KEY" : "DEL_KEY", peer_addr, arvif->vdev_id,
|
||||
+ flags, arvif->vdev_type, arvif->num_stations);
|
||||
+
|
||||
+ /* Allow group key clearing only in AP mode when no stations are
|
||||
+ * associated. There is a known race condition in firmware where
|
||||
+ * group addressed packets may be dropped if the key is cleared
|
||||
+ * and immediately set again during rekey.
|
||||
+ *
|
||||
+ * During GTK rekey, mac80211 issues a clear key (if the old key
|
||||
+ * exists) followed by an install key operation for same key
|
||||
+ * index. This causes ath11k to send two WMI commands in quick
|
||||
+ * succession: one to clear the old key and another to install the
|
||||
+ * new key in the same slot.
|
||||
+ *
|
||||
+ * Under certain conditions—especially under high load or time
|
||||
+ * sensitive scenarios, firmware may process these commands
|
||||
+ * asynchronously in a way that firmware assumes the key is
|
||||
+ * cleared whereas hardware has a valid key. This inconsistency
|
||||
+ * between hardware and firmware leads to group addressed packet
|
||||
+ * drops after rekey.
|
||||
+ * Only setting the same key again can restore a valid key in
|
||||
+ * firmware and allow packets to be transmitted.
|
||||
+ *
|
||||
+ * There is a use case where an AP can transition from Secure mode
|
||||
+ * to open mode without a vdev restart by just deleting all
|
||||
+ * associated peers and clearing key, Hence allow clear key for
|
||||
+ * that case alone. Mark arvif->reinstall_group_keys in such cases
|
||||
+ * and reinstall the same key when the first peer is added,
|
||||
+ * allowing firmware to recover from the race if it had occurred.
|
||||
+ */
|
||||
|
||||
- ret = ath11k_dp_peer_rx_pn_replay_config(arvif, peer_addr, cmd, key);
|
||||
- if (ret) {
|
||||
- ath11k_warn(ab, "failed to offload PN replay detection %d\n", ret);
|
||||
- goto exit;
|
||||
+ is_ap_with_no_sta = (vif->type == NL80211_IFTYPE_AP &&
|
||||
+ !arvif->num_stations);
|
||||
+ if ((flags & WMI_KEY_PAIRWISE) || cmd == SET_KEY || is_ap_with_no_sta) {
|
||||
+ ret = ath11k_install_key(arvif, key, cmd, peer_addr, flags);
|
||||
+ if (ret) {
|
||||
+ ath11k_warn(ab, "ath11k_install_key failed (%d)\n", ret);
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ ret = ath11k_dp_peer_rx_pn_replay_config(arvif, peer_addr, cmd, key);
|
||||
+ if (ret) {
|
||||
+ ath11k_warn(ab, "failed to offload PN replay detection %d\n",
|
||||
+ ret);
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ if ((flags & WMI_KEY_GROUP) && cmd == SET_KEY && is_ap_with_no_sta)
|
||||
+ arvif->reinstall_group_keys = true;
|
||||
}
|
||||
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
@@ -4994,6 +5070,7 @@ static int ath11k_mac_inc_num_stations(s
|
||||
return -ENOBUFS;
|
||||
|
||||
ar->num_stations++;
|
||||
+ arvif->num_stations++;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -5009,6 +5086,7 @@ static void ath11k_mac_dec_num_stations(
|
||||
return;
|
||||
|
||||
ar->num_stations--;
|
||||
+ arvif->num_stations--;
|
||||
}
|
||||
|
||||
static u32 ath11k_mac_ieee80211_sta_bw_to_wmi(struct ath11k *ar,
|
||||
@@ -9553,6 +9631,21 @@ static int ath11k_mac_station_add(struct
|
||||
goto exit;
|
||||
}
|
||||
|
||||
+ /* Driver allows the DEL KEY followed by SET KEY sequence for
|
||||
+ * group keys for only when there is no clients associated, if at
|
||||
+ * all firmware has entered the race during that window,
|
||||
+ * reinstalling the same key when the first sta connects will allow
|
||||
+ * firmware to recover from the race.
|
||||
+ */
|
||||
+ if (arvif->num_stations == 1 && arvif->reinstall_group_keys) {
|
||||
+ ath11k_dbg(ab, ATH11K_DBG_MAC, "set group keys on 1st station add for vdev %d\n",
|
||||
+ arvif->vdev_id);
|
||||
+ ret = ath11k_set_group_keys(arvif);
|
||||
+ if (ret)
|
||||
+ goto dec_num_station;
|
||||
+ arvif->reinstall_group_keys = false;
|
||||
+ }
|
||||
+
|
||||
arsta->rx_stats = kzalloc(sizeof(*arsta->rx_stats), GFP_KERNEL);
|
||||
if (!arsta->rx_stats) {
|
||||
ret = -ENOMEM;
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
From 888830b2cbc035838bebefe94502976da94332a5 Mon Sep 17 00:00:00 2001
|
||||
From: Matvey Kovalev <matvey.kovalev@ispras.ru>
|
||||
Date: Wed, 17 Sep 2025 22:20:01 +0300
|
||||
Subject: wifi: ath11k: fix NULL dereference in ath11k_qmi_m3_load()
|
||||
|
||||
commit 3fd2ef2ae2b5c955584a3bee8e83ae7d7a98f782 upstream.
|
||||
|
||||
If ab->fw.m3_data points to data, then fw pointer remains null.
|
||||
Further, if m3_mem is not allocated, then fw is dereferenced to be
|
||||
passed to ath11k_err function.
|
||||
|
||||
Replace fw->size by m3_len.
|
||||
|
||||
Found by Linux Verification Center (linuxtesting.org) with SVACE.
|
||||
|
||||
Fixes: 7db88b962f06 ("wifi: ath11k: add firmware-2.bin support")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Matvey Kovalev <matvey.kovalev@ispras.ru>
|
||||
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
|
||||
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
|
||||
Link: https://patch.msgid.link/20250917192020.1340-1-matvey.kovalev@ispras.ru
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2576,7 +2576,7 @@ static int ath11k_qmi_m3_load(struct ath
|
||||
GFP_KERNEL);
|
||||
if (!m3_mem->vaddr) {
|
||||
ath11k_err(ab, "failed to allocate memory for M3 with size %zu\n",
|
||||
- fw->size);
|
||||
+ m3_len);
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -130,7 +130,7 @@ Best regards,
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -2832,6 +2832,9 @@ int ath12k_wmi_send_scan_chan_list_cmd(s
|
||||
@@ -2891,6 +2891,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,12 +142,12 @@ Best regards,
|
|||
arg->nallchans -= num_send_chans;
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3947,6 +3947,8 @@ struct wmi_stop_scan_cmd {
|
||||
@@ -4004,6 +4004,8 @@ struct wmi_stop_scan_cmd {
|
||||
__le32 pdev_id;
|
||||
} __packed;
|
||||
|
||||
+#define WMI_MAX_NUM_CHAN_PER_WMI_CMD 58
|
||||
+
|
||||
struct ath12k_wmi_scan_chan_list_arg {
|
||||
struct list_head list;
|
||||
u32 pdev_id;
|
||||
u16 nallchans;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ Best regards,
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -6985,9 +6985,7 @@ static void ath12k_mac_setup_ht_vht_cap(
|
||||
@@ -7723,9 +7723,7 @@ static void ath12k_mac_setup_ht_vht_cap(
|
||||
rate_cap_rx_chainmask);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,484 +0,0 @@
|
|||
From patchwork Wed May 21 22:45:31 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 14096118
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.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 8D9B523506D
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:57 +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=1747867559; cv=none;
|
||||
b=QXLrpE5trQYq3qZVPuAYdZ8IfmZi7XatjLyxn+9IZXmAWvPsCpT2EOrmLKoTKXH1gxwInwHzxiiwzDveDdYBFh2FGnxhAgdJlTBf1yChfW7+YndhKTtca3rP8z+Zt8QK48/n7gpmFEWkKGmxkG1DKIkCHgAZjD///ttubaAe2gc=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1747867559; c=relaxed/simple;
|
||||
bh=wlnSlGktw4cBYqpNPJwSPfG4fkld5ABcJ0NmmjY/jLg=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=A4dIxT87Fh9Y97+jvDIVTPlA5cnixK5ZcCAl5lklS0dCWBpo0QkFFiYyRUSKso7kYaT6KFazofkMt8A2z/fDgN8gVZgqEkaXDFSRjqNWCtoplSK7qYryl88snzbQvzD52CbWKkX8yu2Qmd98HFrl2kg69o1e4wzXVcNc+fehea8=
|
||||
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=gwsO0461; 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="gwsO0461"
|
||||
Received: from pps.filterd (m0279871.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
54LIZCMW000836;
|
||||
Wed, 21 May 2025 22:45:53 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=
|
||||
jJ/9931jjDg+8neUbH09oigyzQwINmgJKgsYw6rWwPU=; b=gwsO0461NDm4hzMy
|
||||
/aP5LNjbfqB08SmlMEzcZ/MRNS7Ffjdvz9gsUyJR4DOilx71C5MvB0ZBvxEJF6pg
|
||||
qcU4QPZtOzyixWx+3vL6eh4Sdt/RN5AD/6U6TJEZCPwdJNLMD5uB2OQjP87NG9Wj
|
||||
2aEs+kb//lRXz6Gy5d7CCDW3+1KSDzgIg/cYJecPjWsMKbyCxTeFTIkkdonetQyz
|
||||
PSzkIDi3IBnca94koYTQyFTVvpUVHpC3QAq+jM9+xQJOItRbDHZjdPjLG6q1ML4W
|
||||
zYHODhd8LupxL323rnWJQxtYu5Ver7g2LgPW3npNz/JEdF2Hq9b8G0w5U8qVJVHr
|
||||
2nNuUA==
|
||||
Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf6vbsd-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:53 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjqLl023280
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:52 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:51 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Muna Sinada <quic_msinada@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 1/9] wifi: ath12k: push HE MU-MIMO params to
|
||||
hardware
|
||||
Date: Wed, 21 May 2025 15:45:31 -0700
|
||||
Message-ID: <20250521224539.355985-2-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@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: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196)
|
||||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-GUID: Zzf2Q5y4JzSN5f1E_vlCnvLRODG4zasa
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfXyLZVeJQcQf0U
|
||||
B/O6/0+L+1nXg6SAFSC1bdc8B/eF8RxRnvbbX+YkF3RG14/UHGCF654g8ZXTq8oTCDzm3x5wmAk
|
||||
i8wAlv0otog8iYaicRd5q/x9Vynwlo0e67/iHhH1K0rxsp5yagZ6L3XLS82iLDPuXzHP7ylgo+I
|
||||
D0c1CMcLo4bGNe421uQk2jqRij3j1iAoI0gGSwcQqHRucJQSYetF+SSp/oDox9Dn2TqOagngt4V
|
||||
UxzAxO13SoH2X7RyWe5NxhfbEjOUmHjfodyJhBfIYh4s5SCx8IDUn6jSorAnl5mh1ZmAfISyZCC
|
||||
UqoQ2LDdmGl1HT3d4xvb7/ah09ru4wukKEcvP+HDrow6Xn/WsfgmRy6xdRv5vdNODiEv64XOGHa
|
||||
TxrJA2l36xRwX82xvkyUzyQ1sIeXwbvD0Wn//AQSmFVE0uMJHnCwRE1OYRGf9Dd2p/mfZfFh
|
||||
X-Authority-Analysis: v=2.4 cv=fZOty1QF c=1 sm=1 tr=0 ts=682e57a1 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=-_O-Wy8N5QNPZvNXkjkA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-ORIG-GUID: Zzf2Q5y4JzSN5f1E_vlCnvLRODG4zasa
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
clxscore=1015 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 suspectscore=0
|
||||
malwarescore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999
|
||||
lowpriorityscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a
|
||||
authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210226
|
||||
|
||||
Currently, only the HE IE in management frames is updated with
|
||||
respect to MU-MIMO configurations, but this change is not
|
||||
reflected in the hardware. Add support to propagate MU-MIMO
|
||||
configurations to the hardware as well.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Co-developed-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 228 +++++++++++++++++---------
|
||||
drivers/net/wireless/ath/ath12k/mac.h | 15 ++
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 28 +---
|
||||
3 files changed, 169 insertions(+), 102 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -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)
|
||||
+{
|
||||
+ struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
+ struct ath12k *ar = arvif->ar;
|
||||
+ u32 param = WMI_VDEV_PARAM_SET_HEMU_MODE;
|
||||
+ u32 value = 0;
|
||||
+ int ret;
|
||||
+ struct ieee80211_bss_conf *link_conf;
|
||||
+
|
||||
+ link_conf = ath12k_mac_get_link_bss_conf(arvif);
|
||||
+ if (!link_conf) {
|
||||
+ ath12k_warn(ar->ab, "unable to access bss link conf in txbf conf\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ if (!link_conf->he_support)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (link_conf->he_su_beamformer) {
|
||||
+ value |= u32_encode_bits(HE_SU_BFER_ENABLE, HE_MODE_SU_TX_BFER);
|
||||
+ if (link_conf->he_mu_beamformer &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_AP)
|
||||
+ value |= u32_encode_bits(HE_MU_BFER_ENABLE, HE_MODE_MU_TX_BFER);
|
||||
+ }
|
||||
+
|
||||
+ if (ahvif->vif->type != NL80211_IFTYPE_MESH_POINT) {
|
||||
+ value |= u32_encode_bits(HE_DL_MUOFDMA_ENABLE, HE_MODE_DL_OFDMA) |
|
||||
+ u32_encode_bits(HE_UL_MUOFDMA_ENABLE, HE_MODE_UL_OFDMA);
|
||||
+
|
||||
+ if (link_conf->he_full_ul_mumimo)
|
||||
+ value |= u32_encode_bits(HE_UL_MUMIMO_ENABLE, HE_MODE_UL_MUMIMO);
|
||||
+
|
||||
+ if (link_conf->he_su_beamformee)
|
||||
+ value |= u32_encode_bits(HE_SU_BFEE_ENABLE, HE_MODE_SU_TX_BFEE);
|
||||
+ }
|
||||
+
|
||||
+ ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, param, value);
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab, "failed to set vdev %d HE MU mode: %d\n",
|
||||
+ arvif->vdev_id, ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ param = WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE;
|
||||
+ value = u32_encode_bits(HE_VHT_SOUNDING_MODE_ENABLE, HE_VHT_SOUNDING_MODE) |
|
||||
+ u32_encode_bits(HE_TRIG_NONTRIG_SOUNDING_MODE_ENABLE,
|
||||
+ HE_TRIG_NONTRIG_SOUNDING_MODE);
|
||||
+ ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
|
||||
+ param, value);
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab, "failed to set vdev %d sounding mode: %d\n",
|
||||
+ arvif->vdev_id, ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ath12k_mac_vif_recalc_sta_he_txbf(struct ath12k *ar,
|
||||
+ struct ath12k_link_vif *arvif,
|
||||
+ struct ieee80211_sta_he_cap *he_cap,
|
||||
+ int *hemode)
|
||||
+{
|
||||
+ struct ieee80211_vif *vif = arvif->ahvif->vif;
|
||||
+ struct ieee80211_he_cap_elem he_cap_elem = {};
|
||||
+ struct ieee80211_sta_he_cap *cap_band;
|
||||
+ struct cfg80211_chan_def def;
|
||||
+ u8 link_id = arvif->link_id;
|
||||
+ struct ieee80211_bss_conf *link_conf;
|
||||
+
|
||||
+ link_conf = ath12k_mac_get_link_bss_conf(arvif);
|
||||
+ if (!link_conf) {
|
||||
+ ath12k_warn(ar->ab, "unable to access bss link conf in recalc txbf conf\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ if (!link_conf->he_support)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (vif->type != NL80211_IFTYPE_STATION)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (WARN_ON(ath12k_mac_vif_link_chan(vif, link_id, &def)))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (def.chan->band == NL80211_BAND_2GHZ)
|
||||
+ cap_band = &ar->mac.iftype[NL80211_BAND_2GHZ][vif->type].he_cap;
|
||||
+ else
|
||||
+ cap_band = &ar->mac.iftype[NL80211_BAND_5GHZ][vif->type].he_cap;
|
||||
+
|
||||
+ memcpy(&he_cap_elem, &cap_band->he_cap_elem, sizeof(he_cap_elem));
|
||||
+
|
||||
+ *hemode = 0;
|
||||
+ if (HECAP_PHY_SUBFME_GET(he_cap_elem.phy_cap_info)) {
|
||||
+ if (HECAP_PHY_SUBFMR_GET(he_cap->he_cap_elem.phy_cap_info))
|
||||
+ *hemode |= u32_encode_bits(HE_SU_BFEE_ENABLE, HE_MODE_SU_TX_BFEE);
|
||||
+ if (HECAP_PHY_MUBFMR_GET(he_cap->he_cap_elem.phy_cap_info))
|
||||
+ *hemode |= u32_encode_bits(HE_MU_BFEE_ENABLE, HE_MODE_MU_TX_BFEE);
|
||||
+ }
|
||||
+
|
||||
+ if (vif->type != NL80211_IFTYPE_MESH_POINT) {
|
||||
+ *hemode |= u32_encode_bits(HE_DL_MUOFDMA_ENABLE, HE_MODE_DL_OFDMA) |
|
||||
+ u32_encode_bits(HE_UL_MUOFDMA_ENABLE, HE_MODE_UL_OFDMA);
|
||||
+
|
||||
+ if (HECAP_PHY_ULMUMIMO_GET(he_cap_elem.phy_cap_info))
|
||||
+ if (HECAP_PHY_ULMUMIMO_GET(he_cap->he_cap_elem.phy_cap_info))
|
||||
+ *hemode |= u32_encode_bits(HE_UL_MUMIMO_ENABLE,
|
||||
+ HE_MODE_UL_MUMIMO);
|
||||
+
|
||||
+ if (u32_get_bits(*hemode, HE_MODE_MU_TX_BFEE))
|
||||
+ *hemode |= u32_encode_bits(HE_SU_BFEE_ENABLE, HE_MODE_SU_TX_BFEE);
|
||||
+
|
||||
+ if (u32_get_bits(*hemode, HE_MODE_MU_TX_BFER))
|
||||
+ *hemode |= u32_encode_bits(HE_SU_BFER_ENABLE, HE_MODE_SU_TX_BFER);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void ath12k_bss_assoc(struct ath12k *ar,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
@@ -3187,6 +3306,7 @@ static void ath12k_bss_assoc(struct ath1
|
||||
struct ath12k_sta *ahsta;
|
||||
struct ath12k_peer *peer;
|
||||
bool is_auth = false;
|
||||
+ u32 hemode = 0;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
@@ -3230,8 +3350,26 @@ static void ath12k_bss_assoc(struct ath1
|
||||
|
||||
ath12k_peer_assoc_prepare(ar, arvif, arsta, peer_arg, false);
|
||||
|
||||
+ /* link_sta->he_cap must be protected by rcu_read_lock */
|
||||
+ ret = ath12k_mac_vif_recalc_sta_he_txbf(ar, arvif, &link_sta->he_cap, &hemode);
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab, "failed to recalc he txbf for vdev %i on bss %pM: %d\n",
|
||||
+ arvif->vdev_id, bss_conf->bssid, ret);
|
||||
+ rcu_read_unlock();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
rcu_read_unlock();
|
||||
|
||||
+ /* keep this before ath12k_wmi_send_peer_assoc_cmd() */
|
||||
+ ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
|
||||
+ WMI_VDEV_PARAM_SET_HEMU_MODE, hemode);
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab, "failed to submit vdev param txbf 0x%x: %d\n",
|
||||
+ hemode, ret);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
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",
|
||||
@@ -3850,6 +3988,13 @@ static void ath12k_mac_bss_info_changed(
|
||||
ether_addr_copy(arvif->bssid, info->bssid);
|
||||
|
||||
if (changed & BSS_CHANGED_BEACON_ENABLED) {
|
||||
+ if (info->enable_beacon) {
|
||||
+ ret = ath12k_mac_set_he_txbf_conf(arvif);
|
||||
+ if (ret)
|
||||
+ ath12k_warn(ar->ab,
|
||||
+ "failed to set HE TXBF config for vdev: %d\n",
|
||||
+ arvif->vdev_id);
|
||||
+ }
|
||||
ath12k_control_beaconing(arvif, info);
|
||||
|
||||
if (arvif->is_up && info->he_support &&
|
||||
@@ -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;
|
||||
-
|
||||
+ he_cap_elem->phy_cap_info[0] &=
|
||||
+ 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;
|
||||
+ 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] &=
|
||||
~IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK;
|
||||
- he_cap_elem->phy_cap_info[5] &=
|
||||
- ~IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_MASK;
|
||||
he_cap_elem->phy_cap_info[5] |= num_tx_chains - 1;
|
||||
|
||||
switch (iftype) {
|
||||
@@ -8454,72 +8602,6 @@ static int ath12k_mac_setup_vdev_create_
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static u32
|
||||
-ath12k_mac_prepare_he_mode(struct ath12k_pdev *pdev, u32 viftype)
|
||||
-{
|
||||
- struct ath12k_pdev_cap *pdev_cap = &pdev->cap;
|
||||
- struct ath12k_band_cap *cap_band = NULL;
|
||||
- u32 *hecap_phy_ptr = NULL;
|
||||
- u32 hemode;
|
||||
-
|
||||
- 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];
|
||||
-
|
||||
- hecap_phy_ptr = &cap_band->he_cap_phy_info[0];
|
||||
-
|
||||
- hemode = u32_encode_bits(HE_SU_BFEE_ENABLE, HE_MODE_SU_TX_BFEE) |
|
||||
- u32_encode_bits(HECAP_PHY_SUBFMR_GET(hecap_phy_ptr),
|
||||
- HE_MODE_SU_TX_BFER) |
|
||||
- u32_encode_bits(HECAP_PHY_ULMUMIMO_GET(hecap_phy_ptr),
|
||||
- HE_MODE_UL_MUMIMO);
|
||||
-
|
||||
- /* TODO: WDS and other modes */
|
||||
- if (viftype == NL80211_IFTYPE_AP) {
|
||||
- hemode |= u32_encode_bits(HECAP_PHY_MUBFMR_GET(hecap_phy_ptr),
|
||||
- HE_MODE_MU_TX_BFER) |
|
||||
- u32_encode_bits(HE_DL_MUOFDMA_ENABLE, HE_MODE_DL_OFDMA) |
|
||||
- u32_encode_bits(HE_UL_MUOFDMA_ENABLE, HE_MODE_UL_OFDMA);
|
||||
- } else {
|
||||
- hemode |= u32_encode_bits(HE_MU_BFEE_ENABLE, HE_MODE_MU_TX_BFEE);
|
||||
- }
|
||||
-
|
||||
- return hemode;
|
||||
-}
|
||||
-
|
||||
-static int ath12k_set_he_mu_sounding_mode(struct ath12k *ar,
|
||||
- struct ath12k_link_vif *arvif)
|
||||
-{
|
||||
- u32 param_id, param_value;
|
||||
- struct ath12k_base *ab = ar->ab;
|
||||
- struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
- int ret;
|
||||
-
|
||||
- param_id = WMI_VDEV_PARAM_SET_HEMU_MODE;
|
||||
- param_value = ath12k_mac_prepare_he_mode(ar->pdev, ahvif->vif->type);
|
||||
- ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
|
||||
- param_id, param_value);
|
||||
- if (ret) {
|
||||
- ath12k_warn(ab, "failed to set vdev %d HE MU mode: %d param_value %x\n",
|
||||
- arvif->vdev_id, ret, param_value);
|
||||
- return ret;
|
||||
- }
|
||||
- param_id = WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE;
|
||||
- param_value =
|
||||
- u32_encode_bits(HE_VHT_SOUNDING_MODE_ENABLE, HE_VHT_SOUNDING_MODE) |
|
||||
- u32_encode_bits(HE_TRIG_NONTRIG_SOUNDING_MODE_ENABLE,
|
||||
- HE_TRIG_NONTRIG_SOUNDING_MODE);
|
||||
- ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
|
||||
- param_id, param_value);
|
||||
- if (ret) {
|
||||
- ath12k_warn(ab, "failed to set vdev %d HE MU mode: %d\n",
|
||||
- arvif->vdev_id, ret);
|
||||
- return ret;
|
||||
- }
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
static void ath12k_mac_update_vif_offload(struct ath12k_link_vif *arvif)
|
||||
{
|
||||
struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
@@ -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 */
|
||||
- if (link_conf->he_support) {
|
||||
- ret = ath12k_set_he_mu_sounding_mode(ar, arvif);
|
||||
- if (ret) {
|
||||
- ath12k_warn(ar->ab, "failed to set he mode vdev %i\n",
|
||||
- arg.vdev_id);
|
||||
- return ret;
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
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
|
||||
@@ -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)
|
||||
+
|
||||
+#define HECAP_PHY_SUBFME_GET(hecap_phy) \
|
||||
+ u8_get_bits(hecap_phy[4], IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE)
|
||||
+
|
||||
+#define HECAP_PHY_MUBFMR_GET(hecap_phy) \
|
||||
+ u8_get_bits(hecap_phy[4], IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER)
|
||||
+
|
||||
+#define HECAP_PHY_ULMUMIMO_GET(hecap_phy) \
|
||||
+ u8_get_bits(hecap_phy[2], IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO)
|
||||
+
|
||||
+#define HECAP_PHY_ULOFDMA_GET(hecap_phy) \
|
||||
+ u8_get_bits(hecap_phy[2], IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO)
|
||||
+
|
||||
enum ath12k_supported_bw {
|
||||
ATH12K_BW_20 = 0,
|
||||
ATH12K_BW_40 = 1,
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -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)
|
||||
|
||||
-#define HECAP_PHYDWORD_0 0
|
||||
-#define HECAP_PHYDWORD_1 1
|
||||
-#define HECAP_PHYDWORD_2 2
|
||||
-
|
||||
-#define HECAP_PHY_SU_BFER BIT(31)
|
||||
-#define HECAP_PHY_SU_BFEE BIT(0)
|
||||
-#define HECAP_PHY_MU_BFER BIT(1)
|
||||
-#define HECAP_PHY_UL_MUMIMO BIT(22)
|
||||
-#define HECAP_PHY_UL_MUOFDMA BIT(23)
|
||||
-
|
||||
-#define HECAP_PHY_SUBFMR_GET(hecap_phy) \
|
||||
- u32_get_bits(hecap_phy[HECAP_PHYDWORD_0], HECAP_PHY_SU_BFER)
|
||||
-
|
||||
-#define HECAP_PHY_SUBFME_GET(hecap_phy) \
|
||||
- u32_get_bits(hecap_phy[HECAP_PHYDWORD_1], HECAP_PHY_SU_BFEE)
|
||||
-
|
||||
-#define HECAP_PHY_MUBFMR_GET(hecap_phy) \
|
||||
- u32_get_bits(hecap_phy[HECAP_PHYDWORD_1], HECAP_PHY_MU_BFER)
|
||||
-
|
||||
-#define HECAP_PHY_ULMUMIMO_GET(hecap_phy) \
|
||||
- u32_get_bits(hecap_phy[HECAP_PHYDWORD_0], HECAP_PHY_UL_MUMIMO)
|
||||
-
|
||||
-#define HECAP_PHY_ULOFDMA_GET(hecap_phy) \
|
||||
- u32_get_bits(hecap_phy[HECAP_PHYDWORD_0], HECAP_PHY_UL_MUOFDMA)
|
||||
-
|
||||
#define HE_MODE_SU_TX_BFEE BIT(0)
|
||||
#define HE_MODE_SU_TX_BFER BIT(1)
|
||||
#define HE_MODE_MU_TX_BFEE BIT(2)
|
||||
@@ -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
|
||||
+#define HE_UL_MUMIMO_ENABLE 1
|
||||
#define HE_MU_BFEE_ENABLE 1
|
||||
#define HE_SU_BFEE_ENABLE 1
|
||||
+#define HE_MU_BFER_ENABLE 1
|
||||
+#define HE_SU_BFER_ENABLE 1
|
||||
|
||||
#define HE_VHT_SOUNDING_MODE_ENABLE 1
|
||||
#define HE_SU_MU_SOUNDING_MODE_ENABLE 1
|
||||
|
|
@ -1,242 +0,0 @@
|
|||
From patchwork Wed May 21 22:45:32 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 14096119
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.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 697B71A23AA
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:58 +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=1747867560; cv=none;
|
||||
b=XceXZ7CY2+FEzM9RuC10/cGW+vmyB2cX8QWJ3ckav7jiY5NYBQe1XW2asWcHaAEmOwdUh2iRT6imeiQLYue78g4UAcBErvihTGqlYL0m+10CQMNHmQZurUQkLPeFS0WAwlA+HBgcdp+Z71PhXs/ttQD6dF/8mlPaeGqxlTUoEcM=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1747867560; c=relaxed/simple;
|
||||
bh=mXjCwVOeMuqCjiNDATjkwHPrwNjm6Uv3d5yO5+bqbfk=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=SeDDAI+0lqXCMqhleIhxgpdPq9QuWaPI9jj0JOqYiwOIVtAsNqQv7KQ+AMvXDQTsIe0LfA2l23stlXB7sLNpKHTM9JhPsLkafU7mvBaiwTxaJR5tEi4zGQZhsrKSn/awYszamnM81hQS3r9bBgS4oe8AeFV2/lDXYPXNHCGv0+w=
|
||||
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=DwzHO5rL; 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="DwzHO5rL"
|
||||
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
|
||||
54LJflLg012749;
|
||||
Wed, 21 May 2025 22:45:53 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=
|
||||
tiHJ0bp145D1K0TKBussv+a5p9S+5sP37NuNrmk03fg=; b=DwzHO5rLl1Vp87qm
|
||||
lpxifM2nR9pLT0mgMqz/HRb/yTHCnS9oGDXzc24mnve2I/O9X/YT8q8qN+wjBlLB
|
||||
4W7snIItVpffzrSmAJupTNtzj8qbmIYeti1zUlDdVoesUaICbdiDvSeCWPUtfeaz
|
||||
tNKDOmBUTvCb+1qxxciQZhuRobmmkuRgcg8VkgCFP+OyG5o1OrUESYu3QeZ62Hle
|
||||
ODt78jw+qe8cE9e2TxGEZhy++loik0tbF8D9P3cX5L+CdB+i4TyWnFxwvNgJciIx
|
||||
RptE1lyB75UdrnAqETq0km4svwyidUuum/x0hqd6TvlDod3b7FD4tjbE7EP5iQ5V
|
||||
Dw2tXA==
|
||||
Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf9carr-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:53 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjqtS008810
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:52 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:52 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Muna Sinada <quic_msinada@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 2/9] wifi: ath12k: push EHT MU-MIMO params to
|
||||
hardware
|
||||
Date: Wed, 21 May 2025 15:45:32 -0700
|
||||
Message-ID: <20250521224539.355985-3-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@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: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196)
|
||||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-ORIG-GUID: _eaDrXLa14UhDtRJT-hk8Y6z1fwFI6QB
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNSBTYWx0ZWRfX7QgTyyXEHZM8
|
||||
OnUvphQD/4J77Z8iHm4hJQIe6duMI5HbpiWELH5aRxqU7pFuvCjmltcmWPjwls9DzTkJnDGHMjo
|
||||
FuBarQpMaZO8eQsx97aM8WpE0dpJHROE1ZRZ3SV8VEoTHHG712fvPw+oUWaZo6WccaEbxH9x9+W
|
||||
n76tkFOOopbjRgOBmCokHCrfZmCMKcT4FLUFoiIDn0Fv8b/WKaut3Z+1hrEwcOuXCJv4X1QIOcx
|
||||
6NCnxNr8y1O1cwqXg3pBhHB+BpcLiEat6TlD9bH/5oUZHFce4W1jkZYs2J5VJnzLDeQxq8xBhP0
|
||||
Qal3bpuUPyWAMKZKH/uAEXwEZ5ZMghUioGuc78EBMJhSXa2VsT3lhmJtc/CaHDqNKFrp01I/KAh
|
||||
7UcIN/PKb8qOKrHE8/8cpuHgoBgB24X84Qo5rORKfnW4s7FbS0xkcs2ZV2TI0AIGz4eEZAOY
|
||||
X-Authority-Analysis: v=2.4 cv=GawXnRXL c=1 sm=1 tr=0 ts=682e57a1 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=uoU_VXRAPQDrZd00miQA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-GUID: _eaDrXLa14UhDtRJT-hk8Y6z1fwFI6QB
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
mlxscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0
|
||||
priorityscore=1501 clxscore=1015 malwarescore=0 phishscore=0 bulkscore=0
|
||||
spamscore=0 suspectscore=0 adultscore=0 classifier=spam authscore=0
|
||||
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210225
|
||||
|
||||
Currently, only the EHT IE in management frames is updated with
|
||||
respect to MU-MIMO configurations, but this change is not
|
||||
reflected in the hardware. Add support to propagate MU-MIMO
|
||||
configurations to the hardware as well for AP mode. Similar
|
||||
support for STA mode will be added in future.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Co-developed-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 58 +++++++++++++++++++++++++++
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 21 ++++++++++
|
||||
2 files changed, 79 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -3292,6 +3292,58 @@ static int ath12k_mac_vif_recalc_sta_he_
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int ath12k_mac_set_eht_txbf_conf(struct ath12k_link_vif *arvif)
|
||||
+{
|
||||
+ struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
+ struct ath12k *ar = arvif->ar;
|
||||
+ u32 param = WMI_VDEV_PARAM_SET_EHT_MU_MODE;
|
||||
+ u32 value = 0;
|
||||
+ int ret;
|
||||
+ struct ieee80211_bss_conf *link_conf;
|
||||
+
|
||||
+ link_conf = ath12k_mac_get_link_bss_conf(arvif);
|
||||
+ if (!link_conf) {
|
||||
+ ath12k_warn(ar->ab, "unable to access bss link conf in eht txbf conf\n");
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+
|
||||
+ if (!link_conf->eht_support)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (link_conf->eht_su_beamformer) {
|
||||
+ value |= u32_encode_bits(EHT_SU_BFER_ENABLE, EHT_MODE_SU_TX_BFER);
|
||||
+ if (link_conf->eht_mu_beamformer &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_AP)
|
||||
+ value |= u32_encode_bits(EHT_MU_BFER_ENABLE,
|
||||
+ EHT_MODE_MU_TX_BFER) |
|
||||
+ u32_encode_bits(EHT_DL_MUOFDMA_ENABLE,
|
||||
+ EHT_MODE_DL_OFDMA_MUMIMO) |
|
||||
+ u32_encode_bits(EHT_UL_MUOFDMA_ENABLE,
|
||||
+ EHT_MODE_UL_OFDMA_MUMIMO);
|
||||
+ }
|
||||
+
|
||||
+ if (ahvif->vif->type != NL80211_IFTYPE_MESH_POINT) {
|
||||
+ value |= u32_encode_bits(EHT_DL_MUOFDMA_ENABLE, EHT_MODE_DL_OFDMA) |
|
||||
+ u32_encode_bits(EHT_UL_MUOFDMA_ENABLE, EHT_MODE_UL_OFDMA);
|
||||
+
|
||||
+ if (link_conf->eht_80mhz_full_bw_ul_mumimo)
|
||||
+ value |= u32_encode_bits(EHT_UL_MUMIMO_ENABLE, EHT_MODE_MUMIMO);
|
||||
+
|
||||
+ if (link_conf->eht_su_beamformee)
|
||||
+ value |= u32_encode_bits(EHT_SU_BFEE_ENABLE,
|
||||
+ EHT_MODE_SU_TX_BFEE);
|
||||
+ }
|
||||
+
|
||||
+ ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, param, value);
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab, "failed to set vdev %d EHT MU mode: %d\n",
|
||||
+ arvif->vdev_id, ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void ath12k_bss_assoc(struct ath12k *ar,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
@@ -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);
|
||||
+
|
||||
+ ret = ath12k_mac_set_eht_txbf_conf(arvif);
|
||||
+ if (ret)
|
||||
+ ath12k_warn(ar->ab,
|
||||
+ "failed to set EHT TXBF config for vdev: %d\n",
|
||||
+ arvif->vdev_id);
|
||||
}
|
||||
ath12k_control_beaconing(arvif, info);
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -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,
|
||||
+ WMI_VDEV_PARAM_SET_EHT_MU_MODE = 0x8005,
|
||||
};
|
||||
|
||||
enum wmi_tlv_peer_flags {
|
||||
@@ -3148,6 +3149,26 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
#define HE_MU_BFER_ENABLE 1
|
||||
#define HE_SU_BFER_ENABLE 1
|
||||
|
||||
+#define EHT_MODE_SU_TX_BFEE BIT(0)
|
||||
+#define EHT_MODE_SU_TX_BFER BIT(1)
|
||||
+#define EHT_MODE_MU_TX_BFEE BIT(2)
|
||||
+#define EHT_MODE_MU_TX_BFER BIT(3)
|
||||
+#define EHT_MODE_DL_OFDMA BIT(4)
|
||||
+#define EHT_MODE_UL_OFDMA BIT(5)
|
||||
+#define EHT_MODE_MUMIMO BIT(6)
|
||||
+#define EHT_MODE_DL_OFDMA_TXBF BIT(7)
|
||||
+#define EHT_MODE_DL_OFDMA_MUMIMO BIT(8)
|
||||
+#define EHT_MODE_UL_OFDMA_MUMIMO BIT(9)
|
||||
+
|
||||
+#define EHT_DL_MUOFDMA_ENABLE 1
|
||||
+#define EHT_UL_MUOFDMA_ENABLE 1
|
||||
+#define EHT_DL_MUMIMO_ENABLE 1
|
||||
+#define EHT_UL_MUMIMO_ENABLE 1
|
||||
+#define EHT_MU_BFEE_ENABLE 1
|
||||
+#define EHT_SU_BFEE_ENABLE 1
|
||||
+#define EHT_MU_BFER_ENABLE 1
|
||||
+#define EHT_SU_BFER_ENABLE 1
|
||||
+
|
||||
#define HE_VHT_SOUNDING_MODE_ENABLE 1
|
||||
#define HE_SU_MU_SOUNDING_MODE_ENABLE 1
|
||||
#define HE_TRIG_NONTRIG_SOUNDING_MODE_ENABLE 1
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
From patchwork Wed May 21 22:45:33 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 14096126
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.com
|
||||
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com
|
||||
[205.220.168.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 A4E00239570
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:46:01 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.168.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1747867563; cv=none;
|
||||
b=m0NU8tyG2d1pHiYNjTYhCTeGXC0pFtHNZTKxb+dc5AEzzUCa75lxPxtYFZApv1QHaLqo3lGkZ+ADhqhj/V82GA+bUeetm3hSsnyGgjbayU3IzqeO09+VPkt9sx9hdrTMlVGEI4c5881Zho41rlVW65O/SlmqRi4J/ajQzA4tiGQ=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1747867563; c=relaxed/simple;
|
||||
bh=0bTV82dMwisd7nmbtolnSKswG/aTjqN0YxpAx66Oqv8=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=jOkezej/N9fmvOtPNCGPpnPNtoQ+pAG4k1zAiw3xnL1iikk7VcJlbXDCrGUithxMZE2513zz/fsfDjXx0AMi4YT1ISljvGCw9B0dGQ5ECiFfoGLc+12nnsvqjiXI5zla6C1iX7bgtJjv/OYWzoY0TR5jI28CZWC/Pa9fT/X0duw=
|
||||
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=UqUMYAcW; arc=none smtp.client-ip=205.220.168.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="UqUMYAcW"
|
||||
Received: from pps.filterd (m0279866.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
54LIDlKw013406;
|
||||
Wed, 21 May 2025 22:45:53 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=
|
||||
tYXOeicncMlFjsw5kmnB5kxC/Nrj/HibF1jgO4m8lhM=; b=UqUMYAcWWQ07Z79h
|
||||
GESSroshxr6zIUBw3jr/ESGDCO554RYWZZh9PXJxjTRM3ceCrNHNpCAT+mqXXiWy
|
||||
eb+l7G0W+s1l/MStBq7B43CSdKxljZtlkC/JsHk6DQjBacQzVB8qAiq3ShbR/vn7
|
||||
ud3kzjHtYsfLvIpi+8wLTkE1in8E/CUFZ4bea866xldnrcOVEa7EuxKwKXj3sLhE
|
||||
8n3IsPUIYGLKnEFkmWFZTXTqlEOV9lVYdTxeDAUBxII8PQIKu+dlB/UWffTFTSOd
|
||||
aQDPK5N6y8x29E2fugyy2XBSEFskz50Jb60+kJhHFGTgl5cQw+NfymuC9SQJBWaE
|
||||
HFZu+w==
|
||||
Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwh5cfg1-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:53 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjqn9020293
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:52 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:52 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Muna Sinada <quic_msinada@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 3/9] wifi: ath12k: move HE MCS mapper to a
|
||||
separate function
|
||||
Date: Wed, 21 May 2025 15:45:33 -0700
|
||||
Message-ID: <20250521224539.355985-4-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@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: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196)
|
||||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX0c42ymLt+PTP
|
||||
1OuRw1LMafhFmBy7Y+zhs50WttVxoryUfqamicOcfcFB1N0ReYFgzeQ7geC/w54E8E6mzQDYeie
|
||||
WWkPGvuIyvtCjzhBcBwz1A7W/LdsI7Od6+VlXyCuAp4pbCASB7kqVnI7Neak6mvdIQIW5khVLX7
|
||||
r/364Kop8/BPQzOVUZf5snfx4TBCgWauiHZQBTJupIn1Tf8+NctUXB8H3QNfu8zJTLVrBA3rtt1
|
||||
+yjeNOHom4U/t0u5Vzxu+8XctXsWHoYytfluXbsRo7WNut0MwPSY8GCm7RQ2wDQp0CzdactGb6t
|
||||
KCMvNcpkDRjEtOdkNtf2BeVHF1yJKxuibe6qssobLjTadJRkC33xnz5E+hzF6sEZlg7JWok01h4
|
||||
OxWFUldQYnF/eQjZYTQcgLyH91h9gWkvz0YJWKGCrg0PlxqeIFS/SQvVNs7qMnsX0qrXb7NV
|
||||
X-Authority-Analysis: v=2.4 cv=XeWJzJ55 c=1 sm=1 tr=0 ts=682e57a1 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=4Pgy4kl5F6fn7-PMLAkA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-GUID: CVZHk1FyIP3eCYHbVaXVp1fjSAGIjnVJ
|
||||
X-Proofpoint-ORIG-GUID: CVZHk1FyIP3eCYHbVaXVp1fjSAGIjnVJ
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
phishscore=0 clxscore=1015 mlxlogscore=999 mlxscore=0 bulkscore=0 spamscore=0
|
||||
suspectscore=0 impostorscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0
|
||||
priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc=
|
||||
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000
|
||||
definitions=main-2505210226
|
||||
|
||||
Refactor the HE MCS mapper functionality in
|
||||
ath12k_mac_copy_he_cap() into a new function.
|
||||
|
||||
This helps improve readability, extensibility and will be used
|
||||
when adding support for 160 MHz bandwidth in subsequent patches.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Co-developed-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 22 ++++++++++++++--------
|
||||
1 file changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -7339,12 +7339,24 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
return cpu_to_le16(bcap->he_6ghz_capa);
|
||||
}
|
||||
|
||||
+static void ath12k_mac_set_hemcsmap(struct ath12k_band_cap *band_cap,
|
||||
+ struct ieee80211_sta_he_cap *he_cap)
|
||||
+{
|
||||
+ struct ieee80211_he_mcs_nss_supp *mcs_nss = &he_cap->he_mcs_nss_supp;
|
||||
+
|
||||
+ mcs_nss->rx_mcs_80 = cpu_to_le16(band_cap->he_mcs & 0xffff);
|
||||
+ mcs_nss->tx_mcs_80 = cpu_to_le16(band_cap->he_mcs & 0xffff);
|
||||
+ mcs_nss->rx_mcs_160 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
+ mcs_nss->tx_mcs_160 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
+ mcs_nss->rx_mcs_80p80 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
+ mcs_nss->tx_mcs_80p80 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
+}
|
||||
+
|
||||
static void ath12k_mac_copy_he_cap(struct ath12k_band_cap *band_cap,
|
||||
int iftype, u8 num_tx_chains,
|
||||
struct ieee80211_sta_he_cap *he_cap)
|
||||
{
|
||||
struct ieee80211_he_cap_elem *he_cap_elem = &he_cap->he_cap_elem;
|
||||
- struct ieee80211_he_mcs_nss_supp *mcs_nss = &he_cap->he_mcs_nss_supp;
|
||||
|
||||
he_cap->has_he = true;
|
||||
memcpy(he_cap_elem->mac_cap_info, band_cap->he_cap_info,
|
||||
@@ -7384,13 +7396,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
break;
|
||||
}
|
||||
|
||||
- mcs_nss->rx_mcs_80 = cpu_to_le16(band_cap->he_mcs & 0xffff);
|
||||
- mcs_nss->tx_mcs_80 = cpu_to_le16(band_cap->he_mcs & 0xffff);
|
||||
- mcs_nss->rx_mcs_160 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
- mcs_nss->tx_mcs_160 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
- mcs_nss->rx_mcs_80p80 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
- mcs_nss->tx_mcs_80p80 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
-
|
||||
+ ath12k_mac_set_hemcsmap(band_cap, he_cap);
|
||||
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)
|
||||
|
|
@ -1,197 +0,0 @@
|
|||
From patchwork Wed May 21 22:45:34 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 14096123
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.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 A3C04239581
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:57 +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=1747867561; cv=none;
|
||||
b=JUfYB6YNOea3E6luldlHf63eW7OUVXEtawJXGCeH7nt9iIJpG0ODfz3v+Zl+gtQtUZ1ELh/UAhCubbThHH30w661eEN5+cQarbiqdd1cN5dnkAsmZUNSD6l//QpurFV6Wsvv4Nr2fYgyuAVHf9JDoITZKNEbIki68J7WTV+fieU=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1747867561; c=relaxed/simple;
|
||||
bh=e6/wBkUC5dKwNLeEqNLmC/3pJt4EcGfxZRx+zntD5Ek=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=bg3Y4gdyPqhSKZtqqeN+SjMvTgg+BVUsyqAvkS3YPjV+C7dPwxcByNFjDRsuBqwHuSvgolo2ISExqyfJkgT6Flp4H+hriFJHcMdI0WmDf9NrBPI+E07JvNLDvP5X59C6pSrqpjXYngUV6AvPCJL7ynVBFF80h0neCm0IRu8Ur8w=
|
||||
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=LbIprPEi; 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="LbIprPEi"
|
||||
Received: from pps.filterd (m0279873.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
54LIdAVE024983;
|
||||
Wed, 21 May 2025 22:45:54 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=
|
||||
oR9JZ4DE7PwiZ/DcP72BpK9yTZspsBeRbWSrP3w24nY=; b=LbIprPEif55TZs6Z
|
||||
ZsvTaIhFDxESbkxn/avX548dzh51JY3wFWHowpcPEnJJdIE1oNPWkxrPo0hHkyUb
|
||||
UICPtIHoZHdMwN/uHPyglzBnBLNP82LGLHZI5eHx6jVz4INyCFm1Gmof8YNLLIo/
|
||||
pTKj4Qx3OO0jH6zSnAoKIIg39v5TWetjVZbL2qbNR+GImD0RtoefBQxRgyJWn11r
|
||||
O3ycFAW9xlW8wYJql07vue+hM3MWNtk5EPqF70c7JrrmMAYvTyOFuP0Kaf11szIB
|
||||
mF4bMyb+bb1/QA6moW7LDIoDBWEjCLINcTdGUPTnwnfBWlxZJhZoMqzU9ZuZgvsR
|
||||
1UjthA==
|
||||
Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf4vc5x-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:54 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjrWL023291
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:53 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:52 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Muna Sinada <quic_msinada@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 4/9] wifi: ath12k: generate rx and tx mcs maps
|
||||
for supported HE mcs
|
||||
Date: Wed, 21 May 2025 15:45:34 -0700
|
||||
Message-ID: <20250521224539.355985-5-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@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: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196)
|
||||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-GUID: mYgnUwiU6CWGXCKmK4mo491eQG1yf62Y
|
||||
X-Proofpoint-ORIG-GUID: mYgnUwiU6CWGXCKmK4mo491eQG1yf62Y
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX1nkoUF8smaXX
|
||||
IWIOVUfe7hMPdAVBJy7J1imFvumQnVaEdoZ98Hgv5FTjeK2Ebgl2R2fohvg1z4LsyCLnU8qfg96
|
||||
1OdC0+PM8u7DhRIEnk7H2EZt0UJoJRxlc7daiIvimTjbBLu53yfgzses5Gth0zLCzoih5ffW/H5
|
||||
1h2tf1ZE4W6AmHjQJc+WE0P3RhBMdl286VT/kc0ko03He0+5/QdxsynqL2e4svB4f3035pzXOEK
|
||||
dUS4nBFSZJXuBkq0d//SizRJgH9egq51A/OVPm8om04qEcOK3x9OmrrborAen5I0iuLaqAMMBXa
|
||||
nlUKQ4fpPRovjAByevo6BIIwB698Nmo72bZcFiWOocONR92lAssB6pFXJnuwOC6VQ7MJE7DKc0x
|
||||
5UnlyGSMzMAM7cQXuGFk1AK16e6Tu/rC5YA6A4ogDKajrcBGepxGFKcZ+xK4+BwuwgI4Qysv
|
||||
X-Authority-Analysis: v=2.4 cv=R7UDGcRX c=1 sm=1 tr=0 ts=682e57a2 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=WmtfbAKxhnfIJFSrnnQA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
phishscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 spamscore=0
|
||||
bulkscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 mlxscore=0
|
||||
impostorscore=0 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc=
|
||||
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000
|
||||
definitions=main-2505210226
|
||||
|
||||
Generate rx and tx mcs maps in ath12k_mac_set_hemcsmap() based
|
||||
on number of supported tx/rx chains and set them in supported
|
||||
mcs/nss for HE capabilities.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Co-developed-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 40 ++++++++++++++++++++-------
|
||||
1 file changed, 30 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -7339,20 +7339,40 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
return cpu_to_le16(bcap->he_6ghz_capa);
|
||||
}
|
||||
|
||||
-static void ath12k_mac_set_hemcsmap(struct ath12k_band_cap *band_cap,
|
||||
+static void ath12k_mac_set_hemcsmap(struct ath12k *ar,
|
||||
+ struct ath12k_pdev_cap *cap,
|
||||
struct ieee80211_sta_he_cap *he_cap)
|
||||
{
|
||||
struct ieee80211_he_mcs_nss_supp *mcs_nss = &he_cap->he_mcs_nss_supp;
|
||||
+ u16 txmcs_map, rxmcs_map;
|
||||
+ u32 i;
|
||||
|
||||
- mcs_nss->rx_mcs_80 = cpu_to_le16(band_cap->he_mcs & 0xffff);
|
||||
- mcs_nss->tx_mcs_80 = cpu_to_le16(band_cap->he_mcs & 0xffff);
|
||||
- mcs_nss->rx_mcs_160 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
- mcs_nss->tx_mcs_160 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
- mcs_nss->rx_mcs_80p80 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
- mcs_nss->tx_mcs_80p80 = cpu_to_le16((band_cap->he_mcs >> 16) & 0xffff);
|
||||
+ rxmcs_map = 0;
|
||||
+ txmcs_map = 0;
|
||||
+ for (i = 0; i < 8; i++) {
|
||||
+ if (i < ar->num_tx_chains &&
|
||||
+ (ar->cfg_tx_chainmask >> cap->tx_chain_mask_shift) & BIT(i))
|
||||
+ txmcs_map |= IEEE80211_HE_MCS_SUPPORT_0_11 << (i * 2);
|
||||
+ else
|
||||
+ txmcs_map |= IEEE80211_HE_MCS_NOT_SUPPORTED << (i * 2);
|
||||
+
|
||||
+ if (i < ar->num_rx_chains &&
|
||||
+ (ar->cfg_rx_chainmask >> cap->tx_chain_mask_shift) & BIT(i))
|
||||
+ rxmcs_map |= IEEE80211_HE_MCS_SUPPORT_0_11 << (i * 2);
|
||||
+ else
|
||||
+ rxmcs_map |= IEEE80211_HE_MCS_NOT_SUPPORTED << (i * 2);
|
||||
+ }
|
||||
+
|
||||
+ mcs_nss->rx_mcs_80 = cpu_to_le16(rxmcs_map & 0xffff);
|
||||
+ 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);
|
||||
+ mcs_nss->rx_mcs_80p80 = cpu_to_le16(rxmcs_map & 0xffff);
|
||||
+ mcs_nss->tx_mcs_80p80 = cpu_to_le16(txmcs_map & 0xffff);
|
||||
}
|
||||
|
||||
-static void ath12k_mac_copy_he_cap(struct ath12k_band_cap *band_cap,
|
||||
+static void ath12k_mac_copy_he_cap(struct ath12k *ar,
|
||||
+ struct ath12k_band_cap *band_cap,
|
||||
int iftype, u8 num_tx_chains,
|
||||
struct ieee80211_sta_he_cap *he_cap)
|
||||
{
|
||||
@@ -7396,7 +7416,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
break;
|
||||
}
|
||||
|
||||
- ath12k_mac_set_hemcsmap(band_cap, he_cap);
|
||||
+ ath12k_mac_set_hemcsmap(ar, &ar->pdev->cap, he_cap);
|
||||
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)
|
||||
@@ -7586,7 +7606,7 @@ static int ath12k_mac_copy_sband_iftype_
|
||||
|
||||
data[idx].types_mask = BIT(i);
|
||||
|
||||
- ath12k_mac_copy_he_cap(band_cap, i, ar->num_tx_chains, he_cap);
|
||||
+ ath12k_mac_copy_he_cap(ar, band_cap, i, ar->num_tx_chains, he_cap);
|
||||
if (band == NL80211_BAND_6GHZ) {
|
||||
data[idx].he_6ghz_capa.capa =
|
||||
ath12k_mac_setup_he_6ghz_cap(cap, band_cap);
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
From patchwork Wed May 21 22:45:35 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 14096120
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.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 A3B9F239570
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:57 +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=1747867560; cv=none;
|
||||
b=GmlOnDZdpnT/77kfeg7qPbZIn+pp+Rv41/WYnHylPZroDHwpWp5rzjObHMVoVIVB8f5dpHJSWNb5ucf0EdCqAqynnnDnAHne0d3j8kMBBH6ZVQr4AnIsYhkIrbmy6o7JffEBF094XVxGwQTjyWSEPi6VY94Md6L1NnuF0J5lJXw=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1747867560; c=relaxed/simple;
|
||||
bh=Xdsuttpv57eTzMnRm7g3A0+frkCx/SnGj1xOjVOXHng=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=DCZ4pyonUsAaIuBQUBu/1NYBINM2V/yqfV+6ngHC6I8x7PP5e0WLPB1zEyJgRG752GtXxlhP3WdI6a+eW/8O0I64lNeSLtCeGZQ2ljn0mAfcuMtjB3rZq3UejFTR8v3I78Chfhv8/eSjfW7gSO+sswpSCXiFykPgseD3Hhz6W/4=
|
||||
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=n5c8p9dB; 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="n5c8p9dB"
|
||||
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
|
||||
54LIhKMc027654;
|
||||
Wed, 21 May 2025 22:45:54 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=
|
||||
igBIHxXxEIGErFGPWQKC8rBeF0DUPvb+tsDy6dmbEUQ=; b=n5c8p9dBo/+917ae
|
||||
iUuuRoUPhgwmxRjEorR4N5thttRSLen0XwHulOSFzfVHZvX/ZX7Xb8qa67RpJUAw
|
||||
jx3TGu38TFybZ9zCbXxa3PoR7FqIyl7TyaU+RpGmjLnDTRjq5ODiDDkcGM8aLJ6C
|
||||
pgH1JDyjAtZODpP3W+kKpoMlU/N8QCB8wVOob4E3+nH0XDeYWh0cSY4dAnFcFYsC
|
||||
dgkUoVt65T3wJptGX80bBT1muPG/3O+IiWrYoP6NVayscmgOnCqKVpuSjYrEn/02
|
||||
HlxMp7yg/I4LhlQquL2SfmAXdKThQLrOF/XiFsCW2VZETvSbXsLI0NXYRbRFUxC4
|
||||
e9SLmw==
|
||||
Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf9cars-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:54 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjrc1023294
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:53 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:53 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 5/9] wifi: ath12k: fix TX and RX MCS rate
|
||||
configurations in HE mode
|
||||
Date: Wed, 21 May 2025 15:45:35 -0700
|
||||
Message-ID: <20250521224539.355985-6-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@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: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196)
|
||||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-ORIG-GUID: lrtwH7rWiPRFD03fbbD0IavLBLpNgTW-
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNSBTYWx0ZWRfX0HS2wunF/V5Q
|
||||
jQqxwakF2Imrc/4a4WgPSFOFxUyO27D7Yw6gnIBRodgtwOFgflHDfeJMrELW79jrSDvXvRC0nnc
|
||||
lTonRisd7/CZWExy3sM2diYhHrZ5YT1dPhFtq33ItpY8BaOhwiLxc3wn0tlWRX8B/cd+xyEHTZY
|
||||
A4nCDSw77SEdaZfmqAB81LMzQWIuTucnxkms4pM1CIIYZrgAPcBk4XN8tWVQ6JQKCpMpelTF6Hj
|
||||
/XLCY2ByRqjtwd/zSjtcCfLOyKdT+uQtAJU1XZvedwqQW5MFk2GeD7O72PfhAP1V0YcbHdiTxde
|
||||
roRpAlQg48k0Ug5EMIUPb9TYEP15vwtPDTw03C3u7eOhs6znDqvMYNAtXwbxfGeHRwjsbMgpWLG
|
||||
+weN3zziLWlwb66N0xo5nfdJRHrOVDNcSx8/Z/xvCmHBTuVr44Q7It0iW+CGbHNqXrg4h4CH
|
||||
X-Authority-Analysis: v=2.4 cv=GawXnRXL c=1 sm=1 tr=0 ts=682e57a2 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=mu3tZSmwaZwQUXtd2tAA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-GUID: lrtwH7rWiPRFD03fbbD0IavLBLpNgTW-
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
mlxscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0
|
||||
priorityscore=1501 clxscore=1015 malwarescore=0 phishscore=0 bulkscore=0
|
||||
spamscore=0 suspectscore=0 adultscore=0 classifier=spam authscore=0
|
||||
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210225
|
||||
|
||||
Currently, the TX and RX MCS rate configurations per peer are
|
||||
reversed when sent to the firmware. As a result, RX MCS rates
|
||||
are configured for TX, and vice versa. This commit rectifies
|
||||
the configuration to match what the firmware expects.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
|
||||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 4 ++--
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 2 ++
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -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));
|
||||
|
||||
- he_mcs->rx_mcs_set = cpu_to_le32(arg->peer_he_rx_mcs_set[i]);
|
||||
- he_mcs->tx_mcs_set = cpu_to_le32(arg->peer_he_tx_mcs_set[i]);
|
||||
+ he_mcs->rx_mcs_set = cpu_to_le32(arg->peer_he_tx_mcs_set[i]);
|
||||
+ he_mcs->tx_mcs_set = cpu_to_le32(arg->peer_he_rx_mcs_set[i]);
|
||||
ptr += sizeof(*he_mcs);
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -4157,7 +4157,9 @@ struct ath12k_wmi_vht_rate_set_params {
|
||||
|
||||
struct ath12k_wmi_he_rate_set_params {
|
||||
__le32 tlv_header;
|
||||
+ /* MCS at which the peer can receive */
|
||||
__le32 rx_mcs_set;
|
||||
+ /* MCS at which the peer can transmit */
|
||||
__le32 tx_mcs_set;
|
||||
} __packed;
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,262 +0,0 @@
|
|||
From patchwork Wed May 21 22:45:37 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 14096121
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.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 ED55023958A
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:58 +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=1747867560; cv=none;
|
||||
b=R6R1l/0hUMYWkLzVM4w8Z2s3aU01ujlrdBV4IEYLrqQ3CzuP8xd2fnZMcdbVAFvXd/hepJKOZrFod6RG43u2TuGCQ5wM3SKIqyk0c/MlskZk+jnUnvm9WtrezJS82phw1G2mJ8NiYsKzmcJGMQtaYfl3jWA4o+BGMGyOg0Keb/M=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1747867560; c=relaxed/simple;
|
||||
bh=HUqzq2V1sSbcLZxqxveNb5xXvMg5sfyIhSzn4mKsdms=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=G9poRT2jwhhAC0htiaG4SIE8b1DuTf63uDCDCGj5WoQ4B/v/NWtaqtzBWJF4c7UuQBso4JO4X9auJyfxJ4SxUBrULdlJq7mvAs7nxFOPEBDBltLKWCZznLwuuuo690MjvUQ5mfKt/Oy+uREyur4vXsQtfSBZc0DSZUlC5R+Z2Mc=
|
||||
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=cu63IdMd; 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="cu63IdMd"
|
||||
Received: from pps.filterd (m0279871.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
54LJgw7Z025025;
|
||||
Wed, 21 May 2025 22:45:56 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=
|
||||
90lF32RvbNU2yyxl2mGBEewKfDvRJ7MRRLe6DgCwXFs=; b=cu63IdMdS+nJIsqy
|
||||
ktY/ZQ/qTTWf2MpubSMC9UftiwnI9Xj6K8LFE0q+NvCN2EgZKzf+OzyW9wbbRepN
|
||||
Q3ZYBAR3lFyw40J6AZgpAuPiq7Y+eqt7l8jc+/2bb2+imOzvWHwFkXSvc8nijnHX
|
||||
ZLEU29M0xloyHeJ7xLbumzRdfcCJ6357/HKp9U3mLvEfpLY97t5/H3yEJWHQmnvE
|
||||
aHkFaLM6Ru2R2+nzPDylKcY+TZsqv306oEqydWI33ANyvfDkWJqbQjtQ+geTkJxC
|
||||
syi9ZifD5zPdOjb9YWNn0V8mWUBRx6hW8ZKU/L3gWGXjkvyRHneZ4AOz83Tp9Ym4
|
||||
L34jSQ==
|
||||
Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf6vbsf-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:55 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjsWN022226
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:54 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:54 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 7/9] wifi: ath12k: clean up 80P80 support
|
||||
Date: Wed, 21 May 2025 15:45:37 -0700
|
||||
Message-ID: <20250521224539.355985-8-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@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: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196)
|
||||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-GUID: xDBdjIlSrmWJZkBfMwcImhxnyTIR4551
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX75XKL//oF16a
|
||||
YMA/60ZSduIYMzTQ+PpEhRfS8BSEJ3JAYNLLDjp3b1hmrHJmdqMnxgbya6RQ+qeAISgkr8ZWIMx
|
||||
fGx/btrlFP2SbXd0JWwSMOApD3LJewBu/ZeBWBDEWbbO00LOGnR0aFqmCeym6YSeYyakVcNd8nQ
|
||||
0JnPxxBLeXeYPpIZTFMD6TpVFyfvtCG9jpMOI27FLBdHLednVW2yrOx5b62xwy181re5iN4XOki
|
||||
1M/HJRMACpfQJImHpO9X3rRh2j79oKIKVwa3UjV8A7vD3noV/pV0SOTZP0awMYQH/Pn91nji685
|
||||
auXzHG2pai3Byw89+jYZIG2xfiqBcBwIEARvw52XSv3glk0tSvLDxNo8nyFNPsZ63g70USl1IlC
|
||||
AKhW+QOw9/zkn3oCB+3fZZ/y+F4vlu4OzN4gETU+6p3798YiFGWMvocQnI/Ig7Unex9rmOP5
|
||||
X-Authority-Analysis: v=2.4 cv=fZOty1QF c=1 sm=1 tr=0 ts=682e57a3 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=QHHbJxpVzSBZVvfXPLwA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-ORIG-GUID: xDBdjIlSrmWJZkBfMwcImhxnyTIR4551
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
clxscore=1015 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 suspectscore=0
|
||||
malwarescore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999
|
||||
lowpriorityscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a
|
||||
authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210226
|
||||
|
||||
Clean up unused 80P80 references as hardware does not support
|
||||
it. This is applicable to both QCN9274 and WCN7850.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 48 ++++++---------------------
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 2 --
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 1 -
|
||||
3 files changed, 10 insertions(+), 41 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -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,
|
||||
- [NL80211_CHAN_WIDTH_80P80] = MODE_11BE_EHT80_80,
|
||||
+ [NL80211_CHAN_WIDTH_80P80] = MODE_UNKNOWN,
|
||||
[NL80211_CHAN_WIDTH_320] = MODE_11BE_EHT320,
|
||||
},
|
||||
[NL80211_BAND_6GHZ] = {
|
||||
@@ -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,
|
||||
- [NL80211_CHAN_WIDTH_80P80] = MODE_11BE_EHT80_80,
|
||||
+ [NL80211_CHAN_WIDTH_80P80] = MODE_UNKNOWN,
|
||||
[NL80211_CHAN_WIDTH_320] = MODE_11BE_EHT320,
|
||||
},
|
||||
|
||||
@@ -2556,17 +2556,6 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
|
||||
switch (link_sta->bandwidth) {
|
||||
case IEEE80211_STA_RX_BW_160:
|
||||
- if (he_cap->he_cap_elem.phy_cap_info[0] &
|
||||
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) {
|
||||
- v = ath12k_peer_assoc_h_he_limit(v, he_mcs_mask);
|
||||
- arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
|
||||
-
|
||||
- v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80p80);
|
||||
- arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
|
||||
-
|
||||
- arg->peer_he_mcs_count++;
|
||||
- he_tx_mcs = v;
|
||||
- }
|
||||
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;
|
||||
|
||||
@@ -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) {
|
||||
- switch (link_sta->vht_cap.cap &
|
||||
- IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
|
||||
- case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ:
|
||||
+ if (link_sta->vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ)
|
||||
return MODE_11AC_VHT160;
|
||||
- case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ:
|
||||
- return MODE_11AC_VHT80_80;
|
||||
- default:
|
||||
- /* not sure if this is a valid case? */
|
||||
- return MODE_11AC_VHT160;
|
||||
- }
|
||||
+
|
||||
+ /* not sure if this is a valid case? */
|
||||
+ return MODE_11AC_VHT160;
|
||||
}
|
||||
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -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;
|
||||
- else if (link_sta->he_cap.he_cap_elem.phy_cap_info[0] &
|
||||
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
|
||||
- return MODE_11AX_HE80_80;
|
||||
- /* not sure if this is a valid case? */
|
||||
- return MODE_11AX_HE160;
|
||||
+
|
||||
+ return MODE_UNKNOWN;
|
||||
}
|
||||
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -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;
|
||||
|
||||
- if (link_sta->he_cap.he_cap_elem.phy_cap_info[0] &
|
||||
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
|
||||
- return MODE_11BE_EHT80_80;
|
||||
-
|
||||
ath12k_warn(ar->ab, "invalid EHT PHY capability info for 160 Mhz: %d\n",
|
||||
link_sta->he_cap.he_cap_elem.phy_cap_info[0]);
|
||||
|
||||
- return MODE_11BE_EHT160;
|
||||
+ return MODE_UNKNOWN;
|
||||
}
|
||||
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -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);
|
||||
- mcs_nss->rx_mcs_80p80 = cpu_to_le16(rxmcs_map & 0xffff);
|
||||
- mcs_nss->tx_mcs_80p80 = cpu_to_le16(txmcs_map & 0xffff);
|
||||
}
|
||||
|
||||
static void ath12k_mac_copy_he_cap(struct ath12k *ar,
|
||||
@@ -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;
|
||||
+ /* 80PLUS80 is not supported */
|
||||
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] &=
|
||||
@@ -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] &
|
||||
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
|
||||
- return he_cap->he_mcs_nss_supp.tx_mcs_80p80;
|
||||
-
|
||||
- if (he_cap->he_cap_elem.phy_cap_info[0] &
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G)
|
||||
return he_cap->he_mcs_nss_supp.tx_mcs_160;
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -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);
|
||||
- } else if (arg->mode == MODE_11BE_EHT80_80) {
|
||||
- chan->band_center_freq2 = cpu_to_le32(arg->band_center_freq2);
|
||||
} else {
|
||||
chan->band_center_freq2 = 0;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -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
|
||||
-#define WMI_HECAP_TXRX_MCS_NSS_IDX_80_80 2
|
||||
|
||||
#define ATH12K_WMI_MLO_MAX_PARTNER_LINKS \
|
||||
(ATH12K_WMI_MLO_MAX_LINKS + ATH12K_MAX_NUM_BRIDGE_LINKS - 1)
|
||||
|
|
@ -1,379 +0,0 @@
|
|||
From patchwork Wed May 21 22:45:38 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 14096124
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.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 DEE9223A9AA
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:59 +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=1747867561; cv=none;
|
||||
b=qWgm5H8L0Zhrc5crkCw7SBoGEQ8yf+aC0TSWOzfiTwcAddeStpjorEa3XaBl0GOhHPRaECOhMSNqu88tQ5CzCGmumBQ3QLC6mod6Tb0Y0PdeUJm3YoGKcI+F0oE3g5kCHaU9LRKKnmMZQS72kE7dO+lEBfwMIuCX/VwV066B1p8=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1747867561; c=relaxed/simple;
|
||||
bh=61S52HJJJauXcXkg3NpFqkwtGSPNO+bmTpNYu1v9AKM=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=gi5WIxM8SYlljyfdAVTdIK6JQ5jJHPGGfdxPkwbtEaPElRA55vurxkaaJ0RktTtDYYJEn7KLZFieBHAv5/nEcrDjL4NGvgT3wiAoGcbsd+TIF6w5J2RSmAwhAP008N5swveLHDzJ0M9TrtQj2HHndc8JPD4oGWbcEqKQqHSq8ck=
|
||||
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=lMYw009C; 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="lMYw009C"
|
||||
Received: from pps.filterd (m0279868.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
54LJgEPE029249;
|
||||
Wed, 21 May 2025 22:45:56 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=
|
||||
ph+yJaIkwYsZzzEsymzTjupgmHjdwFMJhbEzuPrYvfY=; b=lMYw009CSvZqDxkz
|
||||
+HCEzcZhy6QO8G2ut93TJxHdCbVLlRaMNReXGlGqx2KRNracyLRkAQsC16i+QcpJ
|
||||
aHBvIE2c0/TEtBiyv3HzBf3/89R0POT080sz81P6go3m8w9bcIE+Q2DqjdhVNqu3
|
||||
AlV8qb6pj/QUVvDbJQxO1M9eCXSO6g2BBDjgRCktOu+x2TlxhdBZ/tJP+h0AUk+j
|
||||
YsH1LhcLOZYCFTJyB6IFmHWvtGk5Ef6i6D/tXyCL7nQiDP/R1v2PcdlLlI5e5/PO
|
||||
FhKB2+RCmSyJUtyaAHHi/mVen5yqFX2K3/vL3BtprRAJINhFxQrLs6xLIQabELzj
|
||||
KCstuQ==
|
||||
Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwfb4b3x-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:55 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjtX2022238
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:55 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:54 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
P Praneesh <quic_ppranees@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 8/9] wifi: ath12k: add support for 160 MHz
|
||||
bandwidth
|
||||
Date: Wed, 21 May 2025 15:45:38 -0700
|
||||
Message-ID: <20250521224539.355985-9-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@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: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196)
|
||||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-ORIG-GUID: T9MbsOp4F8M93FD6ZEyfm1BTh5tEiCIl
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX0EeEFBAyVxZV
|
||||
WX6jh2dkCn4P+eViI8Gvz/6S+yZ+Avx9/8To2mbulh5j1kDm92bEDu7iQtI17ILPnOgbUXWAjjt
|
||||
Z2LvemtbMzJe0lY0EjJNWWunihdlsXPAdOnZFjV0rOtakq8Xx4y8K45/1cGY9dQOApxDFC9HiLZ
|
||||
+FK9apopZ2DyP6haLf5HQI+6DC3wwgbEQlE+89g69hXEM8UePlFlsf0fpfIVgiWG73gfzHkrRPM
|
||||
8ByVGmKpFSXIBmvY+EZZOPuPsQHt/91pIisXw5Joxdbl6Qf2anjuC0X4LPrTgTxgXWhljS4JdXo
|
||||
djhNt09IBnNuagxN9aMx/frUhqQPNL54kp/cXbpgcLQX0XQg8SOvwyxJs+CALQUyymluDLHyH9w
|
||||
UQUznCXFrps86AX/Fpnhrl9hqR5NO0/6oR340zsS7mvryRucOqzT7vc3WPMJEhW68VMCAl5Z
|
||||
X-Proofpoint-GUID: T9MbsOp4F8M93FD6ZEyfm1BTh5tEiCIl
|
||||
X-Authority-Analysis: v=2.4 cv=dLCmmPZb c=1 sm=1 tr=0 ts=682e57a4 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=dOJm2eNAaUnF9U8lSB4A:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
mlxscore=0 clxscore=1015 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0
|
||||
impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0
|
||||
priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc=
|
||||
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000
|
||||
definitions=main-2505210226
|
||||
|
||||
Add support to configure maximum NSS in 160 MHz bandwidth.
|
||||
Firmware advertises support for handling NSS ratio information
|
||||
as a part of service ready ext event using nss_ratio_enabled
|
||||
flag. Save this information in ath12k_pdev_cap to calculate
|
||||
NSS ratio.
|
||||
|
||||
Additionally, reorder the code by moving
|
||||
ath12k_peer_assoc_h_phymode() before ath12k_peer_assoc_h_vht()
|
||||
to ensure that arg->peer_phymode correctly reflects the bandwidth
|
||||
in the max NSS calculation.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Co-developed-by: P Praneesh <quic_ppranees@quicinc.com>
|
||||
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
|
||||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/core.h | 2 +
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 89 ++++++++++++++++++++++----
|
||||
drivers/net/wireless/ath/ath12k/mac.h | 2 +
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 7 +-
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 28 ++++++++
|
||||
5 files changed, 115 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/core.h
|
||||
@@ -879,6 +879,8 @@ struct ath12k_pdev_cap {
|
||||
struct ath12k_band_cap band[NUM_NL80211_BANDS];
|
||||
u32 eml_cap;
|
||||
u32 mld_cap;
|
||||
+ bool nss_ratio_enabled;
|
||||
+ u8 nss_ratio_info;
|
||||
};
|
||||
|
||||
struct mlo_timestamp {
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -2185,6 +2185,34 @@ ath12k_peer_assoc_h_vht_limit(u16 tx_mcs
|
||||
return tx_mcs_set;
|
||||
}
|
||||
|
||||
+static u8 ath12k_get_nss_160mhz(struct ath12k *ar,
|
||||
+ u8 max_nss)
|
||||
+{
|
||||
+ u8 nss_ratio_info = ar->pdev->cap.nss_ratio_info;
|
||||
+ u8 max_sup_nss = 0;
|
||||
+
|
||||
+ switch (nss_ratio_info) {
|
||||
+ case WMI_NSS_RATIO_1BY2_NSS:
|
||||
+ max_sup_nss = max_nss >> 1;
|
||||
+ break;
|
||||
+ case WMI_NSS_RATIO_3BY4_NSS:
|
||||
+ ath12k_warn(ar->ab, "WMI_NSS_RATIO_3BY4_NSS not supported\n");
|
||||
+ break;
|
||||
+ case WMI_NSS_RATIO_1_NSS:
|
||||
+ max_sup_nss = max_nss;
|
||||
+ break;
|
||||
+ case WMI_NSS_RATIO_2_NSS:
|
||||
+ ath12k_warn(ar->ab, "WMI_NSS_RATIO_2_NSS not supported\n");
|
||||
+ break;
|
||||
+ default:
|
||||
+ ath12k_warn(ar->ab, "invalid nss ratio received from fw: %d\n",
|
||||
+ nss_ratio_info);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return max_sup_nss;
|
||||
+}
|
||||
+
|
||||
static void ath12k_peer_assoc_h_vht(struct ath12k *ar,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ath12k_link_sta *arsta,
|
||||
@@ -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;
|
||||
+ u32 rx_nss, tx_nss, nss_160;
|
||||
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
|
||||
@@ -2306,10 +2335,24 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
/* TODO: Check */
|
||||
arg->tx_max_mcs_nss = 0xFF;
|
||||
|
||||
- ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "mac vht peer %pM max_mpdu %d flags 0x%x\n",
|
||||
- arsta->addr, arg->peer_max_mpdu, arg->peer_flags);
|
||||
+ if (arg->peer_phymode == MODE_11AC_VHT160) {
|
||||
+ tx_nss = ath12k_get_nss_160mhz(ar, max_nss);
|
||||
+ rx_nss = min(arg->peer_nss, tx_nss);
|
||||
+ arg->peer_bw_rxnss_override = ATH12K_BW_NSS_MAP_ENABLE;
|
||||
+
|
||||
+ if (!rx_nss) {
|
||||
+ ath12k_warn(ar->ab, "invalid max_nss\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ nss_160 = u32_encode_bits(rx_nss - 1, ATH12K_PEER_RX_NSS_160MHZ);
|
||||
+ arg->peer_bw_rxnss_override |= nss_160;
|
||||
+ }
|
||||
|
||||
- /* TODO: rxnss_override */
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
+ "mac vht peer %pM max_mpdu %d flags 0x%x nss_override 0x%x\n",
|
||||
+ arsta->addr, arg->peer_max_mpdu, arg->peer_flags,
|
||||
+ arg->peer_bw_rxnss_override);
|
||||
}
|
||||
|
||||
static int ath12k_mac_get_max_he_mcs_map(u16 mcs_map, int nss)
|
||||
@@ -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;
|
||||
+ u32 rx_nss, tx_nss, nss_160;
|
||||
|
||||
if (WARN_ON(ath12k_mac_vif_link_chan(vif, link_id, &def)))
|
||||
return;
|
||||
@@ -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);
|
||||
|
||||
+ if (arg->peer_phymode == MODE_11AX_HE160) {
|
||||
+ tx_nss = ath12k_get_nss_160mhz(ar, max_nss);
|
||||
+ rx_nss = min(arg->peer_nss, tx_nss);
|
||||
+ arg->peer_bw_rxnss_override = ATH12K_BW_NSS_MAP_ENABLE;
|
||||
+
|
||||
+ if (!rx_nss) {
|
||||
+ ath12k_warn(ar->ab, "invalid max_nss\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ nss_160 = u32_encode_bits(rx_nss - 1, ATH12K_PEER_RX_NSS_160MHZ);
|
||||
+ arg->peer_bw_rxnss_override |= nss_160;
|
||||
+ }
|
||||
+
|
||||
ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
- "mac he peer %pM nss %d mcs cnt %d\n",
|
||||
- arsta->addr, arg->peer_nss, arg->peer_he_mcs_count);
|
||||
+ "mac he peer %pM nss %d mcs cnt %d nss_override 0x%x\n",
|
||||
+ arsta->addr, arg->peer_nss,
|
||||
+ arg->peer_he_mcs_count,
|
||||
+ arg->peer_bw_rxnss_override);
|
||||
}
|
||||
|
||||
static void ath12k_peer_assoc_h_he_6ghz(struct ath12k *ar,
|
||||
@@ -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) {
|
||||
- if (link_sta->vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ)
|
||||
+ if (link_sta->vht_cap.cap & (IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
|
||||
+ IEEE80211_VHT_CAP_EXT_NSS_BW_MASK))
|
||||
return MODE_11AC_VHT160;
|
||||
|
||||
- /* not sure if this is a valid case? */
|
||||
+ /* Allow STA to connect even if it does not explicitly advertise 160 MHz
|
||||
+ * support
|
||||
+ */
|
||||
return MODE_11AC_VHT160;
|
||||
}
|
||||
|
||||
@@ -7379,10 +7442,8 @@ ath12k_create_vht_cap(struct ath12k *ar,
|
||||
|
||||
ath12k_set_vht_txbf_cap(ar, &vht_cap.cap);
|
||||
|
||||
- /* TODO: Enable back VHT160 mode once association issues are fixed */
|
||||
- /* Disabling VHT160 and VHT80+80 modes */
|
||||
- vht_cap.cap &= ~IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK;
|
||||
- vht_cap.cap &= ~IEEE80211_VHT_CAP_SHORT_GI_160;
|
||||
+ /* 80P80 is not supported */
|
||||
+ vht_cap.cap &= ~IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ;
|
||||
|
||||
rxmcs_map = 0;
|
||||
txmcs_map = 0;
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
+
|
||||
if ((ht_cap & WMI_HT_CAP_ENABLED) || is_6ghz) {
|
||||
ieee80211_hw_set(hw, AMPDU_AGGREGATION);
|
||||
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
|
||||
@@ -41,6 +41,8 @@ struct ath12k_generic_iter {
|
||||
#define IEEE80211_DISABLE_VHT_MCS_SUPPORT_0_11 BIT(24)
|
||||
|
||||
#define ATH12K_CHAN_WIDTH_NUM 14
|
||||
+#define ATH12K_BW_NSS_MAP_ENABLE BIT(31)
|
||||
+#define ATH12K_PEER_RX_NSS_160MHZ GENMASK(2, 0)
|
||||
|
||||
#define ATH12K_TX_POWER_MAX_VAL 70
|
||||
#define ATH12K_TX_POWER_MIN_VAL 0
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -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);
|
||||
+ pdev_cap->nss_ratio_enabled =
|
||||
+ WMI_NSS_RATIO_EN_DIS_GET(mac_caps->nss_ratio);
|
||||
+ pdev_cap->nss_ratio_info =
|
||||
+ WMI_NSS_RATIO_INFO_GET(mac_caps->nss_ratio);
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1059,7 +1063,8 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
|
||||
chan->band_center_freq2 = cpu_to_le32(center_freq1);
|
||||
|
||||
- } else if (arg->mode == MODE_11BE_EHT160) {
|
||||
+ } else if (arg->mode == MODE_11BE_EHT160 ||
|
||||
+ arg->mode == MODE_11AX_HE160) {
|
||||
if (arg->freq > center_freq1)
|
||||
chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40);
|
||||
else
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -2328,6 +2328,21 @@ enum wmi_direct_buffer_module {
|
||||
WMI_DIRECT_BUF_MAX
|
||||
};
|
||||
|
||||
+/**
|
||||
+ * enum wmi_nss_ratio - NSS ratio received from FW during service ready ext event
|
||||
+ * @WMI_NSS_RATIO_1BY2_NSS: Max nss of 160MHz is equals to half of the max nss of 80MHz
|
||||
+ * @WMI_NSS_RATIO_3BY4_NSS: Max nss of 160MHz is equals to 3/4 of the max nss of 80MHz
|
||||
+ * @WMI_NSS_RATIO_1_NSS: Max nss of 160MHz is equals to the max nss of 80MHz
|
||||
+ * @WMI_NSS_RATIO_2_NSS: Max nss of 160MHz is equals to two times the max nss of 80MHz
|
||||
+ */
|
||||
+
|
||||
+enum wmi_nss_ratio {
|
||||
+ WMI_NSS_RATIO_1BY2_NSS,
|
||||
+ WMI_NSS_RATIO_3BY4_NSS,
|
||||
+ WMI_NSS_RATIO_1_NSS,
|
||||
+ WMI_NSS_RATIO_2_NSS
|
||||
+};
|
||||
+
|
||||
struct ath12k_wmi_pdev_band_arg {
|
||||
u32 pdev_id;
|
||||
u32 start_freq;
|
||||
@@ -2647,6 +2662,12 @@ struct ath12k_wmi_hw_mode_cap_params {
|
||||
} __packed;
|
||||
|
||||
#define WMI_MAX_HECAP_PHY_SIZE (3)
|
||||
+#define WMI_NSS_RATIO_EN_DIS_BITPOS BIT(0)
|
||||
+#define WMI_NSS_RATIO_EN_DIS_GET(_val) \
|
||||
+ le32_get_bits(_val, WMI_NSS_RATIO_EN_DIS_BITPOS)
|
||||
+#define WMI_NSS_RATIO_INFO_BITPOS GENMASK(4, 1)
|
||||
+#define WMI_NSS_RATIO_INFO_GET(_val) \
|
||||
+ le32_get_bits(_val, WMI_NSS_RATIO_INFO_BITPOS)
|
||||
|
||||
/* 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.
|
||||
|
|
@ -1,202 +0,0 @@
|
|||
From patchwork Wed May 21 22:45:39 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 14096122
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.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 9A1E9239E85
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:59 +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=1747867561; cv=none;
|
||||
b=YNQGoLeTsEUX0an1dYT8uFrTBxczoxLPoB0nXP+MEP3YMcemaxVf4zoi5GMSuKPLe4yeLz/R7AB090SrXrBTbY6MmwXLrUJGFBQUGwr05KQ5BnedSLyVE+PtNo01ZVjrjprsc5LC4z0vYHmQdBsqIfqP+bb+ATVkdkkKWV4Kg3A=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1747867561; c=relaxed/simple;
|
||||
bh=WkoD1wqfpiPds2ZNAwn7TY38LnC6cJOAuobqk3tWbSk=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=aAO1mDb/PrwqKRHoeS0PAxgJAvDLPWPPBkzRX0hwJbFzcXtKdtWHDE83rjGbjR1bnM7lhkAU4SwoT87sOuciveNqdywUe6+9XTB2oWM/j0Tza/ZRKKRZFeByh7ib8Aibzc4y0ACg7Oaz/QhmWmPObPjc4oKuVzaH/P8Tub0rBcI=
|
||||
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=o3M+Sjyr; 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="o3M+Sjyr"
|
||||
Received: from pps.filterd (m0279871.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
54LJHZNq001758;
|
||||
Wed, 21 May 2025 22:45:56 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=
|
||||
wh8AVrVaz3Wne8xUCnRodQGPYbrNE8Rm9/NepU3KoQA=; b=o3M+SjyriKBrU+dH
|
||||
+Uwb/f5RzskxDlOAgOvwNH7O5p766ueJYE/nAazyAuVI1fbDT1gkgvOM4VOLQAPP
|
||||
zg9tDUD5Mz80GzBzSnheYbeedz7RgpaN14Qr6Gz/+1yrP4wWTh2quGduIAXBFDZR
|
||||
QpWsQh2DxVOvXqoLRm64iurJNhvpq+YIAwpAxEA9Fp46SrXsFefc82nza6qgdk5P
|
||||
pUjalFWnwLLxaSHJj2EoJhFDAf99q9N5KNKW/UCNY8A2CwQXqL9KmggTLRK1OC+S
|
||||
ueHigeV9ydoGGD1W6zmEdydGv5JSaQRhjAxtJokUtrlUwn8mbpJyokm+Ie4GZV5v
|
||||
tie1qQ==
|
||||
Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf6vbsg-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:56 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjtcB022245
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 21 May 2025 22:45:55 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:54 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 9/9] wifi: ath12k: add extended NSS bandwidth
|
||||
support for 160 MHz
|
||||
Date: Wed, 21 May 2025 15:45:39 -0700
|
||||
Message-ID: <20250521224539.355985-10-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@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: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196)
|
||||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-GUID: 3XlPaBNySyE2wx5TC6p1DVWVXzadsV9U
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX4g8vKznbpwuH
|
||||
ZKoHe/eZESaXJ/nU0MF27s2mZH9kbhxkG1nYDBAxgIAR6HSB4Ir8V8BP9wvETNPaaV4xpgjbT6m
|
||||
sDGIplm3HpwbpmQYiBtQIsOrs/s1B2t7uVdhqW02FHlFu/UIBLwZc7J8sLJcsYdxHYcx7MQ3nEe
|
||||
tDoPrPTEwHw7n1CnzcfVsEUAuxuJ5iFaxBATgZF+LuAhijNvhyaoEWRUO2KUcBJaFHq/QbCYfpY
|
||||
JBXWUNl+mlZxfQe4pogCpRmvEOONRvpKgZLFdEAxf2Fx0Z7OhaIV84gi99TYTjfe1aihjorJ/cp
|
||||
cv78Jzcd3Pe3GwTFD0ZOqI30oSiaUyJS3E9XIjfDGLAVMK6FeM+KOYgnqo95ImgBH8HRshrA4LJ
|
||||
qTKv2kKP1y4zPtpf7lmI2mcl7emiLGQx+t0d7Z8upCbYseoNAGHUkFJ45HF940Za9ZkEYTRq
|
||||
X-Authority-Analysis: v=2.4 cv=fZOty1QF c=1 sm=1 tr=0 ts=682e57a4 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=Opr4SxZhII4Vei-TI5AA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-ORIG-GUID: 3XlPaBNySyE2wx5TC6p1DVWVXzadsV9U
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
clxscore=1015 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 suspectscore=0
|
||||
malwarescore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999
|
||||
lowpriorityscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a
|
||||
authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210226
|
||||
|
||||
Currently rx and tx MCS map for 160 MHz under HE capabilities
|
||||
are not updating properly, when 160 MHz is configured with NSS
|
||||
lesser than max NSS support. Fix this by utilizing
|
||||
nss_ratio_enabled and nss_ratio_info fields sent by firmware
|
||||
in service ready event.
|
||||
|
||||
However, if firmware advertises EXT NSS BW support in VHT caps
|
||||
as 1(1x2) and when nss_ratio_info indicates 1:1, reset the EXT
|
||||
NSS BW Support in VHT caps to 0 which indicates 1x1. This is
|
||||
to avoid incorrectly choosing 1:2 NSS ratio when using the
|
||||
default VHT caps advertised by firmware.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 33 ++++++++++++++++++++++-----
|
||||
1 file changed, 27 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -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) {
|
||||
- tx_nss = ath12k_get_nss_160mhz(ar, max_nss);
|
||||
+ tx_nss = ath12k_get_nss_160mhz(ar, ar->num_tx_chains);
|
||||
rx_nss = min(arg->peer_nss, tx_nss);
|
||||
+
|
||||
+ arg->peer_nss = min(link_sta->rx_nss, ar->num_rx_chains);
|
||||
arg->peer_bw_rxnss_override = ATH12K_BW_NSS_MAP_ENABLE;
|
||||
|
||||
if (!rx_nss) {
|
||||
@@ -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);
|
||||
|
||||
+ /* Check if the HW supports 1:1 NSS ratio and reset
|
||||
+ * EXT NSS BW Support field to 0 to indicate 1:1 ratio
|
||||
+ */
|
||||
+ if (ar->pdev->cap.nss_ratio_info == WMI_NSS_RATIO_1_NSS)
|
||||
+ vht_cap.cap &= ~IEEE80211_VHT_CAP_EXT_NSS_BW_MASK;
|
||||
+
|
||||
return vht_cap;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
- u16 txmcs_map, rxmcs_map;
|
||||
+ u8 maxtxnss_160 = ath12k_get_nss_160mhz(ar, ar->num_tx_chains);
|
||||
+ u8 maxrxnss_160 = ath12k_get_nss_160mhz(ar, ar->num_rx_chains);
|
||||
+ u16 txmcs_map_160 = 0, rxmcs_map_160 = 0;
|
||||
+ u16 txmcs_map = 0, rxmcs_map = 0;
|
||||
u32 i;
|
||||
|
||||
- rxmcs_map = 0;
|
||||
- txmcs_map = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (i < ar->num_tx_chains &&
|
||||
(ar->cfg_tx_chainmask >> cap->tx_chain_mask_shift) & BIT(i))
|
||||
@@ -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);
|
||||
+
|
||||
+ if (i < maxtxnss_160 &&
|
||||
+ (ar->cfg_tx_chainmask >> cap->tx_chain_mask_shift) & BIT(i))
|
||||
+ txmcs_map_160 |= IEEE80211_HE_MCS_SUPPORT_0_11 << (i * 2);
|
||||
+ else
|
||||
+ txmcs_map_160 |= IEEE80211_HE_MCS_NOT_SUPPORTED << (i * 2);
|
||||
+
|
||||
+ if (i < maxrxnss_160 &&
|
||||
+ (ar->cfg_tx_chainmask >> cap->tx_chain_mask_shift) & BIT(i))
|
||||
+ rxmcs_map_160 |= IEEE80211_HE_MCS_SUPPORT_0_11 << (i * 2);
|
||||
+ else
|
||||
+ rxmcs_map_160 |= IEEE80211_HE_MCS_NOT_SUPPORTED << (i * 2);
|
||||
}
|
||||
|
||||
mcs_nss->rx_mcs_80 = cpu_to_le16(rxmcs_map & 0xffff);
|
||||
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);
|
||||
+ mcs_nss->rx_mcs_160 = cpu_to_le16(rxmcs_map_160 & 0xffff);
|
||||
+ mcs_nss->tx_mcs_160 = cpu_to_le16(txmcs_map_160 & 0xffff);
|
||||
}
|
||||
|
||||
static void ath12k_mac_copy_he_cap(struct ath12k *ar,
|
||||
|
|
@ -171,7 +171,7 @@ Best regards,
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -20,7 +20,7 @@
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <linux/time.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/etherdevice.h>
|
||||
|
|
@ -180,7 +180,7 @@ Best regards,
|
|||
#include <linux/unaligned.h>
|
||||
|
||||
#include "hw.h"
|
||||
@@ -2718,19 +2718,25 @@ static void ath9k_hw_gpio_cfg_output_mux
|
||||
@@ -2719,19 +2719,25 @@ static void ath9k_hw_gpio_cfg_output_mux
|
||||
static void ath9k_hw_gpio_cfg_soc(struct ath_hw *ah, u32 gpio, bool out,
|
||||
const char *label)
|
||||
{
|
||||
|
|
@ -210,7 +210,7 @@ Best regards,
|
|||
}
|
||||
|
||||
static void ath9k_hw_gpio_cfg_wmac(struct ath_hw *ah, u32 gpio, bool out,
|
||||
@@ -2792,8 +2798,10 @@ void ath9k_hw_gpio_free(struct ath_hw *a
|
||||
@@ -2793,8 +2799,10 @@ void ath9k_hw_gpio_free(struct ath_hw *a
|
||||
|
||||
WARN_ON(gpio >= ah->caps.num_gpio_pins);
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ Best regards,
|
|||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_gpio_free);
|
||||
|
||||
@@ -2821,8 +2829,8 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah,
|
||||
@@ -2822,8 +2830,8 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah,
|
||||
val = REG_READ(ah, AR_GPIO_IN(ah)) & BIT(gpio);
|
||||
else
|
||||
val = MS_REG_READ(AR, gpio);
|
||||
|
|
@ -234,7 +234,7 @@ Best regards,
|
|||
} else {
|
||||
WARN_ON(1);
|
||||
}
|
||||
@@ -2845,8 +2853,8 @@ void ath9k_hw_set_gpio(struct ath_hw *ah
|
||||
@@ -2846,8 +2854,8 @@ void ath9k_hw_set_gpio(struct ath_hw *ah
|
||||
AR7010_GPIO_OUT : AR_GPIO_IN_OUT(ah);
|
||||
|
||||
REG_RMW(ah, out_addr, val << gpio, BIT(gpio));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1434,8 +1434,12 @@ static bool ath9k_hw_set_reset(struct at
|
||||
@@ -1435,8 +1435,12 @@ static bool ath9k_hw_set_reset(struct at
|
||||
if (!AR_SREV_9100(ah))
|
||||
REG_WRITE(ah, AR_RC, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1311,39 +1311,56 @@ void ath9k_hw_get_delta_slope_vals(struc
|
||||
@@ -1312,39 +1312,56 @@ void ath9k_hw_get_delta_slope_vals(struc
|
||||
*coef_exponent = coef_exp - 16;
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -1396,24 +1413,24 @@ static bool ath9k_hw_set_reset(struct at
|
||||
@@ -1397,24 +1414,24 @@ static bool ath9k_hw_set_reset(struct at
|
||||
rst_flags |= AR_RTC_RC_MAC_COLD;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2974,7 +2974,8 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2975,7 +2975,8 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
{
|
||||
struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
|
||||
struct ieee80211_channel *channel;
|
||||
|
|
@ -18,7 +18,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
|
|||
u16 ctl = NO_CTL;
|
||||
|
||||
if (!chan)
|
||||
@@ -2986,9 +2987,14 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2987,9 +2988,14 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
channel = chan->chan;
|
||||
chan_pwr = min_t(int, channel->max_power * 2, MAX_COMBINED_POWER);
|
||||
new_pwr = min_t(int, chan_pwr, reg->power_limit);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2993,6 +2993,10 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2994,6 +2994,10 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
if (ant_gain > max_gain)
|
||||
ant_reduction = ant_gain - max_gain;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask);
|
||||
--- a/drivers/net/wireless/ath/ath9k/common-debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common-debug.c
|
||||
@@ -260,3 +260,58 @@ void ath9k_cmn_debug_phy_err(struct dent
|
||||
@@ -261,3 +261,58 @@ void ath9k_cmn_debug_phy_err(struct dent
|
||||
&fops_phy_err);
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_cmn_debug_phy_err);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -402,13 +402,8 @@ static void ath9k_hw_init_config(struct
|
||||
@@ -403,13 +403,8 @@ static void ath9k_hw_init_config(struct
|
||||
|
||||
ah->config.rx_intr_mitigation = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
bool disable_ani;
|
||||
--- a/drivers/net/wireless/ath/ath9k/common.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common.c
|
||||
@@ -297,11 +297,13 @@ EXPORT_SYMBOL(ath9k_cmn_get_hw_crypto_ke
|
||||
@@ -298,11 +298,13 @@ EXPORT_SYMBOL(ath9k_cmn_get_hw_crypto_ke
|
||||
/*
|
||||
* Update internal channel flags.
|
||||
*/
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
ichan->channel = chan->center_freq;
|
||||
ichan->chan = chan;
|
||||
@@ -309,7 +311,19 @@ static void ath9k_cmn_update_ichannel(st
|
||||
@@ -310,7 +312,19 @@ static void ath9k_cmn_update_ichannel(st
|
||||
if (chan->band == NL80211_BAND_5GHZ)
|
||||
flags |= CHANNEL_5GHZ;
|
||||
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
case NL80211_CHAN_WIDTH_5:
|
||||
flags |= CHANNEL_QUARTER;
|
||||
break;
|
||||
@@ -342,10 +356,11 @@ struct ath9k_channel *ath9k_cmn_get_chan
|
||||
@@ -343,10 +357,11 @@ struct ath9k_channel *ath9k_cmn_get_chan
|
||||
struct cfg80211_chan_def *chandef)
|
||||
{
|
||||
struct ieee80211_channel *curchan = chandef->chan;
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/common-debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common-debug.c
|
||||
@@ -315,3 +315,55 @@ void ath9k_cmn_debug_eeprom(struct dentr
|
||||
@@ -316,3 +316,55 @@ void ath9k_cmn_debug_eeprom(struct dentr
|
||||
&fops_eeprom);
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_cmn_debug_eeprom);
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
+
|
||||
+ common->chan_bw = chan_bw;
|
||||
+ if (!test_bit(ATH_OP_INVALID, &common->op_flags))
|
||||
+ common->ieee_ops->config(ah->hw, IEEE80211_CONF_CHANGE_CHANNEL);
|
||||
+ common->ieee_ops->config(ah->hw, -1, IEEE80211_CONF_CHANGE_CHANNEL);
|
||||
+
|
||||
+ return count;
|
||||
+}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -662,6 +662,7 @@ int ath9k_hw_init(struct ath_hw *ah)
|
||||
@@ -663,6 +663,7 @@ int ath9k_hw_init(struct ath_hw *ah)
|
||||
|
||||
/* These are all the AR5008/AR9001/AR9002/AR9003 hardware family of chipsets */
|
||||
switch (ah->hw_version.devid) {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1872,6 +1872,20 @@ u32 ath9k_hw_get_tsf_offset(ktime_t last
|
||||
@@ -1873,6 +1873,20 @@ u32 ath9k_hw_get_tsf_offset(ktime_t last
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
|
||||
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
struct ath9k_hw_cal_data *caldata, bool fastcc)
|
||||
{
|
||||
@@ -2080,6 +2094,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -2081,6 +2095,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
ar9003_hw_disable_phy_restart(ah);
|
||||
|
||||
ath9k_hw_apply_gpio_override(ah);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -247,6 +247,19 @@ void ath9k_hw_get_channel_centers(struct
|
||||
@@ -248,6 +248,19 @@ void ath9k_hw_get_channel_centers(struct
|
||||
centers->synth_center + (extoff * HT40_CHANNEL_CENTER_SHIFT);
|
||||
}
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
/******************/
|
||||
/* Chip Revisions */
|
||||
/******************/
|
||||
@@ -1454,6 +1467,9 @@ static bool ath9k_hw_set_reset(struct at
|
||||
@@ -1455,6 +1468,9 @@ static bool ath9k_hw_set_reset(struct at
|
||||
udelay(50);
|
||||
}
|
||||
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -1553,6 +1569,9 @@ static bool ath9k_hw_chip_reset(struct a
|
||||
@@ -1554,6 +1570,9 @@ static bool ath9k_hw_chip_reset(struct a
|
||||
ar9003_hw_internal_regulator_apply(ah);
|
||||
ath9k_hw_init_pll(ah, chan);
|
||||
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -1859,8 +1878,14 @@ static int ath9k_hw_do_fastcc(struct ath
|
||||
@@ -1860,8 +1879,14 @@ static int ath9k_hw_do_fastcc(struct ath
|
||||
if (AR_SREV_9271(ah))
|
||||
ar9002_hw_load_ani_reg(ah, chan);
|
||||
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -2105,6 +2130,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -2106,6 +2131,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
ath9k_hw_set_radar_params(ah);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@
|
|||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -117,6 +117,7 @@ ATH9K_WOW=
|
||||
@@ -118,6 +118,7 @@ ATH9K_WOW=
|
||||
ATH9K_RFKILL=
|
||||
ATH9K_CHANNEL_CONTEXT=
|
||||
ATH9K_PCOEM=
|
||||
|
|
|
|||
|
|
@ -1,100 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
@@ -16,37 +16,21 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
+#include <linux/mod_devicetable.h>
|
||||
+#include <linux/module.h>
|
||||
#include <linux/nl80211.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
-#include <linux/module.h>
|
||||
-#include <linux/mod_devicetable.h>
|
||||
+
|
||||
#include "ath9k.h"
|
||||
|
||||
-static const struct platform_device_id ath9k_platform_id_table[] = {
|
||||
- {
|
||||
- .name = "ath9k",
|
||||
- .driver_data = AR5416_AR9100_DEVID,
|
||||
- },
|
||||
- {
|
||||
- .name = "ar933x_wmac",
|
||||
- .driver_data = AR9300_DEVID_AR9330,
|
||||
- },
|
||||
- {
|
||||
- .name = "ar934x_wmac",
|
||||
- .driver_data = AR9300_DEVID_AR9340,
|
||||
- },
|
||||
- {
|
||||
- .name = "qca955x_wmac",
|
||||
- .driver_data = AR9300_DEVID_QCA955X,
|
||||
- },
|
||||
- {
|
||||
- .name = "qca953x_wmac",
|
||||
- .driver_data = AR9300_DEVID_AR953X,
|
||||
- },
|
||||
- {
|
||||
- .name = "qca956x_wmac",
|
||||
- .driver_data = AR9300_DEVID_QCA956X,
|
||||
- },
|
||||
+static const struct of_device_id ath9k_of_match_table[] = {
|
||||
+ { .compatible = "qca,ar9130-wifi", .data = (void *)AR5416_AR9100_DEVID },
|
||||
+ { .compatible = "qca,ar9330-wifi", .data = (void *)AR9300_DEVID_AR9330 },
|
||||
+ { .compatible = "qca,ar9340-wifi", .data = (void *)AR9300_DEVID_AR9340 },
|
||||
+ { .compatible = "qca,qca9530-wifi", .data = (void *)AR9300_DEVID_AR953X },
|
||||
+ { .compatible = "qca,qca9550-wifi", .data = (void *)AR9300_DEVID_QCA955X },
|
||||
+ { .compatible = "qca,qca9560-wifi", .data = (void *)AR9300_DEVID_QCA956X },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -71,19 +55,14 @@ static const struct ath_bus_ops ath_ahb_
|
||||
|
||||
static int ath_ahb_probe(struct platform_device *pdev)
|
||||
{
|
||||
- void __iomem *mem;
|
||||
- struct ath_softc *sc;
|
||||
struct ieee80211_hw *hw;
|
||||
- const struct platform_device_id *id = platform_get_device_id(pdev);
|
||||
- int irq;
|
||||
- int ret = 0;
|
||||
+ struct ath_softc *sc;
|
||||
struct ath_hw *ah;
|
||||
+ void __iomem *mem;
|
||||
char hw_name[64];
|
||||
-
|
||||
- if (!dev_get_platdata(&pdev->dev)) {
|
||||
- dev_err(&pdev->dev, "no platform data specified\n");
|
||||
- return -EINVAL;
|
||||
- }
|
||||
+ u16 dev_id;
|
||||
+ int irq;
|
||||
+ int ret;
|
||||
|
||||
mem = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(mem)) {
|
||||
@@ -117,7 +96,8 @@ static int ath_ahb_probe(struct platform
|
||||
goto err_free_hw;
|
||||
}
|
||||
|
||||
- ret = ath9k_init_device(id->driver_data, sc, &ath_ahb_bus_ops);
|
||||
+ dev_id = (u16)(kernel_ulong_t)of_device_get_match_data(&pdev->dev);
|
||||
+ ret = ath9k_init_device(dev_id, sc, &ath_ahb_bus_ops);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize device\n");
|
||||
goto err_irq;
|
||||
@@ -167,11 +147,11 @@ static struct platform_driver ath_ahb_dr
|
||||
|
||||
.driver = {
|
||||
.name = "ath9k",
|
||||
+ .of_match_table = ath9k_of_match_table,
|
||||
},
|
||||
- .id_table = ath9k_platform_id_table,
|
||||
};
|
||||
|
||||
-MODULE_DEVICE_TABLE(platform, ath9k_platform_id_table);
|
||||
+MODULE_DEVICE_TABLE(of, ath9k_of_match_table);
|
||||
|
||||
int ath_ahb_init(void)
|
||||
{
|
||||
|
|
@ -42,11 +42,12 @@
|
|||
|
||||
if (wl->radio_enabled != phy->radio_on) {
|
||||
if (wl->radio_enabled) {
|
||||
@@ -5178,6 +5175,47 @@ static int b43_op_get_survey(struct ieee
|
||||
@@ -5178,6 +5175,49 @@ static int b43_op_get_survey(struct ieee
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int b43_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
|
||||
+static int b43_op_set_antenna(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 tx_ant, u32 rx_ant)
|
||||
+{
|
||||
+ struct b43_wl *wl = hw_to_b43_wl(hw);
|
||||
+ struct b43_wldev *dev = wl->current_dev;
|
||||
|
|
@ -71,7 +72,8 @@
|
|||
+}
|
||||
+
|
||||
+
|
||||
+static int b43_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
|
||||
+static int b43_op_get_antenna(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 *tx_ant, u32 *rx_ant)
|
||||
+{
|
||||
+ struct b43_wl *wl = hw_to_b43_wl(hw);
|
||||
+ struct b43_wldev *dev = wl->current_dev;
|
||||
|
|
@ -90,7 +92,7 @@
|
|||
static const struct ieee80211_ops b43_hw_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
@@ -5204,6 +5242,8 @@ static const struct ieee80211_ops b43_hw
|
||||
@@ -5204,6 +5244,8 @@ static const struct ieee80211_ops b43_hw
|
||||
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
|
||||
.get_survey = b43_op_get_survey,
|
||||
.rfkill_poll = b43_rfkill_poll,
|
||||
|
|
@ -99,7 +101,7 @@
|
|||
};
|
||||
|
||||
/* Hard-reset the chip. Do not call this directly.
|
||||
@@ -5505,6 +5545,8 @@ static int b43_one_core_attach(struct b4
|
||||
@@ -5505,6 +5547,8 @@ static int b43_one_core_attach(struct b4
|
||||
if (!wldev)
|
||||
goto out;
|
||||
|
||||
|
|
@ -108,7 +110,7 @@
|
|||
wldev->use_pio = b43_modparam_pio;
|
||||
wldev->dev = dev;
|
||||
wldev->wl = wl;
|
||||
@@ -5596,6 +5638,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
@@ -5596,6 +5640,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Subject: [PATCH] brcmfmac: add in-driver tables with country codes
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This adds early support for changing region. Ideally this data should
|
||||
be stored in DT as all these mappings are devices specific.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
@@ -66,6 +66,36 @@ static int brcmf_of_get_country_codes(st
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/* TODO: FIXME: Use DT */
|
||||
+static void brcmf_of_probe_cc(struct device *dev,
|
||||
+ struct brcmf_mp_device *settings)
|
||||
+{
|
||||
+ static struct brcmfmac_pd_cc_entry netgear_r8000_cc_ent[] = {
|
||||
+ { "JP", "JP", 78 },
|
||||
+ { "US", "Q2", 86 },
|
||||
+ };
|
||||
+ struct brcmfmac_pd_cc_entry *cc_ent = NULL;
|
||||
+ int table_size = 0;
|
||||
+
|
||||
+ if (of_machine_is_compatible("netgear,r8000")) {
|
||||
+ cc_ent = netgear_r8000_cc_ent;
|
||||
+ table_size = ARRAY_SIZE(netgear_r8000_cc_ent);
|
||||
+ }
|
||||
+
|
||||
+ if (cc_ent && table_size) {
|
||||
+ struct brcmfmac_pd_cc *cc;
|
||||
+ size_t memsize;
|
||||
+
|
||||
+ memsize = table_size * sizeof(struct brcmfmac_pd_cc_entry);
|
||||
+ cc = devm_kzalloc(dev, sizeof(*cc) + memsize, GFP_KERNEL);
|
||||
+ if (!cc)
|
||||
+ return;
|
||||
+ cc->table_size = table_size;
|
||||
+ memcpy(cc->table, cc_ent, memsize);
|
||||
+ settings->country_codes = cc;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
@@ -121,6 +151,8 @@ int brcmf_of_probe(struct device *dev, e
|
||||
|
||||
brcmf_dbg(INFO, "%s LPO clock\n", clk ? "enable" : "no");
|
||||
|
||||
+ brcmf_of_probe_cc(dev, settings);
|
||||
+
|
||||
if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
||||
return 0;
|
||||
|
||||
|
|
@ -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>
|
||||
@@ -8223,31 +8224,45 @@ static void brcmf_cfg80211_reg_notifier(
|
||||
@@ -8270,31 +8271,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;
|
||||
|
|
@ -99,8 +99,8 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|||
/**
|
||||
* struct nvram_parser - internal info for parser.
|
||||
*
|
||||
@@ -562,11 +565,27 @@ static int brcmf_fw_request_nvram_done(c
|
||||
goto fail;
|
||||
@@ -566,11 +569,27 @@ static int brcmf_fw_request_nvram_done(c
|
||||
}
|
||||
}
|
||||
|
||||
- if (data)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
@@ -3343,6 +3343,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
@@ -3360,6 +3360,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
bphy_err(drvr, "error (%d)\n", err);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ JIRA: SWWLAN-136577
|
|||
BRCMF_DEFAULT_SCAN_CHANNEL_TIME);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1322,7 +1322,7 @@ int brcmf_alloc(struct device *dev, stru
|
||||
@@ -1327,7 +1327,7 @@ int brcmf_alloc(struct device *dev, stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ JIRA: SWWLAN-136577
|
|||
{
|
||||
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
|
||||
struct brcmf_pub *drvr = bus_if->drvr;
|
||||
@@ -1365,10 +1365,13 @@ int brcmf_attach(struct device *dev)
|
||||
@@ -1370,10 +1370,13 @@ int brcmf_attach(struct device *dev)
|
||||
|
||||
brcmf_fwvid_get_cfg80211_ops(drvr);
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ JIRA: SWWLAN-136577
|
|||
void *data);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
@@ -2210,7 +2210,7 @@ static void brcmf_pcie_setup(struct devi
|
||||
@@ -2214,7 +2214,7 @@ static void brcmf_pcie_setup(struct devi
|
||||
|
||||
init_waitqueue_head(&devinfo->mbdata_resp_wait);
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ JIRA: SWWLAN-136577
|
|||
|
||||
#ifdef DEBUG
|
||||
/* Device console log buffer state */
|
||||
@@ -1105,7 +1117,7 @@ static void brcmf_sdio_get_console_addr(
|
||||
@@ -1106,7 +1118,7 @@ static void brcmf_sdio_get_console_addr(
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ JIRA: SWWLAN-136577
|
|||
{
|
||||
struct brcmf_sdio_dev *sdiod = bus->sdiodev;
|
||||
struct brcmf_core *core = bus->sdio_core;
|
||||
@@ -1194,6 +1206,9 @@ static u32 brcmf_sdio_hostmail(struct br
|
||||
@@ -1195,6 +1207,9 @@ static u32 brcmf_sdio_hostmail(struct br
|
||||
HMB_DATA_FCDATA_MASK | HMB_DATA_VERSION_MASK))
|
||||
brcmf_err("Unknown mailbox data content: 0x%02x\n",
|
||||
hmb_data);
|
||||
|
|
@ -266,7 +266,7 @@ JIRA: SWWLAN-136577
|
|||
|
||||
return intstatus;
|
||||
}
|
||||
@@ -2580,6 +2595,182 @@ static int brcmf_sdio_intr_rstatus(struc
|
||||
@@ -2581,6 +2596,182 @@ static int brcmf_sdio_intr_rstatus(struc
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -449,7 +449,7 @@ JIRA: SWWLAN-136577
|
|||
static void brcmf_sdio_dpc(struct brcmf_sdio *bus)
|
||||
{
|
||||
struct brcmf_sdio_dev *sdiod = bus->sdiodev;
|
||||
@@ -2651,8 +2842,11 @@ static void brcmf_sdio_dpc(struct brcmf_
|
||||
@@ -2652,8 +2843,11 @@ static void brcmf_sdio_dpc(struct brcmf_
|
||||
|
||||
/* Handle host mailbox indication */
|
||||
if (intstatus & I_HMB_HOST_INT) {
|
||||
|
|
@ -462,7 +462,7 @@ JIRA: SWWLAN-136577
|
|||
}
|
||||
|
||||
sdio_release_host(bus->sdiodev->func1);
|
||||
@@ -2697,7 +2891,7 @@ static void brcmf_sdio_dpc(struct brcmf_
|
||||
@@ -2698,7 +2892,7 @@ static void brcmf_sdio_dpc(struct brcmf_
|
||||
brcmf_sdio_clrintr(bus);
|
||||
|
||||
if (bus->ctrl_frame_stat && (bus->clkstate == CLK_AVAIL) &&
|
||||
|
|
@ -471,7 +471,7 @@ JIRA: SWWLAN-136577
|
|||
sdio_claim_host(bus->sdiodev->func1);
|
||||
if (bus->ctrl_frame_stat) {
|
||||
err = brcmf_sdio_tx_ctrlframe(bus, bus->ctrl_frame_buf,
|
||||
@@ -3567,6 +3761,10 @@ static int brcmf_sdio_bus_preinit(struct
|
||||
@@ -3569,6 +3763,10 @@ static int brcmf_sdio_bus_preinit(struct
|
||||
if (err < 0)
|
||||
goto done;
|
||||
|
||||
|
|
@ -482,7 +482,7 @@ JIRA: SWWLAN-136577
|
|||
bus->tx_hdrlen = SDPCM_HWHDR_LEN + SDPCM_SWHDR_LEN;
|
||||
if (sdiodev->sg_support) {
|
||||
bus->txglom = false;
|
||||
@@ -4217,7 +4415,7 @@ static void brcmf_sdio_firmware_callback
|
||||
@@ -4219,7 +4417,7 @@ static void brcmf_sdio_firmware_callback
|
||||
u8 saveclk, bpreq;
|
||||
u8 devctl;
|
||||
|
||||
|
|
@ -491,7 +491,7 @@ JIRA: SWWLAN-136577
|
|||
|
||||
if (err)
|
||||
goto fail;
|
||||
@@ -4394,12 +4592,25 @@ static void brcmf_sdio_firmware_callback
|
||||
@@ -4397,12 +4595,25 @@ static void brcmf_sdio_firmware_callback
|
||||
}
|
||||
|
||||
/* Attach to the common layer, reserve hdr space */
|
||||
|
|
@ -518,7 +518,7 @@ JIRA: SWWLAN-136577
|
|||
/* ready */
|
||||
return;
|
||||
|
||||
@@ -4646,3 +4857,40 @@ int brcmf_sdio_sleep(struct brcmf_sdio *
|
||||
@@ -4649,3 +4860,40 @@ int brcmf_sdio_sleep(struct brcmf_sdio *
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -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
|
||||
@@ -1211,7 +1211,7 @@ static void brcmf_usb_probe_phase2(struc
|
||||
@@ -1208,7 +1208,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;
|
||||
|
||||
@@ -1291,7 +1291,7 @@ static int brcmf_usb_probe_cb(struct brc
|
||||
@@ -1288,7 +1288,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
|
||||
@@ -2496,43 +2496,50 @@ brcmf_cfg80211_connect(struct wiphy *wip
|
||||
@@ -2512,43 +2512,50 @@ brcmf_cfg80211_connect(struct wiphy *wip
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
|
|||
err = brcmf_fil_bsscfg_data_set(vif->ifp, "actframe_abort", &int_val,
|
||||
sizeof(s32));
|
||||
if (err)
|
||||
@@ -1826,6 +1830,7 @@ bool brcmf_p2p_send_action_frame(struct
|
||||
@@ -1817,6 +1821,7 @@ bool brcmf_p2p_send_action_frame(struct
|
||||
/* validate channel and p2p ies */
|
||||
if (config_af_params.search_channel &&
|
||||
IS_P2P_SOCIAL_CHANNEL(le32_to_cpu(af_params->channel)) &&
|
||||
|
|
|
|||
|
|
@ -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
|
||||
@@ -8002,6 +8002,7 @@ static s32 brcmf_translate_country_code(
|
||||
@@ -8049,6 +8049,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)
|
||||
{
|
||||
@@ -8224,6 +8225,7 @@ exit:
|
||||
@@ -8271,6 +8272,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)
|
||||
@@ -8390,8 +8392,10 @@ struct brcmf_cfg80211_info *brcmf_cfg802
|
||||
@@ -8437,8 +8439,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
|
||||
|
|
|
|||
|
|
@ -680,7 +680,7 @@
|
|||
|
||||
--- a/net/wireless/trace.h
|
||||
+++ b/net/wireless/trace.h
|
||||
@@ -446,7 +446,11 @@ TRACE_EVENT(rdev_add_virtual_intf,
|
||||
@@ -478,7 +478,11 @@ TRACE_EVENT(rdev_add_virtual_intf,
|
||||
),
|
||||
TP_fast_assign(
|
||||
WIPHY_ASSIGN;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath10k/snoc.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
|
||||
@@ -1638,10 +1638,10 @@ static int ath10k_fw_init(struct ath10k
|
||||
@@ -1630,10 +1630,10 @@ static int ath10k_fw_init(struct ath10k
|
||||
|
||||
ar_snoc->fw.dev = &pdev->dev;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
@@ -1031,10 +1031,10 @@ static int ath11k_ahb_fw_resources_init(
|
||||
@@ -1020,10 +1020,10 @@ static int ath11k_ahb_fw_resources_init(
|
||||
|
||||
ab_ahb->fw.dev = &pdev->dev;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
}
|
||||
|
||||
return err;
|
||||
@@ -1521,7 +1537,11 @@ static int cfg80211_netdev_notifier_call
|
||||
@@ -1549,7 +1565,11 @@ static int cfg80211_netdev_notifier_call
|
||||
SET_NETDEV_DEVTYPE(dev, &wiphy_type);
|
||||
wdev->netdev = dev;
|
||||
/* can only change netns with wiphy */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
@@ -1588,7 +1588,11 @@ static int brcmf_usb_reset_device(struct
|
||||
@@ -1585,7 +1585,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
|
||||
@@ -6672,6 +6672,7 @@ static void hwsim_virtio_rx_done(struct
|
||||
@@ -6927,6 +6927,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 },
|
||||
@@ -6679,6 +6680,19 @@ static int init_vqs(struct virtio_device
|
||||
@@ -6934,6 +6935,19 @@ static int init_vqs(struct virtio_device
|
||||
|
||||
return virtio_find_vqs(vdev, HWSIM_NUM_VQS,
|
||||
hwsim_vqs, vqs_info, NULL);
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
--- a/drivers/net/wireless/ti/wlcore/sysfs.c
|
||||
+++ b/drivers/net/wireless/ti/wlcore/sysfs.c
|
||||
@@ -88,7 +88,7 @@ static ssize_t hw_pg_ver_show(struct dev
|
||||
static DEVICE_ATTR_RO(hw_pg_ver);
|
||||
|
||||
static ssize_t wl1271_sysfs_read_fwlog(struct file *filp, struct kobject *kobj,
|
||||
- const struct bin_attribute *bin_attr,
|
||||
+ struct bin_attribute *bin_attr,
|
||||
char *buffer, loff_t pos, size_t count)
|
||||
{
|
||||
struct device *dev = kobj_to_dev(kobj);
|
||||
@@ -121,7 +121,7 @@ static ssize_t wl1271_sysfs_read_fwlog(s
|
||||
|
||||
static const struct bin_attribute fwlog_attr = {
|
||||
.attr = { .name = "fwlog", .mode = 0400 },
|
||||
- .read_new = wl1271_sysfs_read_fwlog,
|
||||
+ .read = wl1271_sysfs_read_fwlog,
|
||||
};
|
||||
|
||||
int wlcore_sysfs_init(struct wl1271 *wl)
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
.llseek = generic_file_llseek, \
|
||||
};
|
||||
|
||||
@@ -141,9 +142,10 @@ static ssize_t aqm_write(struct file *fi
|
||||
@@ -139,9 +140,10 @@ static ssize_t aqm_write(struct file *fi
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -192,9 +194,10 @@ static ssize_t airtime_flags_write(struc
|
||||
@@ -190,9 +192,10 @@ static ssize_t airtime_flags_write(struc
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -222,8 +225,9 @@ static ssize_t aql_pending_read(struct f
|
||||
@@ -220,8 +223,9 @@ static ssize_t aql_pending_read(struct f
|
||||
buf, len);
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -301,9 +305,10 @@ static ssize_t aql_txq_limit_write(struc
|
||||
@@ -299,9 +303,10 @@ static ssize_t aql_txq_limit_write(struc
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -350,9 +355,10 @@ static ssize_t aql_enable_write(struct f
|
||||
@@ -348,9 +353,10 @@ static ssize_t aql_enable_write(struct f
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -400,9 +406,10 @@ static ssize_t force_tx_status_write(str
|
||||
@@ -398,9 +404,10 @@ static ssize_t force_tx_status_write(str
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -427,8 +434,9 @@ static ssize_t reset_write(struct file *
|
||||
@@ -425,8 +432,9 @@ static ssize_t reset_write(struct file *
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
.llseek = noop_llseek,
|
||||
};
|
||||
#endif
|
||||
@@ -656,8 +664,9 @@ static ssize_t stats_ ##name## _read(str
|
||||
@@ -653,8 +661,9 @@ static ssize_t stats_ ##name## _read(str
|
||||
print_devstats_##name); \
|
||||
} \
|
||||
\
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
@@ -442,8 +444,9 @@ STA_OPS_RW(agg_status);
|
||||
@@ -440,8 +442,9 @@ STA_OPS_RW(agg_status);
|
||||
|
||||
/* link sta attributes */
|
||||
#define LINK_STA_OPS(name) \
|
||||
|
|
@ -186,7 +186,7 @@
|
|||
|
||||
--- a/net/mac80211/rate.c
|
||||
+++ b/net/mac80211/rate.c
|
||||
@@ -249,8 +249,9 @@ static ssize_t rcname_read(struct file *
|
||||
@@ -252,8 +252,9 @@ static ssize_t rcname_read(struct file *
|
||||
ref->ops->name, len);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,116 +0,0 @@
|
|||
From f4e661a75cdfa7eb88ac0fa832edd4a90775805d Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
Date: Fri, 7 Nov 2025 23:05:56 +0100
|
||||
Subject: [PATCH] mwl8k: inject DS Params IE into beacons if missing
|
||||
|
||||
Some Marvell AP firmware used with mwl8k misbehaves when beacon frames
|
||||
do not contain a WLAN_EID_DS_PARAMS information element with the current
|
||||
channel. It was reported on OpenWrt Github issues [0].
|
||||
|
||||
When hostapd/mac80211 omits DS Params from the beacon (which is valid on
|
||||
some bands), the firmware stops transmitting sane frames and RX status
|
||||
starts reporting bogus channel information. This makes AP mode unusable.
|
||||
|
||||
Newer Marvell drivers (mwlwifi [1]) hard-code DS Params IE into AP beacons
|
||||
for all chips, which suggests this is a firmware requirement rather than
|
||||
a mwl8k-specific quirk.
|
||||
|
||||
Mirror that behaviour in mwl8k: when setting the beacon, check if
|
||||
WLAN_EID_DS_PARAMS is present, and if not, extend the beacon and inject
|
||||
a DS Params IE at the beginning of the IE list, using the current
|
||||
channel from hw->conf.chandef.chan.
|
||||
|
||||
Tested on Linksys EA4500 (88W8366).
|
||||
|
||||
[0] https://github.com/openwrt/openwrt/issues/19088
|
||||
[1] https://github.com/kaloz/mwlwifi/blob/db97edf20fadea2617805006f5230665fadc6a8c/hif/fwcmd.c#L675
|
||||
|
||||
Tested-by: Antony Kolitsos <zeusomighty@hotmail.com>
|
||||
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwl8k.c | 61 +++++++++++++++++++++++++---
|
||||
1 file changed, 56 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||
@@ -2962,6 +2962,42 @@ mwl8k_cmd_rf_antenna(struct ieee80211_hw
|
||||
/*
|
||||
* CMD_SET_BEACON.
|
||||
*/
|
||||
+
|
||||
+static bool mwl8k_beacon_has_ds_params(const u8 *buf, int len)
|
||||
+{
|
||||
+ const struct ieee80211_mgmt *mgmt = (const void *)buf;
|
||||
+ int ies_len;
|
||||
+
|
||||
+ if (len <= offsetof(struct ieee80211_mgmt, u.beacon.variable))
|
||||
+ return false;
|
||||
+
|
||||
+ ies_len = len - offsetof(struct ieee80211_mgmt, u.beacon.variable);
|
||||
+
|
||||
+ return cfg80211_find_ie(WLAN_EID_DS_PARAMS, mgmt->u.beacon.variable,
|
||||
+ ies_len) != NULL;
|
||||
+}
|
||||
+
|
||||
+static void mwl8k_beacon_copy_inject_ds_params(struct ieee80211_hw *hw,
|
||||
+ u8 *buf_dst, const u8 *buf_src,
|
||||
+ int src_len)
|
||||
+{
|
||||
+ const struct ieee80211_mgmt *mgmt = (const void *)buf_src;
|
||||
+ const u8 *ies;
|
||||
+ int hdr_len, left;
|
||||
+
|
||||
+ ies = mgmt->u.beacon.variable;
|
||||
+ hdr_len = ies - buf_src;
|
||||
+ left = src_len - hdr_len;
|
||||
+
|
||||
+ memcpy(buf_dst, buf_src, hdr_len);
|
||||
+
|
||||
+ /* Inject a DS Params IE at the beginning of the IE list */
|
||||
+ buf_dst[hdr_len + 0] = WLAN_EID_DS_PARAMS;
|
||||
+ buf_dst[hdr_len + 1] = 1;
|
||||
+ buf_dst[hdr_len + 2] = hw->conf.chandef.chan->hw_value;
|
||||
+
|
||||
+ memcpy(buf_dst + hdr_len + 3, buf_src + hdr_len, left);
|
||||
+}
|
||||
struct mwl8k_cmd_set_beacon {
|
||||
struct mwl8k_cmd_pkt_hdr header;
|
||||
__le16 beacon_len;
|
||||
@@ -2971,17 +3007,32 @@ struct mwl8k_cmd_set_beacon {
|
||||
static int mwl8k_cmd_set_beacon(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif, u8 *beacon, int len)
|
||||
{
|
||||
+ bool ds_params_present = mwl8k_beacon_has_ds_params(beacon, len);
|
||||
struct mwl8k_cmd_set_beacon *cmd;
|
||||
- int rc;
|
||||
+ int rc, final_len = len;
|
||||
+
|
||||
+ if (!ds_params_present)
|
||||
+ /*
|
||||
+ * mwl8k firmware requires a DS Params IE with the current
|
||||
+ * channel in AP beacons. If mac80211/hostapd does not
|
||||
+ * include it, inject one here. IE ID + length + channel
|
||||
+ * number = 3 bytes.
|
||||
+ */
|
||||
+ final_len += 3;
|
||||
|
||||
- cmd = kzalloc(sizeof(*cmd) + len, GFP_KERNEL);
|
||||
+ cmd = kzalloc(sizeof(*cmd) + final_len, GFP_KERNEL);
|
||||
if (cmd == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_BEACON);
|
||||
- cmd->header.length = cpu_to_le16(sizeof(*cmd) + len);
|
||||
- cmd->beacon_len = cpu_to_le16(len);
|
||||
- memcpy(cmd->beacon, beacon, len);
|
||||
+ cmd->header.length = cpu_to_le16(sizeof(*cmd) + final_len);
|
||||
+ cmd->beacon_len = cpu_to_le16(final_len);
|
||||
+
|
||||
+ if (ds_params_present)
|
||||
+ memcpy(cmd->beacon, beacon, len);
|
||||
+ else
|
||||
+ mwl8k_beacon_copy_inject_ds_params(hw, cmd->beacon, beacon,
|
||||
+ len);
|
||||
|
||||
rc = mwl8k_post_pervif_cmd(hw, vif, &cmd->header);
|
||||
kfree(cmd);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||
@@ -5763,6 +5763,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
|
||||
@@ -5779,6 +5779,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
|
||||
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
||||
|
||||
static const struct pci_device_id mwl8k_pci_id_table[] = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
@@ -2102,6 +2102,8 @@ struct wireless_dev *lbs_cfg_alloc(struc
|
||||
@@ -2105,6 +2105,8 @@ struct wireless_dev *lbs_cfg_alloc(struc
|
||||
goto err_wiphy_new;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
@@ -2179,6 +2179,8 @@ int lbs_cfg_register(struct lbs_private
|
||||
@@ -2182,6 +2182,8 @@ int lbs_cfg_register(struct lbs_private
|
||||
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
|
||||
wdev->wiphy->reg_notifier = lbs_reg_notifier;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||
@@ -6349,6 +6349,8 @@ static int mwl8k_probe(struct pci_dev *p
|
||||
@@ -6365,6 +6365,8 @@ static int mwl8k_probe(struct pci_dev *p
|
||||
|
||||
priv->running_bsses = 0;
|
||||
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
return rc;
|
||||
|
||||
err_stop_firmware:
|
||||
@@ -6382,8 +6384,6 @@ static void mwl8k_remove(struct pci_dev
|
||||
@@ -6398,8 +6400,6 @@ static void mwl8k_remove(struct pci_dev
|
||||
return;
|
||||
priv = hw->priv;
|
||||
|
||||
|
|
|
|||
|
|
@ -140,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
|
||||
@@ -1090,6 +1090,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
@@ -1091,6 +1091,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,12 +1,13 @@
|
|||
--- a/drivers/net/wireless/ralink/rt2x00/Kconfig
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/Kconfig
|
||||
@@ -226,36 +226,37 @@ config RT2800SOC
|
||||
@@ -223,33 +223,33 @@ config RT2800SOC
|
||||
|
||||
|
||||
config RT2800_LIB
|
||||
- tristate
|
||||
+ tristate "RT2800 USB/PCI support"
|
||||
depends on m
|
||||
depends on CRC_CCITT
|
||||
|
||||
config RT2800_LIB_MMIO
|
||||
- tristate
|
||||
|
|
@ -19,6 +20,7 @@
|
|||
- tristate
|
||||
+ tristate "RT2x00 MMIO support"
|
||||
depends on m
|
||||
select RT2X00_LIB
|
||||
|
||||
config RT2X00_LIB_PCI
|
||||
- tristate
|
||||
|
|
@ -26,13 +28,6 @@
|
|||
depends on m
|
||||
select RT2X00_LIB
|
||||
|
||||
config RT2X00_LIB_SOC
|
||||
- tristate
|
||||
+ tristate "RT2x00 SoC support"
|
||||
+ depends on SOC_RT288X || SOC_RT305X || SOC_MT7620
|
||||
depends on m
|
||||
select RT2X00_LIB
|
||||
|
||||
config RT2X00_LIB_USB
|
||||
- tristate
|
||||
+ tristate "RT2x00 USB support"
|
||||
|
|
|
|||
|
|
@ -10,21 +10,12 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/Kconfig
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/Kconfig
|
||||
@@ -211,7 +211,7 @@ endif
|
||||
@@ -209,7 +209,7 @@ endif
|
||||
config RT2800SOC
|
||||
tristate "Ralink WiSoC support"
|
||||
depends on m
|
||||
- depends on SOC_RT288X || SOC_RT305X || SOC_MT7620
|
||||
+ depends on SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620
|
||||
select RT2X00_LIB_SOC
|
||||
- depends on OF && (SOC_RT288X || SOC_RT305X || SOC_MT7620 || COMPILE_TEST)
|
||||
+ depends on OF && (SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620 || COMPILE_TEST)
|
||||
select RT2X00_LIB_MMIO
|
||||
select RT2X00_LIB_CRYPTO
|
||||
@@ -246,7 +246,7 @@ config RT2X00_LIB_PCI
|
||||
|
||||
config RT2X00_LIB_SOC
|
||||
tristate "RT2x00 SoC support"
|
||||
- depends on SOC_RT288X || SOC_RT305X || SOC_MT7620
|
||||
+ depends on SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620
|
||||
depends on m
|
||||
select RT2X00_LIB
|
||||
|
||||
select RT2X00_LIB_FIRMWARE
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 +
|
||||
.../net/wireless/ralink/rt2x00/rt2x00dev.c | 9 +++
|
||||
.../net/wireless/ralink/rt2x00/rt2x00eeprom.c | 75 +++++++++++++++++++
|
||||
.../net/wireless/ralink/rt2x00/rt2x00soc.c | 1 +
|
||||
.../net/wireless/ralink/rt2x00/rt2x00soc.h | 9 +++
|
||||
.../net/wireless/ralink/rt2x00/rt2800soc.c | 1 +
|
||||
.../net/wireless/ralink/rt2x00/rt2800soc.h | 9 +++
|
||||
8 files changed, 102 insertions(+), 14 deletions(-)
|
||||
create mode 100644 drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
|
||||
|
|
@ -37,9 +37,9 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
select RT2X00_LIB_FIRMWARE
|
||||
+ select RT2X00_LIB_EEPROM
|
||||
select RT2X00_LIB_CRYPTO
|
||||
depends on CRC_CCITT
|
||||
depends on EEPROM_93CX6
|
||||
@@ -216,6 +217,7 @@ config RT2800SOC
|
||||
help
|
||||
@@ -213,6 +214,7 @@ config RT2800SOC
|
||||
select RT2X00_LIB_MMIO
|
||||
select RT2X00_LIB_CRYPTO
|
||||
select RT2X00_LIB_FIRMWARE
|
||||
|
|
@ -47,7 +47,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
select RT2800_LIB
|
||||
select RT2800_LIB_MMIO
|
||||
help
|
||||
@@ -266,6 +268,9 @@ config RT2X00_LIB_FIRMWARE
|
||||
@@ -259,6 +261,9 @@ config RT2X00_LIB_FIRMWARE
|
||||
config RT2X00_LIB_CRYPTO
|
||||
bool
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
/* Firmware functions */
|
||||
static char *rt2800soc_get_firmware_name(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
@@ -172,7 +159,7 @@ static const struct rt2800_ops rt2800soc
|
||||
@@ -190,7 +177,7 @@ static const struct rt2800_ops rt2800soc
|
||||
.register_multiread = rt2x00mmio_register_multiread,
|
||||
.register_multiwrite = rt2x00mmio_register_multiwrite,
|
||||
.regbusy_read = rt2x00mmio_regbusy_read,
|
||||
|
|
@ -98,6 +98,14 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
.hwcrypt_disabled = rt2800soc_hwcrypt_disabled,
|
||||
.drv_write_firmware = rt2800soc_write_firmware,
|
||||
.drv_init_registers = rt2800mmio_init_registers,
|
||||
@@ -304,6 +291,7 @@ static int rt2x00soc_probe(struct platfo
|
||||
rt2x00dev->name = pdev->dev.driver->name;
|
||||
rt2x00dev->csr.base = mem;
|
||||
|
||||
+ set_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags);
|
||||
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC);
|
||||
|
||||
retval = rt2x00lib_probe_dev(rt2x00dev);
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
||||
@@ -692,6 +692,7 @@ enum rt2x00_capability_flags {
|
||||
|
|
@ -108,7 +116,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
|
||||
/*
|
||||
* Capabilities
|
||||
@@ -1504,4 +1505,13 @@ void rt2x00lib_remove_dev(struct rt2x00_
|
||||
@@ -1506,4 +1507,13 @@ void rt2x00lib_remove_dev(struct rt2x00_
|
||||
int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev);
|
||||
int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);
|
||||
|
||||
|
|
@ -124,7 +132,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
#endif /* RT2X00_H */
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
@@ -0,0 +1,79 @@
|
||||
@@ -0,0 +1,78 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+/* Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
|
||||
+ * Copyright (C) 2004 - 2009 Gertjan van Wingerde <gwingerde@gmail.com>
|
||||
|
|
@ -140,7 +148,6 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
+#include <linux/of.h>
|
||||
+
|
||||
+#include "rt2x00.h"
|
||||
+#include "rt2x00soc.h"
|
||||
+
|
||||
+static const char *
|
||||
+rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
|
||||
|
|
@ -204,16 +211,6 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
+ return rt2x00lib_read_eeprom_file(rt2x00dev);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(rt2x00lib_read_eeprom);
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
|
||||
@@ -86,6 +86,7 @@ int rt2x00soc_probe(struct platform_devi
|
||||
if (IS_ERR(rt2x00dev->clk))
|
||||
rt2x00dev->clk = NULL;
|
||||
|
||||
+ set_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags);
|
||||
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC);
|
||||
|
||||
retval = rt2x00soc_alloc_reg(rt2x00dev);
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800pci.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800pci.c
|
||||
@@ -278,6 +278,9 @@ static int rt2800pci_read_eeprom(struct
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/Kconfig
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/Kconfig
|
||||
@@ -220,6 +220,7 @@ config RT2800SOC
|
||||
@@ -217,6 +217,7 @@ config RT2800SOC
|
||||
select RT2X00_LIB_EEPROM
|
||||
select RT2800_LIB
|
||||
select RT2800_LIB_MMIO
|
||||
|
|
@ -24,7 +24,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
Supported chips: RT2880, RT3050, RT3052, RT3350, RT3352.
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
@@ -11,10 +11,66 @@
|
||||
@@ -11,9 +11,65 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
|
|
@ -34,7 +34,6 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
+#endif
|
||||
|
||||
#include "rt2x00.h"
|
||||
#include "rt2x00soc.h"
|
||||
|
||||
+#if IS_ENABLED(CONFIG_MTD)
|
||||
+static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
|
||||
|
|
@ -91,7 +90,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
static const char *
|
||||
rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
@@ -74,6 +130,14 @@ err_exit:
|
||||
@@ -73,6 +129,14 @@ err_exit:
|
||||
|
||||
int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
@@ -20,6 +20,19 @@
|
||||
#include "rt2x00soc.h"
|
||||
@@ -19,6 +19,19 @@
|
||||
#include "rt2x00.h"
|
||||
|
||||
#if IS_ENABLED(CONFIG_MTD)
|
||||
+static void rt2800lib_eeprom_swap(struct rt2x00_dev *rt2x00dev)
|
||||
|
|
@ -33,7 +33,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
struct device_node *np = rt2x00dev->dev->of_node, *mtd_np = NULL;
|
||||
@@ -65,6 +78,8 @@ static int rt2800lib_read_eeprom_mtd(str
|
||||
@@ -64,6 +77,8 @@ static int rt2800lib_read_eeprom_mtd(str
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,20 +21,19 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
@@ -15,11 +15,11 @@
|
||||
@@ -15,10 +15,10 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#endif
|
||||
+#include <linux/nvmem-consumer.h>
|
||||
|
||||
#include "rt2x00.h"
|
||||
#include "rt2x00soc.h"
|
||||
|
||||
-#if IS_ENABLED(CONFIG_MTD)
|
||||
static void rt2800lib_eeprom_swap(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
struct device_node *np = rt2x00dev->dev->of_node;
|
||||
@@ -33,6 +33,7 @@ static void rt2800lib_eeprom_swap(struct
|
||||
@@ -32,6 +32,7 @@ static void rt2800lib_eeprom_swap(struct
|
||||
rt2x00dev->eeprom[i] = swab16(rt2x00dev->eeprom[i]);
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +41,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
struct device_node *np = rt2x00dev->dev->of_node, *mtd_np = NULL;
|
||||
@@ -86,6 +87,40 @@ static int rt2800lib_read_eeprom_mtd(str
|
||||
@@ -85,6 +86,40 @@ static int rt2800lib_read_eeprom_mtd(str
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -83,7 +82,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
static const char *
|
||||
rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
@@ -153,6 +188,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
|
||||
@@ -152,6 +187,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Signed-off-by: Coia Prant <coiaprant@gmail.com>
|
|||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
|
||||
@@ -33,6 +33,27 @@ static void rt2800lib_eeprom_swap(struct
|
||||
@@ -32,6 +32,27 @@ static void rt2800lib_eeprom_swap(struct
|
||||
rt2x00dev->eeprom[i] = swab16(rt2x00dev->eeprom[i]);
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ Signed-off-by: Coia Prant <coiaprant@gmail.com>
|
|||
#if IS_ENABLED(CONFIG_MTD)
|
||||
static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
@@ -182,6 +203,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
|
||||
@@ -181,6 +202,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
From 04dbd87265f6ba4a373b211ba324b437d224fb2d Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <blogic@openwrt.org>
|
||||
Date: Sun, 17 Mar 2013 00:03:31 +0100
|
||||
Subject: [PATCH 21/38] rt2x00: make wmac loadable via OF on rt288x/305x SoC
|
||||
|
||||
This patch ads the match table to allow loading the wmac support from a
|
||||
devicetree.
|
||||
|
||||
Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
|
||||
@@ -237,10 +237,18 @@ static int bp_rt2x00soc_remove(struct pl
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+static const struct of_device_id rt2880_wmac_match[] = {
|
||||
+ { .compatible = "ralink,rt2880-wmac" },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, rt2880_wmac_match);
|
||||
+
|
||||
static struct platform_driver rt2800soc_driver = {
|
||||
.driver = {
|
||||
.name = "rt2800_wmac",
|
||||
.mod_name = KBUILD_MODNAME,
|
||||
+ .of_match_table = rt2880_wmac_match,
|
||||
},
|
||||
.probe = rt2800soc_probe,
|
||||
#if LINUX_VERSION_IS_GEQ(6,11,0)
|
||||
|
|
@ -22,7 +22,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
---
|
||||
.../net/wireless/ralink/rt2x00/rt2800lib.c | 58 +++++++++++++++++++
|
||||
drivers/net/wireless/ralink/rt2x00/rt2x00.h | 5 ++
|
||||
.../net/wireless/ralink/rt2x00/rt2x00soc.c | 15 +++++
|
||||
.../net/wireless/ralink/rt2x00/rt2800soc.c | 15 +++++
|
||||
3 files changed, 78 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
|
|
@ -95,11 +95,11 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
};
|
||||
|
||||
struct rt2x00_bar_list_entry {
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
|
||||
@@ -97,6 +97,21 @@ int rt2x00soc_probe(struct platform_devi
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
|
||||
@@ -298,6 +298,21 @@ static int rt2x00soc_probe(struct platfo
|
||||
if (retval)
|
||||
goto exit_free_reg;
|
||||
goto exit_free_device;
|
||||
|
||||
+ rt2x00dev->pinctrl = devm_pinctrl_get(&pdev->dev);
|
||||
+ if (IS_ERR(rt2x00dev->pinctrl)) {
|
||||
|
|
@ -118,4 +118,4 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
+
|
||||
return 0;
|
||||
|
||||
exit_free_reg:
|
||||
exit_free_device:
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@
|
|||
/* Allow hardware encryption to be disabled. */
|
||||
static bool modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
|
||||
@@ -118,6 +124,27 @@ static int rt2800soc_write_firmware(stru
|
||||
return 0;
|
||||
@@ -136,6 +142,27 @@ static int rt2800soc_resume(struct platf
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
+#ifdef CONFIG_SOC_MT7620
|
||||
+static int rt2800soc_get_chippkg(void)
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
static const struct ieee80211_ops rt2800soc_mac80211_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
@@ -165,6 +192,9 @@ static const struct rt2800_ops rt2800soc
|
||||
@@ -183,6 +210,9 @@ static const struct rt2800_ops rt2800soc
|
||||
.drv_init_registers = rt2800mmio_init_registers,
|
||||
.drv_get_txwi = rt2800mmio_get_txwi,
|
||||
.drv_get_dma_done = rt2800mmio_get_dma_done,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
@@ -1691,12 +1691,6 @@ static int ieee80211_stop_ap(struct wiph
|
||||
@@ -1882,12 +1882,6 @@ static int ieee80211_stop_ap(struct wiph
|
||||
|
||||
__sta_info_flush(sdata, true, link_id, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -1595,24 +1595,6 @@ int ieee80211_register_hw(struct ieee802
|
||||
@@ -1597,24 +1597,6 @@ int ieee80211_register_hw(struct ieee802
|
||||
|
||||
ieee80211_check_wbrf_support(local);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
@@ -2925,6 +2925,8 @@ static int ieee80211_scan(struct wiphy *
|
||||
@@ -3131,6 +3131,8 @@ static int ieee80211_scan(struct wiphy *
|
||||
*/
|
||||
fallthrough;
|
||||
case NL80211_IFTYPE_AP:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
@@ -2468,6 +2468,13 @@ static void sta_stats_decode_rate(struct
|
||||
@@ -2526,6 +2526,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
|
||||
@@ -582,6 +582,7 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
@@ -630,6 +630,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);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -103,6 +103,8 @@ ieee80211_sta_keep_active(struct sta_inf
|
||||
@@ -111,6 +111,8 @@ ieee80211_sta_keep_active(struct sta_inf
|
||||
return time_before_eq(jiffies, sta->airtime[ac].last_active + HZ / 10);
|
||||
}
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -4066,7 +4066,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
@@ -4084,7 +4084,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,
|
||||
@@ -4209,7 +4209,8 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
@@ -4229,7 +4229,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]);
|
||||
}
|
||||
|
||||
@@ -4217,7 +4218,7 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
@@ -4237,7 +4238,7 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
if (sta->airtime[ac].deficit >= 0)
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -190,6 +190,8 @@ enum ieee80211_channel_flags {
|
||||
@@ -187,6 +187,8 @@ enum ieee80211_channel_flags {
|
||||
* @dfs_state: current state of this channel. Only relevant if radar is required
|
||||
* on this channel.
|
||||
* @dfs_state_entered: timestamp (jiffies) when the dfs state was entered.
|
||||
|
|
@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
* @dfs_cac_ms: DFS CAC time in milliseconds, this is valid for DFS channels.
|
||||
* @psd: power spectral density (in dBm)
|
||||
*/
|
||||
@@ -207,6 +209,7 @@ struct ieee80211_channel {
|
||||
@@ -204,6 +206,7 @@ struct ieee80211_channel {
|
||||
int orig_mag, orig_mpwr;
|
||||
enum nl80211_dfs_state dfs_state;
|
||||
unsigned long dfs_state_entered;
|
||||
|
|
@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/net/wireless/chan.c
|
||||
+++ b/net/wireless/chan.c
|
||||
@@ -643,6 +643,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
@@ -639,6 +639,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
|
||||
c->dfs_state = dfs_state;
|
||||
c->dfs_state_entered = jiffies;
|
||||
|
|
@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
{
|
||||
--- a/net/wireless/core.h
|
||||
+++ b/net/wireless/core.h
|
||||
@@ -474,6 +474,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
@@ -481,6 +481,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
enum nl80211_dfs_state dfs_state);
|
||||
|
||||
void cfg80211_dfs_channels_update_work(struct work_struct *work);
|
||||
|
|
@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/net/wireless/mlme.c
|
||||
+++ b/net/wireless/mlme.c
|
||||
@@ -1038,6 +1038,8 @@ void cfg80211_dfs_channels_update_work(s
|
||||
@@ -1056,6 +1056,8 @@ void cfg80211_dfs_channels_update_work(s
|
||||
if (c->dfs_state == NL80211_DFS_UNAVAILABLE) {
|
||||
time_dfs_update = IEEE80211_DFS_MIN_NOP_TIME_MS;
|
||||
radar_event = NL80211_RADAR_NOP_FINISHED;
|
||||
|
|
@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
} else {
|
||||
if (regulatory_pre_cac_allowed(wiphy) ||
|
||||
cfg80211_any_wiphy_oper_chan(wiphy, c))
|
||||
@@ -1045,11 +1047,10 @@ void cfg80211_dfs_channels_update_work(s
|
||||
@@ -1063,11 +1065,10 @@ void cfg80211_dfs_channels_update_work(s
|
||||
|
||||
time_dfs_update = REG_PRE_CAC_EXPIRY_GRACE_MS;
|
||||
radar_event = NL80211_RADAR_PRE_CAC_EXPIRED;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -3437,6 +3437,7 @@ enum wiphy_params_flags {
|
||||
@@ -3604,6 +3604,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
|
||||
|
|
@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
#define IEEE80211_AQL_THRESHOLD 24000
|
||||
--- a/net/mac80211/debugfs.c
|
||||
+++ b/net/mac80211/debugfs.c
|
||||
@@ -215,11 +215,13 @@ static ssize_t aql_pending_read(struct f
|
||||
@@ -213,11 +213,13 @@ static ssize_t aql_pending_read(struct f
|
||||
"VI %u us\n"
|
||||
"BE %u us\n"
|
||||
"BK %u us\n"
|
||||
|
|
@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
atomic_read(&local->aql_total_pending_airtime));
|
||||
return simple_read_from_buffer(user_buf, count, ppos,
|
||||
buf, len);
|
||||
@@ -245,7 +247,8 @@ static ssize_t aql_txq_limit_read(struct
|
||||
@@ -243,7 +245,8 @@ static ssize_t aql_txq_limit_read(struct
|
||||
"VO %u %u\n"
|
||||
"VI %u %u\n"
|
||||
"BE %u %u\n"
|
||||
|
|
@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
local->aql_txq_limit_low[IEEE80211_AC_VO],
|
||||
local->aql_txq_limit_high[IEEE80211_AC_VO],
|
||||
local->aql_txq_limit_low[IEEE80211_AC_VI],
|
||||
@@ -253,7 +256,8 @@ static ssize_t aql_txq_limit_read(struct
|
||||
@@ -251,7 +254,8 @@ static ssize_t aql_txq_limit_read(struct
|
||||
local->aql_txq_limit_low[IEEE80211_AC_BE],
|
||||
local->aql_txq_limit_high[IEEE80211_AC_BE],
|
||||
local->aql_txq_limit_low[IEEE80211_AC_BK],
|
||||
|
|
@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
return simple_read_from_buffer(user_buf, count, ppos,
|
||||
buf, len);
|
||||
}
|
||||
@@ -279,6 +283,11 @@ static ssize_t aql_txq_limit_write(struc
|
||||
@@ -277,6 +281,11 @@ static ssize_t aql_txq_limit_write(struc
|
||||
else
|
||||
buf[count] = '\0';
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1377,10 +1377,12 @@ struct ieee80211_local {
|
||||
@@ -1428,10 +1428,12 @@ struct ieee80211_local {
|
||||
spinlock_t handle_wake_tx_queue_lock;
|
||||
|
||||
u16 airtime_flags;
|
||||
|
|
@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
const struct ieee80211_ops *ops;
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -959,6 +959,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
@@ -984,6 +984,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
spin_lock_init(&local->rx_path_lock);
|
||||
spin_lock_init(&local->queue_stop_reason_lock);
|
||||
|
||||
|
|
@ -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
|
||||
@@ -2382,13 +2382,28 @@ EXPORT_SYMBOL(ieee80211_sta_recalc_aggre
|
||||
@@ -2431,13 +2431,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
|
||||
@@ -2539,7 +2539,7 @@ static u16 ieee80211_store_ack_skb(struc
|
||||
@@ -2554,7 +2554,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) {
|
||||
@@ -3967,20 +3967,20 @@ begin:
|
||||
@@ -3985,20 +3985,20 @@ begin:
|
||||
encap_out:
|
||||
info->control.vif = vif;
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
}
|
||||
|
||||
return skb;
|
||||
@@ -4032,6 +4032,7 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
@@ -4050,6 +4050,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]);
|
||||
|
||||
@@ -4055,26 +4056,26 @@ struct ieee80211_txq *ieee80211_next_txq
|
||||
@@ -4073,26 +4074,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;
|
||||
|
||||
@@ -4139,7 +4140,8 @@ bool ieee80211_txq_airtime_check(struct
|
||||
@@ -4159,7 +4160,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;
|
||||
@@ -4188,15 +4190,15 @@ bool ieee80211_txq_may_transmit(struct i
|
||||
@@ -4208,15 +4210,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
|
||||
@@ -1245,8 +1245,8 @@ struct ieee80211_tx_info {
|
||||
@@ -1249,8 +1249,8 @@ struct ieee80211_tx_info {
|
||||
status_data_idr:1,
|
||||
status_data:13,
|
||||
hw_queue:4,
|
||||
|
|
@ -269,7 +269,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/net/mac80211/status.c
|
||||
+++ b/net/mac80211/status.c
|
||||
@@ -734,7 +734,7 @@ static void ieee80211_report_used_skb(st
|
||||
@@ -751,7 +751,7 @@ static void ieee80211_report_used_skb(st
|
||||
ieee80211_sta_update_pending_airtime(local, sta,
|
||||
skb_get_queue_mapping(skb),
|
||||
tx_time_est,
|
||||
|
|
@ -278,7 +278,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
@@ -1143,10 +1143,11 @@ void ieee80211_tx_status_ext(struct ieee
|
||||
@@ -1160,10 +1160,11 @@ void ieee80211_tx_status_ext(struct ieee
|
||||
/* Do this here to avoid the expensive lookup of the sta
|
||||
* in ieee80211_report_used_skb().
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
From: Alexander Wetzel <Alexander@wetzel-home.de>
|
||||
Date: Thu, 17 Jul 2025 18:25:46 +0200
|
||||
Subject: [PATCH] wifi: mac80211: Do not schedule stopped TXQs
|
||||
|
||||
Ignore TXQs with the flag IEEE80211_TXQ_STOP when scheduling a queue.
|
||||
|
||||
The flag is only set after all fragments have been dequeued and won't
|
||||
allow dequeueing other frames as long as the flag is set.
|
||||
|
||||
For drivers using ieee80211_txq_schedule_start() this prevents an
|
||||
loop trying to push the queued frames while IEEE80211_TXQ_STOP is set:
|
||||
|
||||
After setting IEEE80211_TXQ_STOP the driver will call
|
||||
ieee80211_return_txq(). Which calls __ieee80211_schedule_txq(), detects
|
||||
that there sill are frames in the queue and immediately restarts the
|
||||
stopped TXQ. Which can't dequeue any frame and thus starts over the loop.
|
||||
|
||||
Signed-off-by: Alexander Wetzel <Alexander@wetzel-home.de>
|
||||
Fixes: ba8c3d6f16a1 ("mac80211: add an intermediate software queue implementation")
|
||||
Link: https://patch.msgid.link/20250717162547.94582-2-Alexander@wetzel-home.de
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -4099,7 +4099,9 @@ void __ieee80211_schedule_txq(struct iee
|
||||
|
||||
spin_lock_bh(&local->active_txq_lock[txq->ac]);
|
||||
|
||||
- has_queue = force || txq_has_queue(txq);
|
||||
+ has_queue = force ||
|
||||
+ (!test_bit(IEEE80211_TXQ_STOP, &txqi->flags) &&
|
||||
+ txq_has_queue(txq));
|
||||
if (list_empty(&txqi->schedule_order) &&
|
||||
(has_queue || ieee80211_txq_keep_active(txqi))) {
|
||||
/* If airtime accounting is active, always enqueue STAs at the
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From: Alexander Wetzel <Alexander@wetzel-home.de>
|
||||
Date: Thu, 17 Jul 2025 18:25:47 +0200
|
||||
Subject: [PATCH] wifi: mac80211: Don't call fq_flow_idx() for management
|
||||
frames
|
||||
|
||||
skb_get_hash() can only be used when the skb is linked to a netdev
|
||||
device.
|
||||
|
||||
Signed-off-by: Alexander Wetzel <Alexander@wetzel-home.de>
|
||||
Fixes: 73bc9e0af594 ("mac80211: don't apply flow control on management frames")
|
||||
Link: https://patch.msgid.link/20250717162547.94582-3-Alexander@wetzel-home.de
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1428,7 +1428,7 @@ static void ieee80211_txq_enqueue(struct
|
||||
{
|
||||
struct fq *fq = &local->fq;
|
||||
struct fq_tin *tin = &txqi->tin;
|
||||
- u32 flow_idx = fq_flow_idx(fq, skb);
|
||||
+ u32 flow_idx;
|
||||
|
||||
ieee80211_set_skb_enqueue_time(skb);
|
||||
|
||||
@@ -1444,6 +1444,7 @@ static void ieee80211_txq_enqueue(struct
|
||||
IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
||||
__skb_queue_tail(&txqi->frags, skb);
|
||||
} else {
|
||||
+ flow_idx = fq_flow_idx(fq, skb);
|
||||
fq_tin_enqueue(fq, tin, flow_idx, skb,
|
||||
fq_skb_free_func);
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From: Remi Pommarel <repk@triplefau.lt>
|
||||
Date: Thu, 17 Jul 2025 17:45:28 +0200
|
||||
Subject: [PATCH] wifi: mac80211: Check 802.11 encaps offloading in
|
||||
ieee80211_tx_h_select_key()
|
||||
|
||||
With 802.11 encapsulation offloading, ieee80211_tx_h_select_key() is
|
||||
called on 802.3 frames. In that case do not try to use skb data as
|
||||
valid 802.11 headers.
|
||||
|
||||
Reported-by: Bert Karwatzki <spasswolf@web.de>
|
||||
Closes: https://lore.kernel.org/linux-wireless/20250410215527.3001-1-spasswolf@web.de
|
||||
Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue")
|
||||
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
|
||||
Link: https://patch.msgid.link/1af4b5b903a5fca5ebe67333d5854f93b2be5abe.1752765971.git.repk@triplefau.lt
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -612,6 +612,12 @@ ieee80211_tx_h_select_key(struct ieee802
|
||||
else
|
||||
tx->key = NULL;
|
||||
|
||||
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
|
||||
+ if (tx->key && tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
|
||||
+ info->control.hw_key = &tx->key->conf;
|
||||
+ return TX_CONTINUE;
|
||||
+ }
|
||||
+
|
||||
if (tx->key) {
|
||||
bool skip_hw = false;
|
||||
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
From: Remi Pommarel <repk@triplefau.lt>
|
||||
Date: Thu, 17 Jul 2025 17:45:29 +0200
|
||||
Subject: [PATCH] Reapply "wifi: mac80211: Update skb's control block key in
|
||||
ieee80211_tx_dequeue()"
|
||||
|
||||
This reverts commit 0937cb5f345c ("Revert "wifi: mac80211: Update
|
||||
skb's control block key in ieee80211_tx_dequeue()"").
|
||||
|
||||
This commit broke TX with 802.11 encapsulation HW offloading, now that
|
||||
this is fixed, reapply it.
|
||||
|
||||
Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue")
|
||||
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
|
||||
Link: https://patch.msgid.link/66b8fc39fb0194fa06c9ca7eeb6ffe0118dcb3ec.1752765971.git.repk@triplefau.lt
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -3883,6 +3883,7 @@ begin:
|
||||
* The key can be removed while the packet was queued, so need to call
|
||||
* this here to get the current key.
|
||||
*/
|
||||
+ info->control.hw_key = NULL;
|
||||
r = ieee80211_tx_h_select_key(&tx);
|
||||
if (r != TX_CONTINUE) {
|
||||
ieee80211_free_txskb(&local->hw, skb);
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue