mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
Merge branch 'master' of https://github.com/coolsnowwolf/lede
This commit is contained in:
commit
85f1abdc82
@ -12,10 +12,10 @@ PKG_SOURCE_DATE:=2021-11-28
|
|||||||
PKG_SOURCE_VERSION:=dc350bbf41d987c5b2db54405bcc9ef3cd66d5db
|
PKG_SOURCE_VERSION:=dc350bbf41d987c5b2db54405bcc9ef3cd66d5db
|
||||||
PKG_MIRROR_HASH:=92422485c7b92be840a40bf8d157bb6731d14d3811907b6cb4e4cfab0777b60d
|
PKG_MIRROR_HASH:=92422485c7b92be840a40bf8d157bb6731d14d3811907b6cb4e4cfab0777b60d
|
||||||
|
|
||||||
# Build the 5.10 ath10k-ct driver version.
|
# Build the 5.15 ath10k-ct driver version.
|
||||||
# Probably this should match as closely as
|
# Probably this should match as closely as
|
||||||
# possible to whatever mac80211 backports version is being used.
|
# possible to whatever mac80211 backports version is being used.
|
||||||
CT_KVER="-5.10"
|
CT_KVER="-5.15"
|
||||||
|
|
||||||
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
|
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
@ -0,0 +1,162 @@
|
|||||||
|
From e2333703373e8b81294da5d1c73c30154f75b082 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
Date: Fri, 15 Oct 2021 18:56:33 +0200
|
||||||
|
Subject: [PATCH] ath10k: fetch (pre-)calibration data via nvmem subsystem
|
||||||
|
|
||||||
|
On most embedded ath10k devices (like range extenders,
|
||||||
|
routers, accesspoints, ...) the calibration data is
|
||||||
|
stored in a easily accessible MTD partitions named
|
||||||
|
"ART", "caldata", "calibration", etc...
|
||||||
|
|
||||||
|
Since commit 4b361cfa8624 ("mtd: core: add OTP nvmem provider support"):
|
||||||
|
MTD partitions and portions of them can be specified
|
||||||
|
as potential nvmem-cells which are accessible through
|
||||||
|
the nvmem subsystem.
|
||||||
|
|
||||||
|
This feature - together with an nvmem cell definition either
|
||||||
|
in the platform data or via device-tree allows drivers to get
|
||||||
|
the (pre-)calibration data which is required for initializing
|
||||||
|
the WIFI.
|
||||||
|
|
||||||
|
Tested with Netgear EX6150v2 (IPQ4018)
|
||||||
|
|
||||||
|
Cc: Robert Marko <robimarko@gmail.com>
|
||||||
|
Cc: Thibaut Varene <hacks@slashdirt.org>
|
||||||
|
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
---
|
||||||
|
--- a/ath10k-5.15/core.c
|
||||||
|
+++ b/ath10k-5.15/core.c
|
||||||
|
@@ -13,6 +13,7 @@
|
||||||
|
#include <linux/dmi.h>
|
||||||
|
#include <linux/ctype.h>
|
||||||
|
#include <linux/pm_qos.h>
|
||||||
|
+#include <linux/nvmem-consumer.h>
|
||||||
|
#include <asm/byteorder.h>
|
||||||
|
#include <linux/ctype.h>
|
||||||
|
|
||||||
|
@@ -988,7 +989,8 @@ static int ath10k_core_get_board_id_from
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
||||||
|
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
||||||
|
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
||||||
|
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
||||||
|
bmi_board_id_param = BMI_PARAM_GET_FLASH_BOARD_ID;
|
||||||
|
else
|
||||||
|
bmi_board_id_param = BMI_PARAM_GET_EEPROM_BOARD_ID;
|
||||||
|
@@ -2087,7 +2089,8 @@ static int ath10k_download_and_run_otp(s
|
||||||
|
|
||||||
|
/* As of now pre-cal is valid for 10_4 variants */
|
||||||
|
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
||||||
|
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
||||||
|
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
||||||
|
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
||||||
|
bmi_otp_exe_param = BMI_PARAM_FLASH_SECTION_ALL;
|
||||||
|
|
||||||
|
ret = ath10k_bmi_execute(ar, address, bmi_otp_exe_param, &result);
|
||||||
|
@@ -2221,6 +2224,39 @@ struct ath10k_bss_rom_ie {
|
||||||
|
__le32 rom_len;
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
+static int ath10k_download_cal_nvmem(struct ath10k *ar, const char *cell_name)
|
||||||
|
+{
|
||||||
|
+ struct nvmem_cell *cell;
|
||||||
|
+ void *buf;
|
||||||
|
+ size_t len;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ cell = devm_nvmem_cell_get(ar->dev, cell_name);
|
||||||
|
+ if (IS_ERR(cell)) {
|
||||||
|
+ ret = PTR_ERR(cell);
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ buf = nvmem_cell_read(cell, &len);
|
||||||
|
+ if (IS_ERR(buf))
|
||||||
|
+ return PTR_ERR(buf);
|
||||||
|
+
|
||||||
|
+ if (ar->hw_params.cal_data_len != len) {
|
||||||
|
+ kfree(buf);
|
||||||
|
+ ath10k_warn(ar, "invalid calibration data length in nvmem-cell '%s': %zu != %u\n",
|
||||||
|
+ cell_name, len, ar->hw_params.cal_data_len);
|
||||||
|
+ return -EMSGSIZE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ret = ath10k_download_board_data(ar, buf, len);
|
||||||
|
+ kfree(buf);
|
||||||
|
+ if (ret)
|
||||||
|
+ ath10k_warn(ar, "failed to download calibration data from nvmem-cell '%s': %d\n",
|
||||||
|
+ cell_name, ret);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
|
||||||
|
struct ath10k_fw_file *fw_file)
|
||||||
|
{
|
||||||
|
@@ -2597,6 +2633,18 @@ static int ath10k_core_pre_cal_download(
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
+ ret = ath10k_download_cal_nvmem(ar, "pre-calibration");
|
||||||
|
+ if (ret == 0) {
|
||||||
|
+ ar->cal_mode = ATH10K_PRE_CAL_MODE_NVMEM;
|
||||||
|
+ goto success;
|
||||||
|
+ } else if (ret == -EPROBE_DEFER) {
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||||
|
+ "boot did not find a pre-calibration nvmem-cell, try file next: %d\n",
|
||||||
|
+ ret);
|
||||||
|
+
|
||||||
|
ret = ath10k_download_cal_file(ar, ar->pre_cal_file);
|
||||||
|
if (ret == 0) {
|
||||||
|
ar->cal_mode = ATH10K_PRE_CAL_MODE_FILE;
|
||||||
|
@@ -2663,6 +2711,18 @@ static int ath10k_download_cal_data(stru
|
||||||
|
"pre cal download procedure failed, try cal file: %d\n",
|
||||||
|
ret);
|
||||||
|
|
||||||
|
+ ret = ath10k_download_cal_nvmem(ar, "calibration");
|
||||||
|
+ if (ret == 0) {
|
||||||
|
+ ar->cal_mode = ATH10K_CAL_MODE_NVMEM;
|
||||||
|
+ goto done;
|
||||||
|
+ } else if (ret == -EPROBE_DEFER) {
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||||
|
+ "boot did not find a calibration nvmem-cell, try file next: %d\n",
|
||||||
|
+ ret);
|
||||||
|
+
|
||||||
|
ret = ath10k_download_cal_file(ar, ar->cal_file);
|
||||||
|
if (ret == 0) {
|
||||||
|
ar->cal_mode = ATH10K_CAL_MODE_FILE;
|
||||||
|
--- a/ath10k-5.15/core.h
|
||||||
|
+++ b/ath10k-5.15/core.h
|
||||||
|
@@ -1109,8 +1109,10 @@ enum ath10k_cal_mode {
|
||||||
|
ATH10K_CAL_MODE_FILE,
|
||||||
|
ATH10K_CAL_MODE_OTP,
|
||||||
|
ATH10K_CAL_MODE_DT,
|
||||||
|
+ ATH10K_CAL_MODE_NVMEM,
|
||||||
|
ATH10K_PRE_CAL_MODE_FILE,
|
||||||
|
ATH10K_PRE_CAL_MODE_DT,
|
||||||
|
+ ATH10K_PRE_CAL_MODE_NVMEM,
|
||||||
|
ATH10K_CAL_MODE_EEPROM,
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -1130,10 +1132,14 @@ static inline const char *ath10k_cal_mod
|
||||||
|
return "otp";
|
||||||
|
case ATH10K_CAL_MODE_DT:
|
||||||
|
return "dt";
|
||||||
|
+ case ATH10K_CAL_MODE_NVMEM:
|
||||||
|
+ return "nvmem";
|
||||||
|
case ATH10K_PRE_CAL_MODE_FILE:
|
||||||
|
return "pre-cal-file";
|
||||||
|
case ATH10K_PRE_CAL_MODE_DT:
|
||||||
|
return "pre-cal-dt";
|
||||||
|
+ case ATH10K_PRE_CAL_MODE_NVMEM:
|
||||||
|
+ return "pre-cal-nvmem";
|
||||||
|
case ATH10K_CAL_MODE_EEPROM:
|
||||||
|
return "eeprom";
|
||||||
|
}
|
@ -66,25 +66,25 @@ v13:
|
|||||||
|
|
||||||
* cleanup includes
|
* cleanup includes
|
||||||
|
|
||||||
ath10k-5.10/Kconfig | 10 +++
|
ath10k-5.15/Kconfig | 10 +++
|
||||||
ath10k-5.10/Makefile | 1 +
|
ath10k-5.15/Makefile | 1 +
|
||||||
ath10k-5.10/core.c | 22 +++++++
|
ath10k-5.15/core.c | 22 +++++++
|
||||||
ath10k-5.10/core.h | 9 ++-
|
ath10k-5.15/core.h | 9 ++-
|
||||||
ath10k-5.10/hw.h | 1 +
|
ath10k-5.15/hw.h | 1 +
|
||||||
ath10k-5.10/leds.c | 103 ++++++++++++++++++++++++++++++
|
ath10k-5.15/leds.c | 103 ++++++++++++++++++++++++++++++
|
||||||
ath10k-5.10/leds.h | 45 +++++++++++++
|
ath10k-5.15/leds.h | 45 +++++++++++++
|
||||||
ath10k-5.10/mac.c | 1 +
|
ath10k-5.15/mac.c | 1 +
|
||||||
ath10k-5.10/wmi-ops.h | 32 ++++++++++
|
ath10k-5.15/wmi-ops.h | 32 ++++++++++
|
||||||
ath10k-5.10/wmi-tlv.c | 2 +
|
ath10k-5.15/wmi-tlv.c | 2 +
|
||||||
ath10k-5.10/wmi.c | 54 ++++++++++++++++
|
ath10k-5.15/wmi.c | 54 ++++++++++++++++
|
||||||
ath10k-5.10/wmi.h | 35 ++++++++++
|
ath10k-5.15/wmi.h | 35 ++++++++++
|
||||||
12 files changed, 314 insertions(+), 1 deletion(-)
|
12 files changed, 314 insertions(+), 1 deletion(-)
|
||||||
create mode 100644 ath10k-5.10/leds.c
|
create mode 100644 ath10k-5.15/leds.c
|
||||||
create mode 100644 ath10k-5.10/leds.h
|
create mode 100644 ath10k-5.15/leds.h
|
||||||
|
|
||||||
--- a/ath10k-5.10/Kconfig
|
--- a/ath10k-5.15/Kconfig
|
||||||
+++ b/ath10k-5.10/Kconfig
|
+++ b/ath10k-5.15/Kconfig
|
||||||
@@ -65,6 +65,16 @@ config ATH10K_DEBUGFS
|
@@ -66,6 +66,16 @@ config ATH10K_DEBUGFS
|
||||||
|
|
||||||
If unsure, say Y to make it easier to debug problems.
|
If unsure, say Y to make it easier to debug problems.
|
||||||
|
|
||||||
@ -101,8 +101,8 @@ v13:
|
|||||||
config ATH10K_SPECTRAL
|
config ATH10K_SPECTRAL
|
||||||
bool "Atheros ath10k spectral scan support"
|
bool "Atheros ath10k spectral scan support"
|
||||||
depends on ATH10K_DEBUGFS
|
depends on ATH10K_DEBUGFS
|
||||||
--- a/ath10k-5.10/Makefile
|
--- a/ath10k-5.15/Makefile
|
||||||
+++ b/ath10k-5.10/Makefile
|
+++ b/ath10k-5.15/Makefile
|
||||||
@@ -20,6 +20,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) +=
|
@@ -20,6 +20,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) +=
|
||||||
ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
|
ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
|
||||||
ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
|
ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
|
||||||
@ -111,9 +111,9 @@ v13:
|
|||||||
ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
|
ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
|
||||||
ath10k_core-$(CONFIG_PM) += wow.o
|
ath10k_core-$(CONFIG_PM) += wow.o
|
||||||
ath10k_core-$(CONFIG_ATH10K_CE) += ce.o
|
ath10k_core-$(CONFIG_ATH10K_CE) += ce.o
|
||||||
--- a/ath10k-5.10/core.c
|
--- a/ath10k-5.15/core.c
|
||||||
+++ b/ath10k-5.10/core.c
|
+++ b/ath10k-5.15/core.c
|
||||||
@@ -26,6 +26,7 @@
|
@@ -28,6 +28,7 @@
|
||||||
#include "testmode.h"
|
#include "testmode.h"
|
||||||
#include "wmi-ops.h"
|
#include "wmi-ops.h"
|
||||||
#include "coredump.h"
|
#include "coredump.h"
|
||||||
@ -121,7 +121,7 @@ v13:
|
|||||||
|
|
||||||
/* Disable ath10k-ct DBGLOG output by default */
|
/* Disable ath10k-ct DBGLOG output by default */
|
||||||
unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG;
|
unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG;
|
||||||
@@ -68,6 +69,7 @@ static const struct ath10k_hw_params ath
|
@@ -70,6 +71,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA988X_2_0_DEVICE_ID,
|
.dev_id = QCA988X_2_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca988x hw2.0",
|
.name = "qca988x hw2.0",
|
||||||
@ -129,7 +129,7 @@ v13:
|
|||||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||||
@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath
|
@@ -141,6 +143,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca9887 hw1.0",
|
.name = "qca9887 hw1.0",
|
||||||
@ -137,7 +137,7 @@ v13:
|
|||||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||||
@@ -342,6 +345,7 @@ static const struct ath10k_hw_params ath
|
@@ -352,6 +355,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca99x0 hw2.0",
|
.name = "qca99x0 hw2.0",
|
||||||
@ -145,7 +145,7 @@ v13:
|
|||||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.otp_exe_param = 0x00000700,
|
.otp_exe_param = 0x00000700,
|
||||||
@@ -382,6 +386,7 @@ static const struct ath10k_hw_params ath
|
@@ -393,6 +397,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca9984/qca9994 hw1.0",
|
.name = "qca9984/qca9994 hw1.0",
|
||||||
@ -153,7 +153,7 @@ v13:
|
|||||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||||
@@ -429,6 +434,7 @@ static const struct ath10k_hw_params ath
|
@@ -441,6 +446,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca9888 hw2.0",
|
.name = "qca9888 hw2.0",
|
||||||
@ -161,7 +161,7 @@ v13:
|
|||||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||||
@@ -3705,6 +3711,10 @@ int ath10k_core_start(struct ath10k *ar,
|
@@ -3942,6 +3948,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||||
ath10k_wmi_check_apply_board_power_ctl_table(ar);
|
ath10k_wmi_check_apply_board_power_ctl_table(ar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ v13:
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_hif_stop:
|
err_hif_stop:
|
||||||
@@ -3963,9 +3973,18 @@ static void ath10k_core_register_work(st
|
@@ -4203,9 +4213,18 @@ static void ath10k_core_register_work(st
|
||||||
goto err_spectral_destroy;
|
goto err_spectral_destroy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ v13:
|
|||||||
err_spectral_destroy:
|
err_spectral_destroy:
|
||||||
ath10k_spectral_destroy(ar);
|
ath10k_spectral_destroy(ar);
|
||||||
err_debug_destroy:
|
err_debug_destroy:
|
||||||
@@ -4025,6 +4044,8 @@ void ath10k_core_unregister(struct ath10
|
@@ -4265,6 +4284,8 @@ void ath10k_core_unregister(struct ath10
|
||||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -200,8 +200,8 @@ v13:
|
|||||||
ath10k_thermal_unregister(ar);
|
ath10k_thermal_unregister(ar);
|
||||||
/* Stop spectral before unregistering from mac80211 to remove the
|
/* Stop spectral before unregistering from mac80211 to remove the
|
||||||
* relayfs debugfs file cleanly. Otherwise the parent debugfs tree
|
* relayfs debugfs file cleanly. Otherwise the parent debugfs tree
|
||||||
--- a/ath10k-5.10/core.h
|
--- a/ath10k-5.15/core.h
|
||||||
+++ b/ath10k-5.10/core.h
|
+++ b/ath10k-5.15/core.h
|
||||||
@@ -14,6 +14,7 @@
|
@@ -14,6 +14,7 @@
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/uuid.h>
|
#include <linux/uuid.h>
|
||||||
@ -210,7 +210,7 @@ v13:
|
|||||||
|
|
||||||
#include "htt.h"
|
#include "htt.h"
|
||||||
#include "htc.h"
|
#include "htc.h"
|
||||||
@@ -1557,6 +1558,13 @@ struct ath10k {
|
@@ -1577,6 +1578,13 @@ struct ath10k {
|
||||||
} testmode;
|
} testmode;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@ -224,8 +224,8 @@ v13:
|
|||||||
/* protected by data_lock */
|
/* protected by data_lock */
|
||||||
u32 rx_crc_err_drop;
|
u32 rx_crc_err_drop;
|
||||||
u32 fw_crash_counter;
|
u32 fw_crash_counter;
|
||||||
--- a/ath10k-5.10/hw.h
|
--- a/ath10k-5.15/hw.h
|
||||||
+++ b/ath10k-5.10/hw.h
|
+++ b/ath10k-5.15/hw.h
|
||||||
@@ -521,6 +521,7 @@ struct ath10k_hw_params {
|
@@ -521,6 +521,7 @@ struct ath10k_hw_params {
|
||||||
const char *name;
|
const char *name;
|
||||||
u32 patch_load_addr;
|
u32 patch_load_addr;
|
||||||
@ -235,7 +235,7 @@ v13:
|
|||||||
|
|
||||||
/* Type of hw cycle counter wraparound logic, for more info
|
/* Type of hw cycle counter wraparound logic, for more info
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/ath10k-5.10/leds.c
|
+++ b/ath10k-5.15/leds.c
|
||||||
@@ -0,0 +1,103 @@
|
@@ -0,0 +1,103 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2005-2011 Atheros Communications Inc.
|
+ * Copyright (c) 2005-2011 Atheros Communications Inc.
|
||||||
@ -341,7 +341,7 @@ v13:
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/ath10k-5.10/leds.h
|
+++ b/ath10k-5.15/leds.h
|
||||||
@@ -0,0 +1,41 @@
|
@@ -0,0 +1,41 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||||
@ -384,8 +384,8 @@ v13:
|
|||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
+#endif /* _LEDS_H_ */
|
+#endif /* _LEDS_H_ */
|
||||||
--- a/ath10k-5.10/mac.c
|
--- a/ath10k-5.15/mac.c
|
||||||
+++ b/ath10k-5.10/mac.c
|
+++ b/ath10k-5.15/mac.c
|
||||||
@@ -25,6 +25,7 @@
|
@@ -25,6 +25,7 @@
|
||||||
#include "wmi-tlv.h"
|
#include "wmi-tlv.h"
|
||||||
#include "wmi-ops.h"
|
#include "wmi-ops.h"
|
||||||
@ -394,8 +394,8 @@ v13:
|
|||||||
|
|
||||||
/*********/
|
/*********/
|
||||||
/* Rates */
|
/* Rates */
|
||||||
--- a/ath10k-5.10/wmi-ops.h
|
--- a/ath10k-5.15/wmi-ops.h
|
||||||
+++ b/ath10k-5.10/wmi-ops.h
|
+++ b/ath10k-5.15/wmi-ops.h
|
||||||
@@ -228,7 +228,10 @@ struct wmi_ops {
|
@@ -228,7 +228,10 @@ struct wmi_ops {
|
||||||
const struct wmi_bb_timing_cfg_arg *arg);
|
const struct wmi_bb_timing_cfg_arg *arg);
|
||||||
struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar,
|
struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar,
|
||||||
@ -443,8 +443,8 @@ v13:
|
|||||||
static inline int
|
static inline int
|
||||||
ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
|
ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
|
||||||
{
|
{
|
||||||
--- a/ath10k-5.10/wmi-tlv.c
|
--- a/ath10k-5.15/wmi-tlv.c
|
||||||
+++ b/ath10k-5.10/wmi-tlv.c
|
+++ b/ath10k-5.15/wmi-tlv.c
|
||||||
@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops
|
@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||||
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
|
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
|
||||||
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
|
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
|
||||||
@ -454,8 +454,8 @@ v13:
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
||||||
--- a/ath10k-5.10/wmi.c
|
--- a/ath10k-5.15/wmi.c
|
||||||
+++ b/ath10k-5.10/wmi.c
|
+++ b/ath10k-5.15/wmi.c
|
||||||
@@ -8409,6 +8409,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
@@ -8409,6 +8409,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
@ -506,7 +506,7 @@ v13:
|
|||||||
static struct sk_buff *
|
static struct sk_buff *
|
||||||
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
||||||
enum wmi_sta_ps_mode psmode)
|
enum wmi_sta_ps_mode psmode)
|
||||||
@@ -10238,6 +10281,9 @@ static const struct wmi_ops wmi_ops = {
|
@@ -10240,6 +10283,9 @@ static const struct wmi_ops wmi_ops = {
|
||||||
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
@ -516,7 +516,7 @@ v13:
|
|||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -10308,6 +10354,8 @@ static const struct wmi_ops wmi_10_1_ops
|
@@ -10310,6 +10356,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
@ -525,7 +525,7 @@ v13:
|
|||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -10387,6 +10435,8 @@ static const struct wmi_ops wmi_10_2_ops
|
@@ -10389,6 +10437,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||||
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
||||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
@ -534,7 +534,7 @@ v13:
|
|||||||
/* .gen_pdev_enable_adaptive_cca not implemented */
|
/* .gen_pdev_enable_adaptive_cca not implemented */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -10458,6 +10508,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
@@ -10460,6 +10510,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||||
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
||||||
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
||||||
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
|
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
|
||||||
@ -543,7 +543,7 @@ v13:
|
|||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -10540,6 +10592,8 @@ static const struct wmi_ops wmi_10_4_ops
|
@@ -10542,6 +10594,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||||
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
||||||
@ -552,8 +552,8 @@ v13:
|
|||||||
};
|
};
|
||||||
|
|
||||||
int ath10k_wmi_attach(struct ath10k *ar)
|
int ath10k_wmi_attach(struct ath10k *ar)
|
||||||
--- a/ath10k-5.10/wmi.h
|
--- a/ath10k-5.15/wmi.h
|
||||||
+++ b/ath10k-5.10/wmi.h
|
+++ b/ath10k-5.15/wmi.h
|
||||||
@@ -3133,6 +3133,41 @@ enum wmi_10_4_feature_mask {
|
@@ -3133,6 +3133,41 @@ enum wmi_10_4_feature_mask {
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -595,4 +595,4 @@ v13:
|
|||||||
+
|
+
|
||||||
struct wmi_ext_resource_config_10_4_cmd {
|
struct wmi_ext_resource_config_10_4_cmd {
|
||||||
/* contains enum wmi_host_platform_type */
|
/* contains enum wmi_host_platform_type */
|
||||||
__le32 host_platform_config;
|
__le32 host_platform_config;
|
||||||
|
@ -9,14 +9,14 @@ traffic.
|
|||||||
|
|
||||||
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||||
---
|
---
|
||||||
ath10k-5.10/core.h | 4 ++++
|
ath10k-5.15/core.h | 4 ++++
|
||||||
ath10k-5.10/leds.c | 4 +---
|
ath10k-5.15/leds.c | 4 +---
|
||||||
ath10k-5.10/mac.c | 2 +-
|
ath10k-5.15/mac.c | 2 +-
|
||||||
3 files changed, 6 insertions(+), 4 deletions(-)
|
3 files changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
--- a/ath10k-5.10/core.h
|
--- a/ath10k-5.15/core.h
|
||||||
+++ b/ath10k-5.10/core.h
|
+++ b/ath10k-5.15/core.h
|
||||||
@@ -1665,6 +1665,10 @@ struct ath10k {
|
@@ -1692,6 +1692,10 @@ struct ath10k {
|
||||||
u8 csi_data[4096];
|
u8 csi_data[4096];
|
||||||
u16 csi_data_len;
|
u16 csi_data_len;
|
||||||
|
|
||||||
@ -27,8 +27,8 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|||||||
/* must be last */
|
/* must be last */
|
||||||
u8 drv_priv[] __aligned(sizeof(void *));
|
u8 drv_priv[] __aligned(sizeof(void *));
|
||||||
};
|
};
|
||||||
--- a/ath10k-5.10/leds.c
|
--- a/ath10k-5.15/leds.c
|
||||||
+++ b/ath10k-5.10/leds.c
|
+++ b/ath10k-5.15/leds.c
|
||||||
@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k *
|
@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k *
|
||||||
|
|
||||||
ar->leds.cdev.name = ar->leds.label;
|
ar->leds.cdev.name = ar->leds.label;
|
||||||
@ -40,9 +40,9 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|||||||
|
|
||||||
ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
|
ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
--- a/ath10k-5.10/mac.c
|
--- a/ath10k-5.15/mac.c
|
||||||
+++ b/ath10k-5.10/mac.c
|
+++ b/ath10k-5.15/mac.c
|
||||||
@@ -11405,7 +11405,7 @@ int ath10k_mac_register(struct ath10k *a
|
@@ -11521,7 +11521,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||||
|
|
||||||
#ifdef CPTCFG_MAC80211_LEDS
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
@ -50,4 +50,4 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|||||||
+ ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw,
|
+ ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw,
|
||||||
IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink,
|
IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink,
|
||||||
ARRAY_SIZE(ath10k_tpt_blink));
|
ARRAY_SIZE(ath10k_tpt_blink));
|
||||||
#endif
|
#endif
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
From 0d2e335d780bda1432a9ba719c8200f796d27854 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robert Marko <robimarko@gmail.com>
|
||||||
|
Date: Mon, 29 Nov 2021 12:27:12 +0100
|
||||||
|
Subject: [PATCH] ath10k-ct: Fix spectral scan NULL pointer
|
||||||
|
|
||||||
|
If spectral scan support is enabled then ath10k-ct will cause a NULL
|
||||||
|
pointer due to relay_open() being called with a const callback struct
|
||||||
|
which is only supported in kernel 5.11 and later.
|
||||||
|
|
||||||
|
So, simply check the kernel version and if 5.11 and newer use the const
|
||||||
|
callback struct, otherwise use the regular struct.
|
||||||
|
|
||||||
|
Fixes: 553a3ac ("ath10k-ct: use 5.15 version")
|
||||||
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
|
---
|
||||||
|
ath10k-5.15/spectral.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
--- a/ath10k-5.15/spectral.c
|
||||||
|
+++ b/ath10k-5.15/spectral.c
|
||||||
|
@@ -497,7 +497,11 @@ static int remove_buf_file_handler(struc
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_IS_GEQ(5,11,0)
|
||||||
|
static const struct rchan_callbacks rfs_spec_scan_cb = {
|
||||||
|
+#else
|
||||||
|
+static struct rchan_callbacks rfs_spec_scan_cb = {
|
||||||
|
+#endif
|
||||||
|
.create_buf_file = create_buf_file_handler,
|
||||||
|
.remove_buf_file = remove_buf_file_handler,
|
||||||
|
};
|
@ -1,5 +1,5 @@
|
|||||||
--- a/ath10k-5.10/htt.h
|
--- a/ath10k-5.15/htt.h
|
||||||
+++ b/ath10k-5.10/htt.h
|
+++ b/ath10k-5.15/htt.h
|
||||||
@@ -237,7 +237,11 @@ enum htt_rx_ring_flags {
|
@@ -237,7 +237,11 @@ enum htt_rx_ring_flags {
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -11,4 +11,4 @@
|
|||||||
+#endif
|
+#endif
|
||||||
#define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
|
#define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
|
||||||
#define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
|
#define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
|
||||||
#define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
|
#define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--- a/ath10k-5.10/pci.c
|
--- a/ath10k-5.15/pci.c
|
||||||
+++ b/ath10k-5.10/pci.c
|
+++ b/ath10k-5.15/pci.c
|
||||||
@@ -131,7 +131,11 @@ static const struct ce_attr pci_host_ce_
|
@@ -131,7 +131,11 @@ static const struct ce_attr pci_host_ce_
|
||||||
.flags = CE_ATTR_FLAGS,
|
.flags = CE_ATTR_FLAGS,
|
||||||
.src_nentries = 0,
|
.src_nentries = 0,
|
||||||
@ -47,4 +47,4 @@
|
|||||||
+#endif
|
+#endif
|
||||||
.recv_cb = ath10k_pci_pktlog_rx_cb,
|
.recv_cb = ath10k_pci_pktlog_rx_cb,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=mac80211
|
PKG_NAME:=mac80211
|
||||||
|
|
||||||
PKG_VERSION:=5.10.42-1
|
PKG_VERSION:=5.15.8-1
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=2
|
||||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.42/
|
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.8/
|
||||||
PKG_HASH:=6876520105240844fdb32d1dcdf2bfdea291a37a96f16c892fda3776ba714fcb
|
PKG_HASH:=9f71b659c034f19d156532ec780fcb606cee3c4ccc42e2f8ef18dd3e9f1b6820
|
||||||
|
|
||||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||||
@ -23,7 +23,6 @@ PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
PKG_DRIVERS = \
|
PKG_DRIVERS = \
|
||||||
adm8211 \
|
adm8211 \
|
||||||
airo \
|
|
||||||
hermes hermes-pci hermes-pcmcia hermes-plx\
|
hermes hermes-pci hermes-pcmcia hermes-plx\
|
||||||
lib80211 \
|
lib80211 \
|
||||||
mac80211-hwsim \
|
mac80211-hwsim \
|
||||||
@ -84,7 +83,6 @@ config-$(CONFIG_PACKAGE_CFG80211_TESTMODE) += NL80211_TESTMODE
|
|||||||
|
|
||||||
config-$(call config_package,mac80211) += MAC80211
|
config-$(call config_package,mac80211) += MAC80211
|
||||||
config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
|
config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
|
||||||
config-$(CONFIG_PACKAGE_MAC80211_NSS_SUPPORT) += MAC80211_NSS_SUPPORT
|
|
||||||
|
|
||||||
include ath.mk
|
include ath.mk
|
||||||
include broadcom.mk
|
include broadcom.mk
|
||||||
@ -99,7 +97,7 @@ PKG_CONFIG_DEPENDS += \
|
|||||||
define KernelPackage/cfg80211
|
define KernelPackage/cfg80211
|
||||||
$(call KernelPackage/mac80211/Default)
|
$(call KernelPackage/mac80211/Default)
|
||||||
TITLE:=cfg80211 - wireless configuration API
|
TITLE:=cfg80211 - wireless configuration API
|
||||||
DEPENDS+= +iw +iwinfo +wireless-regdb
|
DEPENDS+= +iw +iwinfo +wireless-regdb +USE_RFKILL:kmod-rfkill
|
||||||
ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
||||||
FILES:= \
|
FILES:= \
|
||||||
$(PKG_BUILD_DIR)/compat/compat.ko \
|
$(PKG_BUILD_DIR)/compat/compat.ko \
|
||||||
@ -128,7 +126,7 @@ define KernelPackage/mac80211
|
|||||||
$(call KernelPackage/mac80211/Default)
|
$(call KernelPackage/mac80211/Default)
|
||||||
TITLE:=Linux 802.11 Wireless Networking Stack
|
TITLE:=Linux 802.11 Wireless Networking Stack
|
||||||
# +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c
|
# +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c
|
||||||
DEPENDS+= +kmod-cfg80211 +kmod-crypto-cmac +kmod-crypto-ccm +kmod-crypto-gcm +hostapd-common +PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv +PACKAGE_kmod-qca-nss-drv-64:kmod-qca-nss-drv-64
|
DEPENDS+= +kmod-cfg80211 +kmod-crypto-cmac +kmod-crypto-ccm +kmod-crypto-gcm +hostapd-common
|
||||||
KCONFIG:=\
|
KCONFIG:=\
|
||||||
CONFIG_AVERAGE=y
|
CONFIG_AVERAGE=y
|
||||||
FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
|
FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
|
||||||
@ -138,14 +136,6 @@ endef
|
|||||||
|
|
||||||
define KernelPackage/mac80211/config
|
define KernelPackage/mac80211/config
|
||||||
if PACKAGE_kmod-mac80211
|
if PACKAGE_kmod-mac80211
|
||||||
|
|
||||||
if PACKAGE_kmod-qca-nss-drv||PACKAGE_kmod-qca-nss-drv-64
|
|
||||||
config PACKAGE_MAC80211_NSS_SUPPORT
|
|
||||||
bool "Enable NSS support for IPQ platform"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
This option enables support for NSS in boards.
|
|
||||||
endif
|
|
||||||
|
|
||||||
config PACKAGE_MAC80211_DEBUGFS
|
config PACKAGE_MAC80211_DEBUGFS
|
||||||
bool "Export mac80211 internals in DebugFS"
|
bool "Export mac80211 internals in DebugFS"
|
||||||
@ -183,18 +173,6 @@ define KernelPackage/adm8211
|
|||||||
AUTOLOAD:=$(call AutoProbe,adm8211)
|
AUTOLOAD:=$(call AutoProbe,adm8211)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/airo
|
|
||||||
$(call KernelPackage/mac80211/Default)
|
|
||||||
TITLE:=Cisco Aironet driver
|
|
||||||
DEPENDS+=@PCI_SUPPORT +@DRIVER_WEXT_SUPPORT +kmod-cfg80211 @TARGET_x86 @BROKEN
|
|
||||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/cisco/airo.ko
|
|
||||||
AUTOLOAD:=$(call AutoProbe,airo)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/airo/description
|
|
||||||
Kernel support for Cisco Aironet cards
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/hermes
|
define KernelPackage/hermes
|
||||||
$(call KernelPackage/mac80211/Default)
|
$(call KernelPackage/mac80211/Default)
|
||||||
TITLE:=Hermes 802.11b chipset support
|
TITLE:=Hermes 802.11b chipset support
|
||||||
@ -415,8 +393,6 @@ endif
|
|||||||
|
|
||||||
config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
|
config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
|
||||||
|
|
||||||
config-$(call config_package,airo) += AIRO
|
|
||||||
|
|
||||||
config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
|
config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
|
||||||
config-$(call config_package,mt7601u) += MT7601U
|
config-$(call config_package,mt7601u) += MT7601U
|
||||||
config-y += WL_MEDIATEK
|
config-y += WL_MEDIATEK
|
||||||
@ -451,8 +427,7 @@ endif
|
|||||||
|
|
||||||
MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
|
MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
|
||||||
$(KERNEL_MAKE_FLAGS) \
|
$(KERNEL_MAKE_FLAGS) \
|
||||||
EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES) \
|
EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES)" \
|
||||||
-I$(STAGING_DIR)/usr/include/qca-nss-drv" \
|
|
||||||
KLIB_BUILD="$(LINUX_DIR)" \
|
KLIB_BUILD="$(LINUX_DIR)" \
|
||||||
MODPROBE=true \
|
MODPROBE=true \
|
||||||
KLIB=$(TARGET_MODULES_DIR) \
|
KLIB=$(TARGET_MODULES_DIR) \
|
||||||
|
@ -12,7 +12,6 @@ PKG_CONFIG_DEPENDS += \
|
|||||||
CONFIG_ATH9K_TX99 \
|
CONFIG_ATH9K_TX99 \
|
||||||
CONFIG_ATH10K_LEDS \
|
CONFIG_ATH10K_LEDS \
|
||||||
CONFIG_ATH10K_THERMAL \
|
CONFIG_ATH10K_THERMAL \
|
||||||
CONFIG_ATH11K_MEM_PROFILE_512M \
|
|
||||||
CONFIG_ATH_USER_REGD
|
CONFIG_ATH_USER_REGD
|
||||||
|
|
||||||
ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
|
ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
|
||||||
@ -55,7 +54,6 @@ config-$(CONFIG_ATH9K_TX99) += ATH9K_TX99
|
|||||||
config-$(CONFIG_ATH9K_UBNTHSR) += ATH9K_UBNTHSR
|
config-$(CONFIG_ATH9K_UBNTHSR) += ATH9K_UBNTHSR
|
||||||
config-$(CONFIG_ATH10K_LEDS) += ATH10K_LEDS
|
config-$(CONFIG_ATH10K_LEDS) += ATH10K_LEDS
|
||||||
config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL
|
config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL
|
||||||
config-$(CONFIG_ATH11K_MEM_PROFILE_512M) += ATH11K_MEM_PROFILE_512M
|
|
||||||
|
|
||||||
config-$(call config_package,ath9k-htc) += ATH9K_HTC
|
config-$(call config_package,ath9k-htc) += ATH9K_HTC
|
||||||
config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
|
config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
|
||||||
@ -319,11 +317,6 @@ define KernelPackage/ath11k/config
|
|||||||
depends on PACKAGE_kmod-ath11k
|
depends on PACKAGE_kmod-ath11k
|
||||||
default y if TARGET_ipq807x
|
default y if TARGET_ipq807x
|
||||||
|
|
||||||
config ATH11K_MEM_PROFILE_512M
|
|
||||||
bool "Enable 512MB profile"
|
|
||||||
depends on PACKAGE_kmod-ath11k
|
|
||||||
default y if TARGET_ipq807x_generic_DEVICE_redmi_ax6 || TARGET_ipq807x_generic_DEVICE_xiaomi_ax3600 || TARGET_ipq807x_generic_DEVICE_zte_mf269
|
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/ath11k-ahb
|
define KernelPackage/ath11k-ahb
|
||||||
|
@ -52,6 +52,8 @@ drv_mac80211_init_device_config() {
|
|||||||
he_spr_sr_control \
|
he_spr_sr_control \
|
||||||
he_twt_required
|
he_twt_required
|
||||||
config_add_int \
|
config_add_int \
|
||||||
|
beamformer_antennas \
|
||||||
|
beamformee_antennas \
|
||||||
vht_max_a_mpdu_len_exp \
|
vht_max_a_mpdu_len_exp \
|
||||||
vht_max_mpdu \
|
vht_max_mpdu \
|
||||||
vht_link_adapt \
|
vht_link_adapt \
|
||||||
@ -147,6 +149,9 @@ mac80211_hostapd_setup_base() {
|
|||||||
[ "$noscan" -gt 0 ] && hostapd_noscan=1
|
[ "$noscan" -gt 0 ] && hostapd_noscan=1
|
||||||
[ "$tx_burst" = 0 ] && tx_burst=
|
[ "$tx_burst" = 0 ] && tx_burst=
|
||||||
|
|
||||||
|
chan_ofs=0
|
||||||
|
[ "$band" = "6g" ] && chan_ofs=1
|
||||||
|
|
||||||
ieee80211n=1
|
ieee80211n=1
|
||||||
ht_capab=
|
ht_capab=
|
||||||
case "$htmode" in
|
case "$htmode" in
|
||||||
@ -154,7 +159,7 @@ mac80211_hostapd_setup_base() {
|
|||||||
HT40*|VHT40|VHT80|VHT160|HE40|HE80|HE160)
|
HT40*|VHT40|VHT80|VHT160|HE40|HE80|HE160)
|
||||||
case "$hwmode" in
|
case "$hwmode" in
|
||||||
a)
|
a)
|
||||||
case "$(( ($channel / 4) % 2 ))" in
|
case "$(( (($channel / 4) + $chan_ofs) % 2 ))" in
|
||||||
1) ht_capab="[HT40+]";;
|
1) ht_capab="[HT40+]";;
|
||||||
0) ht_capab="[HT40-]";;
|
0) ht_capab="[HT40-]";;
|
||||||
esac
|
esac
|
||||||
@ -223,8 +228,6 @@ mac80211_hostapd_setup_base() {
|
|||||||
enable_ac=0
|
enable_ac=0
|
||||||
vht_oper_chwidth=0
|
vht_oper_chwidth=0
|
||||||
vht_center_seg0=
|
vht_center_seg0=
|
||||||
chan_ofs=0
|
|
||||||
[ "$band" = "6g" ] && chan_ofs=1
|
|
||||||
|
|
||||||
idx="$channel"
|
idx="$channel"
|
||||||
case "$htmode" in
|
case "$htmode" in
|
||||||
@ -292,6 +295,8 @@ mac80211_hostapd_setup_base() {
|
|||||||
mu_beamformee:1 \
|
mu_beamformee:1 \
|
||||||
vht_txop_ps:1 \
|
vht_txop_ps:1 \
|
||||||
htc_vht:1 \
|
htc_vht:1 \
|
||||||
|
beamformee_antennas:4 \
|
||||||
|
beamformer_antennas:4 \
|
||||||
rx_antenna_pattern:1 \
|
rx_antenna_pattern:1 \
|
||||||
tx_antenna_pattern:1 \
|
tx_antenna_pattern:1 \
|
||||||
vht_max_a_mpdu_len_exp:7 \
|
vht_max_a_mpdu_len_exp:7 \
|
||||||
@ -332,6 +337,18 @@ mac80211_hostapd_setup_base() {
|
|||||||
RX-STBC-123:0x700:0x300:1 \
|
RX-STBC-123:0x700:0x300:1 \
|
||||||
RX-STBC-1234:0x700:0x400:1 \
|
RX-STBC-1234:0x700:0x400:1 \
|
||||||
|
|
||||||
|
[ "$(($vht_cap & 0x800))" -gt 0 -a "$su_beamformer" -gt 0 ] && {
|
||||||
|
cap_ant="$(( ( ($vht_cap >> 16) & 3 ) + 1 ))"
|
||||||
|
[ "$cap_ant" -gt "$beamformer_antennas" ] && cap_ant="$beamformer_antennas"
|
||||||
|
[ "$cap_ant" -gt 1 ] && vht_capab="$vht_capab[SOUNDING-DIMENSION-$cap_ant]"
|
||||||
|
}
|
||||||
|
|
||||||
|
[ "$(($vht_cap & 0x1000))" -gt 0 -a "$su_beamformee" -gt 0 ] && {
|
||||||
|
cap_ant="$(( ( ($vht_cap >> 13) & 3 ) + 1 ))"
|
||||||
|
[ "$cap_ant" -gt "$beamformee_antennas" ] && cap_ant="$beamformee_antennas"
|
||||||
|
[ "$cap_ant" -gt 1 ] && vht_capab="$vht_capab[BF-ANTENNA-$cap_ant]"
|
||||||
|
}
|
||||||
|
|
||||||
# supported Channel widths
|
# supported Channel widths
|
||||||
vht160_hw=0
|
vht160_hw=0
|
||||||
[ "$(($vht_cap & 12))" -eq 4 -a 1 -le "$vht160" ] && \
|
[ "$(($vht_cap & 12))" -eq 4 -a 1 -le "$vht160" ] && \
|
||||||
@ -624,7 +641,7 @@ mac80211_iw_interface_add() {
|
|||||||
rc="$?"
|
rc="$?"
|
||||||
}
|
}
|
||||||
|
|
||||||
[ "$rc" != 0 ] && wireless_setup_failed INTERFACE_CREATION_FAILED
|
[ "$rc" != 0 ] && echo "Failed to create interface $ifname"
|
||||||
return $rc
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -859,6 +876,7 @@ mac80211_setup_adhoc() {
|
|||||||
mcval=
|
mcval=
|
||||||
[ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
|
[ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
|
||||||
|
|
||||||
|
iw dev "$ifname" set type ibss
|
||||||
iw dev "$ifname" ibss join "$ssid" $freq $iw_htmode fixed-freq $bssid \
|
iw dev "$ifname" ibss join "$ssid" $freq $iw_htmode fixed-freq $bssid \
|
||||||
beacon-interval $beacon_int \
|
beacon-interval $beacon_int \
|
||||||
${brstr:+basic-rates $brstr} \
|
${brstr:+basic-rates $brstr} \
|
||||||
|
@ -176,7 +176,7 @@ detect_mac80211() {
|
|||||||
set wireless.radio${devidx}.htmode=$htmode
|
set wireless.radio${devidx}.htmode=$htmode
|
||||||
set wireless.radio${devidx}.disabled=0
|
set wireless.radio${devidx}.disabled=0
|
||||||
set wireless.radio${devidx}.country=US
|
set wireless.radio${devidx}.country=US
|
||||||
|
|
||||||
set wireless.default_radio${devidx}=wifi-iface
|
set wireless.default_radio${devidx}=wifi-iface
|
||||||
set wireless.default_radio${devidx}.device=radio${devidx}
|
set wireless.default_radio${devidx}.device=radio${devidx}
|
||||||
set wireless.default_radio${devidx}.network=lan
|
set wireless.default_radio${devidx}.network=lan
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
From: Christian Lamparter <chunkeey@gmail.com>
|
|
||||||
Date: Sat, 16 Nov 2019 19:25:24 +0100
|
|
||||||
Subject: [PATCH] owl_loader: compatibility patch
|
|
||||||
|
|
||||||
This patch includes OpenWrt specific changes that are
|
|
||||||
not included in the upstream owl-loader.
|
|
||||||
|
|
||||||
This includes a platform data handling changes for ar71xx.
|
|
||||||
|
|
||||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
|
||||||
@@ -103,6 +103,7 @@ static void owl_fw_cb(const struct firmw
|
|
||||||
{
|
|
||||||
struct pci_dev *pdev = (struct pci_dev *)context;
|
|
||||||
struct owl_ctx *ctx = (struct owl_ctx *)pci_get_drvdata(pdev);
|
|
||||||
+ struct ath9k_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
|
||||||
struct pci_bus *bus;
|
|
||||||
|
|
||||||
complete(&ctx->eeprom_load);
|
|
||||||
@@ -118,6 +119,16 @@ static void owl_fw_cb(const struct firmw
|
|
||||||
goto release;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (pdata) {
|
|
||||||
+ memcpy(pdata->eeprom_data, fw->data, fw->size);
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * eeprom has been successfully loaded - pass the data to ath9k
|
|
||||||
+ * but remove the eeprom_name, so it doesn't try to load it too.
|
|
||||||
+ */
|
|
||||||
+ pdata->eeprom_name = NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (ath9k_pci_fixup(pdev, (const u16 *)fw->data, fw->size))
|
|
||||||
goto release;
|
|
||||||
|
|
||||||
@@ -137,8 +148,14 @@ release:
|
|
||||||
static const char *owl_get_eeprom_name(struct pci_dev *pdev)
|
|
||||||
{
|
|
||||||
struct device *dev = &pdev->dev;
|
|
||||||
+ struct ath9k_platform_data *pdata;
|
|
||||||
char *eeprom_name;
|
|
||||||
|
|
||||||
+ /* try the existing platform data first */
|
|
||||||
+ pdata = dev_get_platdata(dev);
|
|
||||||
+ if (pdata && pdata->eeprom_name)
|
|
||||||
+ return pdata->eeprom_name;
|
|
||||||
+
|
|
||||||
dev_dbg(dev, "using auto-generated eeprom filename\n");
|
|
||||||
|
|
||||||
eeprom_name = devm_kzalloc(dev, EEPROM_FILENAME_LEN, GFP_KERNEL);
|
|
@ -14,7 +14,7 @@
|
|||||||
CFLAGS_trace.o := -I$(src)
|
CFLAGS_trace.o := -I$(src)
|
||||||
--- a/drivers/net/wireless/ath/ath.h
|
--- a/drivers/net/wireless/ath/ath.h
|
||||||
+++ b/drivers/net/wireless/ath/ath.h
|
+++ b/drivers/net/wireless/ath/ath.h
|
||||||
@@ -316,14 +316,7 @@ void _ath_dbg(struct ath_common *common,
|
@@ -317,14 +317,7 @@ void _ath_dbg(struct ath_common *common,
|
||||||
#endif /* CPTCFG_ATH_DEBUG */
|
#endif /* CPTCFG_ATH_DEBUG */
|
||||||
|
|
||||||
/** Returns string describing opmode, or NULL if unknown mode. */
|
/** Returns string describing opmode, or NULL if unknown mode. */
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
||||||
if (!wiphy->bands[band])
|
if (!wiphy->bands[band])
|
||||||
continue;
|
continue;
|
||||||
@@ -378,6 +387,9 @@ ath_reg_apply_ir_flags(struct wiphy *wip
|
@@ -379,6 +388,9 @@ ath_reg_apply_ir_flags(struct wiphy *wip
|
||||||
{
|
{
|
||||||
struct ieee80211_supported_band *sband;
|
struct ieee80211_supported_band *sband;
|
||||||
|
|
||||||
@ -47,7 +47,7 @@
|
|||||||
sband = wiphy->bands[NL80211_BAND_2GHZ];
|
sband = wiphy->bands[NL80211_BAND_2GHZ];
|
||||||
if (!sband)
|
if (!sband)
|
||||||
return;
|
return;
|
||||||
@@ -407,6 +419,9 @@ static void ath_reg_apply_radar_flags(st
|
@@ -408,6 +420,9 @@ static void ath_reg_apply_radar_flags(st
|
||||||
struct ieee80211_channel *ch;
|
struct ieee80211_channel *ch;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
@ -57,7 +57,7 @@
|
|||||||
if (!wiphy->bands[NL80211_BAND_5GHZ])
|
if (!wiphy->bands[NL80211_BAND_5GHZ])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -639,6 +654,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
@@ -640,6 +655,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||||
const struct ieee80211_regdomain *regd;
|
const struct ieee80211_regdomain *regd;
|
||||||
|
|
||||||
wiphy->reg_notifier = reg_notifier;
|
wiphy->reg_notifier = reg_notifier;
|
||||||
@ -82,7 +82,7 @@
|
|||||||
help
|
help
|
||||||
--- a/local-symbols
|
--- a/local-symbols
|
||||||
+++ b/local-symbols
|
+++ b/local-symbols
|
||||||
@@ -86,6 +86,7 @@ ADM8211=
|
@@ -76,6 +76,7 @@ ADM8211=
|
||||||
ATH_COMMON=
|
ATH_COMMON=
|
||||||
WLAN_VENDOR_ATH=
|
WLAN_VENDOR_ATH=
|
||||||
ATH_DEBUG=
|
ATH_DEBUG=
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/wireless/reg.c
|
--- a/net/wireless/reg.c
|
||||||
+++ b/net/wireless/reg.c
|
+++ b/net/wireless/reg.c
|
||||||
@@ -3252,6 +3252,8 @@ void regulatory_hint_country_ie(struct w
|
@@ -3299,6 +3299,8 @@ void regulatory_hint_country_ie(struct w
|
||||||
enum environment_cap env = ENVIRON_ANY;
|
enum environment_cap env = ENVIRON_ANY;
|
||||||
struct regulatory_request *request = NULL, *lr;
|
struct regulatory_request *request = NULL, *lr;
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
/* IE len must be evenly divisible by 2 */
|
/* IE len must be evenly divisible by 2 */
|
||||||
if (country_ie_len & 0x01)
|
if (country_ie_len & 0x01)
|
||||||
return;
|
return;
|
||||||
@@ -3503,6 +3505,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
@@ -3550,6 +3552,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||||
|
|
||||||
void regulatory_hint_disconnect(void)
|
void regulatory_hint_disconnect(void)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
bool ath_is_world_regd(struct ath_regulatory *reg)
|
bool ath_is_world_regd(struct ath_regulatory *reg)
|
||||||
{
|
{
|
||||||
return is_wwr_sku(ath_regd_get_eepromRD(reg));
|
return is_wwr_sku(ath_regd_get_eepromRD(reg));
|
||||||
@@ -658,6 +666,9 @@ ath_regd_init_wiphy(struct ath_regulator
|
@@ -659,6 +667,9 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||||
if (IS_ENABLED(CPTCFG_ATH_USER_REGD))
|
if (IS_ENABLED(CPTCFG_ATH_USER_REGD))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
||||||
--- a/local-symbols
|
--- a/local-symbols
|
||||||
+++ b/local-symbols
|
+++ b/local-symbols
|
||||||
@@ -145,6 +145,7 @@ ATH10K_SNOC=
|
@@ -135,6 +135,7 @@ ATH10K_SNOC=
|
||||||
ATH10K_DEBUG=
|
ATH10K_DEBUG=
|
||||||
ATH10K_DEBUGFS=
|
ATH10K_DEBUGFS=
|
||||||
ATH10K_SPECTRAL=
|
ATH10K_SPECTRAL=
|
||||||
|
@ -0,0 +1,162 @@
|
|||||||
|
From e2333703373e8b81294da5d1c73c30154f75b082 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
Date: Fri, 15 Oct 2021 18:56:33 +0200
|
||||||
|
Subject: [PATCH] ath10k: fetch (pre-)calibration data via nvmem subsystem
|
||||||
|
|
||||||
|
On most embedded ath10k devices (like range extenders,
|
||||||
|
routers, accesspoints, ...) the calibration data is
|
||||||
|
stored in a easily accessible MTD partitions named
|
||||||
|
"ART", "caldata", "calibration", etc...
|
||||||
|
|
||||||
|
Since commit 4b361cfa8624 ("mtd: core: add OTP nvmem provider support"):
|
||||||
|
MTD partitions and portions of them can be specified
|
||||||
|
as potential nvmem-cells which are accessible through
|
||||||
|
the nvmem subsystem.
|
||||||
|
|
||||||
|
This feature - together with an nvmem cell definition either
|
||||||
|
in the platform data or via device-tree allows drivers to get
|
||||||
|
the (pre-)calibration data which is required for initializing
|
||||||
|
the WIFI.
|
||||||
|
|
||||||
|
Tested with Netgear EX6150v2 (IPQ4018)
|
||||||
|
|
||||||
|
Cc: Robert Marko <robimarko@gmail.com>
|
||||||
|
Cc: Thibaut Varene <hacks@slashdirt.org>
|
||||||
|
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
---
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||||
|
@@ -12,6 +12,7 @@
|
||||||
|
#include <linux/dmi.h>
|
||||||
|
#include <linux/ctype.h>
|
||||||
|
#include <linux/pm_qos.h>
|
||||||
|
+#include <linux/nvmem-consumer.h>
|
||||||
|
#include <asm/byteorder.h>
|
||||||
|
|
||||||
|
#include "core.h"
|
||||||
|
@@ -935,7 +936,8 @@ static int ath10k_core_get_board_id_from
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
||||||
|
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
||||||
|
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
||||||
|
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
||||||
|
bmi_board_id_param = BMI_PARAM_GET_FLASH_BOARD_ID;
|
||||||
|
else
|
||||||
|
bmi_board_id_param = BMI_PARAM_GET_EEPROM_BOARD_ID;
|
||||||
|
@@ -1726,7 +1728,8 @@ static int ath10k_download_and_run_otp(s
|
||||||
|
|
||||||
|
/* As of now pre-cal is valid for 10_4 variants */
|
||||||
|
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
||||||
|
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
||||||
|
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
||||||
|
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
||||||
|
bmi_otp_exe_param = BMI_PARAM_FLASH_SECTION_ALL;
|
||||||
|
|
||||||
|
ret = ath10k_bmi_execute(ar, address, bmi_otp_exe_param, &result);
|
||||||
|
@@ -1853,6 +1856,39 @@ out_free:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int ath10k_download_cal_nvmem(struct ath10k *ar, const char *cell_name)
|
||||||
|
+{
|
||||||
|
+ struct nvmem_cell *cell;
|
||||||
|
+ void *buf;
|
||||||
|
+ size_t len;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ cell = devm_nvmem_cell_get(ar->dev, cell_name);
|
||||||
|
+ if (IS_ERR(cell)) {
|
||||||
|
+ ret = PTR_ERR(cell);
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ buf = nvmem_cell_read(cell, &len);
|
||||||
|
+ if (IS_ERR(buf))
|
||||||
|
+ return PTR_ERR(buf);
|
||||||
|
+
|
||||||
|
+ if (ar->hw_params.cal_data_len != len) {
|
||||||
|
+ kfree(buf);
|
||||||
|
+ ath10k_warn(ar, "invalid calibration data length in nvmem-cell '%s': %zu != %u\n",
|
||||||
|
+ cell_name, len, ar->hw_params.cal_data_len);
|
||||||
|
+ return -EMSGSIZE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ret = ath10k_download_board_data(ar, buf, len);
|
||||||
|
+ kfree(buf);
|
||||||
|
+ if (ret)
|
||||||
|
+ ath10k_warn(ar, "failed to download calibration data from nvmem-cell '%s': %d\n",
|
||||||
|
+ cell_name, ret);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
|
||||||
|
struct ath10k_fw_file *fw_file)
|
||||||
|
{
|
||||||
|
@@ -2087,6 +2123,18 @@ static int ath10k_core_pre_cal_download(
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
+ ret = ath10k_download_cal_nvmem(ar, "pre-calibration");
|
||||||
|
+ if (ret == 0) {
|
||||||
|
+ ar->cal_mode = ATH10K_PRE_CAL_MODE_NVMEM;
|
||||||
|
+ goto success;
|
||||||
|
+ } else if (ret == -EPROBE_DEFER) {
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||||
|
+ "boot did not find a pre-calibration nvmem-cell, try file next: %d\n",
|
||||||
|
+ ret);
|
||||||
|
+
|
||||||
|
ret = ath10k_download_cal_file(ar, ar->pre_cal_file);
|
||||||
|
if (ret == 0) {
|
||||||
|
ar->cal_mode = ATH10K_PRE_CAL_MODE_FILE;
|
||||||
|
@@ -2153,6 +2201,18 @@ static int ath10k_download_cal_data(stru
|
||||||
|
"pre cal download procedure failed, try cal file: %d\n",
|
||||||
|
ret);
|
||||||
|
|
||||||
|
+ ret = ath10k_download_cal_nvmem(ar, "calibration");
|
||||||
|
+ if (ret == 0) {
|
||||||
|
+ ar->cal_mode = ATH10K_CAL_MODE_NVMEM;
|
||||||
|
+ goto done;
|
||||||
|
+ } else if (ret == -EPROBE_DEFER) {
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||||
|
+ "boot did not find a calibration nvmem-cell, try file next: %d\n",
|
||||||
|
+ ret);
|
||||||
|
+
|
||||||
|
ret = ath10k_download_cal_file(ar, ar->cal_file);
|
||||||
|
if (ret == 0) {
|
||||||
|
ar->cal_mode = ATH10K_CAL_MODE_FILE;
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||||
|
@@ -877,8 +877,10 @@ enum ath10k_cal_mode {
|
||||||
|
ATH10K_CAL_MODE_FILE,
|
||||||
|
ATH10K_CAL_MODE_OTP,
|
||||||
|
ATH10K_CAL_MODE_DT,
|
||||||
|
+ ATH10K_CAL_MODE_NVMEM,
|
||||||
|
ATH10K_PRE_CAL_MODE_FILE,
|
||||||
|
ATH10K_PRE_CAL_MODE_DT,
|
||||||
|
+ ATH10K_PRE_CAL_MODE_NVMEM,
|
||||||
|
ATH10K_CAL_MODE_EEPROM,
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -898,10 +900,14 @@ static inline const char *ath10k_cal_mod
|
||||||
|
return "otp";
|
||||||
|
case ATH10K_CAL_MODE_DT:
|
||||||
|
return "dt";
|
||||||
|
+ case ATH10K_CAL_MODE_NVMEM:
|
||||||
|
+ return "nvmem";
|
||||||
|
case ATH10K_PRE_CAL_MODE_FILE:
|
||||||
|
return "pre-cal-file";
|
||||||
|
case ATH10K_PRE_CAL_MODE_DT:
|
||||||
|
return "pre-cal-dt";
|
||||||
|
+ case ATH10K_PRE_CAL_MODE_NVMEM:
|
||||||
|
+ return "pre-cal-nvmem";
|
||||||
|
case ATH10K_CAL_MODE_EEPROM:
|
||||||
|
return "eeprom";
|
||||||
|
}
|
@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||||
@@ -3189,6 +3189,16 @@ int ath10k_core_register(struct ath10k *
|
@@ -3412,6 +3412,16 @@ int ath10k_core_register(struct ath10k *
|
||||||
|
|
||||||
queue_work(ar->workqueue, &ar->register_work);
|
queue_work(ar->workqueue, &ar->register_work);
|
||||||
|
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
From: Linus Lüssing <ll@simonwunderlich.de>
|
|
||||||
Date: Wed, 5 Feb 2020 20:10:43 +0100
|
|
||||||
Subject: ath10k: increase rx buffer size to 2048
|
|
||||||
|
|
||||||
Before, only frames with a maximum size of 1528 bytes could be
|
|
||||||
transmitted between two 802.11s nodes.
|
|
||||||
|
|
||||||
For batman-adv for instance, which adds its own header to each frame,
|
|
||||||
we typically need an MTU of at least 1532 bytes to be able to transmit
|
|
||||||
without fragmentation.
|
|
||||||
|
|
||||||
This patch now increases the maxmimum frame size from 1528 to 1656
|
|
||||||
bytes.
|
|
||||||
|
|
||||||
Tested with two ath10k devices in 802.11s mode, as well as with
|
|
||||||
batman-adv on top of 802.11s with forwarding disabled.
|
|
||||||
|
|
||||||
Fix originally found and developed by Ben Greear.
|
|
||||||
|
|
||||||
Link: https://github.com/greearb/ath10k-ct/issues/89
|
|
||||||
Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d
|
|
||||||
Cc: Ben Greear <greearb@candelatech.com>
|
|
||||||
Signed-off-by: Linus Lüssing <ll@simonwunderlich.de>
|
|
||||||
|
|
||||||
Forwarded: https://patchwork.kernel.org/patch/11367055/
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/htt.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/htt.h
|
|
||||||
@@ -2243,7 +2243,7 @@ struct htt_rx_chan_info {
|
|
||||||
* Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size,
|
|
||||||
* rounded up to a cache line size.
|
|
||||||
*/
|
|
||||||
-#define HTT_RX_BUF_SIZE 1920
|
|
||||||
+#define HTT_RX_BUF_SIZE 2048
|
|
||||||
#define HTT_RX_MSDU_SIZE (HTT_RX_BUF_SIZE - (int)sizeof(struct htt_rx_desc))
|
|
||||||
|
|
||||||
/* Refill a bunch of RX buffers for each refill round so that FW/HW can handle
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
@@ -9708,6 +9708,21 @@ static int ath10k_mac_init_rd(struct ath
|
@@ -9843,6 +9843,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
int ath10k_mac_register(struct ath10k *ar)
|
int ath10k_mac_register(struct ath10k *ar)
|
||||||
{
|
{
|
||||||
static const u32 cipher_suites[] = {
|
static const u32 cipher_suites[] = {
|
||||||
@@ -10057,6 +10072,12 @@ int ath10k_mac_register(struct ath10k *a
|
@@ -10195,6 +10210,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||||
|
|
||||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ v13:
|
|||||||
create mode 100644 drivers/net/wireless/ath/ath10k/leds.h
|
create mode 100644 drivers/net/wireless/ath/ath10k/leds.h
|
||||||
--- a/drivers/net/wireless/ath/ath10k/Kconfig
|
--- a/drivers/net/wireless/ath/ath10k/Kconfig
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
|
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
|
||||||
@@ -70,6 +70,16 @@ config ATH10K_DEBUGFS
|
@@ -71,6 +71,16 @@ config ATH10K_DEBUGFS
|
||||||
|
|
||||||
If unsure, say Y to make it easier to debug problems.
|
If unsure, say Y to make it easier to debug problems.
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ v13:
|
|||||||
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
|
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
|
||||||
--- a/local-symbols
|
--- a/local-symbols
|
||||||
+++ b/local-symbols
|
+++ b/local-symbols
|
||||||
@@ -146,6 +146,7 @@ ATH10K_DEBUG=
|
@@ -136,6 +136,7 @@ ATH10K_DEBUG=
|
||||||
ATH10K_DEBUGFS=
|
ATH10K_DEBUGFS=
|
||||||
ATH10K_SPECTRAL=
|
ATH10K_SPECTRAL=
|
||||||
ATH10K_THERMAL=
|
ATH10K_THERMAL=
|
||||||
@ -124,7 +124,7 @@ v13:
|
|||||||
WCN36XX=
|
WCN36XX=
|
||||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||||
@@ -25,6 +25,7 @@
|
@@ -26,6 +26,7 @@
|
||||||
#include "testmode.h"
|
#include "testmode.h"
|
||||||
#include "wmi-ops.h"
|
#include "wmi-ops.h"
|
||||||
#include "coredump.h"
|
#include "coredump.h"
|
||||||
@ -132,7 +132,7 @@ v13:
|
|||||||
|
|
||||||
unsigned int ath10k_debug_mask;
|
unsigned int ath10k_debug_mask;
|
||||||
EXPORT_SYMBOL(ath10k_debug_mask);
|
EXPORT_SYMBOL(ath10k_debug_mask);
|
||||||
@@ -61,6 +62,7 @@ static const struct ath10k_hw_params ath
|
@@ -62,6 +63,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA988X_2_0_DEVICE_ID,
|
.dev_id = QCA988X_2_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca988x hw2.0",
|
.name = "qca988x hw2.0",
|
||||||
@ -140,7 +140,7 @@ v13:
|
|||||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||||
@@ -130,6 +132,7 @@ static const struct ath10k_hw_params ath
|
@@ -133,6 +135,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca9887 hw1.0",
|
.name = "qca9887 hw1.0",
|
||||||
@ -148,7 +148,7 @@ v13:
|
|||||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||||
@@ -335,6 +338,7 @@ static const struct ath10k_hw_params ath
|
@@ -344,6 +347,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca99x0 hw2.0",
|
.name = "qca99x0 hw2.0",
|
||||||
@ -156,7 +156,7 @@ v13:
|
|||||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.otp_exe_param = 0x00000700,
|
.otp_exe_param = 0x00000700,
|
||||||
@@ -375,6 +379,7 @@ static const struct ath10k_hw_params ath
|
@@ -385,6 +389,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca9984/qca9994 hw1.0",
|
.name = "qca9984/qca9994 hw1.0",
|
||||||
@ -164,7 +164,7 @@ v13:
|
|||||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||||
@@ -422,6 +427,7 @@ static const struct ath10k_hw_params ath
|
@@ -433,6 +438,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca9888 hw2.0",
|
.name = "qca9888 hw2.0",
|
||||||
@ -172,7 +172,7 @@ v13:
|
|||||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||||
@@ -2904,6 +2910,10 @@ int ath10k_core_start(struct ath10k *ar,
|
@@ -3127,6 +3133,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||||
goto err_hif_stop;
|
goto err_hif_stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ v13:
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_hif_stop:
|
err_hif_stop:
|
||||||
@@ -3162,9 +3172,18 @@ static void ath10k_core_register_work(st
|
@@ -3385,9 +3395,18 @@ static void ath10k_core_register_work(st
|
||||||
goto err_spectral_destroy;
|
goto err_spectral_destroy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ v13:
|
|||||||
err_spectral_destroy:
|
err_spectral_destroy:
|
||||||
ath10k_spectral_destroy(ar);
|
ath10k_spectral_destroy(ar);
|
||||||
err_debug_destroy:
|
err_debug_destroy:
|
||||||
@@ -3210,6 +3229,8 @@ void ath10k_core_unregister(struct ath10
|
@@ -3433,6 +3452,8 @@ void ath10k_core_unregister(struct ath10
|
||||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ v13:
|
|||||||
|
|
||||||
#include "htt.h"
|
#include "htt.h"
|
||||||
#include "htc.h"
|
#include "htc.h"
|
||||||
@@ -1237,6 +1238,13 @@ struct ath10k {
|
@@ -1256,6 +1257,13 @@ struct ath10k {
|
||||||
} testmode;
|
} testmode;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@ -467,7 +467,7 @@ v13:
|
|||||||
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
||||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||||
@@ -7468,6 +7468,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
@@ -7472,6 +7472,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,7 +517,7 @@ v13:
|
|||||||
static struct sk_buff *
|
static struct sk_buff *
|
||||||
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
||||||
enum wmi_sta_ps_mode psmode)
|
enum wmi_sta_ps_mode psmode)
|
||||||
@@ -9156,6 +9199,9 @@ static const struct wmi_ops wmi_ops = {
|
@@ -9160,6 +9203,9 @@ static const struct wmi_ops wmi_ops = {
|
||||||
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
@ -527,7 +527,7 @@ v13:
|
|||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -9226,6 +9272,8 @@ static const struct wmi_ops wmi_10_1_ops
|
@@ -9230,6 +9276,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
@ -536,7 +536,7 @@ v13:
|
|||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -9298,6 +9346,8 @@ static const struct wmi_ops wmi_10_2_ops
|
@@ -9302,6 +9350,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||||
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
||||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
@ -545,7 +545,7 @@ v13:
|
|||||||
/* .gen_pdev_enable_adaptive_cca not implemented */
|
/* .gen_pdev_enable_adaptive_cca not implemented */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -9369,6 +9419,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
@@ -9373,6 +9423,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||||
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
||||||
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
||||||
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
|
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
|
||||||
@ -554,7 +554,7 @@ v13:
|
|||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -9450,6 +9502,8 @@ static const struct wmi_ops wmi_10_4_ops
|
@@ -9454,6 +9506,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||||
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
||||||
@ -565,7 +565,7 @@ v13:
|
|||||||
int ath10k_wmi_attach(struct ath10k *ar)
|
int ath10k_wmi_attach(struct ath10k *ar)
|
||||||
--- a/drivers/net/wireless/ath/ath10k/wmi.h
|
--- a/drivers/net/wireless/ath/ath10k/wmi.h
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
|
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
|
||||||
@@ -3027,6 +3027,41 @@ enum wmi_10_4_feature_mask {
|
@@ -3030,6 +3030,41 @@ enum wmi_10_4_feature_mask {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||||
@@ -1290,6 +1290,10 @@ struct ath10k {
|
@@ -1312,6 +1312,10 @@ struct ath10k {
|
||||||
bool coex_support;
|
s32 tx_power_2g_limit;
|
||||||
int coex_gpio_pin;
|
s32 tx_power_5g_limit;
|
||||||
|
|
||||||
+#ifdef CPTCFG_MAC80211_LEDS
|
+#ifdef CPTCFG_MAC80211_LEDS
|
||||||
+ const char *led_default_trigger;
|
+ const char *led_default_trigger;
|
||||||
@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|||||||
if (ret)
|
if (ret)
|
||||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
@@ -10074,7 +10074,7 @@ int ath10k_mac_register(struct ath10k *a
|
@@ -10212,7 +10212,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||||
|
|
||||||
#ifdef CPTCFG_MAC80211_LEDS
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
From: Sven Eckelmann <seckelmann@datto.com>
|
|
||||||
Date: Tue, 11 Jun 2019 13:58:35 +0200
|
|
||||||
Subject: ath10k: fix max antenna gain unit
|
|
||||||
|
|
||||||
Most of the txpower for the ath10k firmware is stored as twicepower (0.5 dB
|
|
||||||
steps). This isn't the case for max_antenna_gain - which is still expected
|
|
||||||
by the firmware as dB.
|
|
||||||
|
|
||||||
The firmware is converting it from dB to the internal (twicepower)
|
|
||||||
representation when it calculates the limits of a channel. This can be seen
|
|
||||||
in tpc_stats when configuring "12" as max_antenna_gain. Instead of the
|
|
||||||
expected 12 (6 dB), the tpc_stats shows 24 (12 dB).
|
|
||||||
|
|
||||||
Tested on QCA9888 and IPQ4019 with firmware 10.4-3.5.3-00057.
|
|
||||||
|
|
||||||
Fixes: 02256930d9b8 ("ath10k: use proper tx power unit")
|
|
||||||
Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
|
|
||||||
|
|
||||||
Forwarded: https://patchwork.kernel.org/patch/10986723/
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
|
||||||
@@ -1038,7 +1038,7 @@ 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;
|
|
||||||
- arg.channel.max_antenna_gain = channel->max_antenna_gain * 2;
|
|
||||||
+ arg.channel.max_antenna_gain = channel->max_antenna_gain;
|
|
||||||
|
|
||||||
reinit_completion(&ar->vdev_setup_done);
|
|
||||||
reinit_completion(&ar->vdev_delete_done);
|
|
||||||
@@ -1484,7 +1484,7 @@ 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;
|
|
||||||
- arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain * 2;
|
|
||||||
+ arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain;
|
|
||||||
|
|
||||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
|
||||||
arg.ssid = arvif->u.ap.ssid;
|
|
||||||
@@ -3255,7 +3255,7 @@ 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;
|
|
||||||
- ch->max_antenna_gain = channel->max_antenna_gain * 2;
|
|
||||||
+ ch->max_antenna_gain = channel->max_antenna_gain;
|
|
||||||
ch->reg_class_id = 0; /* FIXME */
|
|
||||||
|
|
||||||
/* FIXME: why use only legacy modes, why not any
|
|
@ -28,7 +28,7 @@ Forwarded: no
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
@@ -1006,6 +1006,40 @@ static inline int ath10k_vdev_setup_sync
|
@@ -1021,6 +1021,40 @@ static inline int ath10k_vdev_setup_sync
|
||||||
return ar->last_wmi_vdev_start_status;
|
return ar->last_wmi_vdev_start_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ Forwarded: no
|
|||||||
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||||
{
|
{
|
||||||
struct cfg80211_chan_def *chandef = NULL;
|
struct cfg80211_chan_def *chandef = NULL;
|
||||||
@@ -1038,7 +1072,8 @@ static int ath10k_monitor_vdev_start(str
|
@@ -1053,7 +1087,8 @@ static int ath10k_monitor_vdev_start(str
|
||||||
arg.channel.min_power = 0;
|
arg.channel.min_power = 0;
|
||||||
arg.channel.max_power = channel->max_power * 2;
|
arg.channel.max_power = channel->max_power * 2;
|
||||||
arg.channel.max_reg_power = channel->max_reg_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_setup_done);
|
||||||
reinit_completion(&ar->vdev_delete_done);
|
reinit_completion(&ar->vdev_delete_done);
|
||||||
@@ -1484,7 +1519,8 @@ static int ath10k_vdev_start_restart(str
|
@@ -1499,7 +1534,8 @@ static int ath10k_vdev_start_restart(str
|
||||||
arg.channel.min_power = 0;
|
arg.channel.min_power = 0;
|
||||||
arg.channel.max_power = chandef->chan->max_power * 2;
|
arg.channel.max_power = chandef->chan->max_power * 2;
|
||||||
arg.channel.max_reg_power = chandef->chan->max_reg_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) {
|
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||||
arg.ssid = arvif->u.ap.ssid;
|
arg.ssid = arvif->u.ap.ssid;
|
||||||
@@ -3255,7 +3291,8 @@ static int ath10k_update_channel_list(st
|
@@ -3427,7 +3463,8 @@ static int ath10k_update_channel_list(st
|
||||||
ch->min_power = 0;
|
ch->min_power = 0;
|
||||||
ch->max_power = channel->max_power * 2;
|
ch->max_power = channel->max_power * 2;
|
||||||
ch->max_reg_power = channel->max_reg_power * 2;
|
ch->max_reg_power = channel->max_reg_power * 2;
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
From 22fb5991a44c78ff18ec0082dc90c809356eb893 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||||
|
Date: Sun, 27 Sep 2020 19:23:35 +0200
|
||||||
|
Subject: [PATCH 1/2] ath10k: Try to get mac-address from dts
|
||||||
|
|
||||||
|
Most of embedded device that have the ath10k wifi integrated store the
|
||||||
|
mac-address in nvmem partitions. Try to fetch the mac-address using the
|
||||||
|
standard 'of_get_mac_address' than in all the check also try to fetch the
|
||||||
|
address using the nvmem api searching for a defined 'mac-address' cell.
|
||||||
|
Mac-address defined in the dts have priority than any other address found.
|
||||||
|
|
||||||
|
Tested-on: QCA9984 hw1.0 PCI 10.4
|
||||||
|
|
||||||
|
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/net/wireless/ath/ath10k/core.c | 10 ++++++++++
|
||||||
|
1 file changed, 10 insertions(+)
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||||
|
@@ -8,6 +8,7 @@
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/firmware.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
+#include <linux/of_net.h>
|
||||||
|
#include <linux/property.h>
|
||||||
|
#include <linux/dmi.h>
|
||||||
|
#include <linux/ctype.h>
|
||||||
|
@@ -3303,6 +3304,8 @@ static int ath10k_core_probe_fw(struct a
|
||||||
|
|
||||||
|
device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
|
||||||
|
|
||||||
|
+ of_get_mac_address(ar->dev->of_node, ar->mac_addr);
|
||||||
|
+
|
||||||
|
ret = ath10k_core_init_firmware_features(ar);
|
||||||
|
if (ret) {
|
||||||
|
ath10k_err(ar, "fatal problem with firmware features: %d\n",
|
@ -1,337 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
|
||||||
@@ -35,6 +35,7 @@ static bool uart_print;
|
|
||||||
static bool skip_otp;
|
|
||||||
static bool rawmode;
|
|
||||||
static bool fw_diag_log;
|
|
||||||
+static bool ethernetmode = true;
|
|
||||||
|
|
||||||
unsigned long ath10k_coredump_mask = BIT(ATH10K_FW_CRASH_DUMP_REGISTERS) |
|
|
||||||
BIT(ATH10K_FW_CRASH_DUMP_CE_DATA);
|
|
||||||
@@ -47,6 +48,7 @@ module_param(skip_otp, bool, 0644);
|
|
||||||
module_param(rawmode, bool, 0644);
|
|
||||||
module_param(fw_diag_log, bool, 0644);
|
|
||||||
module_param_named(coredump_mask, ath10k_coredump_mask, ulong, 0444);
|
|
||||||
+module_param(ethernetmode, bool, 0644);
|
|
||||||
|
|
||||||
MODULE_PARM_DESC(debug_mask, "Debugging mask");
|
|
||||||
MODULE_PARM_DESC(uart_print, "Uart target debugging");
|
|
||||||
@@ -55,6 +57,7 @@ MODULE_PARM_DESC(cryptmode, "Crypto mode
|
|
||||||
MODULE_PARM_DESC(rawmode, "Use raw 802.11 frame datapath");
|
|
||||||
MODULE_PARM_DESC(coredump_mask, "Bitfield of what to include in firmware crash file");
|
|
||||||
MODULE_PARM_DESC(fw_diag_log, "Diag based fw log debugging");
|
|
||||||
+MODULE_PARM_DESC(ethernetmode, "Use ethernet frame datapath");
|
|
||||||
|
|
||||||
static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
|
||||||
{
|
|
||||||
@@ -3135,6 +3138,14 @@ static void ath10k_core_register_work(st
|
|
||||||
/* peer stats are enabled by default */
|
|
||||||
set_bit(ATH10K_FLAG_PEER_STATS, &ar->dev_flags);
|
|
||||||
|
|
||||||
+ if (ethernetmode && rawmode) {
|
|
||||||
+ ath10k_err(ar, "invalid configuration, ethernet and rawmode data path can not coexist\n");
|
|
||||||
+ status = -EINVAL;
|
|
||||||
+ goto err;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ar->ethernetmode = ethernetmode;
|
|
||||||
+
|
|
||||||
status = ath10k_core_probe_fw(ar);
|
|
||||||
if (status) {
|
|
||||||
ath10k_err(ar, "could not probe fw (%d)\n", status);
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
|
||||||
@@ -113,6 +113,7 @@ enum ath10k_skb_flags {
|
|
||||||
ATH10K_SKB_F_QOS = BIT(4),
|
|
||||||
ATH10K_SKB_F_RAW_TX = BIT(5),
|
|
||||||
ATH10K_SKB_F_NOACK_TID = BIT(6),
|
|
||||||
+ ATH10K_SKB_F_HW_80211_ENCAP = BIT(7),
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ath10k_skb_cb {
|
|
||||||
@@ -1294,6 +1295,8 @@ struct ath10k {
|
|
||||||
const char *led_default_trigger;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+ bool ethernetmode;
|
|
||||||
+
|
|
||||||
/* must be last */
|
|
||||||
u8 drv_priv[] __aligned(sizeof(void *));
|
|
||||||
};
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
|
|
||||||
@@ -1187,6 +1187,10 @@ static u8 ath10k_htt_tx_get_tid(struct s
|
|
||||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
|
||||||
struct ath10k_skb_cb *cb = ATH10K_SKB_CB(skb);
|
|
||||||
|
|
||||||
+ /* Firmware takes care of tid classification for ethernet format */
|
|
||||||
+ if (cb->flags & ATH10K_SKB_F_HW_80211_ENCAP)
|
|
||||||
+ return skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
|
||||||
+
|
|
||||||
if (!is_eth && ieee80211_is_mgmt(hdr->frame_control))
|
|
||||||
return HTT_DATA_TX_EXT_TID_MGMT;
|
|
||||||
else if (cb->flags & ATH10K_SKB_F_QOS)
|
|
||||||
@@ -1434,15 +1438,17 @@ static int ath10k_htt_tx_32(struct ath10
|
|
||||||
txbuf_paddr = htt->txbuf.paddr +
|
|
||||||
(sizeof(struct ath10k_htt_txbuf_32) * msdu_id);
|
|
||||||
|
|
||||||
- if ((ieee80211_is_action(hdr->frame_control) ||
|
|
||||||
- ieee80211_is_deauth(hdr->frame_control) ||
|
|
||||||
- ieee80211_is_disassoc(hdr->frame_control)) &&
|
|
||||||
- ieee80211_has_protected(hdr->frame_control)) {
|
|
||||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
|
||||||
- } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
|
||||||
- txmode == ATH10K_HW_TXRX_RAW &&
|
|
||||||
- ieee80211_has_protected(hdr->frame_control)) {
|
|
||||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
|
||||||
+ if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) {
|
|
||||||
+ if ((ieee80211_is_action(hdr->frame_control) ||
|
|
||||||
+ ieee80211_is_deauth(hdr->frame_control) ||
|
|
||||||
+ ieee80211_is_disassoc(hdr->frame_control)) &&
|
|
||||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
|
||||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
|
||||||
+ } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
|
||||||
+ txmode == ATH10K_HW_TXRX_RAW &&
|
|
||||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
|
||||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
skb_cb->paddr = dma_map_single(dev, msdu->data, msdu->len,
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
|
||||||
@@ -3573,12 +3573,16 @@ ath10k_mac_tx_h_get_txmode(struct ath10k
|
|
||||||
struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
const struct ieee80211_hdr *hdr = (void *)skb->data;
|
|
||||||
+ struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
|
||||||
const struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
|
|
||||||
__le16 fc = hdr->frame_control;
|
|
||||||
|
|
||||||
if (!vif || vif->type == NL80211_IFTYPE_MONITOR)
|
|
||||||
return ATH10K_HW_TXRX_RAW;
|
|
||||||
|
|
||||||
+ if (tx_info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
|
|
||||||
+ return ATH10K_HW_TXRX_ETHERNET;
|
|
||||||
+
|
|
||||||
if (ieee80211_is_mgmt(fc))
|
|
||||||
return ATH10K_HW_TXRX_MGMT;
|
|
||||||
|
|
||||||
@@ -3736,6 +3740,15 @@ static void ath10k_mac_tx_h_fill_cb(stru
|
|
||||||
bool noack = false;
|
|
||||||
|
|
||||||
cb->flags = 0;
|
|
||||||
+ cb->vif = vif;
|
|
||||||
+ cb->txq = txq;
|
|
||||||
+ cb->airtime_est = airtime;
|
|
||||||
+
|
|
||||||
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
|
|
||||||
+ cb->flags |= ATH10K_SKB_F_HW_80211_ENCAP;
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (!ath10k_tx_h_use_hwcrypto(vif, skb))
|
|
||||||
cb->flags |= ATH10K_SKB_F_NO_HWCRYPT;
|
|
||||||
|
|
||||||
@@ -3774,9 +3787,6 @@ static void ath10k_mac_tx_h_fill_cb(stru
|
|
||||||
cb->flags |= ATH10K_SKB_F_RAW_TX;
|
|
||||||
}
|
|
||||||
|
|
||||||
- cb->vif = vif;
|
|
||||||
- cb->txq = txq;
|
|
||||||
- cb->airtime_est = airtime;
|
|
||||||
if (sta) {
|
|
||||||
arsta = (struct ath10k_sta *)sta->drv_priv;
|
|
||||||
spin_lock_bh(&ar->data_lock);
|
|
||||||
@@ -3892,6 +3902,9 @@ static int ath10k_mac_tx(struct ath10k *
|
|
||||||
const struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
|
|
||||||
+ goto skip_encap;
|
|
||||||
+
|
|
||||||
/* We should disable CCK RATE due to P2P */
|
|
||||||
if (info->flags & IEEE80211_TX_CTL_NO_CCK_RATE)
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_MAC, "IEEE80211_TX_CTL_NO_CCK_RATE\n");
|
|
||||||
@@ -3915,6 +3928,7 @@ static int ath10k_mac_tx(struct ath10k *
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+skip_encap:
|
|
||||||
if (!noque_offchan && info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) {
|
|
||||||
if (!ath10k_mac_tx_frm_has_freq(ar)) {
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_MAC, "mac queued offchannel skb %pK len %d\n",
|
|
||||||
@@ -3964,6 +3978,7 @@ void ath10k_offchan_tx_work(struct work_
|
|
||||||
int ret;
|
|
||||||
unsigned long time_left;
|
|
||||||
bool tmp_peer_created = false;
|
|
||||||
+ struct ieee80211_tx_info *info;
|
|
||||||
|
|
||||||
/* FW requirement: We must create a peer before FW will send out
|
|
||||||
* an offchannel frame. Otherwise the frame will be stuck and
|
|
||||||
@@ -3983,8 +3998,14 @@ void ath10k_offchan_tx_work(struct work_
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_MAC, "mac offchannel skb %pK len %d\n",
|
|
||||||
skb, skb->len);
|
|
||||||
|
|
||||||
- hdr = (struct ieee80211_hdr *)skb->data;
|
|
||||||
- peer_addr = ieee80211_get_DA(hdr);
|
|
||||||
+ info = IEEE80211_SKB_CB(skb);
|
|
||||||
+
|
|
||||||
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
|
|
||||||
+ peer_addr = skb->data;
|
|
||||||
+ } else {
|
|
||||||
+ hdr = (struct ieee80211_hdr *)skb->data;
|
|
||||||
+ peer_addr = ieee80211_get_DA(hdr);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
spin_lock_bh(&ar->data_lock);
|
|
||||||
vdev_id = ar->scan.vdev_id;
|
|
||||||
@@ -4517,7 +4538,7 @@ static void ath10k_mac_op_tx(struct ieee
|
|
||||||
struct ieee80211_vif *vif = info->control.vif;
|
|
||||||
struct ieee80211_sta *sta = control->sta;
|
|
||||||
struct ieee80211_txq *txq = NULL;
|
|
||||||
- struct ieee80211_hdr *hdr = (void *)skb->data;
|
|
||||||
+ struct ieee80211_hdr *hdr;
|
|
||||||
enum ath10k_hw_txrx_mode txmode;
|
|
||||||
enum ath10k_mac_tx_path txpath;
|
|
||||||
bool is_htt;
|
|
||||||
@@ -4537,7 +4558,6 @@ static void ath10k_mac_op_tx(struct ieee
|
|
||||||
|
|
||||||
if (is_htt) {
|
|
||||||
spin_lock_bh(&ar->htt.tx_lock);
|
|
||||||
- is_presp = ieee80211_is_probe_resp(hdr->frame_control);
|
|
||||||
|
|
||||||
ret = ath10k_htt_tx_inc_pending(htt);
|
|
||||||
if (ret) {
|
|
||||||
@@ -4548,14 +4568,19 @@ static void ath10k_mac_op_tx(struct ieee
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- ret = ath10k_htt_tx_mgmt_inc_pending(htt, is_mgmt, is_presp);
|
|
||||||
- if (ret) {
|
|
||||||
- ath10k_dbg(ar, ATH10K_DBG_MAC, "failed to increase tx mgmt pending count: %d, dropping\n",
|
|
||||||
- ret);
|
|
||||||
- ath10k_htt_tx_dec_pending(htt);
|
|
||||||
- spin_unlock_bh(&ar->htt.tx_lock);
|
|
||||||
- ieee80211_free_txskb(ar->hw, skb);
|
|
||||||
- return;
|
|
||||||
+ if (is_mgmt) {
|
|
||||||
+ hdr = (struct ieee80211_hdr *)skb->data;
|
|
||||||
+ is_presp = ieee80211_is_probe_resp(hdr->frame_control);
|
|
||||||
+
|
|
||||||
+ ret = ath10k_htt_tx_mgmt_inc_pending(htt, is_mgmt, is_presp);
|
|
||||||
+ if (ret) {
|
|
||||||
+ ath10k_dbg(ar, ATH10K_DBG_MAC, "failed to increase tx mgmt pending count: %d, dropping\n",
|
|
||||||
+ ret);
|
|
||||||
+ ath10k_htt_tx_dec_pending(htt);
|
|
||||||
+ spin_unlock_bh(&ar->htt.tx_lock);
|
|
||||||
+ ieee80211_free_txskb(ar->hw, skb);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
spin_unlock_bh(&ar->htt.tx_lock);
|
|
||||||
}
|
|
||||||
@@ -5378,6 +5403,36 @@ static int ath10k_mac_set_txbf_conf(stru
|
|
||||||
ar->wmi.vdev_param->txbf, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void ath10k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
|
|
||||||
+ struct ieee80211_vif *vif)
|
|
||||||
+{
|
|
||||||
+ struct ath10k *ar = hw->priv;
|
|
||||||
+ struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
|
||||||
+
|
|
||||||
+ u32 vdev_param, param_value;
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ vdev_param = ar->wmi.vdev_param->tx_encap_type;
|
|
||||||
+ if (!ar->ethernetmode ||
|
|
||||||
+ (vif->type != NL80211_IFTYPE_STATION &&
|
|
||||||
+ vif->type != NL80211_IFTYPE_AP))
|
|
||||||
+ vif->offload_flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED;
|
|
||||||
+
|
|
||||||
+ if (vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)
|
|
||||||
+ param_value = ATH10K_HW_TXRX_ETHERNET;
|
|
||||||
+ else
|
|
||||||
+ param_value = ATH10K_HW_TXRX_NATIVE_WIFI;
|
|
||||||
+
|
|
||||||
+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
|
||||||
+ param_value);
|
|
||||||
+
|
|
||||||
+ if (ret) {
|
|
||||||
+ ath10k_info(ar, "failed to set vdev %i TX encapsulation: %d\n",
|
|
||||||
+ arvif->vdev_id, ret);
|
|
||||||
+ vif->offload_flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* TODO:
|
|
||||||
* Figure out how to handle WMI_VDEV_SUBTYPE_P2P_DEVICE,
|
|
||||||
@@ -5571,15 +5626,7 @@ static int ath10k_add_interface(struct i
|
|
||||||
|
|
||||||
arvif->def_wep_key_idx = -1;
|
|
||||||
|
|
||||||
- vdev_param = ar->wmi.vdev_param->tx_encap_type;
|
|
||||||
- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
|
||||||
- ATH10K_HW_TXRX_NATIVE_WIFI);
|
|
||||||
- /* 10.X firmware does not support this VDEV parameter. Do not warn */
|
|
||||||
- if (ret && ret != -EOPNOTSUPP) {
|
|
||||||
- ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n",
|
|
||||||
- arvif->vdev_id, ret);
|
|
||||||
- goto err_vdev_delete;
|
|
||||||
- }
|
|
||||||
+ ath10k_mac_op_update_vif_offload(hw, vif);
|
|
||||||
|
|
||||||
/* Configuring number of spatial stream for monitor interface is causing
|
|
||||||
* target assert in qca9888 and qca6174.
|
|
||||||
@@ -9260,6 +9307,7 @@ static const struct ieee80211_ops ath10k
|
|
||||||
.config = ath10k_config,
|
|
||||||
.add_interface = ath10k_add_interface,
|
|
||||||
.remove_interface = ath10k_remove_interface,
|
|
||||||
+ .update_vif_offload = ath10k_mac_op_update_vif_offload,
|
|
||||||
.configure_filter = ath10k_configure_filter,
|
|
||||||
.bss_info_changed = ath10k_bss_info_changed,
|
|
||||||
.set_coverage_class = ath10k_mac_op_set_coverage_class,
|
|
||||||
@@ -9886,6 +9934,9 @@ int ath10k_mac_register(struct ath10k *a
|
|
||||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
|
||||||
ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK);
|
|
||||||
|
|
||||||
+ if(ar->ethernetmode)
|
|
||||||
+ ieee80211_hw_set(ar->hw, SUPPORTS_TX_ENCAP_OFFLOAD);
|
|
||||||
+
|
|
||||||
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
|
|
||||||
ieee80211_hw_set(ar->hw, SW_CRYPTO_CONTROL);
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/txrx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
|
|
||||||
@@ -50,6 +50,7 @@ int ath10k_txrx_tx_unref(struct ath10k_h
|
|
||||||
struct ath10k_skb_cb *skb_cb;
|
|
||||||
struct ath10k_txq *artxq;
|
|
||||||
struct sk_buff *msdu;
|
|
||||||
+ struct ieee80211_vif *vif;
|
|
||||||
u8 flags;
|
|
||||||
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_HTT,
|
|
||||||
@@ -80,6 +81,8 @@ int ath10k_txrx_tx_unref(struct ath10k_h
|
|
||||||
}
|
|
||||||
|
|
||||||
flags = skb_cb->flags;
|
|
||||||
+ vif = skb_cb->vif;
|
|
||||||
+
|
|
||||||
ath10k_htt_tx_free_msdu_id(htt, tx_done->msdu_id);
|
|
||||||
ath10k_htt_tx_dec_pending(htt);
|
|
||||||
if (htt->num_pending_tx == 0)
|
|
||||||
@@ -130,7 +133,11 @@ int ath10k_txrx_tx_unref(struct ath10k_h
|
|
||||||
info->status.is_valid_ack_signal = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
- ieee80211_tx_status(htt->ar->hw, msdu);
|
|
||||||
+ if (flags & ATH10K_SKB_F_HW_80211_ENCAP)
|
|
||||||
+ ieee80211_tx_status_8023(htt->ar->hw, vif, msdu);
|
|
||||||
+ else
|
|
||||||
+ ieee80211_tx_status(htt->ar->hw, msdu);
|
|
||||||
+
|
|
||||||
/* we do not own the msdu anymore */
|
|
||||||
|
|
||||||
return 0;
|
|
@ -1,144 +0,0 @@
|
|||||||
From da4ccc477bb46cc518991828ae8ac79e856f92ab Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sven Eckelmann <sven@narfation.org>
|
|
||||||
Date: Thu, 15 Oct 2020 15:15:01 +0200
|
|
||||||
Subject: [PATCH] ath11k: search DT for qcom,ath11k-calibration-variant
|
|
||||||
|
|
||||||
Board Data File (BDF) is loaded upon driver boot-up procedure. The right
|
|
||||||
board data file is identified on IPQ6018 using bus, qmi-chip-id and
|
|
||||||
qmi-board-id.
|
|
||||||
|
|
||||||
The problem, however, can occur when the (default) board data file cannot
|
|
||||||
fulfill with the vendor requirements and it is necessary to use a different
|
|
||||||
board data file.
|
|
||||||
|
|
||||||
This problem was already solved on ath10k by adding a ",variant=.*" at the
|
|
||||||
end of the board name. The same functionality must also be provided for
|
|
||||||
ath11k.
|
|
||||||
|
|
||||||
The device tree requires an additional string to define the variant name
|
|
||||||
|
|
||||||
wifi@c000000 {
|
|
||||||
status = "okay";
|
|
||||||
qcom,ath11k-calibration-variant = "Cigtech-WF-188";
|
|
||||||
};
|
|
||||||
|
|
||||||
This would create the boarddata identifier for the board-2.bin search
|
|
||||||
|
|
||||||
* bus=ahb,qmi-chip-id=0,qmi-board-id=18,variant=Cigtech-WF-188
|
|
||||||
|
|
||||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
|
||||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/20201015131501.1939685-2-sven@narfation.org
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/core.c | 35 ++++++++++++++++++++++++--
|
|
||||||
drivers/net/wireless/ath/ath11k/core.h | 1 +
|
|
||||||
drivers/net/wireless/ath/ath11k/qmi.c | 5 ++++
|
|
||||||
drivers/net/wireless/ath/ath11k/qmi.h | 2 ++
|
|
||||||
4 files changed, 41 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/remoteproc.h>
|
|
||||||
#include <linux/firmware.h>
|
|
||||||
+#include <linux/of.h>
|
|
||||||
#include "core.h"
|
|
||||||
#include "dp_tx.h"
|
|
||||||
#include "dp_rx.h"
|
|
||||||
@@ -141,14 +142,44 @@ static const struct ath11k_hw_params ath
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
+int ath11k_core_check_dt(struct ath11k_base *ab)
|
|
||||||
+{
|
|
||||||
+ size_t max_len = sizeof(ab->qmi.target.bdf_ext);
|
|
||||||
+ const char *variant = NULL;
|
|
||||||
+ struct device_node *node;
|
|
||||||
+
|
|
||||||
+ node = ab->dev->of_node;
|
|
||||||
+ if (!node)
|
|
||||||
+ return -ENOENT;
|
|
||||||
+
|
|
||||||
+ of_property_read_string(node, "qcom,ath11k-calibration-variant",
|
|
||||||
+ &variant);
|
|
||||||
+ if (!variant)
|
|
||||||
+ return -ENODATA;
|
|
||||||
+
|
|
||||||
+ if (strscpy(ab->qmi.target.bdf_ext, variant, max_len) < 0)
|
|
||||||
+ ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
|
||||||
+ "bdf variant string is longer than the buffer can accommodate (variant: %s)\n",
|
|
||||||
+ variant);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
|
||||||
size_t name_len)
|
|
||||||
{
|
|
||||||
+ /* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */
|
|
||||||
+ char variant[9 + ATH11K_QMI_BDF_EXT_STR_LENGTH] = { 0 };
|
|
||||||
+
|
|
||||||
+ if (ab->qmi.target.bdf_ext[0] != '\0')
|
|
||||||
+ scnprintf(variant, sizeof(variant), ",variant=%s",
|
|
||||||
+ ab->qmi.target.bdf_ext);
|
|
||||||
+
|
|
||||||
scnprintf(name, name_len,
|
|
||||||
- "bus=%s,qmi-chip-id=%d,qmi-board-id=%d",
|
|
||||||
+ "bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s",
|
|
||||||
ath11k_bus_str(ab->hif.bus),
|
|
||||||
ab->qmi.target.chip_id,
|
|
||||||
- ab->qmi.target.board_id);
|
|
||||||
+ ab->qmi.target.board_id, variant);
|
|
||||||
|
|
||||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot using board name '%s'\n", name);
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
@@ -886,6 +886,7 @@ void ath11k_core_free(struct ath11k_base
|
|
||||||
int ath11k_core_fetch_bdf(struct ath11k_base *ath11k,
|
|
||||||
struct ath11k_board_data *bd);
|
|
||||||
void ath11k_core_free_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd);
|
|
||||||
+int ath11k_core_check_dt(struct ath11k_base *ath11k);
|
|
||||||
|
|
||||||
void ath11k_core_halt(struct ath11k *ar);
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
|
||||||
@@ -1815,6 +1815,7 @@ static int ath11k_qmi_request_target_cap
|
|
||||||
struct qmi_wlanfw_cap_resp_msg_v01 resp;
|
|
||||||
struct qmi_txn txn = {};
|
|
||||||
int ret = 0;
|
|
||||||
+ int r;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
memset(&resp, 0, sizeof(resp));
|
|
||||||
@@ -1880,6 +1881,10 @@ static int ath11k_qmi_request_target_cap
|
|
||||||
ab->qmi.target.fw_build_timestamp,
|
|
||||||
ab->qmi.target.fw_build_id);
|
|
||||||
|
|
||||||
+ r = ath11k_core_check_dt(ab);
|
|
||||||
+ if (r)
|
|
||||||
+ ath11k_dbg(ab, ATH11K_DBG_QMI, "DT bdf variant name not set.\n");
|
|
||||||
+
|
|
||||||
out:
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/qmi.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.h
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
#define ATH11K_QMI_RESP_LEN_MAX 8192
|
|
||||||
#define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01 32
|
|
||||||
#define ATH11K_QMI_CALDB_SIZE 0x480000
|
|
||||||
+#define ATH11K_QMI_BDF_EXT_STR_LENGTH 0x20
|
|
||||||
|
|
||||||
#define QMI_WLFW_REQUEST_MEM_IND_V01 0x0035
|
|
||||||
#define QMI_WLFW_FW_MEM_READY_IND_V01 0x0037
|
|
||||||
@@ -101,6 +102,7 @@ struct target_info {
|
|
||||||
u32 fw_version;
|
|
||||||
char fw_build_timestamp[ATH11K_QMI_WLANFW_MAX_TIMESTAMP_LEN_V01 + 1];
|
|
||||||
char fw_build_id[ATH11K_QMI_WLANFW_MAX_BUILD_ID_LEN_V01 + 1];
|
|
||||||
+ char bdf_ext[ATH11K_QMI_BDF_EXT_STR_LENGTH];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct m3_mem_region {
|
|
@ -1,151 +0,0 @@
|
|||||||
From 4b965be536eefdd16ca0a88120fee23f5b92cd16 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karthikeyan Periyasamy <periyasa@codeaurora.org>
|
|
||||||
Date: Mon, 8 Feb 2021 13:32:11 +0200
|
|
||||||
Subject: ath11k: Update tx descriptor search index properly
|
|
||||||
|
|
||||||
Tx descriptor search index field should be updated with hw peer id
|
|
||||||
and not by AST Hash as per the HW/FW recommendation. Incorrect search
|
|
||||||
index causes throughput degradation in all scenario for all the
|
|
||||||
platforms. so updated the search index field with hw peer id, which
|
|
||||||
is a common change applicable for all the platforms. Also no need of these
|
|
||||||
configuration for non station type. seen 10% throughput increase in WDS
|
|
||||||
traffic with this change.
|
|
||||||
|
|
||||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1
|
|
||||||
|
|
||||||
Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
|
|
||||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/1612410960-9120-1-git-send-email-periyasa@codeaurora.org
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/core.h | 1 +
|
|
||||||
drivers/net/wireless/ath/ath11k/dp_rx.c | 8 ++++++--
|
|
||||||
drivers/net/wireless/ath/ath11k/dp_tx.c | 1 +
|
|
||||||
drivers/net/wireless/ath/ath11k/hal_tx.c | 2 ++
|
|
||||||
drivers/net/wireless/ath/ath11k/hal_tx.h | 1 +
|
|
||||||
drivers/net/wireless/ath/ath11k/peer.c | 9 +++++++--
|
|
||||||
drivers/net/wireless/ath/ath11k/peer.h | 3 ++-
|
|
||||||
7 files changed, 20 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
@@ -193,6 +193,7 @@ struct ath11k_vif {
|
|
||||||
u32 beacon_interval;
|
|
||||||
u32 dtim_period;
|
|
||||||
u16 ast_hash;
|
|
||||||
+ u16 ast_idx;
|
|
||||||
u16 tcl_metadata;
|
|
||||||
u8 hal_addr_search_flags;
|
|
||||||
u8 search_type;
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
||||||
@@ -1648,6 +1648,7 @@ void ath11k_dp_htt_htc_t2h_msg_handler(s
|
|
||||||
u8 mac_addr[ETH_ALEN];
|
|
||||||
u16 peer_mac_h16;
|
|
||||||
u16 ast_hash;
|
|
||||||
+ u16 hw_peer_id;
|
|
||||||
|
|
||||||
ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "dp_htt rx msg type :0x%0x\n", type);
|
|
||||||
|
|
||||||
@@ -1668,7 +1669,7 @@ void ath11k_dp_htt_htc_t2h_msg_handler(s
|
|
||||||
resp->peer_map_ev.info1);
|
|
||||||
ath11k_dp_get_mac_addr(resp->peer_map_ev.mac_addr_l32,
|
|
||||||
peer_mac_h16, mac_addr);
|
|
||||||
- ath11k_peer_map_event(ab, vdev_id, peer_id, mac_addr, 0);
|
|
||||||
+ ath11k_peer_map_event(ab, vdev_id, peer_id, mac_addr, 0, 0);
|
|
||||||
break;
|
|
||||||
case HTT_T2H_MSG_TYPE_PEER_MAP2:
|
|
||||||
vdev_id = FIELD_GET(HTT_T2H_PEER_MAP_INFO_VDEV_ID,
|
|
||||||
@@ -1681,7 +1682,10 @@ void ath11k_dp_htt_htc_t2h_msg_handler(s
|
|
||||||
peer_mac_h16, mac_addr);
|
|
||||||
ast_hash = FIELD_GET(HTT_T2H_PEER_MAP_INFO2_AST_HASH_VAL,
|
|
||||||
resp->peer_map_ev.info2);
|
|
||||||
- ath11k_peer_map_event(ab, vdev_id, peer_id, mac_addr, ast_hash);
|
|
||||||
+ hw_peer_id = FIELD_GET(HTT_T2H_PEER_MAP_INFO1_HW_PEER_ID,
|
|
||||||
+ resp->peer_map_ev.info1);
|
|
||||||
+ ath11k_peer_map_event(ab, vdev_id, peer_id, mac_addr, ast_hash,
|
|
||||||
+ hw_peer_id);
|
|
||||||
break;
|
|
||||||
case HTT_T2H_MSG_TYPE_PEER_UNMAP:
|
|
||||||
case HTT_T2H_MSG_TYPE_PEER_UNMAP2:
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
@@ -165,6 +165,7 @@ tcl_ring_sel:
|
|
||||||
ti.pkt_offset = 0;
|
|
||||||
ti.lmac_id = ar->lmac_id;
|
|
||||||
ti.bss_ast_hash = arvif->ast_hash;
|
|
||||||
+ ti.bss_ast_idx = arvif->ast_idx;
|
|
||||||
ti.dscp_tid_tbl_idx = 0;
|
|
||||||
|
|
||||||
if (skb->ip_summed == CHECKSUM_PARTIAL &&
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/hal_tx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.c
|
|
||||||
@@ -71,6 +71,8 @@ void ath11k_hal_tx_cmd_desc_setup(struct
|
|
||||||
tcl_cmd->info3 = FIELD_PREP(HAL_TCL_DATA_CMD_INFO3_DSCP_TID_TABLE_IDX,
|
|
||||||
ti->dscp_tid_tbl_idx) |
|
|
||||||
FIELD_PREP(HAL_TCL_DATA_CMD_INFO3_SEARCH_INDEX,
|
|
||||||
+ ti->bss_ast_idx) |
|
|
||||||
+ FIELD_PREP(HAL_TCL_DATA_CMD_INFO3_CACHE_SET_NUM,
|
|
||||||
ti->bss_ast_hash);
|
|
||||||
tcl_cmd->info4 = 0;
|
|
||||||
}
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/hal_tx.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.h
|
|
||||||
@@ -29,6 +29,7 @@ struct hal_tx_info {
|
|
||||||
u32 flags1; /* %HAL_TCL_DATA_CMD_INFO2_ */
|
|
||||||
u16 addr_search_flags; /* %HAL_TCL_DATA_CMD_INFO0_ADDR(X/Y)_ */
|
|
||||||
u16 bss_ast_hash;
|
|
||||||
+ u16 bss_ast_idx;
|
|
||||||
u8 tid;
|
|
||||||
u8 search_type; /* %HAL_TX_ADDR_SEARCH_ */
|
|
||||||
u8 lmac_id;
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/peer.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/peer.c
|
|
||||||
@@ -118,7 +118,7 @@ exit:
|
|
||||||
}
|
|
||||||
|
|
||||||
void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id,
|
|
||||||
- u8 *mac_addr, u16 ast_hash)
|
|
||||||
+ u8 *mac_addr, u16 ast_hash, u16 hw_peer_id)
|
|
||||||
{
|
|
||||||
struct ath11k_peer *peer;
|
|
||||||
|
|
||||||
@@ -132,6 +132,7 @@ void ath11k_peer_map_event(struct ath11k
|
|
||||||
peer->vdev_id = vdev_id;
|
|
||||||
peer->peer_id = peer_id;
|
|
||||||
peer->ast_hash = ast_hash;
|
|
||||||
+ peer->hw_peer_id = hw_peer_id;
|
|
||||||
ether_addr_copy(peer->addr, mac_addr);
|
|
||||||
list_add(&peer->list, &ab->peers);
|
|
||||||
wake_up(&ab->peer_mapping_wq);
|
|
||||||
@@ -309,7 +310,11 @@ int ath11k_peer_create(struct ath11k *ar
|
|
||||||
|
|
||||||
peer->pdev_idx = ar->pdev_idx;
|
|
||||||
peer->sta = sta;
|
|
||||||
- arvif->ast_hash = peer->ast_hash;
|
|
||||||
+
|
|
||||||
+ if (arvif->vif->type == NL80211_IFTYPE_STATION) {
|
|
||||||
+ arvif->ast_hash = peer->ast_hash;
|
|
||||||
+ arvif->ast_idx = peer->hw_peer_id;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
peer->sec_type = HAL_ENCRYPT_TYPE_OPEN;
|
|
||||||
peer->sec_type_grp = HAL_ENCRYPT_TYPE_OPEN;
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/peer.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/peer.h
|
|
||||||
@@ -14,6 +14,7 @@ struct ath11k_peer {
|
|
||||||
int peer_id;
|
|
||||||
u16 ast_hash;
|
|
||||||
u8 pdev_idx;
|
|
||||||
+ u16 hw_peer_id;
|
|
||||||
|
|
||||||
/* protected by ab->data_lock */
|
|
||||||
struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1];
|
|
||||||
@@ -31,7 +32,7 @@ struct ath11k_peer {
|
|
||||||
|
|
||||||
void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id);
|
|
||||||
void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id,
|
|
||||||
- u8 *mac_addr, u16 ast_hash);
|
|
||||||
+ u8 *mac_addr, u16 ast_hash, u16 hw_peer_id);
|
|
||||||
struct ath11k_peer *ath11k_peer_find(struct ath11k_base *ab, int vdev_id,
|
|
||||||
const u8 *addr);
|
|
||||||
struct ath11k_peer *ath11k_peer_find_by_addr(struct ath11k_base *ab,
|
|
@ -1,36 +0,0 @@
|
|||||||
From cf8480d338a1b9156121e5e035e6b9721db4332a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karthikeyan Periyasamy <periyasa@codeaurora.org>
|
|
||||||
Date: Mon, 11 Jan 2021 19:49:30 +0200
|
|
||||||
Subject: ath11k: remove duplicate function declaration
|
|
||||||
|
|
||||||
Removed the duplicated peer related function declaration
|
|
||||||
from core.h since those functions are already declared in peer.h
|
|
||||||
|
|
||||||
Founded in code review.
|
|
||||||
|
|
||||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1
|
|
||||||
|
|
||||||
Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
|
|
||||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/1608304793-20612-1-git-send-email-periyasa@codeaurora.org
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/core.h | 8 --------
|
|
||||||
1 file changed, 8 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
@@ -868,14 +868,6 @@ extern const struct service_to_pipe ath1
|
|
||||||
extern const struct ce_pipe_config ath11k_target_ce_config_wlan_qca6390[];
|
|
||||||
extern const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qca6390[];
|
|
||||||
|
|
||||||
-void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id);
|
|
||||||
-void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id,
|
|
||||||
- u8 *mac_addr, u16 ast_hash);
|
|
||||||
-struct ath11k_peer *ath11k_peer_find(struct ath11k_base *ab, int vdev_id,
|
|
||||||
- const u8 *addr);
|
|
||||||
-struct ath11k_peer *ath11k_peer_find_by_addr(struct ath11k_base *ab,
|
|
||||||
- const u8 *addr);
|
|
||||||
-struct ath11k_peer *ath11k_peer_find_by_id(struct ath11k_base *ab, int peer_id);
|
|
||||||
int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab);
|
|
||||||
int ath11k_core_pre_init(struct ath11k_base *ab);
|
|
||||||
int ath11k_core_init(struct ath11k_base *ath11k);
|
|
@ -1,38 +0,0 @@
|
|||||||
From fa7572c2cfe081dff82f884fa05f1b067d4beaaa Mon Sep 17 00:00:00 2001
|
|
||||||
From: Carl Huang <cjhuang@codeaurora.org>
|
|
||||||
Date: Fri, 6 Nov 2020 08:55:48 +0200
|
|
||||||
Subject: ath11k: fix ZERO address in probe request
|
|
||||||
|
|
||||||
Host needs to pass at least on bssid with all 0xff to firmware in
|
|
||||||
WMI_START_SCAN_CMDID, otherwise the bssid and receiver address
|
|
||||||
in probe requeste are all ZEROs.
|
|
||||||
|
|
||||||
This also fixed some hidden AP connection issue because some AP
|
|
||||||
doesn't respond to probe request which receiver address are all
|
|
||||||
ZEROs.
|
|
||||||
|
|
||||||
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
|
|
||||||
|
|
||||||
Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
|
|
||||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/20201012101733.24137-1-cjhuang@codeaurora.org
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/wmi.c | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
@@ -1946,6 +1946,11 @@ void ath11k_wmi_start_scan_init(struct a
|
|
||||||
WMI_SCAN_EVENT_DEQUEUED;
|
|
||||||
arg->scan_flags |= WMI_SCAN_CHAN_STAT_EVENT;
|
|
||||||
arg->num_bssid = 1;
|
|
||||||
+
|
|
||||||
+ /* fill bssid_list[0] with 0xff, otherwise bssid and RA will be
|
|
||||||
+ * ZEROs in probe request
|
|
||||||
+ */
|
|
||||||
+ eth_broadcast_addr(arg->bssid_list[0].addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
@ -1,31 +0,0 @@
|
|||||||
From 096b625fab8f9d88d9b436288a64b70080219d4b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lavanya Suresh <lavaks@codeaurora.org>
|
|
||||||
Date: Wed, 17 Feb 2021 11:45:45 +0200
|
|
||||||
Subject: ath11k: Fix sounding dimension config in HE cap
|
|
||||||
|
|
||||||
Number of Sounding dimensions config received from firmware for
|
|
||||||
bandwidth above 80MHz is cleared, and proper value is not set again.
|
|
||||||
So not resetting it to accept the config from firmware.
|
|
||||||
|
|
||||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01689-QCAHKSWPL_SILICONZ-1
|
|
||||||
|
|
||||||
Signed-off-by: Lavanya Suresh <lavaks@codeaurora.org>
|
|
||||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/1613460136-7170-1-git-send-email-lavaks@codeaurora.org
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/mac.c | 2 --
|
|
||||||
1 file changed, 2 deletions(-)
|
|
||||||
|
|
||||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -3744,8 +3744,6 @@ static int ath11k_mac_copy_he_cap(struct
|
|
||||||
|
|
||||||
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] |= ar->num_tx_chains - 1;
|
|
||||||
|
|
||||||
switch (i) {
|
|
@ -1,31 +0,0 @@
|
|||||||
From f277eb0500b4ee1cbe9db8615761f19b5a5520c9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sriram R <srirrama@codeaurora.org>
|
|
||||||
Date: Wed, 24 Feb 2021 14:32:41 +0530
|
|
||||||
Subject: ath11k: Update signal filled flag during sta_statistics drv op
|
|
||||||
|
|
||||||
Currently, though the peer rssi information is updated to station dump
|
|
||||||
from driver sta_statistics mac op, the info doesn't get updated
|
|
||||||
since the NL80211_STA_INFO_SIGNAL filled flag is not set in station
|
|
||||||
info. Hence update this flag while filling the rssi info.
|
|
||||||
|
|
||||||
Tested on: IPQ8074 WLAN.HK.2.1.0.1-01213-QCAHKSWPL_SILICONZ-1
|
|
||||||
|
|
||||||
Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|
||||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/20210224090241.3098-1-srirrama@codeaurora.org
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/mac.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
(limited to 'drivers/net/wireless/ath/ath11k')
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -5898,6 +5898,7 @@ static void ath11k_mac_op_sta_statistics
|
|
||||||
|
|
||||||
/* TODO: Use real NF instead of default one. */
|
|
||||||
sinfo->signal = arsta->rssi_comb + ATH11K_DEFAULT_NOISE_FLOOR;
|
|
||||||
+ sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct ieee80211_ops ath11k_ops = {
|
|
@ -1,143 +0,0 @@
|
|||||||
From patchwork Sun Apr 4 12:52:33 2021
|
|
||||||
Content-Type: text/plain; charset="utf-8"
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
||||||
X-Patchwork-Id: 12182277
|
|
||||||
X-Patchwork-Delegate: kvalo@adurom.com
|
|
||||||
Return-Path: <linux-wireless-owner@kernel.org>
|
|
||||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
|
||||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
|
||||||
X-Spam-Level:
|
|
||||||
X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED,
|
|
||||||
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH,
|
|
||||||
MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham
|
|
||||||
autolearn_force=no version=3.4.0
|
|
||||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
|
||||||
by smtp.lore.kernel.org (Postfix) with ESMTP id 2BB7BC433B4
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Sun, 4 Apr 2021 12:52:56 +0000 (UTC)
|
|
||||||
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
|
|
||||||
by mail.kernel.org (Postfix) with ESMTP id EE74761041
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Sun, 4 Apr 2021 12:52:55 +0000 (UTC)
|
|
||||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
|
||||||
id S229983AbhDDMw7 (ORCPT
|
|
||||||
<rfc822;linux-wireless@archiver.kernel.org>);
|
|
||||||
Sun, 4 Apr 2021 08:52:59 -0400
|
|
||||||
Received: from so254-9.mailgun.net ([198.61.254.9]:17051 "EHLO
|
|
||||||
so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
|
||||||
with ESMTP id S229483AbhDDMw6 (ORCPT
|
|
||||||
<rfc822;linux-wireless@vger.kernel.org>);
|
|
||||||
Sun, 4 Apr 2021 08:52:58 -0400
|
|
||||||
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org;
|
|
||||||
q=dns/txt;
|
|
||||||
s=smtp; t=1617540774; h=References: In-Reply-To: Message-Id: Date:
|
|
||||||
Subject: Cc: To: From: Sender;
|
|
||||||
bh=/GXnwqptt6p6CF8Ju3RWi0Vi/H9CAhjNh6c9swux4qw=;
|
|
||||||
b=tGeZoN0fcpg6Yz7zhTvx3F8v6K2l45+2zEn+LVCMOnofEU6UylvRzwgYQscWV2SyAdcdXAJl
|
|
||||||
YXfiqu86NFyKeSOy0HwUljtRSv5W0TsrnwrhcTPepD+mqig74O7HV9ApkX70bWbxQ5SFsEcs
|
|
||||||
Q8AizUlCnS3Z8p8yj23M+tyFRtg=
|
|
||||||
X-Mailgun-Sending-Ip: 198.61.254.9
|
|
||||||
X-Mailgun-Sid:
|
|
||||||
WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0=
|
|
||||||
Received: from smtp.codeaurora.org
|
|
||||||
(ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by
|
|
||||||
smtp-out-n01.prod.us-west-2.postgun.com with SMTP id
|
|
||||||
6069b69cf34440a9d4cbfce8 (version=TLS1.2,
|
|
||||||
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sun, 04 Apr 2021 12:52:44
|
|
||||||
GMT
|
|
||||||
Sender: pradeepc=codeaurora.org@mg.codeaurora.org
|
|
||||||
Received: by smtp.codeaurora.org (Postfix, from userid 1001)
|
|
||||||
id 26F3CC43462; Sun, 4 Apr 2021 12:52:44 +0000 (UTC)
|
|
||||||
Received: from pradeepc2-linux.qualcomm.com (i-global254.qualcomm.com
|
|
||||||
[199.106.103.254])
|
|
||||||
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
|
|
||||||
(No client certificate requested)
|
|
||||||
(Authenticated sender: pradeepc)
|
|
||||||
by smtp.codeaurora.org (Postfix) with ESMTPSA id B5E48C433C6;
|
|
||||||
Sun, 4 Apr 2021 12:52:42 +0000 (UTC)
|
|
||||||
DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B5E48C433C6
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
dmarc=none (p=none dis=none) header.from=codeaurora.org
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
spf=fail smtp.mailfrom=pradeepc@codeaurora.org
|
|
||||||
From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
||||||
To: ath11k@lists.infradead.org
|
|
||||||
Cc: linux-wireless@vger.kernel.org,
|
|
||||||
Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>,
|
|
||||||
Miles Hu <milehu@codeaurora.org>,
|
|
||||||
John Crispin <john@phrozen.org>
|
|
||||||
Subject: [PATCH v9 1/3] ath11k: switch to using ieee80211_tx_status_ext()
|
|
||||||
Date: Sun, 4 Apr 2021 05:52:33 -0700
|
|
||||||
Message-Id: <20210404125235.5589-2-pradeepc@codeaurora.org>
|
|
||||||
X-Mailer: git-send-email 2.17.1
|
|
||||||
In-Reply-To: <20210404125235.5589-1-pradeepc@codeaurora.org>
|
|
||||||
References: <20210404125235.5589-1-pradeepc@codeaurora.org>
|
|
||||||
Precedence: bulk
|
|
||||||
List-ID: <linux-wireless.vger.kernel.org>
|
|
||||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
|
||||||
|
|
||||||
This allows us to pass HE rates down into the stack.
|
|
||||||
|
|
||||||
Co-developed-by: Miles Hu <milehu@codeaurora.org>
|
|
||||||
Signed-off-by: Miles Hu <milehu@codeaurora.org>
|
|
||||||
Signed-off-by: John Crispin <john@phrozen.org>
|
|
||||||
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/dp_tx.c | 31 ++++++++++++++++++++-----
|
|
||||||
1 file changed, 25 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
index 8bba5234f81f..f0a2e87b2454 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
@@ -417,9 +417,13 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar,
|
|
||||||
struct sk_buff *msdu,
|
|
||||||
struct hal_tx_status *ts)
|
|
||||||
{
|
|
||||||
+ struct ieee80211_tx_status status = { 0 };
|
|
||||||
struct ath11k_base *ab = ar->ab;
|
|
||||||
struct ieee80211_tx_info *info;
|
|
||||||
struct ath11k_skb_cb *skb_cb;
|
|
||||||
+ struct ath11k_peer *peer;
|
|
||||||
+ struct ath11k_sta *arsta;
|
|
||||||
+ struct rate_info rate;
|
|
||||||
|
|
||||||
if (WARN_ON_ONCE(ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_TQM)) {
|
|
||||||
/* Must not happen */
|
|
||||||
@@ -483,13 +487,28 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar,
|
|
||||||
ath11k_dp_tx_cache_peer_stats(ar, msdu, ts);
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* NOTE: Tx rate status reporting. Tx completion status does not have
|
|
||||||
- * necessary information (for example nss) to build the tx rate.
|
|
||||||
- * Might end up reporting it out-of-band from HTT stats.
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
- ieee80211_tx_status(ar->hw, msdu);
|
|
||||||
+ spin_lock_bh(&ab->base_lock);
|
|
||||||
+ peer = ath11k_peer_find_by_id(ab, ts->peer_id);
|
|
||||||
+ if (!peer || !peer->sta) {
|
|
||||||
+ ath11k_dbg(ab, ATH11K_DBG_DATA,
|
|
||||||
+ "dp_tx: failed to find the peer with peer_id %d\n",
|
|
||||||
+ ts->peer_id);
|
|
||||||
+ spin_unlock_bh(&ab->base_lock);
|
|
||||||
+ dev_kfree_skb_any(msdu);
|
|
||||||
+ goto exit;
|
|
||||||
+ }
|
|
||||||
+ arsta = (struct ath11k_sta *)peer->sta->drv_priv;
|
|
||||||
+ status.sta = peer->sta;
|
|
||||||
+ status.skb = msdu;
|
|
||||||
+ status.info = info;
|
|
||||||
+ rate = arsta->last_txrate;
|
|
||||||
+ status.rate = &rate;
|
|
||||||
+
|
|
||||||
+ spin_unlock_bh(&ab->base_lock);
|
|
||||||
+ rcu_read_unlock();
|
|
||||||
|
|
||||||
+ ieee80211_tx_status_ext(ar->hw, &status);
|
|
||||||
+ return;
|
|
||||||
exit:
|
|
||||||
rcu_read_unlock();
|
|
||||||
}
|
|
@ -1,496 +0,0 @@
|
|||||||
From patchwork Sun Apr 4 12:52:34 2021
|
|
||||||
Content-Type: text/plain; charset="utf-8"
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
||||||
X-Patchwork-Id: 12182281
|
|
||||||
X-Patchwork-Delegate: kvalo@adurom.com
|
|
||||||
Return-Path: <linux-wireless-owner@kernel.org>
|
|
||||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
|
||||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
|
||||||
X-Spam-Level:
|
|
||||||
X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED,
|
|
||||||
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH,
|
|
||||||
MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham
|
|
||||||
autolearn_force=no version=3.4.0
|
|
||||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
|
||||||
by smtp.lore.kernel.org (Postfix) with ESMTP id E3203C433B4
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Sun, 4 Apr 2021 12:53:09 +0000 (UTC)
|
|
||||||
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
|
|
||||||
by mail.kernel.org (Postfix) with ESMTP id AE37B611CC
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Sun, 4 Apr 2021 12:53:09 +0000 (UTC)
|
|
||||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
|
||||||
id S230377AbhDDMxH (ORCPT
|
|
||||||
<rfc822;linux-wireless@archiver.kernel.org>);
|
|
||||||
Sun, 4 Apr 2021 08:53:07 -0400
|
|
||||||
Received: from so254-9.mailgun.net ([198.61.254.9]:62724 "EHLO
|
|
||||||
so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
|
||||||
with ESMTP id S230214AbhDDMxG (ORCPT
|
|
||||||
<rfc822;linux-wireless@vger.kernel.org>);
|
|
||||||
Sun, 4 Apr 2021 08:53:06 -0400
|
|
||||||
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org;
|
|
||||||
q=dns/txt;
|
|
||||||
s=smtp; t=1617540782; h=References: In-Reply-To: Message-Id: Date:
|
|
||||||
Subject: Cc: To: From: Sender;
|
|
||||||
bh=52aLQBi4pTxsSaRgMTF2reTfBgzIt+ifJ5UPtdC+HEc=;
|
|
||||||
b=HJAZiJ/uoeNzd/a5ksLJBM18zUZq5nyjVMEjYLaiuAUii2puX7B0nY9FcKPXUzbsbN+NnxUq
|
|
||||||
p11ACR8WmoIFXL6m+jCP7UOrP/bhPO3tFWq1VTNUn5V7p/CA85dBhrPxy8SBAmZqiGk9KiSX
|
|
||||||
DvEjrVEM57Ob9lvFR0y7IIUgs8Q=
|
|
||||||
X-Mailgun-Sending-Ip: 198.61.254.9
|
|
||||||
X-Mailgun-Sid:
|
|
||||||
WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0=
|
|
||||||
Received: from smtp.codeaurora.org
|
|
||||||
(ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by
|
|
||||||
smtp-out-n06.prod.us-west-2.postgun.com with SMTP id
|
|
||||||
6069b69cfebcffa80f0a68f4 (version=TLS1.2,
|
|
||||||
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sun, 04 Apr 2021 12:52:44
|
|
||||||
GMT
|
|
||||||
Sender: pradeepc=codeaurora.org@mg.codeaurora.org
|
|
||||||
Received: by smtp.codeaurora.org (Postfix, from userid 1001)
|
|
||||||
id DB600C433C6; Sun, 4 Apr 2021 12:52:44 +0000 (UTC)
|
|
||||||
Received: from pradeepc2-linux.qualcomm.com (i-global254.qualcomm.com
|
|
||||||
[199.106.103.254])
|
|
||||||
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
|
|
||||||
(No client certificate requested)
|
|
||||||
(Authenticated sender: pradeepc)
|
|
||||||
by smtp.codeaurora.org (Postfix) with ESMTPSA id 69338C433CA;
|
|
||||||
Sun, 4 Apr 2021 12:52:43 +0000 (UTC)
|
|
||||||
DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 69338C433CA
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
dmarc=none (p=none dis=none) header.from=codeaurora.org
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
spf=fail smtp.mailfrom=pradeepc@codeaurora.org
|
|
||||||
From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
||||||
To: ath11k@lists.infradead.org
|
|
||||||
Cc: linux-wireless@vger.kernel.org,
|
|
||||||
Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>,
|
|
||||||
Miles Hu <milehu@codeaurora.org>
|
|
||||||
Subject: [PATCH v9 2/3] ath11k: decode HE status tlv
|
|
||||||
Date: Sun, 4 Apr 2021 05:52:34 -0700
|
|
||||||
Message-Id: <20210404125235.5589-3-pradeepc@codeaurora.org>
|
|
||||||
X-Mailer: git-send-email 2.17.1
|
|
||||||
In-Reply-To: <20210404125235.5589-1-pradeepc@codeaurora.org>
|
|
||||||
References: <20210404125235.5589-1-pradeepc@codeaurora.org>
|
|
||||||
Precedence: bulk
|
|
||||||
List-ID: <linux-wireless.vger.kernel.org>
|
|
||||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
|
||||||
|
|
||||||
Add new bitmasks and macro definitions required for parsing HE
|
|
||||||
status tlvs. Decode HE status tlvs, which will used in dumping
|
|
||||||
ppdu stats as well as updating radiotap headers.
|
|
||||||
|
|
||||||
Co-developed-by: Miles Hu <milehu@codeaurora.org>
|
|
||||||
Signed-off-by: Miles Hu <milehu@codeaurora.org>
|
|
||||||
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/dp_rx.c | 99 ++++++++++++---
|
|
||||||
drivers/net/wireless/ath/ath11k/hal_desc.h | 1 +
|
|
||||||
drivers/net/wireless/ath/ath11k/hal_rx.h | 135 ++++++++++++++++++++-
|
|
||||||
3 files changed, 214 insertions(+), 21 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
||||||
@@ -2362,7 +2362,7 @@ static void ath11k_dp_rx_deliver_msdu(st
|
|
||||||
char tid[32];
|
|
||||||
|
|
||||||
status = IEEE80211_SKB_RXCB(msdu);
|
|
||||||
- if (status->encoding == RX_ENC_HE) {
|
|
||||||
+ if (status->encoding == RX_ENC_HE && !(status->flag & RX_FLAG_RADIOTAP_HE)) {
|
|
||||||
he = skb_push(msdu, sizeof(known));
|
|
||||||
memcpy(he, &known, sizeof(known));
|
|
||||||
status->flag |= RX_FLAG_RADIOTAP_HE;
|
|
||||||
@@ -4692,7 +4692,7 @@ ath11k_dp_rx_mon_merg_msdus(struct ath11
|
|
||||||
struct ieee80211_rx_status *rxs)
|
|
||||||
{
|
|
||||||
struct sk_buff *msdu, *mpdu_buf, *prev_buf;
|
|
||||||
- u32 decap_format, wifi_hdr_len;
|
|
||||||
+ u32 decap_format;
|
|
||||||
struct hal_rx_desc *rx_desc;
|
|
||||||
char *hdr_desc;
|
|
||||||
u8 *dest;
|
|
||||||
@@ -4729,38 +4729,27 @@ ath11k_dp_rx_mon_merg_msdus(struct ath11
|
|
||||||
|
|
||||||
skb_trim(prev_buf, prev_buf->len - HAL_RX_FCS_LEN);
|
|
||||||
} else if (decap_format == DP_RX_DECAP_TYPE_NATIVE_WIFI) {
|
|
||||||
- __le16 qos_field;
|
|
||||||
u8 qos_pkt = 0;
|
|
||||||
|
|
||||||
rx_desc = (struct hal_rx_desc *)head_msdu->data;
|
|
||||||
hdr_desc = ath11k_dp_rxdesc_get_80211hdr(rx_desc);
|
|
||||||
|
|
||||||
/* Base size */
|
|
||||||
- wifi_hdr_len = sizeof(struct ieee80211_hdr_3addr);
|
|
||||||
wh = (struct ieee80211_hdr_3addr *)hdr_desc;
|
|
||||||
|
|
||||||
if (ieee80211_is_data_qos(wh->frame_control)) {
|
|
||||||
- struct ieee80211_qos_hdr *qwh =
|
|
||||||
- (struct ieee80211_qos_hdr *)hdr_desc;
|
|
||||||
-
|
|
||||||
- qos_field = qwh->qos_ctrl;
|
|
||||||
qos_pkt = 1;
|
|
||||||
}
|
|
||||||
msdu = head_msdu;
|
|
||||||
|
|
||||||
while (msdu) {
|
|
||||||
- rx_desc = (struct hal_rx_desc *)msdu->data;
|
|
||||||
- hdr_desc = ath11k_dp_rxdesc_get_80211hdr(rx_desc);
|
|
||||||
-
|
|
||||||
+ ath11k_dp_rx_msdus_set_payload(msdu);
|
|
||||||
if (qos_pkt) {
|
|
||||||
dest = skb_push(msdu, sizeof(__le16));
|
|
||||||
if (!dest)
|
|
||||||
goto err_merge_fail;
|
|
||||||
- memcpy(dest, hdr_desc, wifi_hdr_len);
|
|
||||||
- memcpy(dest + wifi_hdr_len,
|
|
||||||
- (u8 *)&qos_field, sizeof(__le16));
|
|
||||||
+ memcpy(dest, hdr_desc, sizeof(struct ieee80211_qos_hdr));
|
|
||||||
}
|
|
||||||
- ath11k_dp_rx_msdus_set_payload(msdu);
|
|
||||||
prev_buf = msdu;
|
|
||||||
msdu = msdu->next;
|
|
||||||
}
|
|
||||||
@@ -4790,8 +4779,83 @@ err_merge_fail:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+ath11k_dp_rx_update_radiotap_he(struct hal_rx_mon_ppdu_info *rx_status,
|
|
||||||
+ u8 *rtap_buf)
|
|
||||||
+{
|
|
||||||
+ u32 rtap_len = 0;
|
|
||||||
+
|
|
||||||
+ put_unaligned_le16(rx_status->he_data1, &rtap_buf[rtap_len]);
|
|
||||||
+ rtap_len += 2;
|
|
||||||
+
|
|
||||||
+ put_unaligned_le16(rx_status->he_data2, &rtap_buf[rtap_len]);
|
|
||||||
+ rtap_len += 2;
|
|
||||||
+
|
|
||||||
+ put_unaligned_le16(rx_status->he_data3, &rtap_buf[rtap_len]);
|
|
||||||
+ rtap_len += 2;
|
|
||||||
+
|
|
||||||
+ put_unaligned_le16(rx_status->he_data4, &rtap_buf[rtap_len]);
|
|
||||||
+ rtap_len += 2;
|
|
||||||
+
|
|
||||||
+ put_unaligned_le16(rx_status->he_data5, &rtap_buf[rtap_len]);
|
|
||||||
+ rtap_len += 2;
|
|
||||||
+
|
|
||||||
+ put_unaligned_le16(rx_status->he_data6, &rtap_buf[rtap_len]);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+ath11k_dp_rx_update_radiotap_he_mu(struct hal_rx_mon_ppdu_info *rx_status,
|
|
||||||
+ u8 *rtap_buf)
|
|
||||||
+{
|
|
||||||
+ u32 rtap_len = 0;
|
|
||||||
+
|
|
||||||
+ put_unaligned_le16(rx_status->he_flags1, &rtap_buf[rtap_len]);
|
|
||||||
+ rtap_len += 2;
|
|
||||||
+
|
|
||||||
+ put_unaligned_le16(rx_status->he_flags2, &rtap_buf[rtap_len]);
|
|
||||||
+ rtap_len += 2;
|
|
||||||
+
|
|
||||||
+ rtap_buf[rtap_len] = rx_status->he_RU[0];
|
|
||||||
+ rtap_len += 1;
|
|
||||||
+
|
|
||||||
+ rtap_buf[rtap_len] = rx_status->he_RU[1];
|
|
||||||
+ rtap_len += 1;
|
|
||||||
+
|
|
||||||
+ rtap_buf[rtap_len] = rx_status->he_RU[2];
|
|
||||||
+ rtap_len += 1;
|
|
||||||
+
|
|
||||||
+ rtap_buf[rtap_len] = rx_status->he_RU[3];
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void ath11k_update_radiotap(struct hal_rx_mon_ppdu_info *ppduinfo,
|
|
||||||
+ struct sk_buff *mon_skb,
|
|
||||||
+ struct ieee80211_rx_status *rxs)
|
|
||||||
+{
|
|
||||||
+ u8 *ptr = NULL;
|
|
||||||
+
|
|
||||||
+ if (ppduinfo->he_mu_flags) {
|
|
||||||
+ rxs->flag |= RX_FLAG_RADIOTAP_HE_MU;
|
|
||||||
+ rxs->encoding = RX_ENC_HE;
|
|
||||||
+ ptr = skb_push(mon_skb, sizeof(struct ieee80211_radiotap_he_mu));
|
|
||||||
+ ath11k_dp_rx_update_radiotap_he_mu(ppduinfo, ptr);
|
|
||||||
+ }
|
|
||||||
+ if (ppduinfo->he_flags) {
|
|
||||||
+ rxs->flag |= RX_FLAG_RADIOTAP_HE;
|
|
||||||
+ rxs->encoding = RX_ENC_HE;
|
|
||||||
+ ptr = skb_push(mon_skb, sizeof(struct ieee80211_radiotap_he));
|
|
||||||
+ ath11k_dp_rx_update_radiotap_he(ppduinfo, ptr);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ rxs->flag |= RX_FLAG_MACTIME_START;
|
|
||||||
+ rxs->signal = ppduinfo->rssi_comb + ATH11K_DEFAULT_NOISE_FLOOR;
|
|
||||||
+ rxs->nss = ppduinfo->nss;
|
|
||||||
+
|
|
||||||
+ rxs->mactime = ppduinfo->tsft;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int ath11k_dp_rx_mon_deliver(struct ath11k *ar, u32 mac_id,
|
|
||||||
struct sk_buff *head_msdu,
|
|
||||||
+ struct hal_rx_mon_ppdu_info *ppduinfo,
|
|
||||||
struct sk_buff *tail_msdu,
|
|
||||||
struct napi_struct *napi)
|
|
||||||
{
|
|
||||||
@@ -4821,8 +4885,7 @@ static int ath11k_dp_rx_mon_deliver(stru
|
|
||||||
} else {
|
|
||||||
rxs->flag |= RX_FLAG_ALLOW_SAME_PN;
|
|
||||||
}
|
|
||||||
- rxs->flag |= RX_FLAG_ONLY_MONITOR;
|
|
||||||
-
|
|
||||||
+ ath11k_update_radiotap(ppduinfo, mon_skb, rxs);
|
|
||||||
status = IEEE80211_SKB_RXCB(mon_skb);
|
|
||||||
*status = *rxs;
|
|
||||||
|
|
||||||
@@ -4898,6 +4961,7 @@ static void ath11k_dp_rx_mon_dest_proces
|
|
||||||
}
|
|
||||||
if (head_msdu && tail_msdu) {
|
|
||||||
ath11k_dp_rx_mon_deliver(ar, dp->mac_id, head_msdu,
|
|
||||||
+ &pmon->mon_ppdu_info,
|
|
||||||
tail_msdu, napi);
|
|
||||||
rx_mon_stats->dest_mpdu_done++;
|
|
||||||
}
|
|
||||||
@@ -4944,6 +5008,8 @@ static void ath11k_dp_rx_mon_status_proc
|
|
||||||
while (!skb_queue_empty(&pmon->rx_status_q)) {
|
|
||||||
status_skb = skb_dequeue(&pmon->rx_status_q);
|
|
||||||
|
|
||||||
+ memset(ppdu_info, 0, sizeof(struct hal_rx_mon_ppdu_info));
|
|
||||||
+
|
|
||||||
tlv_status = ath11k_hal_rx_parse_mon_status(ar->ab, ppdu_info,
|
|
||||||
status_skb);
|
|
||||||
if (tlv_status == HAL_TLV_STATUS_PPDU_DONE) {
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/hal_desc.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/hal_desc.h
|
|
||||||
@@ -474,6 +474,7 @@ enum hal_tlv_tag {
|
|
||||||
|
|
||||||
#define HAL_TLV_HDR_TAG GENMASK(9, 1)
|
|
||||||
#define HAL_TLV_HDR_LEN GENMASK(25, 10)
|
|
||||||
+#define HAL_TLV_USR_ID GENMASK(31, 26)
|
|
||||||
|
|
||||||
#define HAL_TLV_ALIGN 4
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/hal_rx.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.h
|
|
||||||
@@ -77,6 +77,36 @@ enum hal_rx_mon_status {
|
|
||||||
HAL_RX_MON_STATUS_BUF_DONE,
|
|
||||||
};
|
|
||||||
|
|
||||||
+struct hal_rx_user_status {
|
|
||||||
+ u32 mcs:4,
|
|
||||||
+ nss:3,
|
|
||||||
+ ofdma_info_valid:1,
|
|
||||||
+ dl_ofdma_ru_start_index:7,
|
|
||||||
+ dl_ofdma_ru_width:7,
|
|
||||||
+ dl_ofdma_ru_size:8;
|
|
||||||
+ u32 ul_ofdma_user_v0_word0;
|
|
||||||
+ u32 ul_ofdma_user_v0_word1;
|
|
||||||
+ u32 ast_index;
|
|
||||||
+ u32 tid;
|
|
||||||
+ u16 tcp_msdu_count;
|
|
||||||
+ u16 udp_msdu_count;
|
|
||||||
+ u16 other_msdu_count;
|
|
||||||
+ u16 frame_control;
|
|
||||||
+ u8 frame_control_info_valid;
|
|
||||||
+ u8 data_sequence_control_info_valid;
|
|
||||||
+ u16 first_data_seq_ctrl;
|
|
||||||
+ u32 preamble_type;
|
|
||||||
+ u16 ht_flags;
|
|
||||||
+ u16 vht_flags;
|
|
||||||
+ u16 he_flags;
|
|
||||||
+ u8 rs_flags;
|
|
||||||
+ u32 mpdu_cnt_fcs_ok;
|
|
||||||
+ u32 mpdu_cnt_fcs_err;
|
|
||||||
+ u32 mpdu_fcs_ok_bitmap[8];
|
|
||||||
+ u32 mpdu_ok_byte_count;
|
|
||||||
+ u32 mpdu_err_byte_count;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
struct hal_rx_mon_ppdu_info {
|
|
||||||
u32 ppdu_id;
|
|
||||||
u32 ppdu_ts;
|
|
||||||
@@ -93,16 +123,58 @@ struct hal_rx_mon_ppdu_info {
|
|
||||||
u8 mcs;
|
|
||||||
u8 nss;
|
|
||||||
u8 bw;
|
|
||||||
+ u8 vht_flag_values1;
|
|
||||||
+ u8 vht_flag_values2;
|
|
||||||
+ u8 vht_flag_values3[4];
|
|
||||||
+ u8 vht_flag_values4;
|
|
||||||
+ u8 vht_flag_values5;
|
|
||||||
+ u16 vht_flag_values6;
|
|
||||||
u8 is_stbc;
|
|
||||||
u8 gi;
|
|
||||||
u8 ldpc;
|
|
||||||
u8 beamformed;
|
|
||||||
u8 rssi_comb;
|
|
||||||
u8 tid;
|
|
||||||
+ u16 ht_flags;
|
|
||||||
+ u16 vht_flags;
|
|
||||||
+ u16 he_flags;
|
|
||||||
+ u16 he_mu_flags;
|
|
||||||
u8 dcm;
|
|
||||||
u8 ru_alloc;
|
|
||||||
u8 reception_type;
|
|
||||||
+ u64 tsft;
|
|
||||||
u64 rx_duration;
|
|
||||||
+ u16 frame_control;
|
|
||||||
+ u32 ast_index;
|
|
||||||
+ u8 rs_fcs_err;
|
|
||||||
+ u8 rs_flags;
|
|
||||||
+ u8 cck_flag;
|
|
||||||
+ u8 ofdm_flag;
|
|
||||||
+ u8 ulofdma_flag;
|
|
||||||
+ u8 frame_control_info_valid;
|
|
||||||
+ u16 he_per_user_1;
|
|
||||||
+ u16 he_per_user_2;
|
|
||||||
+ u8 he_per_user_position;
|
|
||||||
+ u8 he_per_user_known;
|
|
||||||
+ u16 he_flags1;
|
|
||||||
+ u16 he_flags2;
|
|
||||||
+ u8 he_RU[4];
|
|
||||||
+ u16 he_data1;
|
|
||||||
+ u16 he_data2;
|
|
||||||
+ u16 he_data3;
|
|
||||||
+ u16 he_data4;
|
|
||||||
+ u16 he_data5;
|
|
||||||
+ u16 he_data6;
|
|
||||||
+ u32 ppdu_len;
|
|
||||||
+ u32 prev_ppdu_id;
|
|
||||||
+ u32 device_id;
|
|
||||||
+ u16 first_data_seq_ctrl;
|
|
||||||
+ u8 monitor_direct_used;
|
|
||||||
+ u8 data_sequence_control_info_valid;
|
|
||||||
+ u8 ltf_size;
|
|
||||||
+ u8 rxpcu_filter_pass;
|
|
||||||
+ char rssi_chain[8][8];
|
|
||||||
+ struct hal_rx_user_status userstats;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define HAL_RX_PPDU_START_INFO0_PPDU_ID GENMASK(15, 0)
|
|
||||||
@@ -135,6 +207,9 @@ struct hal_rx_ppdu_start {
|
|
||||||
#define HAL_RX_PPDU_END_USER_STATS_INFO6_TID_BITMAP GENMASK(15, 0)
|
|
||||||
#define HAL_RX_PPDU_END_USER_STATS_INFO6_TID_EOSP_BITMAP GENMASK(31, 16)
|
|
||||||
|
|
||||||
+#define HAL_RX_PPDU_END_USER_STATS_RSVD2_6_MPDU_OK_BYTE_COUNT GENMASK(24, 0)
|
|
||||||
+#define HAL_RX_PPDU_END_USER_STATS_RSVD2_8_MPDU_ERR_BYTE_COUNT GENMASK(24, 0)
|
|
||||||
+
|
|
||||||
struct hal_rx_ppdu_end_user_stats {
|
|
||||||
__le32 rsvd0[2];
|
|
||||||
__le32 info0;
|
|
||||||
@@ -149,6 +224,16 @@ struct hal_rx_ppdu_end_user_stats {
|
|
||||||
__le32 rsvd2[11];
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
+struct hal_rx_ppdu_end_user_stats_ext {
|
|
||||||
+ u32 info0;
|
|
||||||
+ u32 info1;
|
|
||||||
+ u32 info2;
|
|
||||||
+ u32 info3;
|
|
||||||
+ u32 info4;
|
|
||||||
+ u32 info5;
|
|
||||||
+ u32 info6;
|
|
||||||
+} __packed;
|
|
||||||
+
|
|
||||||
#define HAL_RX_HT_SIG_INFO_INFO0_MCS GENMASK(6, 0)
|
|
||||||
#define HAL_RX_HT_SIG_INFO_INFO0_BW BIT(7)
|
|
||||||
|
|
||||||
@@ -197,25 +282,62 @@ enum hal_rx_vht_sig_a_gi_setting {
|
|
||||||
HAL_RX_VHT_SIG_A_SHORT_GI_AMBIGUITY = 3,
|
|
||||||
};
|
|
||||||
|
|
||||||
+#define HAL_RX_SU_MU_CODING_LDPC 0x01
|
|
||||||
+
|
|
||||||
+#define HE_GI_0_8 0
|
|
||||||
+#define HE_GI_0_4 1
|
|
||||||
+#define HE_GI_1_6 2
|
|
||||||
+#define HE_GI_3_2 3
|
|
||||||
+
|
|
||||||
+#define HE_LTF_1_X 0
|
|
||||||
+#define HE_LTF_2_X 1
|
|
||||||
+#define HE_LTF_4_X 2
|
|
||||||
+#define HE_LTF_UNKNOWN 3
|
|
||||||
+
|
|
||||||
#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_MCS GENMASK(6, 3)
|
|
||||||
#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_DCM BIT(7)
|
|
||||||
#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_BW GENMASK(20, 19)
|
|
||||||
#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_CP_LTF_SIZE GENMASK(22, 21)
|
|
||||||
#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_NSTS GENMASK(25, 23)
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_BSS_COLOR GENMASK(13, 8)
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_SPATIAL_REUSE GENMASK(18, 15)
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_FORMAT_IND BIT(0)
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_BEAM_CHANGE BIT(1)
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_DL_UL_FLAG BIT(2)
|
|
||||||
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO1_TXOP_DURATION GENMASK(6, 0)
|
|
||||||
#define HAL_RX_HE_SIG_A_SU_INFO_INFO1_CODING BIT(7)
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO1_LDPC_EXTRA BIT(8)
|
|
||||||
#define HAL_RX_HE_SIG_A_SU_INFO_INFO1_STBC BIT(9)
|
|
||||||
#define HAL_RX_HE_SIG_A_SU_INFO_INFO1_TXBF BIT(10)
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO1_PKT_EXT_FACTOR GENMASK(12, 11)
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO1_PKT_EXT_PE_DISAM BIT(13)
|
|
||||||
+#define HAL_RX_HE_SIG_A_SU_INFO_INFO1_DOPPLER_IND BIT(15)
|
|
||||||
|
|
||||||
struct hal_rx_he_sig_a_su_info {
|
|
||||||
__le32 info0;
|
|
||||||
__le32 info1;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
-#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_TRANSMIT_BW GENMASK(17, 15)
|
|
||||||
-#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_CP_LTF_SIZE GENMASK(24, 23)
|
|
||||||
-
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_UL_FLAG BIT(1)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_MCS_OF_SIGB GENMASK(3, 1)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_DCM_OF_SIGB BIT(4)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_BSS_COLOR GENMASK(10, 5)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_SPATIAL_REUSE GENMASK(14, 11)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_TRANSMIT_BW GENMASK(17, 15)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_NUM_SIGB_SYMB GENMASK(21, 18)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_COMP_MODE_SIGB BIT(22)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_CP_LTF_SIZE GENMASK(24, 23)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_DOPPLER_INDICATION BIT(25)
|
|
||||||
+
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_TXOP_DURATION GENMASK(6, 0)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_CODING BIT(7)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_NUM_LTF_SYMB GENMASK(10, 8)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_LDPC_EXTRA BIT(11)
|
|
||||||
#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_STBC BIT(12)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_TXBF BIT(10)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_PKT_EXT_FACTOR GENMASK(14, 13)
|
|
||||||
+#define HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_PKT_EXT_PE_DISAM BIT(15)
|
|
||||||
|
|
||||||
struct hal_rx_he_sig_a_mu_dl_info {
|
|
||||||
__le32 info0;
|
|
||||||
@@ -228,6 +350,7 @@ struct hal_rx_he_sig_b1_mu_info {
|
|
||||||
__le32 info0;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
+#define HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_ID GENMASK(10, 0)
|
|
||||||
#define HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_MCS GENMASK(18, 15)
|
|
||||||
#define HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_CODING BIT(20)
|
|
||||||
#define HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_NSTS GENMASK(31, 29)
|
|
||||||
@@ -236,6 +359,7 @@ struct hal_rx_he_sig_b2_mu_info {
|
|
||||||
__le32 info0;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
+#define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_ID GENMASK(10, 0)
|
|
||||||
#define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_NSTS GENMASK(13, 11)
|
|
||||||
#define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_TXBF BIT(19)
|
|
||||||
#define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_MCS GENMASK(18, 15)
|
|
||||||
@@ -254,10 +378,13 @@ struct hal_rx_phyrx_rssi_legacy_info {
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
#define HAL_RX_MPDU_INFO_INFO0_PEERID GENMASK(31, 16)
|
|
||||||
+#define HAL_RX_MPDU_INFO_INFO1_MPDU_LEN GENMASK(13, 0)
|
|
||||||
struct hal_rx_mpdu_info {
|
|
||||||
__le32 rsvd0;
|
|
||||||
__le32 info0;
|
|
||||||
- __le32 rsvd1[21];
|
|
||||||
+ __le32 rsvd1[11];
|
|
||||||
+ __le32 info1;
|
|
||||||
+ __le32 rsvd2[9];
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
#define HAL_RX_PPDU_END_DURATION GENMASK(23, 0)
|
|
@ -1,47 +0,0 @@
|
|||||||
From c8bcd82a4efd053cdd5ce515a8b0003011a5f756 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kees Cook <keescook@chromium.org>
|
|
||||||
Date: Wed, 16 Jun 2021 12:54:10 -0700
|
|
||||||
Subject: [PATCH] ath11k: Avoid memcpy() over-reading of he_cap
|
|
||||||
|
|
||||||
In preparation for FORTIFY_SOURCE performing compile-time and run-time
|
|
||||||
field bounds checking for memcpy(), memmove(), and memset(), avoid
|
|
||||||
intentionally writing across neighboring array fields.
|
|
||||||
|
|
||||||
Since peer_he_cap_{mac,phy}info and he_cap_elem.{mac,phy}_cap_info are not
|
|
||||||
the same sizes, memcpy() was reading beyond field boundaries. Instead,
|
|
||||||
correctly cap the copy length and pad out any difference in size
|
|
||||||
(peer_he_cap_macinfo is 8 bytes whereas mac_cap_info is 6, and
|
|
||||||
peer_he_cap_phyinfo is 12 bytes whereas phy_cap_info is 11).
|
|
||||||
|
|
||||||
Signed-off-by: Kees Cook <keescook@chromium.org>
|
|
||||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/20210616195410.1232119-1-keescook@chromium.org
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/mac.c | 14 ++++++++++----
|
|
||||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
index eb52332dbe3f13..e9b3689331ec2a 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -1314,10 +1314,16 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
|
|
||||||
|
|
||||||
arg->he_flag = true;
|
|
||||||
|
|
||||||
- memcpy(&arg->peer_he_cap_macinfo, he_cap->he_cap_elem.mac_cap_info,
|
|
||||||
- sizeof(arg->peer_he_cap_macinfo));
|
|
||||||
- memcpy(&arg->peer_he_cap_phyinfo, he_cap->he_cap_elem.phy_cap_info,
|
|
||||||
- sizeof(arg->peer_he_cap_phyinfo));
|
|
||||||
+ memcpy_and_pad(&arg->peer_he_cap_macinfo,
|
|
||||||
+ sizeof(arg->peer_he_cap_macinfo),
|
|
||||||
+ he_cap->he_cap_elem.mac_cap_info,
|
|
||||||
+ sizeof(he_cap->he_cap_elem.mac_cap_info),
|
|
||||||
+ 0);
|
|
||||||
+ memcpy_and_pad(&arg->peer_he_cap_phyinfo,
|
|
||||||
+ sizeof(arg->peer_he_cap_phyinfo),
|
|
||||||
+ he_cap->he_cap_elem.phy_cap_info,
|
|
||||||
+ sizeof(he_cap->he_cap_elem.phy_cap_info),
|
|
||||||
+ 0);
|
|
||||||
arg->peer_he_ops = vif->bss_conf.he_oper.params;
|
|
||||||
|
|
||||||
/* the top most byte is used to indicate BSS color info */
|
|
@ -1,758 +0,0 @@
|
|||||||
From patchwork Sun Apr 4 12:52:35 2021
|
|
||||||
Content-Type: text/plain; charset="utf-8"
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
||||||
X-Patchwork-Id: 12182279
|
|
||||||
X-Patchwork-Delegate: kvalo@adurom.com
|
|
||||||
Return-Path: <linux-wireless-owner@kernel.org>
|
|
||||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
|
||||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
|
||||||
X-Spam-Level:
|
|
||||||
X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED,
|
|
||||||
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH,
|
|
||||||
MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham
|
|
||||||
autolearn_force=no version=3.4.0
|
|
||||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
|
||||||
by smtp.lore.kernel.org (Postfix) with ESMTP id 8410EC433ED
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Sun, 4 Apr 2021 12:53:04 +0000 (UTC)
|
|
||||||
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
|
|
||||||
by mail.kernel.org (Postfix) with ESMTP id 4BABB611CC
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Sun, 4 Apr 2021 12:53:04 +0000 (UTC)
|
|
||||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
|
||||||
id S230472AbhDDMxH (ORCPT
|
|
||||||
<rfc822;linux-wireless@archiver.kernel.org>);
|
|
||||||
Sun, 4 Apr 2021 08:53:07 -0400
|
|
||||||
Received: from so254-9.mailgun.net ([198.61.254.9]:17051 "EHLO
|
|
||||||
so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
|
||||||
with ESMTP id S229483AbhDDMxG (ORCPT
|
|
||||||
<rfc822;linux-wireless@vger.kernel.org>);
|
|
||||||
Sun, 4 Apr 2021 08:53:06 -0400
|
|
||||||
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org;
|
|
||||||
q=dns/txt;
|
|
||||||
s=smtp; t=1617540782; h=References: In-Reply-To: Message-Id: Date:
|
|
||||||
Subject: Cc: To: From: Sender;
|
|
||||||
bh=cf2p38bfxo2Bcdc6lgC2IKZtwOAHsfGlcvwXCZgQWzk=;
|
|
||||||
b=Sv8xfHpbgoNmqYa0Wo4q3Dx9AdLgN2RlBTUHjzr4KfEuknxPgl1UgNdmvr7VmkMZfPrnncn+
|
|
||||||
y2QGaP3tiRW9RZaF3Qr1zKVnrxE2CCunAgtKxIMp2sZ9mRsdwa77nviXwcMeNAmnznwlwVKo
|
|
||||||
M0hpKCEJlbttKHWPYwwEyyeSX40=
|
|
||||||
X-Mailgun-Sending-Ip: 198.61.254.9
|
|
||||||
X-Mailgun-Sid:
|
|
||||||
WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0=
|
|
||||||
Received: from smtp.codeaurora.org
|
|
||||||
(ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by
|
|
||||||
smtp-out-n05.prod.us-east-1.postgun.com with SMTP id
|
|
||||||
6069b69e8166b7eff749171e (version=TLS1.2,
|
|
||||||
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sun, 04 Apr 2021 12:52:46
|
|
||||||
GMT
|
|
||||||
Sender: pradeepc=codeaurora.org@mg.codeaurora.org
|
|
||||||
Received: by smtp.codeaurora.org (Postfix, from userid 1001)
|
|
||||||
id 9ED2CC43462; Sun, 4 Apr 2021 12:52:45 +0000 (UTC)
|
|
||||||
Received: from pradeepc2-linux.qualcomm.com (i-global254.qualcomm.com
|
|
||||||
[199.106.103.254])
|
|
||||||
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
|
|
||||||
(No client certificate requested)
|
|
||||||
(Authenticated sender: pradeepc)
|
|
||||||
by smtp.codeaurora.org (Postfix) with ESMTPSA id 046B9C43461;
|
|
||||||
Sun, 4 Apr 2021 12:52:43 +0000 (UTC)
|
|
||||||
DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 046B9C43461
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
dmarc=none (p=none dis=none) header.from=codeaurora.org
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
spf=fail smtp.mailfrom=pradeepc@codeaurora.org
|
|
||||||
From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
||||||
To: ath11k@lists.infradead.org
|
|
||||||
Cc: linux-wireless@vger.kernel.org,
|
|
||||||
Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>,
|
|
||||||
Miles Hu <milehu@codeaurora.org>,
|
|
||||||
Anilkumar Kolli <akolli@codeaurora.org>
|
|
||||||
Subject: [PATCH v9 3/3] ath11k: translate HE status to radiotap format
|
|
||||||
Date: Sun, 4 Apr 2021 05:52:35 -0700
|
|
||||||
Message-Id: <20210404125235.5589-4-pradeepc@codeaurora.org>
|
|
||||||
X-Mailer: git-send-email 2.17.1
|
|
||||||
In-Reply-To: <20210404125235.5589-1-pradeepc@codeaurora.org>
|
|
||||||
References: <20210404125235.5589-1-pradeepc@codeaurora.org>
|
|
||||||
Precedence: bulk
|
|
||||||
List-ID: <linux-wireless.vger.kernel.org>
|
|
||||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
|
||||||
|
|
||||||
Translate HE status to radiotap format. This uses HE radiotap
|
|
||||||
definitions from include/net/ieee80211_radiotap.h.
|
|
||||||
|
|
||||||
Co-developed-by: Miles Hu <milehu@codeaurora.org>
|
|
||||||
Signed-off-by: Miles Hu <milehu@codeaurora.org>
|
|
||||||
Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
|
|
||||||
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/dp_rx.c | 31 +-
|
|
||||||
drivers/net/wireless/ath/ath11k/hal_rx.c | 470 ++++++++++++++++++++---
|
|
||||||
2 files changed, 438 insertions(+), 63 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
||||||
@@ -4827,29 +4827,44 @@ ath11k_dp_rx_update_radiotap_he_mu(struc
|
|
||||||
rtap_buf[rtap_len] = rx_status->he_RU[3];
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void ath11k_update_radiotap(struct hal_rx_mon_ppdu_info *ppduinfo,
|
|
||||||
+static void ath11k_update_radiotap(struct ath11k *ar,
|
|
||||||
+ struct hal_rx_mon_ppdu_info *ppduinfo,
|
|
||||||
struct sk_buff *mon_skb,
|
|
||||||
struct ieee80211_rx_status *rxs)
|
|
||||||
{
|
|
||||||
+ struct ieee80211_supported_band *sband;
|
|
||||||
u8 *ptr = NULL;
|
|
||||||
|
|
||||||
+ rxs->flag |= RX_FLAG_MACTIME_START;
|
|
||||||
+ rxs->signal = ppduinfo->rssi_comb + ATH11K_DEFAULT_NOISE_FLOOR;
|
|
||||||
+
|
|
||||||
+ if (ppduinfo->nss)
|
|
||||||
+ rxs->nss = ppduinfo->nss;
|
|
||||||
+
|
|
||||||
if (ppduinfo->he_mu_flags) {
|
|
||||||
rxs->flag |= RX_FLAG_RADIOTAP_HE_MU;
|
|
||||||
rxs->encoding = RX_ENC_HE;
|
|
||||||
ptr = skb_push(mon_skb, sizeof(struct ieee80211_radiotap_he_mu));
|
|
||||||
ath11k_dp_rx_update_radiotap_he_mu(ppduinfo, ptr);
|
|
||||||
- }
|
|
||||||
- if (ppduinfo->he_flags) {
|
|
||||||
+ } else if (ppduinfo->he_flags) {
|
|
||||||
rxs->flag |= RX_FLAG_RADIOTAP_HE;
|
|
||||||
rxs->encoding = RX_ENC_HE;
|
|
||||||
ptr = skb_push(mon_skb, sizeof(struct ieee80211_radiotap_he));
|
|
||||||
ath11k_dp_rx_update_radiotap_he(ppduinfo, ptr);
|
|
||||||
+ rxs->rate_idx = ppduinfo->rate;
|
|
||||||
+ } else if (ppduinfo->vht_flags) {
|
|
||||||
+ rxs->encoding = RX_ENC_VHT;
|
|
||||||
+ rxs->rate_idx = ppduinfo->rate;
|
|
||||||
+ } else if (ppduinfo->ht_flags) {
|
|
||||||
+ rxs->encoding = RX_ENC_HT;
|
|
||||||
+ rxs->rate_idx = ppduinfo->rate;
|
|
||||||
+ } else {
|
|
||||||
+ rxs->encoding = RX_ENC_LEGACY;
|
|
||||||
+ sband = &ar->mac.sbands[rxs->band];
|
|
||||||
+ rxs->rate_idx = ath11k_mac_hw_rate_to_idx(sband, ppduinfo->rate,
|
|
||||||
+ ppduinfo->cck_flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
- rxs->flag |= RX_FLAG_MACTIME_START;
|
|
||||||
- rxs->signal = ppduinfo->rssi_comb + ATH11K_DEFAULT_NOISE_FLOOR;
|
|
||||||
- rxs->nss = ppduinfo->nss;
|
|
||||||
-
|
|
||||||
rxs->mactime = ppduinfo->tsft;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -4885,7 +4900,7 @@ static int ath11k_dp_rx_mon_deliver(stru
|
|
||||||
} else {
|
|
||||||
rxs->flag |= RX_FLAG_ALLOW_SAME_PN;
|
|
||||||
}
|
|
||||||
- ath11k_update_radiotap(ppduinfo, mon_skb, rxs);
|
|
||||||
+ ath11k_update_radiotap(ar, ppduinfo, mon_skb, rxs);
|
|
||||||
status = IEEE80211_SKB_RXCB(mon_skb);
|
|
||||||
*status = *rxs;
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/hal_rx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.c
|
|
||||||
@@ -454,10 +454,12 @@ void ath11k_hal_reo_status_queue_stats(s
|
|
||||||
desc->info0));
|
|
||||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "pn = [%08x, %08x, %08x, %08x]\n",
|
|
||||||
desc->pn[0], desc->pn[1], desc->pn[2], desc->pn[3]);
|
|
||||||
- ath11k_dbg(ab, ATH11k_DBG_HAL, "last_rx: enqueue_tstamp %08x dequeue_tstamp %08x\n",
|
|
||||||
+ ath11k_dbg(ab, ATH11k_DBG_HAL,
|
|
||||||
+ "last_rx: enqueue_tstamp %08x dequeue_tstamp %08x\n",
|
|
||||||
desc->last_rx_enqueue_timestamp,
|
|
||||||
desc->last_rx_dequeue_timestamp);
|
|
||||||
- ath11k_dbg(ab, ATH11k_DBG_HAL, "rx_bitmap [%08x %08x %08x %08x %08x %08x %08x %08x]\n",
|
|
||||||
+ ath11k_dbg(ab, ATH11k_DBG_HAL,
|
|
||||||
+ "rx_bitmap [%08x %08x %08x %08x %08x %08x %08x %08x]\n",
|
|
||||||
desc->rx_bitmap[0], desc->rx_bitmap[1], desc->rx_bitmap[2],
|
|
||||||
desc->rx_bitmap[3], desc->rx_bitmap[4], desc->rx_bitmap[5],
|
|
||||||
desc->rx_bitmap[6], desc->rx_bitmap[7]);
|
|
||||||
@@ -838,12 +840,75 @@ void ath11k_hal_reo_hw_setup(struct ath1
|
|
||||||
ring_hash_map));
|
|
||||||
}
|
|
||||||
|
|
||||||
+#define HAL_MAX_UL_MU_USERS 37
|
|
||||||
+static inline void
|
|
||||||
+ath11k_hal_rx_handle_ofdma_info(void *rx_tlv,
|
|
||||||
+ struct hal_rx_user_status *rx_user_status)
|
|
||||||
+{
|
|
||||||
+ struct hal_rx_ppdu_end_user_stats *ppdu_end_user =
|
|
||||||
+ (struct hal_rx_ppdu_end_user_stats *)rx_tlv;
|
|
||||||
+
|
|
||||||
+ rx_user_status->ul_ofdma_user_v0_word0 = __le32_to_cpu(ppdu_end_user->info6);
|
|
||||||
+
|
|
||||||
+ rx_user_status->ul_ofdma_user_v0_word1 = __le32_to_cpu(ppdu_end_user->rsvd2[10]);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static inline void
|
|
||||||
+ath11k_hal_rx_populate_byte_count(void *rx_tlv, void *ppduinfo,
|
|
||||||
+ struct hal_rx_user_status *rx_user_status)
|
|
||||||
+{
|
|
||||||
+ struct hal_rx_ppdu_end_user_stats *ppdu_end_user =
|
|
||||||
+ (struct hal_rx_ppdu_end_user_stats *)rx_tlv;
|
|
||||||
+
|
|
||||||
+ rx_user_status->mpdu_ok_byte_count =
|
|
||||||
+ FIELD_GET(HAL_RX_PPDU_END_USER_STATS_RSVD2_6_MPDU_OK_BYTE_COUNT,
|
|
||||||
+ __le32_to_cpu(ppdu_end_user->rsvd2[6]));
|
|
||||||
+ rx_user_status->mpdu_err_byte_count =
|
|
||||||
+ FIELD_GET(HAL_RX_PPDU_END_USER_STATS_RSVD2_8_MPDU_ERR_BYTE_COUNT,
|
|
||||||
+ __le32_to_cpu(ppdu_end_user->rsvd2[8]));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static inline void
|
|
||||||
+ath11k_hal_rx_populate_mu_user_info(void *rx_tlv, struct hal_rx_mon_ppdu_info *ppdu_info,
|
|
||||||
+ struct hal_rx_user_status *rx_user_status)
|
|
||||||
+{
|
|
||||||
+ rx_user_status->ast_index = ppdu_info->ast_index;
|
|
||||||
+ rx_user_status->tid = ppdu_info->tid;
|
|
||||||
+ rx_user_status->tcp_msdu_count =
|
|
||||||
+ ppdu_info->tcp_msdu_count;
|
|
||||||
+ rx_user_status->udp_msdu_count =
|
|
||||||
+ ppdu_info->udp_msdu_count;
|
|
||||||
+ rx_user_status->other_msdu_count =
|
|
||||||
+ ppdu_info->other_msdu_count;
|
|
||||||
+ rx_user_status->frame_control = ppdu_info->frame_control;
|
|
||||||
+ rx_user_status->frame_control_info_valid =
|
|
||||||
+ ppdu_info->frame_control_info_valid;
|
|
||||||
+ rx_user_status->data_sequence_control_info_valid =
|
|
||||||
+ ppdu_info->data_sequence_control_info_valid;
|
|
||||||
+ rx_user_status->first_data_seq_ctrl =
|
|
||||||
+ ppdu_info->first_data_seq_ctrl;
|
|
||||||
+ rx_user_status->preamble_type = ppdu_info->preamble_type;
|
|
||||||
+ rx_user_status->ht_flags = ppdu_info->ht_flags;
|
|
||||||
+ rx_user_status->vht_flags = ppdu_info->vht_flags;
|
|
||||||
+ rx_user_status->he_flags = ppdu_info->he_flags;
|
|
||||||
+ rx_user_status->rs_flags = ppdu_info->rs_flags;
|
|
||||||
+
|
|
||||||
+ rx_user_status->mpdu_cnt_fcs_ok =
|
|
||||||
+ ppdu_info->num_mpdu_fcs_ok;
|
|
||||||
+ rx_user_status->mpdu_cnt_fcs_err =
|
|
||||||
+ ppdu_info->num_mpdu_fcs_err;
|
|
||||||
+
|
|
||||||
+ ath11k_hal_rx_populate_byte_count(rx_tlv, ppdu_info, rx_user_status);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static enum hal_rx_mon_status
|
|
||||||
ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
|
|
||||||
struct hal_rx_mon_ppdu_info *ppdu_info,
|
|
||||||
- u32 tlv_tag, u8 *tlv_data)
|
|
||||||
+ u32 tlv_tag, u8 *tlv_data, u32 userid)
|
|
||||||
{
|
|
||||||
- u32 info0, info1;
|
|
||||||
+ u32 info0, info1, value;
|
|
||||||
+ u8 he_dcm = 0, he_stbc = 0;
|
|
||||||
+ u16 he_gi = 0, he_ltf = 0;
|
|
||||||
|
|
||||||
switch (tlv_tag) {
|
|
||||||
case HAL_RX_PPDU_START: {
|
|
||||||
@@ -864,6 +929,9 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
|
|
||||||
info0 = __le32_to_cpu(eu_stats->info0);
|
|
||||||
info1 = __le32_to_cpu(eu_stats->info1);
|
|
||||||
|
|
||||||
+ ppdu_info->ast_index =
|
|
||||||
+ FIELD_GET(HAL_RX_PPDU_END_USER_STATS_INFO2_AST_INDEX,
|
|
||||||
+ __le32_to_cpu(eu_stats->info2));
|
|
||||||
ppdu_info->tid =
|
|
||||||
ffs(FIELD_GET(HAL_RX_PPDU_END_USER_STATS_INFO6_TID_BITMAP,
|
|
||||||
__le32_to_cpu(eu_stats->info6))) - 1;
|
|
||||||
@@ -887,6 +955,44 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
|
|
||||||
ppdu_info->num_mpdu_fcs_err =
|
|
||||||
FIELD_GET(HAL_RX_PPDU_END_USER_STATS_INFO0_MPDU_CNT_FCS_ERR,
|
|
||||||
info0);
|
|
||||||
+ switch (ppdu_info->preamble_type) {
|
|
||||||
+ case HAL_RX_PREAMBLE_11N:
|
|
||||||
+ ppdu_info->ht_flags = 1;
|
|
||||||
+ break;
|
|
||||||
+ case HAL_RX_PREAMBLE_11AC:
|
|
||||||
+ ppdu_info->vht_flags = 1;
|
|
||||||
+ break;
|
|
||||||
+ case HAL_RX_PREAMBLE_11AX:
|
|
||||||
+ ppdu_info->he_flags = 1;
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (userid < HAL_MAX_UL_MU_USERS) {
|
|
||||||
+ struct hal_rx_user_status *rxuser_stats =
|
|
||||||
+ &ppdu_info->userstats;
|
|
||||||
+
|
|
||||||
+ ath11k_hal_rx_handle_ofdma_info(tlv_data, rxuser_stats);
|
|
||||||
+ ath11k_hal_rx_populate_mu_user_info(tlv_data, ppdu_info,
|
|
||||||
+ rxuser_stats);
|
|
||||||
+ }
|
|
||||||
+ ppdu_info->userstats.mpdu_fcs_ok_bitmap[0] =
|
|
||||||
+ __le32_to_cpu(eu_stats->rsvd1[0]);
|
|
||||||
+ ppdu_info->userstats.mpdu_fcs_ok_bitmap[1] =
|
|
||||||
+ __le32_to_cpu(eu_stats->rsvd1[1]);
|
|
||||||
+
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ case HAL_RX_PPDU_END_USER_STATS_EXT: {
|
|
||||||
+ struct hal_rx_ppdu_end_user_stats_ext *eu_stats =
|
|
||||||
+ (struct hal_rx_ppdu_end_user_stats_ext *)tlv_data;
|
|
||||||
+ ppdu_info->userstats.mpdu_fcs_ok_bitmap[2] = eu_stats->info1;
|
|
||||||
+ ppdu_info->userstats.mpdu_fcs_ok_bitmap[3] = eu_stats->info2;
|
|
||||||
+ ppdu_info->userstats.mpdu_fcs_ok_bitmap[4] = eu_stats->info3;
|
|
||||||
+ ppdu_info->userstats.mpdu_fcs_ok_bitmap[5] = eu_stats->info4;
|
|
||||||
+ ppdu_info->userstats.mpdu_fcs_ok_bitmap[6] = eu_stats->info5;
|
|
||||||
+ ppdu_info->userstats.mpdu_fcs_ok_bitmap[7] = eu_stats->info6;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HAL_PHYRX_HT_SIG: {
|
|
||||||
@@ -985,50 +1091,151 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
|
|
||||||
else
|
|
||||||
ppdu_info->reception_type =
|
|
||||||
HAL_RX_RECEPTION_TYPE_MU_MIMO;
|
|
||||||
+ ppdu_info->vht_flag_values5 = group_id;
|
|
||||||
+ ppdu_info->vht_flag_values3[0] = (((ppdu_info->mcs) << 4) |
|
|
||||||
+ ppdu_info->nss);
|
|
||||||
+ ppdu_info->vht_flag_values2 = ppdu_info->bw;
|
|
||||||
+ ppdu_info->vht_flag_values4 =
|
|
||||||
+ FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_SU_MU_CODING, info1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HAL_PHYRX_HE_SIG_A_SU: {
|
|
||||||
struct hal_rx_he_sig_a_su_info *he_sig_a =
|
|
||||||
(struct hal_rx_he_sig_a_su_info *)tlv_data;
|
|
||||||
- u32 nsts, cp_ltf, dcm;
|
|
||||||
|
|
||||||
+ ppdu_info->he_flags = 1;
|
|
||||||
info0 = __le32_to_cpu(he_sig_a->info0);
|
|
||||||
info1 = __le32_to_cpu(he_sig_a->info1);
|
|
||||||
|
|
||||||
- ppdu_info->mcs =
|
|
||||||
- FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_MCS,
|
|
||||||
- info0);
|
|
||||||
- ppdu_info->bw =
|
|
||||||
- FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_BW,
|
|
||||||
- info0);
|
|
||||||
- ppdu_info->ldpc = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO1_CODING, info0);
|
|
||||||
- ppdu_info->is_stbc = info1 &
|
|
||||||
- HAL_RX_HE_SIG_A_SU_INFO_INFO1_STBC;
|
|
||||||
- ppdu_info->beamformed = info1 &
|
|
||||||
- HAL_RX_HE_SIG_A_SU_INFO_INFO1_TXBF;
|
|
||||||
- dcm = info0 & HAL_RX_HE_SIG_A_SU_INFO_INFO0_DCM;
|
|
||||||
- cp_ltf = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_CP_LTF_SIZE,
|
|
||||||
- info0);
|
|
||||||
- nsts = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_NSTS, info0);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_FORMAT_IND, info0);
|
|
||||||
|
|
||||||
- switch (cp_ltf) {
|
|
||||||
+ if (value == 0)
|
|
||||||
+ ppdu_info->he_data1 = IEEE80211_RADIOTAP_HE_DATA1_FORMAT_TRIG;
|
|
||||||
+ else
|
|
||||||
+ ppdu_info->he_data1 = IEEE80211_RADIOTAP_HE_DATA1_FORMAT_SU;
|
|
||||||
+
|
|
||||||
+ ppdu_info->he_data1 |=
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_BSS_COLOR_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_BEAM_CHANGE_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_UL_DL_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_DATA_DCM_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_CODING_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_LDPC_XSYMSEG_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_STBC_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_BW_RU_ALLOC_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_DOPPLER_KNOWN;
|
|
||||||
+
|
|
||||||
+ ppdu_info->he_data2 |=
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_GI_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_TXBF_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_PE_DISAMBIG_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_TXOP_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_NUM_LTF_SYMS_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_PRE_FEC_PAD_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_MIDAMBLE_KNOWN;
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_BSS_COLOR, info0);
|
|
||||||
+ ppdu_info->he_data3 =
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_BSS_COLOR, value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_BEAM_CHANGE, info0);
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_BEAM_CHANGE, value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_DL_UL_FLAG, info0);
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_UL_DL, value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_MCS, info0);
|
|
||||||
+ ppdu_info->mcs = value;
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_DATA_MCS, value);
|
|
||||||
+
|
|
||||||
+ he_dcm = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_DCM, info0);
|
|
||||||
+ ppdu_info->dcm = he_dcm;
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_DATA_DCM, he_dcm);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO1_CODING, info1);
|
|
||||||
+ ppdu_info->ldpc = (value == HAL_RX_SU_MU_CODING_LDPC) ? 1 : 0;
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_CODING, value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO1_LDPC_EXTRA, info1);
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_LDPC_XSYMSEG, value);
|
|
||||||
+ he_stbc = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO1_STBC, info1);
|
|
||||||
+ ppdu_info->is_stbc = he_stbc;
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_STBC, he_stbc);
|
|
||||||
+
|
|
||||||
+ /* data4 */
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_SPATIAL_REUSE, info0);
|
|
||||||
+ ppdu_info->he_data4 =
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA4_SU_MU_SPTL_REUSE, value);
|
|
||||||
+
|
|
||||||
+ /* data5 */
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_BW, info0);
|
|
||||||
+ ppdu_info->bw = value;
|
|
||||||
+ ppdu_info->he_data5 =
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC, value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_CP_LTF_SIZE, info0);
|
|
||||||
+ switch (value) {
|
|
||||||
case 0:
|
|
||||||
+ he_gi = HE_GI_0_8;
|
|
||||||
+ he_ltf = HE_LTF_1_X;
|
|
||||||
+ break;
|
|
||||||
case 1:
|
|
||||||
- ppdu_info->gi = HAL_RX_GI_0_8_US;
|
|
||||||
- break;
|
|
||||||
+ he_gi = HE_GI_0_8;
|
|
||||||
+ he_ltf = HE_LTF_2_X;
|
|
||||||
+ break;
|
|
||||||
case 2:
|
|
||||||
- ppdu_info->gi = HAL_RX_GI_1_6_US;
|
|
||||||
- break;
|
|
||||||
+ he_gi = HE_GI_1_6;
|
|
||||||
+ he_ltf = HE_LTF_2_X;
|
|
||||||
+ break;
|
|
||||||
case 3:
|
|
||||||
- if (dcm && ppdu_info->is_stbc)
|
|
||||||
- ppdu_info->gi = HAL_RX_GI_0_8_US;
|
|
||||||
- else
|
|
||||||
- ppdu_info->gi = HAL_RX_GI_3_2_US;
|
|
||||||
- break;
|
|
||||||
+ if (he_dcm && he_stbc) {
|
|
||||||
+ he_gi = HE_GI_0_8;
|
|
||||||
+ he_ltf = HE_LTF_4_X;
|
|
||||||
+ } else {
|
|
||||||
+ he_gi = HE_GI_3_2;
|
|
||||||
+ he_ltf = HE_LTF_4_X;
|
|
||||||
+ }
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
+ ppdu_info->gi = he_gi;
|
|
||||||
+ he_gi = (he_gi != 0) ? he_gi - 1 : 0;
|
|
||||||
+ ppdu_info->he_data5 |= FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_GI, he_gi);
|
|
||||||
+ ppdu_info->ltf_size = he_ltf;
|
|
||||||
+ ppdu_info->he_data5 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE,
|
|
||||||
+ (he_ltf == HE_LTF_4_X) ? he_ltf - 1 : he_ltf);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_NSTS, info0);
|
|
||||||
+ ppdu_info->he_data5 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_NUM_LTF_SYMS, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO1_PKT_EXT_FACTOR, info1);
|
|
||||||
+ ppdu_info->he_data5 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_PRE_FEC_PAD, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO1_TXBF, info1);
|
|
||||||
+ ppdu_info->beamformed = value;
|
|
||||||
+ ppdu_info->he_data5 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_TXBF, value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO1_PKT_EXT_PE_DISAM, info1);
|
|
||||||
+ ppdu_info->he_data5 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_PE_DISAMBIG, value);
|
|
||||||
+
|
|
||||||
+ /* data6 */
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO0_NSTS, info0);
|
|
||||||
+ value++;
|
|
||||||
+ ppdu_info->nss = value;
|
|
||||||
+ ppdu_info->he_data6 =
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA6_NSTS, value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO1_DOPPLER_IND, info1);
|
|
||||||
+ ppdu_info->he_data6 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA6_DOPPLER, value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_SU_INFO_INFO1_TXOP_DURATION, info1);
|
|
||||||
+ ppdu_info->he_data6 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA6_TXOP, value);
|
|
||||||
|
|
||||||
- ppdu_info->nss = nsts + 1;
|
|
||||||
- ppdu_info->dcm = dcm;
|
|
||||||
ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_SU;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -1036,29 +1243,142 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
|
|
||||||
struct hal_rx_he_sig_a_mu_dl_info *he_sig_a_mu_dl =
|
|
||||||
(struct hal_rx_he_sig_a_mu_dl_info *)tlv_data;
|
|
||||||
|
|
||||||
- u32 cp_ltf;
|
|
||||||
-
|
|
||||||
info0 = __le32_to_cpu(he_sig_a_mu_dl->info0);
|
|
||||||
info1 = __le32_to_cpu(he_sig_a_mu_dl->info1);
|
|
||||||
|
|
||||||
- ppdu_info->bw =
|
|
||||||
- FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_TRANSMIT_BW,
|
|
||||||
- info0);
|
|
||||||
- cp_ltf = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_CP_LTF_SIZE,
|
|
||||||
- info0);
|
|
||||||
+ ppdu_info->he_mu_flags = 1;
|
|
||||||
+
|
|
||||||
+ ppdu_info->he_data1 = IEEE80211_RADIOTAP_HE_DATA1_FORMAT_MU;
|
|
||||||
+ ppdu_info->he_data1 |=
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_BSS_COLOR_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_UL_DL_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_LDPC_XSYMSEG_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_STBC_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_BW_RU_ALLOC_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_DOPPLER_KNOWN;
|
|
||||||
+
|
|
||||||
+ ppdu_info->he_data2 =
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_GI_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_NUM_LTF_SYMS_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_PRE_FEC_PAD_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_PE_DISAMBIG_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_TXOP_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA2_MIDAMBLE_KNOWN;
|
|
||||||
+
|
|
||||||
+ /*data3*/
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_BSS_COLOR, info0);
|
|
||||||
+ ppdu_info->he_data3 =
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_BSS_COLOR, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_UL_FLAG, info0);
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_UL_DL, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_LDPC_EXTRA, info1);
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_LDPC_XSYMSEG, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_STBC, info1);
|
|
||||||
+ he_stbc = value;
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_STBC, value);
|
|
||||||
+
|
|
||||||
+ /*data4*/
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_SPATIAL_REUSE, info0);
|
|
||||||
+ ppdu_info->he_data4 =
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA4_SU_MU_SPTL_REUSE, value);
|
|
||||||
+
|
|
||||||
+ /*data5*/
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_TRANSMIT_BW, info0);
|
|
||||||
+ ppdu_info->bw = value;
|
|
||||||
+ ppdu_info->he_data5 =
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC, value);
|
|
||||||
|
|
||||||
- switch (cp_ltf) {
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_CP_LTF_SIZE, info0);
|
|
||||||
+ switch (value) {
|
|
||||||
case 0:
|
|
||||||
+ he_gi = HE_GI_0_8;
|
|
||||||
+ he_ltf = HE_LTF_4_X;
|
|
||||||
+ break;
|
|
||||||
case 1:
|
|
||||||
- ppdu_info->gi = HAL_RX_GI_0_8_US;
|
|
||||||
+ he_gi = HE_GI_0_8;
|
|
||||||
+ he_ltf = HE_LTF_2_X;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
- ppdu_info->gi = HAL_RX_GI_1_6_US;
|
|
||||||
+ he_gi = HE_GI_1_6;
|
|
||||||
+ he_ltf = HE_LTF_2_X;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
- ppdu_info->gi = HAL_RX_GI_3_2_US;
|
|
||||||
+ he_gi = HE_GI_3_2;
|
|
||||||
+ he_ltf = HE_LTF_4_X;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ ppdu_info->gi = he_gi;
|
|
||||||
+ he_gi = (he_gi != 0) ? he_gi - 1 : 0;
|
|
||||||
+ ppdu_info->he_data5 |= FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_GI, he_gi);
|
|
||||||
+ ppdu_info->ltf_size = he_ltf;
|
|
||||||
+ ppdu_info->he_data5 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE,
|
|
||||||
+ (he_ltf == HE_LTF_4_X) ? he_ltf - 1 : he_ltf);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_NUM_LTF_SYMB, info1);
|
|
||||||
+ ppdu_info->he_data5 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_NUM_LTF_SYMS, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_PKT_EXT_FACTOR,
|
|
||||||
+ info1);
|
|
||||||
+ ppdu_info->he_data5 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_PRE_FEC_PAD, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_PKT_EXT_PE_DISAM,
|
|
||||||
+ info1);
|
|
||||||
+ ppdu_info->he_data5 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA5_PE_DISAMBIG, value);
|
|
||||||
+
|
|
||||||
+ /*data6*/
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_DOPPLER_INDICATION,
|
|
||||||
+ info0);
|
|
||||||
+ ppdu_info->he_data6 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA6_DOPPLER, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_TXOP_DURATION, info1);
|
|
||||||
+ ppdu_info->he_data6 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA6_TXOP, value);
|
|
||||||
+
|
|
||||||
+ /* HE-MU Flags */
|
|
||||||
+ /* HE-MU-flags1 */
|
|
||||||
+ ppdu_info->he_flags1 =
|
|
||||||
+ IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_DCM_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_COMP_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_SYMS_USERS_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_MU_FLAGS1_CH1_RU_KNOWN;
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_MCS_OF_SIGB, info0);
|
|
||||||
+ ppdu_info->he_flags1 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS_KNOWN,
|
|
||||||
+ value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_DCM_OF_SIGB, info0);
|
|
||||||
+ ppdu_info->he_flags1 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_DCM_KNOWN,
|
|
||||||
+ value);
|
|
||||||
+
|
|
||||||
+ /* HE-MU-flags2 */
|
|
||||||
+ ppdu_info->he_flags2 =
|
|
||||||
+ IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_KNOWN;
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_TRANSMIT_BW, info0);
|
|
||||||
+ ppdu_info->he_flags2 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW,
|
|
||||||
+ value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_COMP_MODE_SIGB, info0);
|
|
||||||
+ ppdu_info->he_flags2 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_COMP, value);
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_A_MU_DL_INFO_INFO0_NUM_SIGB_SYMB, info0);
|
|
||||||
+ value = value - 1;
|
|
||||||
+ ppdu_info->he_flags2 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_SYMS_USERS,
|
|
||||||
+ value);
|
|
||||||
|
|
||||||
ppdu_info->is_stbc = info1 &
|
|
||||||
HAL_RX_HE_SIG_A_MU_DL_INFO_INFO1_STBC;
|
|
||||||
@@ -1075,6 +1395,7 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
|
|
||||||
ru_tones = FIELD_GET(HAL_RX_HE_SIG_B1_MU_INFO_INFO0_RU_ALLOCATION,
|
|
||||||
info0);
|
|
||||||
ppdu_info->ru_alloc = ath11k_he_ru_tones_to_nl80211_he_ru_alloc(ru_tones);
|
|
||||||
+ ppdu_info->he_RU[0] = ru_tones;
|
|
||||||
ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_MU_MIMO;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -1084,14 +1405,25 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
|
|
||||||
|
|
||||||
info0 = __le32_to_cpu(he_sig_b2_mu->info0);
|
|
||||||
|
|
||||||
+ ppdu_info->he_data1 |= IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_CODING_KNOWN;
|
|
||||||
+
|
|
||||||
ppdu_info->mcs =
|
|
||||||
- FIELD_GET(HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_MCS,
|
|
||||||
- info0);
|
|
||||||
+ FIELD_GET(HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_MCS, info0);
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_DATA_MCS, ppdu_info->mcs);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_CODING, info0);
|
|
||||||
+ ppdu_info->ldpc = value;
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_CODING, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_ID, info0);
|
|
||||||
+ ppdu_info->he_data4 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA4_MU_STA_ID, value);
|
|
||||||
+
|
|
||||||
ppdu_info->nss =
|
|
||||||
- FIELD_GET(HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_NSTS,
|
|
||||||
- info0) + 1;
|
|
||||||
- ppdu_info->ldpc = FIELD_GET(HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_CODING,
|
|
||||||
- info0);
|
|
||||||
+ FIELD_GET(HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_NSTS, info0) + 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HAL_PHYRX_HE_SIG_B2_OFDMA: {
|
|
||||||
@@ -1100,17 +1432,40 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
|
|
||||||
|
|
||||||
info0 = __le32_to_cpu(he_sig_b2_ofdma->info0);
|
|
||||||
|
|
||||||
+ ppdu_info->he_data1 |=
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_DATA_DCM_KNOWN |
|
|
||||||
+ IEEE80211_RADIOTAP_HE_DATA1_CODING_KNOWN;
|
|
||||||
+
|
|
||||||
+ /* HE-data2 */
|
|
||||||
+ ppdu_info->he_data2 |= IEEE80211_RADIOTAP_HE_DATA2_TXBF_KNOWN;
|
|
||||||
+
|
|
||||||
ppdu_info->mcs =
|
|
||||||
FIELD_GET(HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_MCS,
|
|
||||||
info0);
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_DATA_MCS, ppdu_info->mcs);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_DCM, info0);
|
|
||||||
+ he_dcm = value;
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_DATA_DCM, value);
|
|
||||||
+
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_CODING, info0);
|
|
||||||
+ ppdu_info->ldpc = value;
|
|
||||||
+ ppdu_info->he_data3 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA3_CODING, value);
|
|
||||||
+
|
|
||||||
+ /* HE-data4 */
|
|
||||||
+ value = FIELD_GET(HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_ID, info0);
|
|
||||||
+ ppdu_info->he_data4 |=
|
|
||||||
+ FIELD_PREP(IEEE80211_RADIOTAP_HE_DATA4_MU_STA_ID, value);
|
|
||||||
+
|
|
||||||
ppdu_info->nss =
|
|
||||||
FIELD_GET(HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_NSTS,
|
|
||||||
info0) + 1;
|
|
||||||
ppdu_info->beamformed =
|
|
||||||
- info0 &
|
|
||||||
- HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_TXBF;
|
|
||||||
- ppdu_info->ldpc = FIELD_GET(HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_CODING,
|
|
||||||
- info0);
|
|
||||||
+ info0 & HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_TXBF;
|
|
||||||
ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_MU_OFDMA;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -1144,6 +1499,9 @@ ath11k_hal_rx_parse_mon_status_tlv(struc
|
|
||||||
ppdu_info->rx_duration =
|
|
||||||
FIELD_GET(HAL_RX_PPDU_END_DURATION,
|
|
||||||
__le32_to_cpu(ppdu_rx_duration->info0));
|
|
||||||
+ ppdu_info->tsft = __le32_to_cpu(ppdu_rx_duration->rsvd0[1]);
|
|
||||||
+ ppdu_info->tsft = (ppdu_info->tsft << 32) |
|
|
||||||
+ __le32_to_cpu(ppdu_rx_duration->rsvd0[0]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HAL_DUMMY:
|
|
||||||
@@ -1167,12 +1525,14 @@ ath11k_hal_rx_parse_mon_status(struct at
|
|
||||||
enum hal_rx_mon_status hal_status = HAL_RX_MON_STATUS_BUF_DONE;
|
|
||||||
u16 tlv_tag;
|
|
||||||
u16 tlv_len;
|
|
||||||
+ u32 tlv_userid = 0;
|
|
||||||
u8 *ptr = skb->data;
|
|
||||||
|
|
||||||
do {
|
|
||||||
tlv = (struct hal_tlv_hdr *)ptr;
|
|
||||||
tlv_tag = FIELD_GET(HAL_TLV_HDR_TAG, tlv->tl);
|
|
||||||
tlv_len = FIELD_GET(HAL_TLV_HDR_LEN, tlv->tl);
|
|
||||||
+ tlv_userid = FIELD_GET(HAL_TLV_USR_ID, tlv->tl);
|
|
||||||
ptr += sizeof(*tlv);
|
|
||||||
|
|
||||||
/* The actual length of PPDU_END is the combined length of many PHY
|
|
||||||
@@ -1184,7 +1544,7 @@ ath11k_hal_rx_parse_mon_status(struct at
|
|
||||||
tlv_len = sizeof(struct hal_rx_rxpcu_classification_overview);
|
|
||||||
|
|
||||||
hal_status = ath11k_hal_rx_parse_mon_status_tlv(ab, ppdu_info,
|
|
||||||
- tlv_tag, ptr);
|
|
||||||
+ tlv_tag, ptr, tlv_userid);
|
|
||||||
ptr += tlv_len;
|
|
||||||
ptr = PTR_ALIGN(ptr, HAL_TLV_ALIGN);
|
|
||||||
|
|
@ -1,437 +0,0 @@
|
|||||||
From patchwork Tue Jul 20 21:31:46 2021
|
|
||||||
Content-Type: text/plain; charset="utf-8"
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
X-Patchwork-Submitter: Jouni Malinen <jouni@codeaurora.org>
|
|
||||||
X-Patchwork-Id: 12389427
|
|
||||||
X-Patchwork-Delegate: kvalo@adurom.com
|
|
||||||
Return-Path: <linux-wireless-owner@kernel.org>
|
|
||||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
|
||||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
|
||||||
X-Spam-Level:
|
|
||||||
X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED,
|
|
||||||
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH,
|
|
||||||
MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT
|
|
||||||
autolearn=unavailable autolearn_force=no version=3.4.0
|
|
||||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
|
||||||
by smtp.lore.kernel.org (Postfix) with ESMTP id AE5DFC07E95
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Tue, 20 Jul 2021 21:32:35 +0000 (UTC)
|
|
||||||
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
|
|
||||||
by mail.kernel.org (Postfix) with ESMTP id 8BCA960E0B
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Tue, 20 Jul 2021 21:32:35 +0000 (UTC)
|
|
||||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
|
||||||
id S232037AbhGTUvp (ORCPT
|
|
||||||
<rfc822;linux-wireless@archiver.kernel.org>);
|
|
||||||
Tue, 20 Jul 2021 16:51:45 -0400
|
|
||||||
Received: from so254-9.mailgun.net ([198.61.254.9]:51945 "EHLO
|
|
||||||
so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
|
||||||
with ESMTP id S233404AbhGTUvb (ORCPT
|
|
||||||
<rfc822;linux-wireless@vger.kernel.org>);
|
|
||||||
Tue, 20 Jul 2021 16:51:31 -0400
|
|
||||||
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org;
|
|
||||||
q=dns/txt;
|
|
||||||
s=smtp; t=1626816727; h=Content-Transfer-Encoding: MIME-Version:
|
|
||||||
Message-Id: Date: Subject: Cc: To: From: Sender;
|
|
||||||
bh=0NKtP900YLYCGbw3/GGjWWripcJNlTdjFgNVgginJt0=;
|
|
||||||
b=abeQRnEIETDnBog8B8jC5dz4L/CByAwwAd4rRXQWAhj3mrSD3aI8lXlncgB6UaxCJ7IxwD7n
|
|
||||||
Jd43kUakxtbNRc2ljAhNOBgnVzUYc34DC9P8+cZCUyohmRMATXg9kMszaiWSrlwKfnFbNmhy
|
|
||||||
bB2QJmD4AKn90qUvNto1Rmu6PRY=
|
|
||||||
X-Mailgun-Sending-Ip: 198.61.254.9
|
|
||||||
X-Mailgun-Sid:
|
|
||||||
WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0=
|
|
||||||
Received: from smtp.codeaurora.org
|
|
||||||
(ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by
|
|
||||||
smtp-out-n07.prod.us-east-1.postgun.com with SMTP id
|
|
||||||
60f740d4290ea35ee6638a2d (version=TLS1.2,
|
|
||||||
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 20 Jul 2021 21:32:04
|
|
||||||
GMT
|
|
||||||
Sender: jouni=codeaurora.org@mg.codeaurora.org
|
|
||||||
Received: by smtp.codeaurora.org (Postfix, from userid 1001)
|
|
||||||
id 72C9CC43460; Tue, 20 Jul 2021 21:32:03 +0000 (UTC)
|
|
||||||
Received: from jouni.codeaurora.org (85-76-67-217-nat.elisa-mobile.fi
|
|
||||||
[85.76.67.217])
|
|
||||||
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
|
|
||||||
(No client certificate requested)
|
|
||||||
(Authenticated sender: jouni)
|
|
||||||
by smtp.codeaurora.org (Postfix) with ESMTPSA id 07C11C433F1;
|
|
||||||
Tue, 20 Jul 2021 21:32:00 +0000 (UTC)
|
|
||||||
DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 07C11C433F1
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
dmarc=none (p=none dis=none) header.from=codeaurora.org
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
spf=fail smtp.mailfrom=jouni@codeaurora.org
|
|
||||||
From: Jouni Malinen <jouni@codeaurora.org>
|
|
||||||
To: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
|
|
||||||
Sathishkumar Muruganandam <murugana@codeaurora.org>,
|
|
||||||
Jouni Malinen <jouni@codeaurora.org>
|
|
||||||
Subject: [PATCH 1/2] ath11k: fix 4-addr tx failure for AP and STA modes
|
|
||||||
Date: Wed, 21 Jul 2021 00:31:46 +0300
|
|
||||||
Message-Id: <20210720213147.90042-1-jouni@codeaurora.org>
|
|
||||||
X-Mailer: git-send-email 2.25.1
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Precedence: bulk
|
|
||||||
List-ID: <linux-wireless.vger.kernel.org>
|
|
||||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
|
||||||
|
|
||||||
From: Sathishkumar Muruganandam <murugana@codeaurora.org>
|
|
||||||
|
|
||||||
Ath11k FW requires peer parameter WMI_PEER_USE_4ADDR to be set for
|
|
||||||
4-addr peers allowing 4-address frame transmission to those peers.
|
|
||||||
|
|
||||||
Add ath11k driver callback for sta_set_4addr() to queue new workq
|
|
||||||
set_4addr_wk only once based on new boolean, use_4addr_set.
|
|
||||||
|
|
||||||
sta_set_4addr() will be called during 4-addr STA association cases
|
|
||||||
applicable for both AP and STA modes.
|
|
||||||
|
|
||||||
In ath11k_sta_set_4addr_wk(),
|
|
||||||
|
|
||||||
AP mode:
|
|
||||||
WMI_PEER_USE_4ADDR will be set for the corresponding
|
|
||||||
associated 4-addr STA(s)
|
|
||||||
|
|
||||||
STA mode:
|
|
||||||
WMI_PEER_USE_4ADDR will be set for the AP to which the
|
|
||||||
4-addr STA got associated.
|
|
||||||
|
|
||||||
Tested-on: IPQ8074 WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-1
|
|
||||||
|
|
||||||
Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
|
|
||||||
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/core.h | 3 ++
|
|
||||||
drivers/net/wireless/ath/ath11k/mac.c | 48 ++++++++++++++++++++++++--
|
|
||||||
2 files changed, 49 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
index 018fb2385f2a..11c8dffd0236 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
@@ -362,6 +362,7 @@ struct ath11k_sta {
|
|
||||||
enum hal_pn_type pn_type;
|
|
||||||
|
|
||||||
struct work_struct update_wk;
|
|
||||||
+ struct work_struct set_4addr_wk;
|
|
||||||
struct rate_info txrate;
|
|
||||||
struct rate_info last_txrate;
|
|
||||||
u64 rx_duration;
|
|
||||||
@@ -374,6 +375,8 @@ struct ath11k_sta {
|
|
||||||
/* protected by conf_mutex */
|
|
||||||
bool aggr_mode;
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
+ bool use_4addr_set;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ATH11K_MIN_5G_FREQ 4150
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
index e9b3689331ec..d42637ecbf1e 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -3155,6 +3155,31 @@ static void ath11k_sta_rc_update_wk(struct work_struct *wk)
|
|
||||||
mutex_unlock(&ar->conf_mutex);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void ath11k_sta_set_4addr_wk(struct work_struct *wk)
|
|
||||||
+{
|
|
||||||
+ struct ath11k *ar;
|
|
||||||
+ struct ath11k_vif *arvif;
|
|
||||||
+ struct ath11k_sta *arsta;
|
|
||||||
+ struct ieee80211_sta *sta;
|
|
||||||
+ int ret = 0;
|
|
||||||
+
|
|
||||||
+ arsta = container_of(wk, struct ath11k_sta, set_4addr_wk);
|
|
||||||
+ sta = container_of((void *)arsta, struct ieee80211_sta, drv_priv);
|
|
||||||
+ arvif = arsta->arvif;
|
|
||||||
+ ar = arvif->ar;
|
|
||||||
+
|
|
||||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
|
||||||
+ "setting USE_4ADDR for peer %pM\n", sta->addr);
|
|
||||||
+
|
|
||||||
+ ret = ath11k_wmi_set_peer_param(ar, sta->addr,
|
|
||||||
+ arvif->vdev_id,
|
|
||||||
+ WMI_PEER_USE_4ADDR, 1);
|
|
||||||
+
|
|
||||||
+ if (ret)
|
|
||||||
+ ath11k_warn(ar->ab, "failed to set peer %pM 4addr capability: %d\n",
|
|
||||||
+ sta->addr, ret);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int ath11k_mac_inc_num_stations(struct ath11k_vif *arvif,
|
|
||||||
struct ieee80211_sta *sta)
|
|
||||||
{
|
|
||||||
@@ -3234,11 +3259,13 @@ static int ath11k_mac_station_add(struct ath11k *ar,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ieee80211_vif_is_mesh(vif)) {
|
|
||||||
+ ath11k_dbg(ab, ATH11K_DBG_MAC,
|
|
||||||
+ "setting USE_4ADDR for mesh STA %pM\n", sta->addr);
|
|
||||||
ret = ath11k_wmi_set_peer_param(ar, sta->addr,
|
|
||||||
arvif->vdev_id,
|
|
||||||
WMI_PEER_USE_4ADDR, 1);
|
|
||||||
if (ret) {
|
|
||||||
- ath11k_warn(ab, "failed to STA %pM 4addr capability: %d\n",
|
|
||||||
+ ath11k_warn(ab, "failed to set mesh STA %pM 4addr capability: %d\n",
|
|
||||||
sta->addr, ret);
|
|
||||||
goto free_tx_stats;
|
|
||||||
}
|
|
||||||
@@ -3291,8 +3318,10 @@ static int ath11k_mac_op_sta_state(struct ieee80211_hw *hw,
|
|
||||||
|
|
||||||
/* cancel must be done outside the mutex to avoid deadlock */
|
|
||||||
if ((old_state == IEEE80211_STA_NONE &&
|
|
||||||
- new_state == IEEE80211_STA_NOTEXIST))
|
|
||||||
+ new_state == IEEE80211_STA_NOTEXIST)) {
|
|
||||||
cancel_work_sync(&arsta->update_wk);
|
|
||||||
+ cancel_work_sync(&arsta->set_4addr_wk);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
mutex_lock(&ar->conf_mutex);
|
|
||||||
|
|
||||||
@@ -3301,6 +3330,7 @@ static int ath11k_mac_op_sta_state(struct ieee80211_hw *hw,
|
|
||||||
memset(arsta, 0, sizeof(*arsta));
|
|
||||||
arsta->arvif = arvif;
|
|
||||||
INIT_WORK(&arsta->update_wk, ath11k_sta_rc_update_wk);
|
|
||||||
+ INIT_WORK(&arsta->set_4addr_wk, ath11k_sta_set_4addr_wk);
|
|
||||||
|
|
||||||
ret = ath11k_mac_station_add(ar, vif, sta);
|
|
||||||
if (ret)
|
|
||||||
@@ -3395,6 +3425,19 @@ static int ath11k_mac_op_sta_set_txpwr(struct ieee80211_hw *hw,
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void ath11k_mac_op_sta_set_4addr(struct ieee80211_hw *hw,
|
|
||||||
+ struct ieee80211_vif *vif,
|
|
||||||
+ struct ieee80211_sta *sta, bool enabled)
|
|
||||||
+{
|
|
||||||
+ struct ath11k *ar = hw->priv;
|
|
||||||
+ struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
|
|
||||||
+
|
|
||||||
+ if (enabled && !arsta->use_4addr_set) {
|
|
||||||
+ ieee80211_queue_work(ar->hw, &arsta->set_4addr_wk);
|
|
||||||
+ arsta->use_4addr_set = true;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void ath11k_mac_op_sta_rc_update(struct ieee80211_hw *hw,
|
|
||||||
struct ieee80211_vif *vif,
|
|
||||||
struct ieee80211_sta *sta,
|
|
||||||
@@ -6180,6 +6223,7 @@ static const struct ieee80211_ops ath11k_ops = {
|
|
||||||
.cancel_hw_scan = ath11k_mac_op_cancel_hw_scan,
|
|
||||||
.set_key = ath11k_mac_op_set_key,
|
|
||||||
.sta_state = ath11k_mac_op_sta_state,
|
|
||||||
+ .sta_set_4addr = ath11k_mac_op_sta_set_4addr,
|
|
||||||
.sta_set_txpwr = ath11k_mac_op_sta_set_txpwr,
|
|
||||||
.sta_rc_update = ath11k_mac_op_sta_rc_update,
|
|
||||||
.conf_tx = ath11k_mac_op_conf_tx,
|
|
||||||
|
|
||||||
From patchwork Tue Jul 20 21:31:47 2021
|
|
||||||
Content-Type: text/plain; charset="utf-8"
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
X-Patchwork-Submitter: Jouni Malinen <jouni@codeaurora.org>
|
|
||||||
X-Patchwork-Id: 12389429
|
|
||||||
X-Patchwork-Delegate: kvalo@adurom.com
|
|
||||||
Return-Path: <linux-wireless-owner@kernel.org>
|
|
||||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
|
||||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
|
||||||
X-Spam-Level:
|
|
||||||
X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED,
|
|
||||||
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH,
|
|
||||||
MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT
|
|
||||||
autolearn=unavailable autolearn_force=no version=3.4.0
|
|
||||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
|
||||||
by smtp.lore.kernel.org (Postfix) with ESMTP id 25420C07E9B
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Tue, 20 Jul 2021 21:33:45 +0000 (UTC)
|
|
||||||
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
|
|
||||||
by mail.kernel.org (Postfix) with ESMTP id 01B6660E0B
|
|
||||||
for <linux-wireless@archiver.kernel.org>;
|
|
||||||
Tue, 20 Jul 2021 21:33:44 +0000 (UTC)
|
|
||||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
|
||||||
id S231676AbhGTUw7 (ORCPT
|
|
||||||
<rfc822;linux-wireless@archiver.kernel.org>);
|
|
||||||
Tue, 20 Jul 2021 16:52:59 -0400
|
|
||||||
Received: from so254-9.mailgun.net ([198.61.254.9]:51945 "EHLO
|
|
||||||
so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
|
||||||
with ESMTP id S234001AbhGTUvt (ORCPT
|
|
||||||
<rfc822;linux-wireless@vger.kernel.org>);
|
|
||||||
Tue, 20 Jul 2021 16:51:49 -0400
|
|
||||||
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org;
|
|
||||||
q=dns/txt;
|
|
||||||
s=smtp; t=1626816747; h=Content-Transfer-Encoding: MIME-Version:
|
|
||||||
References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From:
|
|
||||||
Sender; bh=pTgIsAFvKI5zaKS8j6HkCt9Dr4xbghRAApcXu+jUG8M=;
|
|
||||||
b=ZAAksGTytroGGn4JtQ3J6nCBuDx5xyVpnhflyyy4ZihH6zkONxlfFzdmrU9OAB7jqgetM0bw
|
|
||||||
aodI6LSEYmEo+yYTMvYfRD+vtYNqbnEtj3Er8kXZA+EaraVr1rhQNUCootlK9BaqAyA+ckoS
|
|
||||||
iUediQZtUI3serWUbPDTPAUCDn8=
|
|
||||||
X-Mailgun-Sending-Ip: 198.61.254.9
|
|
||||||
X-Mailgun-Sid:
|
|
||||||
WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0=
|
|
||||||
Received: from smtp.codeaurora.org
|
|
||||||
(ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by
|
|
||||||
smtp-out-n01.prod.us-east-1.postgun.com with SMTP id
|
|
||||||
60f740d74815712f3a66316d (version=TLS1.2,
|
|
||||||
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 20 Jul 2021 21:32:07
|
|
||||||
GMT
|
|
||||||
Sender: jouni=codeaurora.org@mg.codeaurora.org
|
|
||||||
Received: by smtp.codeaurora.org (Postfix, from userid 1001)
|
|
||||||
id AE3D3C43217; Tue, 20 Jul 2021 21:32:06 +0000 (UTC)
|
|
||||||
Received: from jouni.codeaurora.org (85-76-67-217-nat.elisa-mobile.fi
|
|
||||||
[85.76.67.217])
|
|
||||||
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
|
|
||||||
(No client certificate requested)
|
|
||||||
(Authenticated sender: jouni)
|
|
||||||
by smtp.codeaurora.org (Postfix) with ESMTPSA id BA686C433D3;
|
|
||||||
Tue, 20 Jul 2021 21:32:04 +0000 (UTC)
|
|
||||||
DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BA686C433D3
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
dmarc=none (p=none dis=none) header.from=codeaurora.org
|
|
||||||
Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org;
|
|
||||||
spf=fail smtp.mailfrom=jouni@codeaurora.org
|
|
||||||
From: Jouni Malinen <jouni@codeaurora.org>
|
|
||||||
To: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
|
|
||||||
Karthikeyan Periyasamy <periyasa@codeaurora.org>,
|
|
||||||
Jouni Malinen <jouni@codeaurora.org>
|
|
||||||
Subject: [PATCH 2/2] ath11k: fix 4addr multicast packet tx
|
|
||||||
Date: Wed, 21 Jul 2021 00:31:47 +0300
|
|
||||||
Message-Id: <20210720213147.90042-2-jouni@codeaurora.org>
|
|
||||||
X-Mailer: git-send-email 2.25.1
|
|
||||||
In-Reply-To: <20210720213147.90042-1-jouni@codeaurora.org>
|
|
||||||
References: <20210720213147.90042-1-jouni@codeaurora.org>
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Precedence: bulk
|
|
||||||
List-ID: <linux-wireless.vger.kernel.org>
|
|
||||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
|
||||||
|
|
||||||
From: Karthikeyan Periyasamy <periyasa@codeaurora.org>
|
|
||||||
|
|
||||||
In 4addr, AP wired backbone to STA wired backbone ping fails due to ARP
|
|
||||||
request not getting answered. Here 4addr ARP multicast packet is sent in
|
|
||||||
3addr, so that 4addr STA not honouring the 3addr ARP multicast packet.
|
|
||||||
Fix this issue by sending out multicast packet in 4addr format, firmware
|
|
||||||
expects peer meta flag instead of vdev meta flag in Tx descriptor.
|
|
||||||
|
|
||||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01641-QCAHKSWPL_SILICONZ-1
|
|
||||||
|
|
||||||
Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
|
|
||||||
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/core.h | 1 +
|
|
||||||
drivers/net/wireless/ath/ath11k/dp_tx.c | 12 ++++++++++--
|
|
||||||
drivers/net/wireless/ath/ath11k/dp_tx.h | 2 +-
|
|
||||||
drivers/net/wireless/ath/ath11k/mac.c | 6 +++++-
|
|
||||||
drivers/net/wireless/ath/ath11k/peer.c | 11 +++++++++++
|
|
||||||
5 files changed, 28 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
index 11c8dffd0236..6a6cabdd3e30 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
@@ -377,6 +377,7 @@ struct ath11k_sta {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool use_4addr_set;
|
|
||||||
+ u16 tcl_metadata;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ATH11K_MIN_5G_FREQ 4150
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
index 8bba5234f81f..3acdd4050d5b 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
@@ -78,7 +78,7 @@ enum hal_encrypt_type ath11k_dp_tx_get_encrypt_type(u32 cipher)
|
|
||||||
}
|
|
||||||
|
|
||||||
int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
|
|
||||||
- struct sk_buff *skb)
|
|
||||||
+ struct ath11k_sta *arsta, struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
struct ath11k_base *ab = ar->ab;
|
|
||||||
struct ath11k_dp *dp = &ab->dp;
|
|
||||||
@@ -145,7 +145,15 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
|
|
||||||
FIELD_PREP(DP_TX_DESC_ID_MSDU_ID, ret) |
|
|
||||||
FIELD_PREP(DP_TX_DESC_ID_POOL_ID, pool_id);
|
|
||||||
ti.encap_type = ath11k_dp_tx_get_encap_type(arvif, skb);
|
|
||||||
- ti.meta_data_flags = arvif->tcl_metadata;
|
|
||||||
+
|
|
||||||
+ if (ieee80211_has_a4(hdr->frame_control) &&
|
|
||||||
+ is_multicast_ether_addr(hdr->addr3) && arsta &&
|
|
||||||
+ arsta->use_4addr_set) {
|
|
||||||
+ ti.meta_data_flags = arsta->tcl_metadata;
|
|
||||||
+ ti.flags0 |= FIELD_PREP(HAL_TCL_DATA_CMD_INFO1_TO_FW, 1);
|
|
||||||
+ } else {
|
|
||||||
+ ti.meta_data_flags = arvif->tcl_metadata;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (ti.encap_type == HAL_TCL_ENCAP_TYPE_RAW) {
|
|
||||||
if (skb_cb->flags & ATH11K_SKB_CIPHER_SET) {
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.h b/drivers/net/wireless/ath/ath11k/dp_tx.h
|
|
||||||
index f8a9f9c8e444..698b907b878d 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.h
|
|
||||||
@@ -17,7 +17,7 @@ struct ath11k_dp_htt_wbm_tx_status {
|
|
||||||
|
|
||||||
int ath11k_dp_tx_htt_h2t_ver_req_msg(struct ath11k_base *ab);
|
|
||||||
int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
|
|
||||||
- struct sk_buff *skb);
|
|
||||||
+ struct ath11k_sta *arsta, struct sk_buff *skb);
|
|
||||||
void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id);
|
|
||||||
int ath11k_dp_tx_send_reo_cmd(struct ath11k_base *ab, struct dp_rx_tid *rx_tid,
|
|
||||||
enum hal_reo_cmd_type type,
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
index d42637ecbf1e..e8da4af82221 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -4356,6 +4356,7 @@ static void ath11k_mac_op_tx(struct ieee80211_hw *hw,
|
|
||||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
|
||||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
|
||||||
struct ieee80211_key_conf *key = info->control.hw_key;
|
|
||||||
+ struct ath11k_sta *arsta = NULL;
|
|
||||||
u32 info_flags = info->flags;
|
|
||||||
bool is_prb_rsp;
|
|
||||||
int ret;
|
|
||||||
@@ -4381,7 +4382,10 @@ static void ath11k_mac_op_tx(struct ieee80211_hw *hw,
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- ret = ath11k_dp_tx(ar, arvif, skb);
|
|
||||||
+ if (control->sta)
|
|
||||||
+ arsta = (struct ath11k_sta *)control->sta->drv_priv;
|
|
||||||
+
|
|
||||||
+ ret = ath11k_dp_tx(ar, arvif, arsta, skb);
|
|
||||||
if (ret) {
|
|
||||||
ath11k_warn(ar->ab, "failed to transmit frame %d\n", ret);
|
|
||||||
ieee80211_free_txskb(ar->hw, skb);
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/peer.c b/drivers/net/wireless/ath/ath11k/peer.c
|
|
||||||
index f49abefa9618..85471f8b3563 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/peer.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/peer.c
|
|
||||||
@@ -251,6 +251,7 @@ int ath11k_peer_create(struct ath11k *ar, struct ath11k_vif *arvif,
|
|
||||||
struct ieee80211_sta *sta, struct peer_create_params *param)
|
|
||||||
{
|
|
||||||
struct ath11k_peer *peer;
|
|
||||||
+ struct ath11k_sta *arsta;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
lockdep_assert_held(&ar->conf_mutex);
|
|
||||||
@@ -319,6 +320,16 @@ int ath11k_peer_create(struct ath11k *ar, struct ath11k_vif *arvif,
|
|
||||||
peer->sec_type = HAL_ENCRYPT_TYPE_OPEN;
|
|
||||||
peer->sec_type_grp = HAL_ENCRYPT_TYPE_OPEN;
|
|
||||||
|
|
||||||
+ if (sta) {
|
|
||||||
+ arsta = (struct ath11k_sta *)sta->drv_priv;
|
|
||||||
+ arsta->tcl_metadata |= FIELD_PREP(HTT_TCL_META_DATA_TYPE, 0) |
|
|
||||||
+ FIELD_PREP(HTT_TCL_META_DATA_PEER_ID,
|
|
||||||
+ peer->peer_id);
|
|
||||||
+
|
|
||||||
+ /* set HTT extension valid bit to 0 by default */
|
|
||||||
+ arsta->tcl_metadata &= ~HTT_TCL_META_DATA_VALID_HTT;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
ar->num_peers++;
|
|
||||||
|
|
||||||
spin_unlock_bh(&ar->ab->base_lock);
|
|
@ -1,31 +0,0 @@
|
|||||||
From fb359946c3effad77a3ac8ebc943ea5cac22d335 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bhaumik Bhatt <bbhatt@codeaurora.org>
|
|
||||||
Date: Thu, 6 May 2021 12:51:43 -0700
|
|
||||||
Subject: [PATCH] ath11k: set register access length for MHI driver
|
|
||||||
|
|
||||||
MHI driver requires register space length to add range checks and
|
|
||||||
prevent memory region accesses outside of that for MMIO space.
|
|
||||||
Set it before registering the MHI controller.
|
|
||||||
|
|
||||||
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
|
|
||||||
Reviewed-by: Hemant Kumar <hemantk@codeaurora.org>
|
|
||||||
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
|
||||||
Acked-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/1620330705-40192-5-git-send-email-bbhatt@codeaurora.org
|
|
||||||
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/mhi.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c
|
|
||||||
index 27b394d115e26a..e097ae52e25733 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mhi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mhi.c
|
|
||||||
@@ -330,6 +330,7 @@ int ath11k_mhi_register(struct ath11k_pci *ab_pci)
|
|
||||||
mhi_ctrl->cntrl_dev = ab->dev;
|
|
||||||
mhi_ctrl->fw_image = ab_pci->amss_path;
|
|
||||||
mhi_ctrl->regs = ab->mem;
|
|
||||||
+ mhi_ctrl->reg_len = ab->mem_len;
|
|
||||||
|
|
||||||
ret = ath11k_mhi_get_msi(ab_pci);
|
|
||||||
if (ret) {
|
|
File diff suppressed because it is too large
Load Diff
@ -1,37 +0,0 @@
|
|||||||
WMI_CHAN_INFO_DFS_FREQ2 needs to be set in wmi vdev start command chan
|
|
||||||
info parameter, to enable radar detection for secondary segment in 160MHz.
|
|
||||||
|
|
||||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01717-QCAHKSWPL_SILICONZ-1
|
|
||||||
|
|
||||||
Signed-off-by: Lavanya Suresh <lavaks@xxxxxxxxxxxxxx>
|
|
||||||
---
|
|
||||||
v2:
|
|
||||||
* Rebased on latest ath.git
|
|
||||||
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/mac.c | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
index b391169..a650d95 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -5096,13 +5096,15 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
|
|
||||||
arg.channel.chan_radar =
|
|
||||||
!!(chandef->chan->flags & IEEE80211_CHAN_RADAR);
|
|
||||||
|
|
||||||
+ arg.channel.freq2_radar =
|
|
||||||
+ !!(chandef->chan->flags & IEEE80211_CHAN_RADAR);
|
|
||||||
+
|
|
||||||
arg.channel.passive = arg.channel.chan_radar;
|
|
||||||
|
|
||||||
spin_lock_bh(&ab->base_lock);
|
|
||||||
arg.regdomain = ar->ab->dfs_region;
|
|
||||||
spin_unlock_bh(&ab->base_lock);
|
|
||||||
|
|
||||||
- /* TODO: Notify if secondary 80Mhz also needs radar detection */
|
|
||||||
if (he_support) {
|
|
||||||
ret = ath11k_set_he_mu_sounding_mode(ar, arvif);
|
|
||||||
if (ret) {
|
|
||||||
--
|
|
||||||
2.7.4
|
|
@ -1,34 +0,0 @@
|
|||||||
From 515bda1d1e51c64edf2a384a58801f85a80a3f2d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
|
|
||||||
Date: Sat, 22 May 2021 11:50:54 +0200
|
|
||||||
Subject: ath11k: Fix an error handling path in
|
|
||||||
ath11k_core_fetch_board_data_api_n()
|
|
||||||
|
|
||||||
All error paths but this one 'goto err' in order to release some
|
|
||||||
resources.
|
|
||||||
Fix this.
|
|
||||||
|
|
||||||
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
|
|
||||||
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
|
|
||||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/e959eb544f3cb04258507d8e25a6f12eab126bde.1621676864.git.christophe.jaillet@wanadoo.fr
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/core.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
|
|
||||||
index 4a1051418f33a..969bf1a590d99 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
|
||||||
@@ -532,7 +532,8 @@ static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *ab,
|
|
||||||
if (len < ALIGN(ie_len, 4)) {
|
|
||||||
ath11k_err(ab, "invalid length for board ie_id %d ie_len %zu len %zu\n",
|
|
||||||
ie_id, ie_len, len);
|
|
||||||
- return -EINVAL;
|
|
||||||
+ ret = -EINVAL;
|
|
||||||
+ goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (ie_id) {
|
|
||||||
--
|
|
||||||
cgit 1.2.3-1.el7
|
|
@ -1,57 +0,0 @@
|
|||||||
From 979ebc54cf13bd1e3eb6e21766d208d5de984fb8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Seevalamuthu Mariappan <seevalam@codeaurora.org>
|
|
||||||
Date: Tue, 25 May 2021 15:30:28 +0200
|
|
||||||
Subject: ath11k: send beacon template after vdev_start/restart during csa
|
|
||||||
|
|
||||||
Firmware has added assert if beacon template is received after
|
|
||||||
vdev_down. Firmware expects beacon template after vdev_start
|
|
||||||
and before vdev_up. This change is needed to support MBSSID EMA
|
|
||||||
cases in firmware.
|
|
||||||
|
|
||||||
Hence, Change the sequence in ath11k as expected from firmware.
|
|
||||||
This new change is not causing any issues with older
|
|
||||||
firmware.
|
|
||||||
|
|
||||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1.r3-00011-QCAHKSWPL_SILICONZ-1
|
|
||||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1.r4-00008-QCAHKSWPL_SILICONZ-1
|
|
||||||
|
|
||||||
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
|
|
||||||
Signed-off-by: Seevalamuthu Mariappan <seevalam@codeaurora.org>
|
|
||||||
[sven@narfation.org: added tested-on/fixes information]
|
|
||||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
|
||||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
||||||
Link: https://lore.kernel.org/r/20210525133028.2805615-1-sven@narfation.org
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/mac.c | 10 +++++-----
|
|
||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
index 9d0ff150ec30f..eb52332dbe3f1 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -5379,11 +5379,6 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
|
|
||||||
if (WARN_ON(!arvif->is_up))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
- ret = ath11k_mac_setup_bcn_tmpl(arvif);
|
|
||||||
- if (ret)
|
|
||||||
- ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
|
|
||||||
- ret);
|
|
||||||
-
|
|
||||||
ret = ath11k_mac_vdev_restart(arvif, &vifs[i].new_ctx->def);
|
|
||||||
if (ret) {
|
|
||||||
ath11k_warn(ab, "failed to restart vdev %d: %d\n",
|
|
||||||
@@ -5391,6 +5386,11 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ ret = ath11k_mac_setup_bcn_tmpl(arvif);
|
|
||||||
+ if (ret)
|
|
||||||
+ ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
|
|
||||||
+ ret);
|
|
||||||
+
|
|
||||||
ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid,
|
|
||||||
arvif->bssid);
|
|
||||||
if (ret) {
|
|
||||||
--
|
|
||||||
cgit 1.2.3-1.el7
|
|
@ -1,103 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
||||||
@@ -1463,11 +1463,9 @@ struct htt_ppdu_stats_info *ath11k_dp_ht
|
|
||||||
{
|
|
||||||
struct htt_ppdu_stats_info *ppdu_info;
|
|
||||||
|
|
||||||
- spin_lock_bh(&ar->data_lock);
|
|
||||||
if (!list_empty(&ar->ppdu_stats_info)) {
|
|
||||||
list_for_each_entry(ppdu_info, &ar->ppdu_stats_info, list) {
|
|
||||||
if (ppdu_info->ppdu_id == ppdu_id) {
|
|
||||||
- spin_unlock_bh(&ar->data_lock);
|
|
||||||
return ppdu_info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1481,16 +1479,13 @@ struct htt_ppdu_stats_info *ath11k_dp_ht
|
|
||||||
kfree(ppdu_info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- spin_unlock_bh(&ar->data_lock);
|
|
||||||
|
|
||||||
ppdu_info = kzalloc(sizeof(*ppdu_info), GFP_ATOMIC);
|
|
||||||
if (!ppdu_info)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
- spin_lock_bh(&ar->data_lock);
|
|
||||||
list_add_tail(&ppdu_info->list, &ar->ppdu_stats_info);
|
|
||||||
ar->ppdu_stat_list_depth++;
|
|
||||||
- spin_unlock_bh(&ar->data_lock);
|
|
||||||
|
|
||||||
return ppdu_info;
|
|
||||||
}
|
|
||||||
@@ -1522,8 +1517,10 @@ static int ath11k_htt_pull_ppdu_stats(st
|
|
||||||
ath11k_htt_ppdu_pktlog_process(ar, (u8 *)skb->data, DP_RX_BUFFER_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ spin_lock_bh(&ar->data_lock);
|
|
||||||
ppdu_info = ath11k_dp_htt_get_ppdu_desc(ar, ppdu_id);
|
|
||||||
if (!ppdu_info) {
|
|
||||||
+ spin_unlock_bh(&ar->data_lock);
|
|
||||||
ret = -EINVAL;
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
@@ -1533,10 +1530,12 @@ static int ath11k_htt_pull_ppdu_stats(st
|
|
||||||
ath11k_htt_tlv_ppdu_stats_parse,
|
|
||||||
(void *)ppdu_info);
|
|
||||||
if (ret) {
|
|
||||||
+ spin_unlock_bh(&ar->data_lock);
|
|
||||||
ath11k_warn(ab, "Failed to parse tlv %d\n", ret);
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ spin_unlock_bh(&ar->data_lock);
|
|
||||||
exit:
|
|
||||||
rcu_read_unlock();
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -2755,22 +2755,28 @@ static int ath11k_clear_peer_keys(struct
|
|
||||||
int ret;
|
|
||||||
int i;
|
|
||||||
u32 flags = 0;
|
|
||||||
+ struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1];
|
|
||||||
|
|
||||||
lockdep_assert_held(&ar->conf_mutex);
|
|
||||||
|
|
||||||
spin_lock_bh(&ab->base_lock);
|
|
||||||
peer = ath11k_peer_find(ab, arvif->vdev_id, addr);
|
|
||||||
- spin_unlock_bh(&ab->base_lock);
|
|
||||||
-
|
|
||||||
- if (!peer)
|
|
||||||
+ if (!peer) {
|
|
||||||
+ spin_unlock_bh(&ab->base_lock);
|
|
||||||
return -ENOENT;
|
|
||||||
+ }
|
|
||||||
+ for (i = 0; i < ARRAY_SIZE(keys); i++) {
|
|
||||||
+ keys[i]= peer->keys[i];
|
|
||||||
+ peer->keys[i]= NULL;
|
|
||||||
+ }
|
|
||||||
+ spin_unlock_bh(&ab->base_lock);
|
|
||||||
|
|
||||||
- for (i = 0; i < ARRAY_SIZE(peer->keys); i++) {
|
|
||||||
- if (!peer->keys[i])
|
|
||||||
+ for (i = 0; i < ARRAY_SIZE(keys); i++) {
|
|
||||||
+ if (!keys[i])
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* key flags are not required to delete the key */
|
|
||||||
- ret = ath11k_install_key(arvif, peer->keys[i],
|
|
||||||
+ ret = ath11k_install_key(arvif, keys[i],
|
|
||||||
DISABLE_KEY, addr, flags);
|
|
||||||
if (ret < 0 && first_errno == 0)
|
|
||||||
first_errno = ret;
|
|
||||||
@@ -2778,10 +2784,6 @@ static int ath11k_clear_peer_keys(struct
|
|
||||||
if (ret < 0)
|
|
||||||
ath11k_warn(ab, "failed to remove peer key %d: %d\n",
|
|
||||||
i, ret);
|
|
||||||
-
|
|
||||||
- spin_lock_bh(&ab->base_lock);
|
|
||||||
- peer->keys[i] = NULL;
|
|
||||||
- spin_unlock_bh(&ab->base_lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
return first_errno;
|
|
@ -1,47 +0,0 @@
|
|||||||
From 89aec0a67ee30cd11762aede86b3edfdb2433663 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Venkateswara Naralasetty <vnaralas@codeaurora.org>
|
|
||||||
Date: Thu, 2 Jul 2020 12:04:34 +0530
|
|
||||||
Subject: [PATCH] ath11k: load appropriate board data based on board id
|
|
||||||
|
|
||||||
This patch adds support to read board id from dts and load
|
|
||||||
appropriate board data.
|
|
||||||
|
|
||||||
Adding the patch which was removed as a part of commit id -
|
|
||||||
Ib950b3271fede9ccf7d53fe9629c38ee729a0ef5
|
|
||||||
|
|
||||||
Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
|
|
||||||
Signed-off-by: Lavanya Suresh <lavaks@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/qmi.c | 9 +++++++--
|
|
||||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
|
||||||
@@ -1811,9 +1811,11 @@ static int ath11k_qmi_assign_target_mem_
|
|
||||||
|
|
||||||
static int ath11k_qmi_request_target_cap(struct ath11k_base *ab)
|
|
||||||
{
|
|
||||||
+ struct device *dev = ab->dev;
|
|
||||||
struct qmi_wlanfw_cap_req_msg_v01 req;
|
|
||||||
struct qmi_wlanfw_cap_resp_msg_v01 resp;
|
|
||||||
struct qmi_txn txn = {};
|
|
||||||
+ unsigned int board_id;
|
|
||||||
int ret = 0;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
@@ -1853,10 +1855,13 @@ static int ath11k_qmi_request_target_cap
|
|
||||||
ab->qmi.target.chip_family = resp.chip_info.chip_family;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (resp.board_info_valid)
|
|
||||||
+ if (!of_property_read_u32(dev->of_node, "qcom,board_id", &board_id) && board_id != 0xFF) {
|
|
||||||
+ ab->qmi.target.board_id = board_id;
|
|
||||||
+ } else if (resp.board_info_valid) {
|
|
||||||
ab->qmi.target.board_id = resp.board_info.board_id;
|
|
||||||
- else
|
|
||||||
+ } else {
|
|
||||||
ab->qmi.target.board_id = 0xFF;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (resp.soc_info_valid)
|
|
||||||
ab->qmi.target.soc_id = resp.soc_info.soc_id;
|
|
@ -1,54 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
@@ -1333,6 +1333,7 @@ int ath11k_wmi_pdev_bss_chan_info_reques
|
|
||||||
WMI_TAG_PDEV_BSS_CHAN_INFO_REQUEST) |
|
|
||||||
FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
|
|
||||||
cmd->req_type = type;
|
|
||||||
+ cmd->pdev_id = ar->pdev->pdev_id;
|
|
||||||
|
|
||||||
ath11k_dbg(ar->ab, ATH11K_DBG_WMI,
|
|
||||||
"WMI bss chan info req type %d\n", type);
|
|
||||||
@@ -3122,7 +3123,7 @@ ath11k_wmi_copy_resource_config(struct w
|
|
||||||
wmi_cfg->bpf_instruction_size = tg_cfg->bpf_instruction_size;
|
|
||||||
wmi_cfg->max_bssid_rx_filters = tg_cfg->max_bssid_rx_filters;
|
|
||||||
wmi_cfg->use_pdev_id = tg_cfg->use_pdev_id;
|
|
||||||
- wmi_cfg->flag1 = tg_cfg->atf_config;
|
|
||||||
+ wmi_cfg->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
|
|
||||||
wmi_cfg->peer_map_unmap_v2_support = tg_cfg->peer_map_unmap_v2_support;
|
|
||||||
wmi_cfg->sched_params = tg_cfg->sched_params;
|
|
||||||
wmi_cfg->twt_ap_pdev_count = tg_cfg->twt_ap_pdev_count;
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/wmi.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
|
|
||||||
@@ -2219,6 +2219,8 @@ struct wmi_init_cmd {
|
|
||||||
u32 num_host_mem_chunks;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
+#define WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 BIT(5)
|
|
||||||
+
|
|
||||||
struct wmi_resource_config {
|
|
||||||
u32 tlv_header;
|
|
||||||
u32 num_vdevs;
|
|
||||||
@@ -2935,6 +2937,7 @@ struct wmi_pdev_bss_chan_info_req_cmd {
|
|
||||||
u32 tlv_header;
|
|
||||||
/* ref wmi_bss_chan_info_req_type */
|
|
||||||
u32 req_type;
|
|
||||||
+ u32 pdev_id;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct wmi_ap_ps_peer_cmd {
|
|
||||||
@@ -4028,7 +4031,6 @@ struct wmi_vdev_stopped_event {
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct wmi_pdev_bss_chan_info_event {
|
|
||||||
- u32 pdev_id;
|
|
||||||
u32 freq; /* Units in MHz */
|
|
||||||
u32 noise_floor; /* units are dBm */
|
|
||||||
/* rx clear - how often the channel was unused */
|
|
||||||
@@ -4046,6 +4048,7 @@ struct wmi_pdev_bss_chan_info_event {
|
|
||||||
/*rx_cycle cnt for my bss in 64bits format */
|
|
||||||
u32 rx_bss_cycle_count_low;
|
|
||||||
u32 rx_bss_cycle_count_high;
|
|
||||||
+ u32 pdev_id;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
#define WMI_VDEV_INSTALL_KEY_COMPL_STATUS_SUCCESS 0
|
|
@ -1,439 +0,0 @@
|
|||||||
From 929e141221444868ee98f253717479e5dd333102 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maharaja Kennadyrajan <mkenna@codeaurora.org>
|
|
||||||
Date: Fri, 19 Mar 2021 14:45:37 +0530
|
|
||||||
Subject: [PATCH] ath11k: register copy engine send completion callback
|
|
||||||
|
|
||||||
Register send completion callback for copy engine-0 (CE0)
|
|
||||||
for the function ath11k_htc_tx_completion_handler().
|
|
||||||
This callback will be used for freeing the skbs allocated
|
|
||||||
by the ath11k_htc_send() from the below functions:
|
|
||||||
ath11k_htc_connect_service() & ath11k_htc_start().
|
|
||||||
|
|
||||||
Signed-off-by: Maharaja Kennadyrajan <mkenna@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/ce.c | 33 +++++++++++----
|
|
||||||
drivers/net/wireless/ath/ath11k/ce.h | 3 +-
|
|
||||||
drivers/net/wireless/ath/ath11k/core.c | 2 +
|
|
||||||
drivers/net/wireless/ath/ath11k/htc.c | 75 ++++++++++++++++++++++++----------
|
|
||||||
drivers/net/wireless/ath/ath11k/htc.h | 4 ++
|
|
||||||
drivers/net/wireless/ath/ath11k/hw.h | 1 +
|
|
||||||
drivers/net/wireless/ath/ath11k/wmi.c | 54 +++++++++++++++++++++---
|
|
||||||
drivers/net/wireless/ath/ath11k/wmi.h | 1 +
|
|
||||||
8 files changed, 138 insertions(+), 35 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/ce.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/ce.c
|
|
||||||
@@ -14,6 +14,7 @@ const struct ce_attr ath11k_host_ce_conf
|
|
||||||
.src_nentries = 16,
|
|
||||||
.src_sz_max = 2048,
|
|
||||||
.dest_nentries = 0,
|
|
||||||
+ .send_cb = ath11k_htc_tx_completion_handler,
|
|
||||||
},
|
|
||||||
|
|
||||||
/* CE1: target->host HTT + HTC control */
|
|
||||||
@@ -40,6 +41,7 @@ const struct ce_attr ath11k_host_ce_conf
|
|
||||||
.src_nentries = 32,
|
|
||||||
.src_sz_max = 2048,
|
|
||||||
.dest_nentries = 0,
|
|
||||||
+ .send_cb = ath11k_htc_tx_completion_handler,
|
|
||||||
},
|
|
||||||
|
|
||||||
/* CE4: host->target HTT */
|
|
||||||
@@ -73,6 +75,7 @@ const struct ce_attr ath11k_host_ce_conf
|
|
||||||
.src_nentries = 32,
|
|
||||||
.src_sz_max = 2048,
|
|
||||||
.dest_nentries = 0,
|
|
||||||
+ .send_cb = ath11k_htc_tx_completion_handler,
|
|
||||||
},
|
|
||||||
|
|
||||||
/* CE8: target autonomous hif_memcpy */
|
|
||||||
@@ -89,6 +92,7 @@ const struct ce_attr ath11k_host_ce_conf
|
|
||||||
.src_nentries = 32,
|
|
||||||
.src_sz_max = 2048,
|
|
||||||
.dest_nentries = 0,
|
|
||||||
+ .send_cb = ath11k_htc_tx_completion_handler,
|
|
||||||
},
|
|
||||||
|
|
||||||
/* CE10: target->host HTT */
|
|
||||||
@@ -116,6 +120,7 @@ const struct ce_attr ath11k_host_ce_conf
|
|
||||||
.src_nentries = 16,
|
|
||||||
.src_sz_max = 2048,
|
|
||||||
.dest_nentries = 0,
|
|
||||||
+ .send_cb = ath11k_htc_tx_completion_handler,
|
|
||||||
},
|
|
||||||
|
|
||||||
/* CE1: target->host HTT + HTC control */
|
|
||||||
@@ -142,6 +147,7 @@ const struct ce_attr ath11k_host_ce_conf
|
|
||||||
.src_nentries = 32,
|
|
||||||
.src_sz_max = 2048,
|
|
||||||
.dest_nentries = 0,
|
|
||||||
+ .send_cb = ath11k_htc_tx_completion_handler,
|
|
||||||
},
|
|
||||||
|
|
||||||
/* CE4: host->target HTT */
|
|
||||||
@@ -436,19 +442,33 @@ err_unlock:
|
|
||||||
return skb;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void ath11k_ce_send_done_cb(struct ath11k_ce_pipe *pipe)
|
|
||||||
+static void ath11k_ce_tx_process_cb(struct ath11k_ce_pipe *pipe)
|
|
||||||
{
|
|
||||||
struct ath11k_base *ab = pipe->ab;
|
|
||||||
struct sk_buff *skb;
|
|
||||||
+ struct sk_buff_head list;
|
|
||||||
|
|
||||||
+ __skb_queue_head_init(&list);
|
|
||||||
while (!IS_ERR(skb = ath11k_ce_completed_send_next(pipe))) {
|
|
||||||
if (!skb)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
dma_unmap_single(ab->dev, ATH11K_SKB_CB(skb)->paddr, skb->len,
|
|
||||||
DMA_TO_DEVICE);
|
|
||||||
- dev_kfree_skb_any(skb);
|
|
||||||
+ if ((!pipe->send_cb) || ab->hw_params.credit_flow) {
|
|
||||||
+ dev_kfree_skb_any(skb);
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ __skb_queue_tail(&list, skb);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ while ((skb = __skb_dequeue(&list))) {
|
|
||||||
+ ath11k_dbg(ab, ATH11K_DBG_AHB, "tx ce pipe %d len %d\n",
|
|
||||||
+ pipe->pipe_num, skb->len);
|
|
||||||
+ pipe->send_cb(ab, skb);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ath11k_ce_srng_msi_ring_params_setup(struct ath11k_base *ab, u32 ce_id,
|
|
||||||
@@ -582,7 +602,7 @@ static int ath11k_ce_alloc_pipe(struct a
|
|
||||||
pipe->attr_flags = attr->flags;
|
|
||||||
|
|
||||||
if (attr->src_nentries) {
|
|
||||||
- pipe->send_cb = ath11k_ce_send_done_cb;
|
|
||||||
+ pipe->send_cb = attr->send_cb;
|
|
||||||
nentries = roundup_pow_of_two(attr->src_nentries);
|
|
||||||
desc_sz = ath11k_hal_ce_get_desc_size(HAL_CE_DESC_SRC);
|
|
||||||
ring = ath11k_ce_alloc_ring(ab, nentries, desc_sz);
|
|
||||||
@@ -613,9 +633,10 @@ static int ath11k_ce_alloc_pipe(struct a
|
|
||||||
void ath11k_ce_per_engine_service(struct ath11k_base *ab, u16 ce_id)
|
|
||||||
{
|
|
||||||
struct ath11k_ce_pipe *pipe = &ab->ce.ce_pipe[ce_id];
|
|
||||||
+ const struct ce_attr *attr = &ab->hw_params.host_ce_config[ce_id];
|
|
||||||
|
|
||||||
- if (pipe->send_cb)
|
|
||||||
- pipe->send_cb(pipe);
|
|
||||||
+ if (attr->src_nentries)
|
|
||||||
+ ath11k_ce_tx_process_cb(pipe);
|
|
||||||
|
|
||||||
if (pipe->recv_cb)
|
|
||||||
ath11k_ce_recv_process_cb(pipe);
|
|
||||||
@@ -624,9 +645,10 @@ void ath11k_ce_per_engine_service(struct
|
|
||||||
void ath11k_ce_poll_send_completed(struct ath11k_base *ab, u8 pipe_id)
|
|
||||||
{
|
|
||||||
struct ath11k_ce_pipe *pipe = &ab->ce.ce_pipe[pipe_id];
|
|
||||||
+ const struct ce_attr *attr = &ab->hw_params.host_ce_config[pipe_id];
|
|
||||||
|
|
||||||
- if ((pipe->attr_flags & CE_ATTR_DIS_INTR) && pipe->send_cb)
|
|
||||||
- pipe->send_cb(pipe);
|
|
||||||
+ if ((pipe->attr_flags & CE_ATTR_DIS_INTR) && attr->src_nentries)
|
|
||||||
+ ath11k_ce_tx_process_cb(pipe);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(ath11k_ce_per_engine_service);
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/ce.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/ce.h
|
|
||||||
@@ -101,6 +101,7 @@ struct ce_attr {
|
|
||||||
unsigned int dest_nentries;
|
|
||||||
|
|
||||||
void (*recv_cb)(struct ath11k_base *, struct sk_buff *);
|
|
||||||
+ void (*send_cb)(struct ath11k_base *, struct sk_buff *);
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CE_DESC_RING_ALIGN 8
|
|
||||||
@@ -154,7 +155,7 @@ struct ath11k_ce_pipe {
|
|
||||||
unsigned int buf_sz;
|
|
||||||
unsigned int rx_buf_needed;
|
|
||||||
|
|
||||||
- void (*send_cb)(struct ath11k_ce_pipe *);
|
|
||||||
+ void (*send_cb)(struct ath11k_base *, struct sk_buff *);
|
|
||||||
void (*recv_cb)(struct ath11k_base *, struct sk_buff *);
|
|
||||||
|
|
||||||
struct tasklet_struct intr_tq;
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
|
||||||
@@ -41,6 +41,7 @@ static const struct ath11k_hw_params ath
|
|
||||||
.max_radios = 3,
|
|
||||||
.bdf_addr = 0x4B0C0000,
|
|
||||||
.hw_ops = &ipq8074_ops,
|
|
||||||
+ .credit_flow = false,
|
|
||||||
.ring_mask = &ath11k_hw_ring_mask_ipq8074,
|
|
||||||
.internal_sleep_clock = false,
|
|
||||||
.regs = &ipq8074_regs,
|
|
||||||
@@ -78,6 +79,7 @@ static const struct ath11k_hw_params ath
|
|
||||||
.max_radios = 2,
|
|
||||||
.bdf_addr = 0x4ABC0000,
|
|
||||||
.hw_ops = &ipq6018_ops,
|
|
||||||
+ .credit_flow = false,
|
|
||||||
.ring_mask = &ath11k_hw_ring_mask_ipq8074,
|
|
||||||
.internal_sleep_clock = false,
|
|
||||||
.regs = &ipq8074_regs,
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/htc.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/htc.c
|
|
||||||
@@ -86,8 +86,7 @@ int ath11k_htc_send(struct ath11k_htc *h
|
|
||||||
}
|
|
||||||
|
|
||||||
skb_push(skb, sizeof(struct ath11k_htc_hdr));
|
|
||||||
-
|
|
||||||
- if (ep->tx_credit_flow_enabled) {
|
|
||||||
+ if (ab->hw_params.credit_flow && ep->tx_credit_flow_enabled) {
|
|
||||||
credits = DIV_ROUND_UP(skb->len, htc->target_credit_size);
|
|
||||||
spin_lock_bh(&htc->tx_lock);
|
|
||||||
if (ep->tx_credits < credits) {
|
|
||||||
@@ -112,7 +111,11 @@ int ath11k_htc_send(struct ath11k_htc *h
|
|
||||||
ret = dma_mapping_error(dev, skb_cb->paddr);
|
|
||||||
if (ret) {
|
|
||||||
ret = -EIO;
|
|
||||||
- goto err_credits;
|
|
||||||
+ if (ab->hw_params.credit_flow)
|
|
||||||
+ goto err_credits;
|
|
||||||
+
|
|
||||||
+ else
|
|
||||||
+ goto err_pull;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = ath11k_ce_send(htc->ab, skb, ep->ul_pipe_id, ep->eid);
|
|
||||||
@@ -124,14 +127,13 @@ int ath11k_htc_send(struct ath11k_htc *h
|
|
||||||
err_unmap:
|
|
||||||
dma_unmap_single(dev, skb_cb->paddr, skb->len, DMA_TO_DEVICE);
|
|
||||||
err_credits:
|
|
||||||
- if (ep->tx_credit_flow_enabled) {
|
|
||||||
+ if (ab->hw_params.credit_flow && ep->tx_credit_flow_enabled) {
|
|
||||||
spin_lock_bh(&htc->tx_lock);
|
|
||||||
ep->tx_credits += credits;
|
|
||||||
ath11k_dbg(ab, ATH11K_DBG_HTC,
|
|
||||||
"htc ep %d reverted %d credits back (total %d)\n",
|
|
||||||
eid, credits, ep->tx_credits);
|
|
||||||
spin_unlock_bh(&htc->tx_lock);
|
|
||||||
-
|
|
||||||
if (ep->ep_ops.ep_tx_credits)
|
|
||||||
ep->ep_ops.ep_tx_credits(htc->ab);
|
|
||||||
}
|
|
||||||
@@ -200,24 +202,25 @@ static int ath11k_htc_process_trailer(st
|
|
||||||
status = -EINVAL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- switch (record->hdr.id) {
|
|
||||||
- case ATH11K_HTC_RECORD_CREDITS:
|
|
||||||
- len = sizeof(struct ath11k_htc_credit_report);
|
|
||||||
- if (record->hdr.len < len) {
|
|
||||||
- ath11k_warn(ab, "Credit report too long\n");
|
|
||||||
- status = -EINVAL;
|
|
||||||
+ if(ab->hw_params.credit_flow) {
|
|
||||||
+ switch (record->hdr.id) {
|
|
||||||
+ case ATH11K_HTC_RECORD_CREDITS:
|
|
||||||
+ len = sizeof(struct ath11k_htc_credit_report);
|
|
||||||
+ if (record->hdr.len < len) {
|
|
||||||
+ ath11k_warn(ab, "Credit report too long\n");
|
|
||||||
+ status = -EINVAL;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ ath11k_htc_process_credit_report(htc,
|
|
||||||
+ record->credit_report,
|
|
||||||
+ record->hdr.len,
|
|
||||||
+ src_eid);
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ ath11k_warn(ab, "Unhandled record: id:%d length:%d\n",
|
|
||||||
+ record->hdr.id, record->hdr.len);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- ath11k_htc_process_credit_report(htc,
|
|
||||||
- record->credit_report,
|
|
||||||
- record->hdr.len,
|
|
||||||
- src_eid);
|
|
||||||
- break;
|
|
||||||
- default:
|
|
||||||
- ath11k_warn(ab, "Unhandled record: id:%d length:%d\n",
|
|
||||||
- record->hdr.id, record->hdr.len);
|
|
||||||
- break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (status)
|
|
||||||
@@ -231,6 +234,29 @@ static int ath11k_htc_process_trailer(st
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void ath11k_htc_tx_completion_handler(struct ath11k_base *ab,
|
|
||||||
+ struct sk_buff *skb)
|
|
||||||
+{
|
|
||||||
+ struct ath11k_htc *htc = &ab->htc;
|
|
||||||
+ struct ath11k_htc_ep *ep;
|
|
||||||
+ u8 eid = ATH11K_HTC_EP_UNUSED;
|
|
||||||
+
|
|
||||||
+ eid = ATH11K_SKB_CB(skb)->eid;
|
|
||||||
+ if (eid >= ATH11K_HTC_EP_COUNT)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ spin_lock_bh(&htc->tx_lock);
|
|
||||||
+ ep = &htc->endpoint[eid];
|
|
||||||
+ if (!ep->ep_ops.ep_tx_complete) {
|
|
||||||
+ dev_kfree_skb_any(skb);
|
|
||||||
+ spin_unlock_bh(&htc->tx_lock);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ spin_unlock_bh(&htc->tx_lock);
|
|
||||||
+
|
|
||||||
+ ep->ep_ops.ep_tx_complete(htc->ab, skb);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void ath11k_htc_rx_completion_handler(struct ath11k_base *ab,
|
|
||||||
struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
@@ -584,6 +610,11 @@ int ath11k_htc_connect_service(struct at
|
|
||||||
disable_credit_flow_ctrl = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (!ab->hw_params.credit_flow) {
|
|
||||||
+ flags |= ATH11K_HTC_CONN_FLAGS_DISABLE_CREDIT_FLOW_CTRL;
|
|
||||||
+ disable_credit_flow_ctrl = true;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
req_msg->flags_len = FIELD_PREP(HTC_SVC_MSG_CONNECTIONFLAGS, flags);
|
|
||||||
req_msg->msg_svc_id |= FIELD_PREP(HTC_SVC_MSG_SERVICE_ID,
|
|
||||||
conn_req->service_id);
|
|
||||||
@@ -708,6 +739,8 @@ int ath11k_htc_start(struct ath11k_htc *
|
|
||||||
msg = (struct ath11k_htc_setup_complete_extended *)skb->data;
|
|
||||||
msg->msg_id = FIELD_PREP(HTC_MSG_MESSAGEID,
|
|
||||||
ATH11K_HTC_MSG_SETUP_COMPLETE_EX_ID);
|
|
||||||
+ if (!ab->hw_params.credit_flow)
|
|
||||||
+ msg->flags |= ATH11K_GLOBAL_DISABLE_CREDIT_FLOW;
|
|
||||||
|
|
||||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "HTC is using TX credit flow control\n");
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/htc.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/htc.h
|
|
||||||
@@ -114,6 +114,8 @@ struct ath11k_htc_conn_svc_resp {
|
|
||||||
u32 svc_meta_pad;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
+#define ATH11K_GLOBAL_DISABLE_CREDIT_FLOW BIT(1)
|
|
||||||
+
|
|
||||||
struct ath11k_htc_setup_complete_extended {
|
|
||||||
u32 msg_id;
|
|
||||||
u32 flags;
|
|
||||||
@@ -309,5 +311,7 @@ int ath11k_htc_send(struct ath11k_htc *h
|
|
||||||
struct sk_buff *ath11k_htc_alloc_skb(struct ath11k_base *ar, int size);
|
|
||||||
void ath11k_htc_rx_completion_handler(struct ath11k_base *ar,
|
|
||||||
struct sk_buff *skb);
|
|
||||||
+void ath11k_htc_tx_completion_handler(struct ath11k_base *ab,
|
|
||||||
+ struct sk_buff *skb);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/hw.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/hw.h
|
|
||||||
@@ -156,6 +156,7 @@ struct ath11k_hw_params {
|
|
||||||
bool htt_peer_map_v2;
|
|
||||||
bool tcl_0_only;
|
|
||||||
u8 spectral_fft_sz;
|
|
||||||
+ bool credit_flow;
|
|
||||||
|
|
||||||
u16 interface_modes;
|
|
||||||
bool supports_monitor;
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
@@ -261,20 +261,35 @@ int ath11k_wmi_cmd_send(struct ath11k_pd
|
|
||||||
{
|
|
||||||
struct ath11k_wmi_base *wmi_sc = wmi->wmi_ab;
|
|
||||||
int ret = -EOPNOTSUPP;
|
|
||||||
+ struct ath11k_base *ab = wmi_sc->ab;
|
|
||||||
|
|
||||||
might_sleep();
|
|
||||||
|
|
||||||
- wait_event_timeout(wmi_sc->tx_credits_wq, ({
|
|
||||||
- ret = ath11k_wmi_cmd_send_nowait(wmi, skb, cmd_id);
|
|
||||||
+ if (ab->hw_params.credit_flow) {
|
|
||||||
+ wait_event_timeout(wmi_sc->tx_credits_wq, ({
|
|
||||||
+ ret = ath11k_wmi_cmd_send_nowait(wmi, skb, cmd_id);
|
|
||||||
+
|
|
||||||
+ if (ret && test_bit(ATH11K_FLAG_CRASH_FLUSH, &wmi_sc->ab->dev_flags))
|
|
||||||
+ ret = -ESHUTDOWN;
|
|
||||||
|
|
||||||
- if (ret && test_bit(ATH11K_FLAG_CRASH_FLUSH, &wmi_sc->ab->dev_flags))
|
|
||||||
- ret = -ESHUTDOWN;
|
|
||||||
+ (ret != -EAGAIN);
|
|
||||||
+ }), WMI_SEND_TIMEOUT_HZ);
|
|
||||||
+ } else {
|
|
||||||
+ wait_event_timeout(wmi->tx_ce_desc_wq, ({
|
|
||||||
+ ret = ath11k_wmi_cmd_send_nowait(wmi, skb, cmd_id);
|
|
||||||
|
|
||||||
- (ret != -EAGAIN);
|
|
||||||
- }), WMI_SEND_TIMEOUT_HZ);
|
|
||||||
+ if (ret && test_bit(ATH11K_FLAG_CRASH_FLUSH, &wmi_sc->ab->dev_flags))
|
|
||||||
+ ret = -ESHUTDOWN;
|
|
||||||
+
|
|
||||||
+ (ret != -ENOBUFS);
|
|
||||||
+ }), WMI_SEND_TIMEOUT_HZ);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (ret == -EAGAIN)
|
|
||||||
ath11k_warn(wmi_sc->ab, "wmi command %d timeout\n", cmd_id);
|
|
||||||
+ if (ret == -ENOBUFS)
|
|
||||||
+ ath11k_warn(wmi_sc->ab, "ce desc not available for wmi command %d\n",
|
|
||||||
+ cmd_id);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
@@ -5328,6 +5343,32 @@ static void ath11k_wmi_op_ep_tx_credits(
|
|
||||||
static void ath11k_wmi_htc_tx_complete(struct ath11k_base *ab,
|
|
||||||
struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
+ struct ath11k_pdev_wmi *wmi;
|
|
||||||
+ u32 i;
|
|
||||||
+ u8 wmi_ep_count;
|
|
||||||
+ u8 eid = ATH11K_HTC_EP_UNUSED;
|
|
||||||
+
|
|
||||||
+ eid = ATH11K_SKB_CB(skb)->eid;
|
|
||||||
+ if (eid >= ATH11K_HTC_EP_COUNT)
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+ wmi_ep_count = ab->htc.wmi_ep_count;
|
|
||||||
+ if (wmi_ep_count > ab->hw_params.max_radios)
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+ dev_kfree_skb(skb);
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < ab->htc.wmi_ep_count; i++) {
|
|
||||||
+ if (ab->wmi_ab.wmi[i].eid == eid) {
|
|
||||||
+ wmi = &ab->wmi_ab.wmi[i];
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ wake_up(&wmi->tx_ce_desc_wq);
|
|
||||||
+
|
|
||||||
+ return;
|
|
||||||
+out:
|
|
||||||
dev_kfree_skb(skb);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -6545,6 +6586,7 @@ static int ath11k_connect_pdev_htc_servi
|
|
||||||
ab->wmi_ab.wmi_endpoint_id[pdev_idx] = conn_resp.eid;
|
|
||||||
ab->wmi_ab.wmi[pdev_idx].eid = conn_resp.eid;
|
|
||||||
ab->wmi_ab.max_msg_len[pdev_idx] = conn_resp.max_msg_len;
|
|
||||||
+ init_waitqueue_head(&ab->wmi_ab.wmi[pdev_idx].tx_ce_desc_wq);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/wmi.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
|
|
||||||
@@ -2446,6 +2446,7 @@ struct ath11k_pdev_wmi {
|
|
||||||
enum ath11k_htc_ep_id eid;
|
|
||||||
const struct wmi_peer_flags_map *peer_flags;
|
|
||||||
u32 rx_decap_mode;
|
|
||||||
+ wait_queue_head_t tx_ce_desc_wq;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct vdev_create_params {
|
|
@ -1,102 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -6278,6 +6278,8 @@ static int __ath11k_mac_register(struct
|
|
||||||
|
|
||||||
ar->hw->wiphy->max_ap_assoc_sta = ar->max_num_stations;
|
|
||||||
|
|
||||||
+ wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT);
|
|
||||||
+
|
|
||||||
ar->hw->queues = ATH11K_HW_MAX_QUEUES;
|
|
||||||
ar->hw->wiphy->tx_queue_len = ATH11K_QUEUE_LEN;
|
|
||||||
ar->hw->offchannel_tx_hw_queue = ATH11K_HW_MAX_QUEUES - 1;
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
@@ -3143,7 +3143,8 @@ ath11k_wmi_copy_resource_config(struct w
|
|
||||||
wmi_cfg->bpf_instruction_size = tg_cfg->bpf_instruction_size;
|
|
||||||
wmi_cfg->max_bssid_rx_filters = tg_cfg->max_bssid_rx_filters;
|
|
||||||
wmi_cfg->use_pdev_id = tg_cfg->use_pdev_id;
|
|
||||||
- wmi_cfg->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
|
|
||||||
+ wmi_cfg->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 |
|
|
||||||
+ WMI_RSRC_CFG_FLAG1_ACK_RSSI;
|
|
||||||
wmi_cfg->peer_map_unmap_v2_support = tg_cfg->peer_map_unmap_v2_support;
|
|
||||||
wmi_cfg->sched_params = tg_cfg->sched_params;
|
|
||||||
wmi_cfg->twt_ap_pdev_count = tg_cfg->twt_ap_pdev_count;
|
|
||||||
@@ -4344,32 +4345,35 @@ static int ath11k_pull_mgmt_rx_params_tl
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int wmi_process_mgmt_tx_comp(struct ath11k *ar, u32 desc_id,
|
|
||||||
- u32 status)
|
|
||||||
+static int wmi_process_mgmt_tx_comp(struct ath11k *ar, struct wmi_mgmt_tx_compl_event *tx_compl_param)
|
|
||||||
{
|
|
||||||
struct sk_buff *msdu;
|
|
||||||
struct ieee80211_tx_info *info;
|
|
||||||
struct ath11k_skb_cb *skb_cb;
|
|
||||||
|
|
||||||
spin_lock_bh(&ar->txmgmt_idr_lock);
|
|
||||||
- msdu = idr_find(&ar->txmgmt_idr, desc_id);
|
|
||||||
+ msdu = idr_find(&ar->txmgmt_idr, tx_compl_param->desc_id);
|
|
||||||
|
|
||||||
if (!msdu) {
|
|
||||||
ath11k_warn(ar->ab, "received mgmt tx compl for invalid msdu_id: %d\n",
|
|
||||||
- desc_id);
|
|
||||||
+ tx_compl_param->desc_id);
|
|
||||||
spin_unlock_bh(&ar->txmgmt_idr_lock);
|
|
||||||
return -ENOENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
- idr_remove(&ar->txmgmt_idr, desc_id);
|
|
||||||
+ idr_remove(&ar->txmgmt_idr, tx_compl_param->desc_id);
|
|
||||||
spin_unlock_bh(&ar->txmgmt_idr_lock);
|
|
||||||
|
|
||||||
skb_cb = ATH11K_SKB_CB(msdu);
|
|
||||||
dma_unmap_single(ar->ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
|
|
||||||
|
|
||||||
info = IEEE80211_SKB_CB(msdu);
|
|
||||||
- if ((!(info->flags & IEEE80211_TX_CTL_NO_ACK)) && !status)
|
|
||||||
+ if ((!(info->flags & IEEE80211_TX_CTL_NO_ACK)) && !tx_compl_param->status)
|
|
||||||
+ {
|
|
||||||
info->flags |= IEEE80211_TX_STAT_ACK;
|
|
||||||
+ info->status.ack_signal = tx_compl_param->ack_rssi;
|
|
||||||
+ info->status.is_valid_ack_signal = true;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
ieee80211_tx_status_irqsafe(ar->hw, msdu);
|
|
||||||
|
|
||||||
@@ -4405,6 +4409,7 @@ static int ath11k_pull_mgmt_tx_compl_par
|
|
||||||
param->pdev_id = ev->pdev_id;
|
|
||||||
param->desc_id = ev->desc_id;
|
|
||||||
param->status = ev->status;
|
|
||||||
+ param->ack_rssi = ev->ack_rssi;
|
|
||||||
|
|
||||||
kfree(tb);
|
|
||||||
return 0;
|
|
||||||
@@ -5798,8 +5803,7 @@ static void ath11k_mgmt_tx_compl_event(s
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
- wmi_process_mgmt_tx_comp(ar, tx_compl_param.desc_id,
|
|
||||||
- tx_compl_param.status);
|
|
||||||
+ wmi_process_mgmt_tx_comp(ar, &tx_compl_param);
|
|
||||||
|
|
||||||
ath11k_dbg(ab, ATH11K_DBG_MGMT,
|
|
||||||
"mgmt tx compl ev pdev_id %d, desc_id %d, status %d",
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/wmi.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
|
|
||||||
@@ -2220,6 +2220,7 @@ struct wmi_init_cmd {
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
#define WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 BIT(5)
|
|
||||||
+#define WMI_RSRC_CFG_FLAG1_ACK_RSSI BIT(18)
|
|
||||||
|
|
||||||
struct wmi_resource_config {
|
|
||||||
u32 tlv_header;
|
|
||||||
@@ -4337,6 +4338,8 @@ struct wmi_mgmt_tx_compl_event {
|
|
||||||
u32 desc_id;
|
|
||||||
u32 status;
|
|
||||||
u32 pdev_id;
|
|
||||||
+ u32 ppdu_id;
|
|
||||||
+ u32 ack_rssi;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct wmi_scan_event {
|
|
@ -1,31 +0,0 @@
|
|||||||
From b71cab89b4be24528db1f4641825d2a0fd5f8efe Mon Sep 17 00:00:00 2001
|
|
||||||
From: P Praneesh <ppranees@codeaurora.org>
|
|
||||||
Date: Mon, 14 Dec 2020 19:05:02 +0530
|
|
||||||
Subject: [PATCH] ath11k: Disable unused CE8 interrupts
|
|
||||||
|
|
||||||
Host driver doesn't need to process CE8 interrupts (used
|
|
||||||
by target independently)
|
|
||||||
|
|
||||||
The volume of interrupts is huge within short interval,
|
|
||||||
CPU0 CPU1 CPU2 CPU3
|
|
||||||
14022188 0 0 0 GIC 71 Edge ce8
|
|
||||||
|
|
||||||
Hence disable these interrupts.
|
|
||||||
|
|
||||||
Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|
||||||
Signed-off-by: P Praneesh <ppranees@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/ce.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/ce.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/ce.c
|
|
||||||
@@ -80,7 +80,7 @@ const struct ce_attr ath11k_host_ce_conf
|
|
||||||
|
|
||||||
/* CE8: target autonomous hif_memcpy */
|
|
||||||
{
|
|
||||||
- .flags = CE_ATTR_FLAGS,
|
|
||||||
+ .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
|
|
||||||
.src_nentries = 0,
|
|
||||||
.src_sz_max = 0,
|
|
||||||
.dest_nentries = 0,
|
|
@ -1,102 +0,0 @@
|
|||||||
From de7df710540275b29231a989a3a65af9f6cf7659 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sriram R <srirrama@codeaurora.org>
|
|
||||||
Date: Wed, 31 Mar 2021 07:59:52 +0530
|
|
||||||
Subject: [PATCH] ath11k: Avoid NULL ptr access during mgmt tx cleanup
|
|
||||||
|
|
||||||
Currently skb_cb values such as ar,vif is not filled during
|
|
||||||
WMI mgmt tx. Though this is generally not used during callback,
|
|
||||||
On interface removal, the remaining idr cleanup callback
|
|
||||||
uses the ar ptr from skb_cb from mgmt txmgmt_idr. Hence
|
|
||||||
fill them during tx call for proper usage.
|
|
||||||
|
|
||||||
Also free the skb which is missing currently in these
|
|
||||||
callbacks.
|
|
||||||
|
|
||||||
Crash_info:
|
|
||||||
|
|
||||||
[19282.489476] Unable to handle kernel NULL pointer dereference at virtual address 00000000
|
|
||||||
[19282.489515] pgd = 91eb8000
|
|
||||||
[19282.496702] [00000000] *pgd=00000000
|
|
||||||
[19282.502524] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
|
|
||||||
[19282.783728] PC is at ath11k_mac_vif_txmgmt_idr_remove+0x28/0xd8 [ath11k]
|
|
||||||
[19282.789170] LR is at idr_for_each+0xa0/0xc8
|
|
||||||
|
|
||||||
Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/mac.c | 17 +++++++++++++++--
|
|
||||||
1 file changed, 15 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -5691,23 +5691,36 @@ static int __ath11k_set_antenna(struct a
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx)
|
|
||||||
+static void ath11k_mac_tx_mgmt_free(struct ath11k *ar, int buf_id)
|
|
||||||
{
|
|
||||||
- struct sk_buff *msdu = skb;
|
|
||||||
+ struct sk_buff *msdu;
|
|
||||||
struct ieee80211_tx_info *info;
|
|
||||||
- struct ath11k *ar = ctx;
|
|
||||||
- struct ath11k_base *ab = ar->ab;
|
|
||||||
|
|
||||||
spin_lock_bh(&ar->txmgmt_idr_lock);
|
|
||||||
- idr_remove(&ar->txmgmt_idr, buf_id);
|
|
||||||
+ msdu = idr_remove(&ar->txmgmt_idr, buf_id);
|
|
||||||
spin_unlock_bh(&ar->txmgmt_idr_lock);
|
|
||||||
- dma_unmap_single(ab->dev, ATH11K_SKB_CB(msdu)->paddr, msdu->len,
|
|
||||||
+
|
|
||||||
+ /* msdu is already removed if msdu is NULL,
|
|
||||||
+ * if msdu is not NULL we free the skb below and
|
|
||||||
+ * idr wont be seen if any concurent tx completion happen
|
|
||||||
+ */
|
|
||||||
+ if (!msdu)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ dma_unmap_single(ar->ab->dev, ATH11K_SKB_CB(msdu)->paddr, msdu->len,
|
|
||||||
DMA_TO_DEVICE);
|
|
||||||
|
|
||||||
info = IEEE80211_SKB_CB(msdu);
|
|
||||||
memset(&info->status, 0, sizeof(info->status));
|
|
||||||
|
|
||||||
ieee80211_free_txskb(ar->hw, msdu);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx)
|
|
||||||
+{
|
|
||||||
+ struct ath11k *ar = ctx;
|
|
||||||
+
|
|
||||||
+ ath11k_mac_tx_mgmt_free(ar, buf_id);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -5716,17 +5729,10 @@ static int ath11k_mac_vif_txmgmt_idr_rem
|
|
||||||
{
|
|
||||||
struct ieee80211_vif *vif = ctx;
|
|
||||||
struct ath11k_skb_cb *skb_cb = ATH11K_SKB_CB((struct sk_buff *)skb);
|
|
||||||
- struct sk_buff *msdu = skb;
|
|
||||||
struct ath11k *ar = skb_cb->ar;
|
|
||||||
- struct ath11k_base *ab = ar->ab;
|
|
||||||
|
|
||||||
- if (skb_cb->vif == vif) {
|
|
||||||
- spin_lock_bh(&ar->txmgmt_idr_lock);
|
|
||||||
- idr_remove(&ar->txmgmt_idr, buf_id);
|
|
||||||
- spin_unlock_bh(&ar->txmgmt_idr_lock);
|
|
||||||
- dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len,
|
|
||||||
- DMA_TO_DEVICE);
|
|
||||||
- }
|
|
||||||
+ if (skb_cb->vif == vif)
|
|
||||||
+ ath11k_mac_tx_mgmt_free(ar, buf_id);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -5767,6 +5773,8 @@ static int ath11k_mac_mgmt_tx_wmi(struct
|
|
||||||
}
|
|
||||||
|
|
||||||
ATH11K_SKB_CB(skb)->paddr = paddr;
|
|
||||||
+ ATH11K_SKB_CB(skb)->vif = arvif->vif;
|
|
||||||
+ ATH11K_SKB_CB(skb)->ar = ar;
|
|
||||||
|
|
||||||
if (ieee80211_is_qos_nullfunc(hdr->frame_control)) {
|
|
||||||
ret = ath11k_wmi_qos_null_send(ar, arvif->vdev_id, buf_id, skb);
|
|
@ -1,129 +0,0 @@
|
|||||||
From: Karthikeyan Periyasamy <periyasa@codeaurora.org>
|
|
||||||
Date: Thu, 3 Jun 2021 15:07:12 +0530
|
|
||||||
Subject: [PATCH] ath11k: fix CE and DP address alignment
|
|
||||||
|
|
||||||
srng dma address and virtual address should be aligned with byte instead
|
|
||||||
of pointer type. Alignment should be based on dma address instead
|
|
||||||
of virtual address. Also CE dma allocations are freed with unaligned
|
|
||||||
address instead of aligned address. so corrected all address alignment.
|
|
||||||
|
|
||||||
Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
|
|
||||||
---
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/ce.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/ce.c
|
|
||||||
@@ -559,6 +559,7 @@ ath11k_ce_alloc_ring(struct ath11k_base
|
|
||||||
{
|
|
||||||
struct ath11k_ce_ring *ce_ring;
|
|
||||||
dma_addr_t base_addr;
|
|
||||||
+ unsigned long off;
|
|
||||||
|
|
||||||
ce_ring = kzalloc(struct_size(ce_ring, skb, nentries), GFP_KERNEL);
|
|
||||||
if (ce_ring == NULL)
|
|
||||||
@@ -581,12 +582,13 @@ ath11k_ce_alloc_ring(struct ath11k_base
|
|
||||||
|
|
||||||
ce_ring->base_addr_ce_space_unaligned = base_addr;
|
|
||||||
|
|
||||||
- ce_ring->base_addr_owner_space = PTR_ALIGN(
|
|
||||||
- ce_ring->base_addr_owner_space_unaligned,
|
|
||||||
- CE_DESC_RING_ALIGN);
|
|
||||||
- ce_ring->base_addr_ce_space = ALIGN(
|
|
||||||
- ce_ring->base_addr_ce_space_unaligned,
|
|
||||||
+ ce_ring->base_addr_ce_space = (dma_addr_t) ALIGN(
|
|
||||||
+ (unsigned long)ce_ring->base_addr_ce_space_unaligned,
|
|
||||||
CE_DESC_RING_ALIGN);
|
|
||||||
+ off = (unsigned long)ce_ring->base_addr_ce_space -
|
|
||||||
+ (unsigned long)ce_ring->base_addr_ce_space_unaligned;
|
|
||||||
+ ce_ring->base_addr_owner_space = (void *)
|
|
||||||
+ ((unsigned long)ce_ring->base_addr_owner_space_unaligned + off);
|
|
||||||
|
|
||||||
return ce_ring;
|
|
||||||
}
|
|
||||||
@@ -935,8 +937,8 @@ void ath11k_ce_free_pipes(struct ath11k_
|
|
||||||
dma_free_coherent(ab->dev,
|
|
||||||
pipe->src_ring->nentries * desc_sz +
|
|
||||||
CE_DESC_RING_ALIGN,
|
|
||||||
- pipe->src_ring->base_addr_owner_space,
|
|
||||||
- pipe->src_ring->base_addr_ce_space);
|
|
||||||
+ pipe->src_ring->base_addr_owner_space_unaligned,
|
|
||||||
+ pipe->src_ring->base_addr_ce_space_unaligned);
|
|
||||||
kfree(pipe->src_ring);
|
|
||||||
pipe->src_ring = NULL;
|
|
||||||
}
|
|
||||||
@@ -946,8 +948,8 @@ void ath11k_ce_free_pipes(struct ath11k_
|
|
||||||
dma_free_coherent(ab->dev,
|
|
||||||
pipe->dest_ring->nentries * desc_sz +
|
|
||||||
CE_DESC_RING_ALIGN,
|
|
||||||
- pipe->dest_ring->base_addr_owner_space,
|
|
||||||
- pipe->dest_ring->base_addr_ce_space);
|
|
||||||
+ pipe->src_ring->base_addr_owner_space_unaligned,
|
|
||||||
+ pipe->src_ring->base_addr_ce_space_unaligned);
|
|
||||||
kfree(pipe->dest_ring);
|
|
||||||
pipe->dest_ring = NULL;
|
|
||||||
}
|
|
||||||
@@ -958,8 +960,8 @@ void ath11k_ce_free_pipes(struct ath11k_
|
|
||||||
dma_free_coherent(ab->dev,
|
|
||||||
pipe->status_ring->nentries * desc_sz +
|
|
||||||
CE_DESC_RING_ALIGN,
|
|
||||||
- pipe->status_ring->base_addr_owner_space,
|
|
||||||
- pipe->status_ring->base_addr_ce_space);
|
|
||||||
+ pipe->src_ring->base_addr_owner_space_unaligned,
|
|
||||||
+ pipe->src_ring->base_addr_ce_space_unaligned);
|
|
||||||
kfree(pipe->status_ring);
|
|
||||||
pipe->status_ring = NULL;
|
|
||||||
}
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/ce.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/ce.h
|
|
||||||
@@ -129,7 +129,7 @@ struct ath11k_ce_ring {
|
|
||||||
/* Host address space */
|
|
||||||
void *base_addr_owner_space_unaligned;
|
|
||||||
/* CE address space */
|
|
||||||
- u32 base_addr_ce_space_unaligned;
|
|
||||||
+ dma_addr_t base_addr_ce_space_unaligned;
|
|
||||||
|
|
||||||
/* Actual start of descriptors.
|
|
||||||
* Aligned to descriptor-size boundary.
|
|
||||||
@@ -139,7 +139,7 @@ struct ath11k_ce_ring {
|
|
||||||
void *base_addr_owner_space;
|
|
||||||
|
|
||||||
/* CE address space */
|
|
||||||
- u32 base_addr_ce_space;
|
|
||||||
+ dma_addr_t base_addr_ce_space;
|
|
||||||
|
|
||||||
/* HAL ring id */
|
|
||||||
u32 hal_ring_id;
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp.c
|
|
||||||
@@ -222,6 +222,7 @@ int ath11k_dp_srng_setup(struct ath11k_b
|
|
||||||
int entry_sz = ath11k_hal_srng_get_entrysize(ab, type);
|
|
||||||
int max_entries = ath11k_hal_srng_get_max_entries(ab, type);
|
|
||||||
int ret;
|
|
||||||
+ unsigned long off;
|
|
||||||
|
|
||||||
if (max_entries < 0 || entry_sz < 0)
|
|
||||||
return -EINVAL;
|
|
||||||
@@ -236,9 +237,10 @@ int ath11k_dp_srng_setup(struct ath11k_b
|
|
||||||
if (!ring->vaddr_unaligned)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
- ring->vaddr = PTR_ALIGN(ring->vaddr_unaligned, HAL_RING_BASE_ALIGN);
|
|
||||||
- ring->paddr = ring->paddr_unaligned + ((unsigned long)ring->vaddr -
|
|
||||||
- (unsigned long)ring->vaddr_unaligned);
|
|
||||||
+ ring->paddr = (dma_addr_t) ALIGN((unsigned long)ring->paddr_unaligned,
|
|
||||||
+ HAL_RING_BASE_ALIGN);
|
|
||||||
+ off = (unsigned long)ring->paddr - (unsigned long)ring->paddr_unaligned;
|
|
||||||
+ ring->vaddr = (u32 *) ((unsigned long)ring->vaddr_unaligned + off);
|
|
||||||
|
|
||||||
params.ring_base_vaddr = ring->vaddr;
|
|
||||||
params.ring_base_paddr = ring->paddr;
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/hal.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/hal.h
|
|
||||||
@@ -19,7 +19,7 @@ struct ath11k_base;
|
|
||||||
#define HAL_NUM_MPDU_LINKS_PER_QUEUE_DESC 12
|
|
||||||
#define HAL_MAX_AVAIL_BLK_RES 3
|
|
||||||
|
|
||||||
-#define HAL_RING_BASE_ALIGN 8
|
|
||||||
+#define HAL_RING_BASE_ALIGN 32
|
|
||||||
|
|
||||||
#define HAL_WBM_IDLE_SCATTER_BUF_SIZE_MAX 32704
|
|
||||||
/* TODO: Check with hw team on the supported scatter buf size */
|
|
@ -1,22 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath11k/hw.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/hw.h
|
|
||||||
@@ -64,7 +64,7 @@
|
|
||||||
#define TARGET_RX_BATCHMODE 1
|
|
||||||
|
|
||||||
#define ATH11K_HW_MAX_QUEUES 4
|
|
||||||
-#define ATH11K_QUEUE_LEN 4096
|
|
||||||
+#define ATH11K_QUEUE_LEN 2048
|
|
||||||
|
|
||||||
#define ATH11k_HW_RATECODE_CCK_SHORT_PREAM_MASK 0x4
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
|
||||||
@@ -1885,6 +1885,8 @@ static int ath11k_qmi_request_target_cap
|
|
||||||
ab->qmi.target.fw_version,
|
|
||||||
ab->qmi.target.fw_build_timestamp,
|
|
||||||
ab->qmi.target.fw_build_id);
|
|
||||||
+
|
|
||||||
+ ath11k_info(ab, "joba-1 patch V2: ATH11K_QUEUE_LEN=%d", ATH11K_QUEUE_LEN);
|
|
||||||
|
|
||||||
r = ath11k_core_check_dt(ab);
|
|
||||||
if (r)
|
|
@ -1,35 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -1593,9 +1593,9 @@ static void ath11k_peer_assoc_h_phymode(
|
|
||||||
} else if (sta->vht_cap.vht_supported &&
|
|
||||||
!ath11k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
|
|
||||||
if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
|
|
||||||
- phymode = MODE_11AC_VHT40;
|
|
||||||
+ phymode = MODE_11AC_VHT40_2G;
|
|
||||||
else
|
|
||||||
- phymode = MODE_11AC_VHT20;
|
|
||||||
+ phymode = MODE_11AC_VHT20_2G;
|
|
||||||
} else if (sta->ht_cap.ht_supported &&
|
|
||||||
!ath11k_peer_assoc_h_ht_masked(ht_mcs_mask)) {
|
|
||||||
if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
|
|
||||||
@@ -3552,6 +3552,9 @@ static void ath11k_mac_setup_ht_vht_cap(
|
|
||||||
*ht_cap_info = ht_cap;
|
|
||||||
band->ht_cap = ath11k_create_ht_cap(ar, ht_cap,
|
|
||||||
rate_cap_rx_chainmask);
|
|
||||||
+
|
|
||||||
+ band->vht_cap = ath11k_create_vht_cap(ar, rate_cap_tx_chainmask,
|
|
||||||
+ rate_cap_rx_chainmask);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP && !ar->supports_6ghz) {
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
|
||||||
@@ -346,6 +346,8 @@ ath11k_pull_mac_phy_cap_svc_ready_ext(st
|
|
||||||
* handled.
|
|
||||||
*/
|
|
||||||
if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_2G_CAP) {
|
|
||||||
+ pdev_cap->vht_cap = mac_phy_caps->vht_cap_info_2g;
|
|
||||||
+ pdev_cap->vht_mcs = mac_phy_caps->vht_supp_mcs_2g;
|
|
||||||
pdev_cap->tx_chain_mask = mac_phy_caps->tx_chain_mask_2g;
|
|
||||||
pdev_cap->rx_chain_mask = mac_phy_caps->rx_chain_mask_2g;
|
|
||||||
} else if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_5G_CAP) {
|
|
@ -1,188 +0,0 @@
|
|||||||
From 1b402e444ff99efe84d09a084b96c39826783a8e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ramya Gnanasekar <rgnanase@codeaurora.org>
|
|
||||||
Date: Thu, 10 Sep 2020 13:33:55 +0530
|
|
||||||
Subject: [PATCH] ath11k: Enable 512MB profile in ath11k
|
|
||||||
|
|
||||||
Below changes are made to enable 512MB mem mode in ath11k
|
|
||||||
* Makefile changes to implement compilation flag when
|
|
||||||
512MB mem profile is configured.
|
|
||||||
* Enabling 512MB mem profile by default from Makefile
|
|
||||||
for IPQ5018. This can be removed later once
|
|
||||||
512MB profile config is supported.
|
|
||||||
* Update target_mem_mode, number of stations, peer and vap
|
|
||||||
during compile time
|
|
||||||
|
|
||||||
Signed-off-by: Ramya Gnanasekar <rgnanase@codeaurora.org>
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/Kconfig | 7 +++++++
|
|
||||||
drivers/net/wireless/ath/ath11k/hw.h | 14 +++++++++++---
|
|
||||||
drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
|
|
||||||
drivers/net/wireless/ath/ath11k/qmi.h | 6 +++++-
|
|
||||||
4 files changed, 24 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/Kconfig
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
|
|
||||||
@@ -60,3 +60,10 @@ config ATH11K_SPECTRAL
|
|
||||||
Enable ath11k spectral scan support
|
|
||||||
|
|
||||||
Say Y to enable access to the FFT/spectral data via debugfs.
|
|
||||||
+
|
|
||||||
+config ATH11K_MEM_PROFILE_512M
|
|
||||||
+ bool "ath11k enable 512MB memory profile"
|
|
||||||
+ depends on ATH11K
|
|
||||||
+ default n
|
|
||||||
+ help
|
|
||||||
+ Enables 512MB memory profile for ath11k
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/hw.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/hw.h
|
|
||||||
@@ -9,11 +9,30 @@
|
|
||||||
#include "wmi.h"
|
|
||||||
|
|
||||||
/* Target configuration defines */
|
|
||||||
+#ifdef CPTCFG_ATH11K_MEM_PROFILE_512M
|
|
||||||
|
|
||||||
+#define TARGET_NUM_VDEVS 8
|
|
||||||
+#define TARGET_NUM_PEERS_PDEV (128 + TARGET_NUM_VDEVS)
|
|
||||||
+/* Max num of stations (per radio) */
|
|
||||||
+#define TARGET_NUM_STATIONS 128
|
|
||||||
+#define ATH11K_QMI_TARGET_MEM_MODE ATH11K_QMI_TARGET_MEM_MODE_512M
|
|
||||||
+#define ATH11K_DP_TX_COMP_RING_SIZE 8192
|
|
||||||
+#define ATH11K_DP_RXDMA_MON_STATUS_RING_SIZE 512
|
|
||||||
+#define ATH11K_DP_RXDMA_MONITOR_BUF_RING_SIZE 128
|
|
||||||
+#define ATH11K_DP_RXDMA_MONITOR_DST_RING_SIZE 128
|
|
||||||
+#else
|
|
||||||
/* Num VDEVS per radio */
|
|
||||||
#define TARGET_NUM_VDEVS (16 + 1)
|
|
||||||
|
|
||||||
#define TARGET_NUM_PEERS_PDEV (512 + TARGET_NUM_VDEVS)
|
|
||||||
+/* Max num of stations (per radio) */
|
|
||||||
+#define TARGET_NUM_STATIONS 512
|
|
||||||
+#define ATH11K_QMI_TARGET_MEM_MODE ATH11K_QMI_TARGET_MEM_MODE_DEFAULT
|
|
||||||
+#define ATH11K_DP_TX_COMP_RING_SIZE 32768
|
|
||||||
+#define ATH11K_DP_RXDMA_MON_STATUS_RING_SIZE 1024
|
|
||||||
+#define ATH11K_DP_RXDMA_MONITOR_BUF_RING_SIZE 4096
|
|
||||||
+#define ATH11K_DP_RXDMA_MONITOR_DST_RING_SIZE 2048
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Num of peers for Single Radio mode */
|
|
||||||
#define TARGET_NUM_PEERS_SINGLE (TARGET_NUM_PEERS_PDEV)
|
|
||||||
@@ -24,9 +43,6 @@
|
|
||||||
/* Num of peers for DBS_SBS */
|
|
||||||
#define TARGET_NUM_PEERS_DBS_SBS (3 * TARGET_NUM_PEERS_PDEV)
|
|
||||||
|
|
||||||
-/* Max num of stations (per radio) */
|
|
||||||
-#define TARGET_NUM_STATIONS 512
|
|
||||||
-
|
|
||||||
#define TARGET_NUM_PEERS(x) TARGET_NUM_PEERS_##x
|
|
||||||
#define TARGET_NUM_PEER_KEYS 2
|
|
||||||
#define TARGET_NUM_TIDS(x) (2 * TARGET_NUM_PEERS(x) + \
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
|
||||||
@@ -2675,7 +2675,7 @@ int ath11k_qmi_init_service(struct ath11
|
|
||||||
memset(&ab->qmi.target_mem, 0, sizeof(struct target_mem_chunk));
|
|
||||||
ab->qmi.ab = ab;
|
|
||||||
|
|
||||||
- ab->qmi.target_mem_mode = ATH11K_QMI_TARGET_MEM_MODE_DEFAULT;
|
|
||||||
+ ab->qmi.target_mem_mode = ATH11K_QMI_TARGET_MEM_MODE;
|
|
||||||
ret = qmi_handle_init(&ab->qmi.handle, ATH11K_QMI_RESP_LEN_MAX,
|
|
||||||
&ath11k_qmi_ops, ath11k_qmi_msg_handlers);
|
|
||||||
if (ret < 0) {
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/qmi.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.h
|
|
||||||
@@ -33,10 +33,14 @@
|
|
||||||
|
|
||||||
#define QMI_WLANFW_MAX_DATA_SIZE_V01 6144
|
|
||||||
#define ATH11K_FIRMWARE_MODE_OFF 4
|
|
||||||
-#define ATH11K_QMI_TARGET_MEM_MODE_DEFAULT 0
|
|
||||||
|
|
||||||
struct ath11k_base;
|
|
||||||
|
|
||||||
+enum ath11k_target_mem_mode {
|
|
||||||
+ ATH11K_QMI_TARGET_MEM_MODE_DEFAULT = 0,
|
|
||||||
+ ATH11K_QMI_TARGET_MEM_MODE_512M,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
enum ath11k_qmi_file_type {
|
|
||||||
ATH11K_QMI_FILE_TYPE_BDF_GOLDEN,
|
|
||||||
ATH11K_QMI_FILE_TYPE_CALDATA,
|
|
||||||
--- a/local-symbols
|
|
||||||
+++ b/local-symbols
|
|
||||||
@@ -153,6 +153,7 @@ WCN36XX_DEBUGFS=
|
|
||||||
ATH11K=
|
|
||||||
ATH11K_AHB=
|
|
||||||
ATH11K_PCI=
|
|
||||||
+ATH11K_MEM_PROFILE_512M=
|
|
||||||
ATH11K_DEBUG=
|
|
||||||
ATH11K_DEBUGFS=
|
|
||||||
ATH11K_TRACING=
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
@@ -734,6 +734,8 @@ struct ath11k_base {
|
|
||||||
u32 num_db_cap;
|
|
||||||
|
|
||||||
struct timer_list mon_reap_timer;
|
|
||||||
+ atomic_t num_max_allowed;
|
|
||||||
+
|
|
||||||
/* must be last */
|
|
||||||
u8 drv_priv[0] __aligned(sizeof(void *));
|
|
||||||
};
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp.h
|
|
||||||
@@ -174,8 +174,9 @@ struct ath11k_pdev_dp {
|
|
||||||
|
|
||||||
#define DP_WBM_RELEASE_RING_SIZE 64
|
|
||||||
#define DP_TCL_DATA_RING_SIZE 512
|
|
||||||
-#define DP_TX_COMP_RING_SIZE 32768
|
|
||||||
+#define DP_TX_COMP_RING_SIZE ATH11K_DP_TX_COMP_RING_SIZE
|
|
||||||
#define DP_TX_IDR_SIZE DP_TX_COMP_RING_SIZE
|
|
||||||
+#define DP_TX_COMP_MAX_ALLOWED ((DP_TX_COMP_RING_SIZE << 1)/3)
|
|
||||||
#define DP_TCL_CMD_RING_SIZE 32
|
|
||||||
#define DP_TCL_STATUS_RING_SIZE 32
|
|
||||||
#define DP_REO_DST_RING_MAX 4
|
|
||||||
@@ -188,9 +189,9 @@ struct ath11k_pdev_dp {
|
|
||||||
#define DP_RXDMA_BUF_RING_SIZE 4096
|
|
||||||
#define DP_RXDMA_REFILL_RING_SIZE 2048
|
|
||||||
#define DP_RXDMA_ERR_DST_RING_SIZE 1024
|
|
||||||
-#define DP_RXDMA_MON_STATUS_RING_SIZE 1024
|
|
||||||
-#define DP_RXDMA_MONITOR_BUF_RING_SIZE 4096
|
|
||||||
-#define DP_RXDMA_MONITOR_DST_RING_SIZE 2048
|
|
||||||
+#define DP_RXDMA_MON_STATUS_RING_SIZE ATH11K_DP_RXDMA_MON_STATUS_RING_SIZE
|
|
||||||
+#define DP_RXDMA_MONITOR_BUF_RING_SIZE ATH11K_DP_RXDMA_MONITOR_BUF_RING_SIZE
|
|
||||||
+#define DP_RXDMA_MONITOR_DST_RING_SIZE ATH11K_DP_RXDMA_MONITOR_BUF_RING_SIZE
|
|
||||||
#define DP_RXDMA_MONITOR_DESC_RING_SIZE 4096
|
|
||||||
|
|
||||||
#define DP_RX_BUFFER_SIZE 2048
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
||||||
@@ -262,6 +262,7 @@ tcl_ring_sel:
|
|
||||||
skb->data, skb->len);
|
|
||||||
|
|
||||||
atomic_inc(&ar->dp.num_tx_pending);
|
|
||||||
+ atomic_inc(&ab->num_max_allowed);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
@@ -308,6 +309,7 @@ static void ath11k_dp_tx_free_txbuf(stru
|
|
||||||
ar = ab->pdevs[mac_id].ar;
|
|
||||||
if (atomic_dec_and_test(&ar->dp.num_tx_pending))
|
|
||||||
wake_up(&ar->dp.tx_empty_waitq);
|
|
||||||
+ atomic_dec(&ab->num_max_allowed);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -339,6 +341,7 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
|
|
||||||
|
|
||||||
if (atomic_dec_and_test(&ar->dp.num_tx_pending))
|
|
||||||
wake_up(&ar->dp.tx_empty_waitq);
|
|
||||||
+ atomic_dec(&ab->num_max_allowed);
|
|
||||||
|
|
||||||
dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
|
|
||||||
|
|
||||||
@@ -619,6 +622,7 @@ void ath11k_dp_tx_completion_handler(str
|
|
||||||
wake_up(&ar->dp.tx_empty_waitq);
|
|
||||||
|
|
||||||
ath11k_dp_tx_complete_msdu(ar, msdu, &ts);
|
|
||||||
+ atomic_dec(&ab->num_max_allowed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
|||||||
goto end;
|
goto end;
|
||||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||||
@@ -1964,7 +1964,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
|
@@ -1963,7 +1963,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs +
|
if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs +
|
||||||
@ -27,7 +27,7 @@
|
|||||||
ah->opmode == NL80211_IFTYPE_MESH_POINT) {
|
ah->opmode == NL80211_IFTYPE_MESH_POINT) {
|
||||||
u64 tsf = ath5k_hw_get_tsf64(ah);
|
u64 tsf = ath5k_hw_get_tsf64(ah);
|
||||||
u32 tsftu = TSF_TO_TU(tsf);
|
u32 tsftu = TSF_TO_TU(tsf);
|
||||||
@@ -2050,7 +2050,7 @@ ath5k_beacon_update_timers(struct ath5k_
|
@@ -2049,7 +2049,7 @@ ath5k_beacon_update_timers(struct ath5k_
|
||||||
|
|
||||||
intval = ah->bintval & AR5K_BEACON_PERIOD;
|
intval = ah->bintval & AR5K_BEACON_PERIOD;
|
||||||
if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs
|
if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs
|
||||||
@ -36,7 +36,7 @@
|
|||||||
intval /= ATH_BCBUF; /* staggered multi-bss beacons */
|
intval /= ATH_BCBUF; /* staggered multi-bss beacons */
|
||||||
if (intval < 15)
|
if (intval < 15)
|
||||||
ATH5K_WARN(ah, "intval %u is too low, min 15\n",
|
ATH5K_WARN(ah, "intval %u is too low, min 15\n",
|
||||||
@@ -2516,6 +2516,7 @@ static const struct ieee80211_iface_limi
|
@@ -2515,6 +2515,7 @@ static const struct ieee80211_iface_limi
|
||||||
BIT(NL80211_IFTYPE_MESH_POINT) |
|
BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||||
#endif
|
#endif
|
||||||
BIT(NL80211_IFTYPE_AP) },
|
BIT(NL80211_IFTYPE_AP) },
|
||||||
|
@ -130,7 +130,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++
|
|||||||
/* Antenna Control */
|
/* Antenna Control */
|
||||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||||
@@ -466,6 +466,9 @@ ath5k_chan_set(struct ath5k_hw *ah, stru
|
@@ -465,6 +465,9 @@ ath5k_chan_set(struct ath5k_hw *ah, stru
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
From 03469e79fee9e8e908dae3bd1a80bcd9a66f2a88 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
Date: Mon, 11 Oct 2021 18:18:00 +0300
|
||||||
|
Subject: ath9k: support DT ieee80211-freq-limit property to limit channels
|
||||||
|
|
||||||
|
The common DT property can be used to limit the available channels
|
||||||
|
but ath9k has to manually call wiphy_read_of_freq_limits().
|
||||||
|
|
||||||
|
I would have put this into ath9k_of_init(). But it didn't work there.
|
||||||
|
The reason is that in ath9k_of_init() the channels and bands are not yet
|
||||||
|
registered in the wiphy struct. So there isn't any channel to flag as
|
||||||
|
disabled.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
|
Link: https://lore.kernel.org/r/20211009212847.1781986-1-chunkeey@gmail.com
|
||||||
|
---
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
|
@@ -1038,6 +1038,8 @@ int ath9k_init_device(u16 devid, struct
|
||||||
|
ARRAY_SIZE(ath9k_tpt_blink));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ wiphy_read_of_freq_limits(hw->wiphy);
|
||||||
|
+
|
||||||
|
/* Register with mac80211 */
|
||||||
|
error = ieee80211_register_hw(hw);
|
||||||
|
if (error)
|
@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -1435,8 +1435,12 @@ static bool ath9k_hw_set_reset(struct at
|
@@ -1434,8 +1434,12 @@ static bool ath9k_hw_set_reset(struct at
|
||||||
if (!AR_SREV_9100(ah))
|
if (!AR_SREV_9100(ah))
|
||||||
REG_WRITE(ah, AR_RC, 0);
|
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
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -1312,39 +1312,56 @@ void ath9k_hw_get_delta_slope_vals(struc
|
@@ -1311,39 +1311,56 @@ void ath9k_hw_get_delta_slope_vals(struc
|
||||||
*coef_exponent = coef_exp - 16;
|
*coef_exponent = coef_exp - 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1397,24 +1414,24 @@ static bool ath9k_hw_set_reset(struct at
|
@@ -1396,24 +1413,24 @@ static bool ath9k_hw_set_reset(struct at
|
||||||
rst_flags |= AR_RTC_RC_MAC_COLD;
|
rst_flags |= AR_RTC_RC_MAC_COLD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -48,7 +48,7 @@ int ath9k_modparam_nohwcrypt;
|
@@ -47,7 +47,7 @@ int ath9k_modparam_nohwcrypt;
|
||||||
module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, 0444);
|
module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, 0444);
|
||||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
|
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -830,6 +830,7 @@ static const struct ieee80211_iface_limi
|
@@ -826,6 +826,7 @@ static const struct ieee80211_iface_limi
|
||||||
BIT(NL80211_IFTYPE_AP) },
|
BIT(NL80211_IFTYPE_AP) },
|
||||||
{ .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
{ .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||||
BIT(NL80211_IFTYPE_P2P_GO) },
|
BIT(NL80211_IFTYPE_P2P_GO) },
|
||||||
+ { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
|
+ { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CPTCFG_WIRELESS_WDS
|
#ifdef CPTCFG_ATH9K_CHANNEL_CONTEXT
|
||||||
|
@ -14,7 +14,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -927,6 +927,7 @@ static void ath9k_set_hw_capab(struct at
|
@@ -907,6 +907,7 @@ static void ath9k_set_hw_capab(struct at
|
||||||
ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
|
ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
|
||||||
ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
|
ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
|
||||||
ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
|
ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
|
||||||
@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
|
|
||||||
if (ath9k_ps_enable)
|
if (ath9k_ps_enable)
|
||||||
ieee80211_hw_set(hw, SUPPORTS_PS);
|
ieee80211_hw_set(hw, SUPPORTS_PS);
|
||||||
@@ -939,9 +940,6 @@ static void ath9k_set_hw_capab(struct at
|
@@ -919,9 +920,6 @@ static void ath9k_set_hw_capab(struct at
|
||||||
IEEE80211_RADIOTAP_MCS_HAVE_STBC;
|
IEEE80211_RADIOTAP_MCS_HAVE_STBC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -1143,25 +1143,25 @@ static int __init ath9k_init(void)
|
@@ -1122,25 +1122,25 @@ static int __init ath9k_init(void)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -403,13 +403,8 @@ static void ath9k_hw_init_config(struct
|
@@ -402,13 +402,8 @@ static void ath9k_hw_init_config(struct
|
||||||
|
|
||||||
ah->config.rx_intr_mitigation = true;
|
ah->config.rx_intr_mitigation = true;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -663,6 +663,7 @@ int ath9k_hw_init(struct ath_hw *ah)
|
@@ -662,6 +662,7 @@ int ath9k_hw_init(struct ath_hw *ah)
|
||||||
|
|
||||||
/* These are all the AR5008/AR9001/AR9002/AR9003 hardware family of chipsets */
|
/* These are all the AR5008/AR9001/AR9002/AR9003 hardware family of chipsets */
|
||||||
switch (ah->hw_version.devid) {
|
switch (ah->hw_version.devid) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||||
@@ -844,6 +844,9 @@ static inline int ath9k_dump_btcoex(stru
|
@@ -843,6 +843,9 @@ static inline int ath9k_dump_btcoex(stru
|
||||||
#ifdef CPTCFG_MAC80211_LEDS
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
void ath_init_leds(struct ath_softc *sc);
|
void ath_init_leds(struct ath_softc *sc);
|
||||||
void ath_deinit_leds(struct ath_softc *sc);
|
void ath_deinit_leds(struct ath_softc *sc);
|
||||||
@ -10,7 +10,7 @@
|
|||||||
#else
|
#else
|
||||||
static inline void ath_init_leds(struct ath_softc *sc)
|
static inline void ath_init_leds(struct ath_softc *sc)
|
||||||
{
|
{
|
||||||
@@ -980,6 +983,13 @@ void ath_ant_comb_scan(struct ath_softc
|
@@ -979,6 +982,13 @@ void ath_ant_comb_scan(struct ath_softc
|
||||||
|
|
||||||
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
|
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
struct ath_softc {
|
struct ath_softc {
|
||||||
struct ieee80211_hw *hw;
|
struct ieee80211_hw *hw;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
@@ -1033,9 +1043,8 @@ struct ath_softc {
|
@@ -1032,9 +1042,8 @@ struct ath_softc {
|
||||||
spinlock_t chan_lock;
|
spinlock_t chan_lock;
|
||||||
|
|
||||||
#ifdef CPTCFG_MAC80211_LEDS
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
@ -181,7 +181,7 @@
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -1055,7 +1055,7 @@ int ath9k_init_device(u16 devid, struct
|
@@ -1032,7 +1032,7 @@ int ath9k_init_device(u16 devid, struct
|
||||||
|
|
||||||
#ifdef CPTCFG_MAC80211_LEDS
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
/* must be initialized before ieee80211_register_hw */
|
/* must be initialized before ieee80211_register_hw */
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
bool reset_power_on;
|
bool reset_power_on;
|
||||||
bool htc_reset_init;
|
bool htc_reset_init;
|
||||||
|
|
||||||
@@ -1076,6 +1084,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
@@ -1077,6 +1085,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
||||||
bool ath9k_hw_check_alive(struct ath_hw *ah);
|
bool ath9k_hw_check_alive(struct ath_hw *ah);
|
||||||
|
|
||||||
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
|
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
|
||||||
@ -94,7 +94,7 @@
|
|||||||
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
|
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
|
||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -1883,6 +1883,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
|
@@ -1881,6 +1881,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
|
EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
|
||||||
|
|
||||||
@ -115,7 +115,7 @@
|
|||||||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||||
struct ath9k_hw_cal_data *caldata, bool fastcc)
|
struct ath9k_hw_cal_data *caldata, bool fastcc)
|
||||||
{
|
{
|
||||||
@@ -2091,6 +2105,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
@@ -2089,6 +2103,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||||
ar9003_hw_disable_phy_restart(ah);
|
ar9003_hw_disable_phy_restart(ah);
|
||||||
|
|
||||||
ath9k_hw_apply_gpio_override(ah);
|
ath9k_hw_apply_gpio_override(ah);
|
||||||
@ -125,9 +125,9 @@
|
|||||||
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
|
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
|
||||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||||
@@ -531,6 +531,11 @@ irqreturn_t ath_isr(int irq, void *dev)
|
@@ -538,6 +538,11 @@ irqreturn_t ath_isr(int irq, void *dev)
|
||||||
if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
+ if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) {
|
+ if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) {
|
||||||
+ status |= ATH9K_INT_FATAL;
|
+ status |= ATH9K_INT_FATAL;
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
|
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
|
||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -818,7 +818,8 @@ static void ath9k_init_txpower_limits(st
|
@@ -814,7 +814,8 @@ static void ath9k_init_txpower_limits(st
|
||||||
if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
|
if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
|
||||||
ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ);
|
ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ);
|
||||||
|
|
||||||
@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct ieee80211_iface_limit if_limits[] = {
|
static const struct ieee80211_iface_limit if_limits[] = {
|
||||||
@@ -1015,6 +1016,18 @@ static void ath9k_set_hw_capab(struct at
|
@@ -992,6 +993,18 @@ static void ath9k_set_hw_capab(struct at
|
||||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
|
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,9 +84,9 @@
|
|||||||
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||||
const struct ath_bus_ops *bus_ops)
|
const struct ath_bus_ops *bus_ops)
|
||||||
{
|
{
|
||||||
@@ -1060,6 +1073,8 @@ int ath9k_init_device(u16 devid, struct
|
@@ -1039,6 +1052,8 @@ int ath9k_init_device(u16 devid, struct
|
||||||
ARRAY_SIZE(ath9k_tpt_blink));
|
|
||||||
#endif
|
wiphy_read_of_freq_limits(hw->wiphy);
|
||||||
|
|
||||||
+ ath_get_initial_entropy(sc);
|
+ ath_get_initial_entropy(sc);
|
||||||
+
|
+
|
||||||
@ -110,7 +110,7 @@
|
|||||||
static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
|
static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
|
||||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||||
@@ -1349,9 +1349,30 @@ void ar5008_hw_init_rate_txpower(struct
|
@@ -1340,9 +1340,30 @@ void ar5008_hw_init_rate_txpower(struct
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +141,7 @@
|
|||||||
static const u32 ar5416_cca_regs[6] = {
|
static const u32 ar5416_cca_regs[6] = {
|
||||||
AR_PHY_CCA,
|
AR_PHY_CCA,
|
||||||
AR_PHY_CH1_CCA,
|
AR_PHY_CH1_CCA,
|
||||||
@@ -1366,6 +1387,8 @@ int ar5008_hw_attach_phy_ops(struct ath_
|
@@ -1357,6 +1378,8 @@ int ar5008_hw_attach_phy_ops(struct ath_
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -248,6 +248,19 @@ void ath9k_hw_get_channel_centers(struct
|
@@ -247,6 +247,19 @@ void ath9k_hw_get_channel_centers(struct
|
||||||
centers->synth_center + (extoff * HT40_CHANNEL_CENTER_SHIFT);
|
centers->synth_center + (extoff * HT40_CHANNEL_CENTER_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
/******************/
|
/******************/
|
||||||
/* Chip Revisions */
|
/* Chip Revisions */
|
||||||
/******************/
|
/******************/
|
||||||
@@ -1455,6 +1468,9 @@ static bool ath9k_hw_set_reset(struct at
|
@@ -1454,6 +1467,9 @@ static bool ath9k_hw_set_reset(struct at
|
||||||
udelay(50);
|
udelay(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1554,6 +1570,9 @@ static bool ath9k_hw_chip_reset(struct a
|
@@ -1553,6 +1569,9 @@ static bool ath9k_hw_chip_reset(struct a
|
||||||
ar9003_hw_internal_regulator_apply(ah);
|
ar9003_hw_internal_regulator_apply(ah);
|
||||||
ath9k_hw_init_pll(ah, chan);
|
ath9k_hw_init_pll(ah, chan);
|
||||||
|
|
||||||
@ -40,7 +40,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1861,8 +1880,14 @@ static int ath9k_hw_do_fastcc(struct ath
|
@@ -1859,8 +1878,14 @@ static int ath9k_hw_do_fastcc(struct ath
|
||||||
if (AR_SREV_9271(ah))
|
if (AR_SREV_9271(ah))
|
||||||
ar9002_hw_load_ani_reg(ah, chan);
|
ar9002_hw_load_ani_reg(ah, chan);
|
||||||
|
|
||||||
@ -55,7 +55,7 @@
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2116,6 +2141,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
@@ -2114,6 +2139,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||||
ath9k_hw_set_radar_params(ah);
|
ath9k_hw_set_radar_params(ah);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||||
@@ -978,55 +978,6 @@ static bool ar5008_hw_ani_control_new(st
|
@@ -969,55 +969,6 @@ static bool ar5008_hw_ani_control_new(st
|
||||||
* on == 0 means more noise imm
|
* on == 0 means more noise imm
|
||||||
*/
|
*/
|
||||||
u32 on = param ? 1 : 0;
|
u32 on = param ? 1 : 0;
|
||||||
|
@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
@@ -990,6 +991,14 @@ struct ath_led {
|
@@ -989,6 +990,14 @@ struct ath_led {
|
||||||
struct led_classdev cdev;
|
struct led_classdev cdev;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
struct ath_softc {
|
struct ath_softc {
|
||||||
struct ieee80211_hw *hw;
|
struct ieee80211_hw *hw;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
@@ -1045,6 +1054,9 @@ struct ath_softc {
|
@@ -1044,6 +1053,9 @@ struct ath_softc {
|
||||||
#ifdef CPTCFG_MAC80211_LEDS
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
const char *led_default_trigger;
|
const char *led_default_trigger;
|
||||||
struct list_head leds;
|
struct list_head leds;
|
||||||
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
---
|
---
|
||||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||||
@@ -1056,6 +1056,7 @@ struct ath_softc {
|
@@ -1055,6 +1055,7 @@ struct ath_softc {
|
||||||
struct list_head leds;
|
struct list_head leds;
|
||||||
#ifdef CONFIG_GPIOLIB
|
#ifdef CONFIG_GPIOLIB
|
||||||
struct ath9k_gpio_chip *gpiochip;
|
struct ath9k_gpio_chip *gpiochip;
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
|
||||||
@@ -627,6 +627,12 @@ static int ath9k_of_init(struct ath_soft
|
|
||||||
|
|
||||||
ath_dbg(common, CONFIG, "parsing configuration from OF node\n");
|
|
||||||
|
|
||||||
+ if (of_property_read_bool(np, "qca,disable-2ghz"))
|
|
||||||
+ ah->disable_2ghz = true;
|
|
||||||
+
|
|
||||||
+ if (of_property_read_bool(np, "qca,disable-5ghz"))
|
|
||||||
+ ah->disable_5ghz = true;
|
|
||||||
+
|
|
||||||
if (of_property_read_bool(np, "qca,no-eeprom")) {
|
|
||||||
/* ath9k-eeprom-<bus>-<id>.bin */
|
|
||||||
scnprintf(eeprom_name, sizeof(eeprom_name),
|
|
@ -339,7 +339,7 @@
|
|||||||
|
|
||||||
static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||||
u32 queues, bool drop);
|
u32 queues, bool drop);
|
||||||
@@ -652,6 +653,7 @@ void ath_reset_work(struct work_struct *
|
@@ -659,6 +660,7 @@ void ath_reset_work(struct work_struct *
|
||||||
static int ath9k_start(struct ieee80211_hw *hw)
|
static int ath9k_start(struct ieee80211_hw *hw)
|
||||||
{
|
{
|
||||||
struct ath_softc *sc = hw->priv;
|
struct ath_softc *sc = hw->priv;
|
||||||
@ -347,7 +347,7 @@
|
|||||||
struct ath_hw *ah = sc->sc_ah;
|
struct ath_hw *ah = sc->sc_ah;
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
|
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
|
||||||
@@ -730,6 +732,11 @@ static int ath9k_start(struct ieee80211_
|
@@ -737,6 +739,11 @@ static int ath9k_start(struct ieee80211_
|
||||||
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -371,7 +371,7 @@
|
|||||||
|
|
||||||
--- a/local-symbols
|
--- a/local-symbols
|
||||||
+++ b/local-symbols
|
+++ b/local-symbols
|
||||||
@@ -113,6 +113,7 @@ ATH9K_WOW=
|
@@ -103,6 +103,7 @@ ATH9K_WOW=
|
||||||
ATH9K_RFKILL=
|
ATH9K_RFKILL=
|
||||||
ATH9K_CHANNEL_CONTEXT=
|
ATH9K_CHANNEL_CONTEXT=
|
||||||
ATH9K_PCOEM=
|
ATH9K_PCOEM=
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
static const struct platform_device_id ath9k_platform_id_table[] = {
|
static const struct platform_device_id ath9k_platform_id_table[] = {
|
||||||
{
|
{
|
||||||
@@ -69,6 +77,242 @@ static const struct ath_bus_ops ath_ahb_
|
@@ -69,6 +77,236 @@ static const struct ath_bus_ops ath_ahb_
|
||||||
.eeprom_read = ath_ahb_eeprom_read,
|
.eeprom_read = ath_ahb_eeprom_read,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -218,12 +218,6 @@
|
|||||||
+ else
|
+ else
|
||||||
+ pdata->led_pin = -1;
|
+ pdata->led_pin = -1;
|
||||||
+
|
+
|
||||||
+ if (of_property_read_bool(pdev->dev.of_node, "qca,disable-2ghz"))
|
|
||||||
+ pdata->disable_2ghz = true;
|
|
||||||
+
|
|
||||||
+ if (of_property_read_bool(pdev->dev.of_node, "qca,disable-5ghz"))
|
|
||||||
+ pdata->disable_5ghz = true;
|
|
||||||
+
|
|
||||||
+ if (of_property_read_bool(pdev->dev.of_node, "qca,tx-gain-buffalo"))
|
+ if (of_property_read_bool(pdev->dev.of_node, "qca,tx-gain-buffalo"))
|
||||||
+ pdata->tx_gain_buffalo = true;
|
+ pdata->tx_gain_buffalo = true;
|
||||||
+
|
+
|
||||||
@ -259,7 +253,7 @@
|
|||||||
static int ath_ahb_probe(struct platform_device *pdev)
|
static int ath_ahb_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
void __iomem *mem;
|
void __iomem *mem;
|
||||||
@@ -80,6 +324,17 @@ static int ath_ahb_probe(struct platform
|
@@ -80,6 +318,17 @@ static int ath_ahb_probe(struct platform
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct ath_hw *ah;
|
struct ath_hw *ah;
|
||||||
char hw_name[64];
|
char hw_name[64];
|
||||||
@ -277,7 +271,7 @@
|
|||||||
|
|
||||||
if (!dev_get_platdata(&pdev->dev)) {
|
if (!dev_get_platdata(&pdev->dev)) {
|
||||||
dev_err(&pdev->dev, "no platform data specified\n");
|
dev_err(&pdev->dev, "no platform data specified\n");
|
||||||
@@ -122,13 +377,16 @@ static int ath_ahb_probe(struct platform
|
@@ -122,13 +371,16 @@ static int ath_ahb_probe(struct platform
|
||||||
sc->mem = mem;
|
sc->mem = mem;
|
||||||
sc->irq = irq;
|
sc->irq = irq;
|
||||||
|
|
||||||
@ -295,7 +289,7 @@
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "failed to initialize device\n");
|
dev_err(&pdev->dev, "failed to initialize device\n");
|
||||||
goto err_irq;
|
goto err_irq;
|
||||||
@@ -159,6 +417,9 @@ static int ath_ahb_remove(struct platfor
|
@@ -159,6 +411,9 @@ static int ath_ahb_remove(struct platfor
|
||||||
free_irq(sc->irq, sc);
|
free_irq(sc->irq, sc);
|
||||||
ieee80211_free_hw(sc->hw);
|
ieee80211_free_hw(sc->hw);
|
||||||
}
|
}
|
||||||
@ -305,7 +299,7 @@
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -168,6 +429,9 @@ static struct platform_driver ath_ahb_dr
|
@@ -168,6 +423,9 @@ static struct platform_driver ath_ahb_dr
|
||||||
.remove = ath_ahb_remove,
|
.remove = ath_ahb_remove,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "ath9k",
|
.name = "ath9k",
|
||||||
@ -325,7 +319,7 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
@@ -1012,6 +1013,9 @@ struct ath_softc {
|
@@ -1011,6 +1012,9 @@ struct ath_softc {
|
||||||
struct ath_hw *sc_ah;
|
struct ath_hw *sc_ah;
|
||||||
void __iomem *mem;
|
void __iomem *mem;
|
||||||
int irq;
|
int irq;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -654,6 +654,12 @@ static int ath9k_of_init(struct ath_soft
|
@@ -644,6 +644,12 @@ static int ath9k_of_init(struct ath_soft
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||||
const struct ath_bus_ops *bus_ops)
|
const struct ath_bus_ops *bus_ops)
|
||||||
{
|
{
|
||||||
@@ -757,6 +763,9 @@ static int ath9k_init_softc(u16 devid, s
|
@@ -747,6 +753,9 @@ static int ath9k_init_softc(u16 devid, s
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_hw;
|
goto err_hw;
|
||||||
|
|
||||||
|
@ -0,0 +1,154 @@
|
|||||||
|
From dab16ef495dbb3cabb355b6c80f0771a4a25e35d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
Date: Fri, 20 Aug 2021 22:44:52 +0200
|
||||||
|
Subject: [PATCH] ath9k: fetch calibration data via nvmem subsystem
|
||||||
|
|
||||||
|
On most embedded ath9k devices (like range extenders,
|
||||||
|
routers, accesspoints, ...) the calibration data is
|
||||||
|
stored in a MTD partitions named "ART", or "caldata"/
|
||||||
|
"calibration".
|
||||||
|
|
||||||
|
Ever since commit
|
||||||
|
4b361cfa8624 ("mtd: core: add OTP nvmem provider support")
|
||||||
|
all MTD partitions are all automatically available through
|
||||||
|
the nvmem subsystem. This allows drivers like ath9k to read
|
||||||
|
the necessary data without needing any userspace helpers
|
||||||
|
that would do this extraction.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
---
|
||||||
|
|
||||||
|
includes:
|
||||||
|
|
||||||
|
From 57671351379b2051cfb07fc14e0bead9916a0880 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dan Carpenter <dan.carpenter@oracle.com>
|
||||||
|
Date: Mon, 11 Oct 2021 18:18:01 +0300
|
||||||
|
Subject: ath9k: fix an IS_ERR() vs NULL check
|
||||||
|
|
||||||
|
The devm_kmemdup() function doesn't return error pointers, it returns
|
||||||
|
NULL on error.
|
||||||
|
|
||||||
|
Fixes: eb3a97a69be8 ("ath9k: fetch calibration data via nvmem subsystem")
|
||||||
|
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
|
||||||
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
|
Link: https://lore.kernel.org/r/20211011123533.GA15188@kili
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
|
||||||
|
@@ -135,13 +135,23 @@ static bool ath9k_hw_nvram_read_firmware
|
||||||
|
offset, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static bool ath9k_hw_nvram_read_nvmem(struct ath_hw *ah, off_t offset,
|
||||||
|
+ u16 *data)
|
||||||
|
+{
|
||||||
|
+ return ath9k_hw_nvram_read_array(ah->nvmem_blob,
|
||||||
|
+ ah->nvmem_blob_len / sizeof(u16),
|
||||||
|
+ offset, data);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data)
|
||||||
|
{
|
||||||
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
|
struct ath9k_platform_data *pdata = ah->dev->platform_data;
|
||||||
|
bool ret;
|
||||||
|
|
||||||
|
- if (ah->eeprom_blob)
|
||||||
|
+ if (ah->nvmem_blob)
|
||||||
|
+ ret = ath9k_hw_nvram_read_nvmem(ah, off, data);
|
||||||
|
+ else if (ah->eeprom_blob)
|
||||||
|
ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data);
|
||||||
|
else if (pdata && !pdata->use_eeprom)
|
||||||
|
ret = ath9k_hw_nvram_read_pdata(pdata, off, data);
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||||
|
@@ -988,6 +988,8 @@ struct ath_hw {
|
||||||
|
bool disable_5ghz;
|
||||||
|
|
||||||
|
const struct firmware *eeprom_blob;
|
||||||
|
+ u16 *nvmem_blob; /* devres managed */
|
||||||
|
+ size_t nvmem_blob_len;
|
||||||
|
|
||||||
|
struct ath_dynack dynack;
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
#include <linux/of_net.h>
|
||||||
|
+#include <linux/nvmem-consumer.h>
|
||||||
|
#include <linux/relay.h>
|
||||||
|
#include <linux/dmi.h>
|
||||||
|
#include <net/ieee80211_radiotap.h>
|
||||||
|
@@ -568,6 +569,57 @@ static void ath9k_eeprom_release(struct
|
||||||
|
release_firmware(sc->sc_ah->eeprom_blob);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int ath9k_nvmem_request_eeprom(struct ath_softc *sc)
|
||||||
|
+{
|
||||||
|
+ struct ath_hw *ah = sc->sc_ah;
|
||||||
|
+ struct nvmem_cell *cell;
|
||||||
|
+ void *buf;
|
||||||
|
+ size_t len;
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ cell = devm_nvmem_cell_get(sc->dev, "calibration");
|
||||||
|
+ if (IS_ERR(cell)) {
|
||||||
|
+ err = PTR_ERR(cell);
|
||||||
|
+
|
||||||
|
+ /* nvmem cell might not be defined, or the nvmem
|
||||||
|
+ * subsystem isn't included. In this case, follow
|
||||||
|
+ * the established "just return 0;" convention of
|
||||||
|
+ * ath9k_init_platform to say:
|
||||||
|
+ * "All good. Nothing to see here. Please go on."
|
||||||
|
+ */
|
||||||
|
+ if (err == -ENOENT || err == -EOPNOTSUPP)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ return err;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ buf = nvmem_cell_read(cell, &len);
|
||||||
|
+ if (IS_ERR(buf))
|
||||||
|
+ return PTR_ERR(buf);
|
||||||
|
+
|
||||||
|
+ /* run basic sanity checks on the returned nvram cell length.
|
||||||
|
+ * That length has to be a multiple of a "u16" (i.e.: & 1).
|
||||||
|
+ * Furthermore, it has to be more than "let's say" 512 bytes
|
||||||
|
+ * but less than the maximum of AR9300_EEPROM_SIZE (16kb).
|
||||||
|
+ */
|
||||||
|
+ if (((len & 1) == 1) || (len < 512) || (len >= AR9300_EEPROM_SIZE)) {
|
||||||
|
+ kfree(buf);
|
||||||
|
+ return -EINVAL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* devres manages the calibration values release on shutdown */
|
||||||
|
+ ah->nvmem_blob = (u16 *)devm_kmemdup(sc->dev, buf, len, GFP_KERNEL);
|
||||||
|
+ kfree(buf);
|
||||||
|
+ if (!ah->nvmem_blob)
|
||||||
|
+ return -ENOMEM;
|
||||||
|
+
|
||||||
|
+ ah->nvmem_blob_len = len;
|
||||||
|
+ ah->ah_flags &= ~AH_USE_EEPROM;
|
||||||
|
+ ah->ah_flags |= AH_NO_EEP_SWAP;
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int ath9k_init_platform(struct ath_softc *sc)
|
||||||
|
{
|
||||||
|
struct ath9k_platform_data *pdata = sc->dev->platform_data;
|
||||||
|
@@ -710,6 +762,10 @@ static int ath9k_init_softc(u16 devid, s
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
+ ret = ath9k_nvmem_request_eeprom(sc);
|
||||||
|
+ if (ret)
|
||||||
|
+ return ret;
|
||||||
|
+
|
||||||
|
if (ath9k_led_active_high != -1)
|
||||||
|
ah->config.led_active_high = ath9k_led_active_high == 1;
|
||||||
|
|
@ -0,0 +1,181 @@
|
|||||||
|
From 9bf31835f11aa3c4fe5a9c1f7462c199c5d8e7ca Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
Date: Sat, 21 Aug 2021 00:22:39 +0200
|
||||||
|
Subject: [PATCH] ath9k: owl-loader: fetch pci init values through nvmem
|
||||||
|
|
||||||
|
extends the owl loader to fetch important pci initialization
|
||||||
|
values - which are stored together with the calibration data -
|
||||||
|
through the nvmem subsystem.
|
||||||
|
|
||||||
|
This allows for much faster WIFI/ath9k initializations on devices
|
||||||
|
that do not require to perform any post-processing (like XOR'ing/
|
||||||
|
reversal or unpacking) since no userspace helper is required.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
---
|
||||||
|
.../wireless/ath/ath9k/ath9k_pci_owl_loader.c | 105 +++++++++++++-----
|
||||||
|
1 file changed, 76 insertions(+), 29 deletions(-)
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||||
|
@@ -19,9 +19,14 @@
|
||||||
|
#include <linux/delay.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/ath9k_platform.h>
|
||||||
|
+#include <linux/nvmem-consumer.h>
|
||||||
|
+#include <linux/workqueue.h>
|
||||||
|
|
||||||
|
struct owl_ctx {
|
||||||
|
+ struct pci_dev *pdev;
|
||||||
|
struct completion eeprom_load;
|
||||||
|
+ struct work_struct work;
|
||||||
|
+ struct nvmem_cell *cell;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define EEPROM_FILENAME_LEN 100
|
||||||
|
@@ -42,6 +47,12 @@ static int ath9k_pci_fixup(struct pci_de
|
||||||
|
u32 bar0;
|
||||||
|
bool swap_needed = false;
|
||||||
|
|
||||||
|
+ /* also note that we are doing *u16 operations on the file */
|
||||||
|
+ if (cal_len > 4096 || cal_len < 0x200 || (cal_len & 1) == 1) {
|
||||||
|
+ dev_err(&pdev->dev, "eeprom has an invalid size.\n");
|
||||||
|
+ return -EINVAL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (*cal_data != AR5416_EEPROM_MAGIC) {
|
||||||
|
if (*cal_data != swab16(AR5416_EEPROM_MAGIC)) {
|
||||||
|
dev_err(&pdev->dev, "invalid calibration data\n");
|
||||||
|
@@ -99,38 +110,31 @@ static int ath9k_pci_fixup(struct pci_de
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void owl_fw_cb(const struct firmware *fw, void *context)
|
||||||
|
+static void owl_rescan(struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
- struct pci_dev *pdev = (struct pci_dev *)context;
|
||||||
|
- struct owl_ctx *ctx = (struct owl_ctx *)pci_get_drvdata(pdev);
|
||||||
|
- struct pci_bus *bus;
|
||||||
|
-
|
||||||
|
- complete(&ctx->eeprom_load);
|
||||||
|
-
|
||||||
|
- if (!fw) {
|
||||||
|
- dev_err(&pdev->dev, "no eeprom data received.\n");
|
||||||
|
- goto release;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* also note that we are doing *u16 operations on the file */
|
||||||
|
- if (fw->size > 4096 || fw->size < 0x200 || (fw->size & 1) == 1) {
|
||||||
|
- dev_err(&pdev->dev, "eeprom file has an invalid size.\n");
|
||||||
|
- goto release;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (ath9k_pci_fixup(pdev, (const u16 *)fw->data, fw->size))
|
||||||
|
- goto release;
|
||||||
|
+ struct pci_bus *bus = pdev->bus;
|
||||||
|
|
||||||
|
pci_lock_rescan_remove();
|
||||||
|
- bus = pdev->bus;
|
||||||
|
pci_stop_and_remove_bus_device(pdev);
|
||||||
|
/* the device should come back with the proper
|
||||||
|
* ProductId. But we have to initiate a rescan.
|
||||||
|
*/
|
||||||
|
pci_rescan_bus(bus);
|
||||||
|
pci_unlock_rescan_remove();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void owl_fw_cb(const struct firmware *fw, void *context)
|
||||||
|
+{
|
||||||
|
+ struct owl_ctx *ctx = (struct owl_ctx *)context;
|
||||||
|
+
|
||||||
|
+ complete(&ctx->eeprom_load);
|
||||||
|
|
||||||
|
-release:
|
||||||
|
+ if (fw) {
|
||||||
|
+ ath9k_pci_fixup(ctx->pdev, (const u16 *)fw->data, fw->size);
|
||||||
|
+ owl_rescan(ctx->pdev);
|
||||||
|
+ } else {
|
||||||
|
+ dev_err(&ctx->pdev->dev, "no eeprom data received.\n");
|
||||||
|
+ }
|
||||||
|
release_firmware(fw);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -152,6 +156,43 @@ static const char *owl_get_eeprom_name(s
|
||||||
|
return eeprom_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void owl_nvmem_work(struct work_struct *work)
|
||||||
|
+{
|
||||||
|
+ struct owl_ctx *ctx = container_of(work, struct owl_ctx, work);
|
||||||
|
+ void *buf;
|
||||||
|
+ size_t len;
|
||||||
|
+
|
||||||
|
+ complete(&ctx->eeprom_load);
|
||||||
|
+
|
||||||
|
+ buf = nvmem_cell_read(ctx->cell, &len);
|
||||||
|
+ if (!IS_ERR(buf)) {
|
||||||
|
+ ath9k_pci_fixup(ctx->pdev, buf, len);
|
||||||
|
+ kfree(buf);
|
||||||
|
+ owl_rescan(ctx->pdev);
|
||||||
|
+ } else {
|
||||||
|
+ dev_err(&ctx->pdev->dev, "no nvmem data received.\n");
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int owl_nvmem_probe(struct owl_ctx *ctx)
|
||||||
|
+{
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ ctx->cell = devm_nvmem_cell_get(&ctx->pdev->dev, "calibration");
|
||||||
|
+ if (IS_ERR(ctx->cell)) {
|
||||||
|
+ err = PTR_ERR(ctx->cell);
|
||||||
|
+ if (err == -ENOENT || err == -EOPNOTSUPP)
|
||||||
|
+ return 1; /* not present, try firmware_request */
|
||||||
|
+
|
||||||
|
+ return err;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ INIT_WORK(&ctx->work, owl_nvmem_work);
|
||||||
|
+ schedule_work(&ctx->work);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int owl_probe(struct pci_dev *pdev,
|
||||||
|
const struct pci_device_id *id)
|
||||||
|
{
|
||||||
|
@@ -164,21 +205,27 @@ static int owl_probe(struct pci_dev *pde
|
||||||
|
|
||||||
|
pcim_pin_device(pdev);
|
||||||
|
|
||||||
|
- eeprom_name = owl_get_eeprom_name(pdev);
|
||||||
|
- if (!eeprom_name) {
|
||||||
|
- dev_err(&pdev->dev, "no eeprom filename found.\n");
|
||||||
|
- return -ENODEV;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
|
||||||
|
if (!ctx)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
init_completion(&ctx->eeprom_load);
|
||||||
|
+ ctx->pdev = pdev;
|
||||||
|
|
||||||
|
pci_set_drvdata(pdev, ctx);
|
||||||
|
+
|
||||||
|
+ err = owl_nvmem_probe(ctx);
|
||||||
|
+ if (err <= 0)
|
||||||
|
+ return err;
|
||||||
|
+
|
||||||
|
+ eeprom_name = owl_get_eeprom_name(pdev);
|
||||||
|
+ if (!eeprom_name) {
|
||||||
|
+ dev_err(&pdev->dev, "no eeprom filename found.\n");
|
||||||
|
+ return -ENODEV;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
err = request_firmware_nowait(THIS_MODULE, true, eeprom_name,
|
||||||
|
- &pdev->dev, GFP_KERNEL, pdev, owl_fw_cb);
|
||||||
|
+ &pdev->dev, GFP_KERNEL, ctx, owl_fw_cb);
|
||||||
|
if (err)
|
||||||
|
dev_err(&pdev->dev, "failed to request caldata (%d).\n", err);
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
|
||||||
@@ -646,11 +646,13 @@
|
|
||||||
ah->ah_flags &= ~AH_USE_EEPROM;
|
|
||||||
ah->ah_flags |= AH_NO_EEP_SWAP;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
|
||||||
+ of_get_mac_address(np, common->macaddr);
|
|
||||||
+#else
|
|
||||||
mac = of_get_mac_address(np);
|
|
||||||
if (!IS_ERR(mac))
|
|
||||||
ether_addr_copy(common->macaddr, mac);
|
|
||||||
-
|
|
||||||
+#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
if (wl->radio_enabled != phy->radio_on) {
|
if (wl->radio_enabled != phy->radio_on) {
|
||||||
if (wl->radio_enabled) {
|
if (wl->radio_enabled) {
|
||||||
@@ -5176,6 +5173,47 @@ static int b43_op_get_survey(struct ieee
|
@@ -5175,6 +5172,47 @@ static int b43_op_get_survey(struct ieee
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@
|
|||||||
static const struct ieee80211_ops b43_hw_ops = {
|
static const struct ieee80211_ops b43_hw_ops = {
|
||||||
.tx = b43_op_tx,
|
.tx = b43_op_tx,
|
||||||
.conf_tx = b43_op_conf_tx,
|
.conf_tx = b43_op_conf_tx,
|
||||||
@@ -5197,6 +5235,8 @@ static const struct ieee80211_ops b43_hw
|
@@ -5196,6 +5234,8 @@ static const struct ieee80211_ops b43_hw
|
||||||
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
|
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
|
||||||
.get_survey = b43_op_get_survey,
|
.get_survey = b43_op_get_survey,
|
||||||
.rfkill_poll = b43_rfkill_poll,
|
.rfkill_poll = b43_rfkill_poll,
|
||||||
@ -99,7 +99,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Hard-reset the chip. Do not call this directly.
|
/* Hard-reset the chip. Do not call this directly.
|
||||||
@@ -5498,6 +5538,8 @@ static int b43_one_core_attach(struct b4
|
@@ -5497,6 +5537,8 @@ static int b43_one_core_attach(struct b4
|
||||||
if (!wldev)
|
if (!wldev)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@ -108,7 +108,7 @@
|
|||||||
wldev->use_pio = b43_modparam_pio;
|
wldev->use_pio = b43_modparam_pio;
|
||||||
wldev->dev = dev;
|
wldev->dev = dev;
|
||||||
wldev->wl = wl;
|
wldev->wl = wl;
|
||||||
@@ -5592,6 +5634,9 @@ static struct b43_wl *b43_wireless_init(
|
@@ -5588,6 +5630,9 @@ static struct b43_wl *b43_wireless_init(
|
||||||
|
|
||||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||||
|
|
||||||
|
@ -13,15 +13,15 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||||
@@ -431,6 +431,7 @@ struct brcmf_fw {
|
@@ -429,6 +429,7 @@ struct brcmf_fw {
|
||||||
struct brcmf_fw_request *req;
|
struct brcmf_fw_request *req;
|
||||||
u32 curpos;
|
u32 curpos;
|
||||||
void (*done)(struct device *dev, int err, struct brcmf_fw_request *req);
|
void (*done)(struct device *dev, int err, struct brcmf_fw_request *req);
|
||||||
+ struct completion *completion;
|
+ struct completion *completion;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx);
|
#ifdef CONFIG_EFI
|
||||||
@@ -638,6 +639,8 @@ static void brcmf_fw_request_done(const
|
@@ -653,6 +654,8 @@ static void brcmf_fw_request_done(const
|
||||||
fwctx->req = NULL;
|
fwctx->req = NULL;
|
||||||
}
|
}
|
||||||
fwctx->done(fwctx->dev, ret, fwctx->req);
|
fwctx->done(fwctx->dev, ret, fwctx->req);
|
||||||
@ -30,16 +30,16 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|||||||
kfree(fwctx);
|
kfree(fwctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -662,6 +665,8 @@ int brcmf_fw_get_firmwares(struct device
|
@@ -693,6 +696,8 @@ int brcmf_fw_get_firmwares(struct device
|
||||||
{
|
{
|
||||||
struct brcmf_fw_item *first = &req->items[0];
|
struct brcmf_fw_item *first = &req->items[0];
|
||||||
struct brcmf_fw *fwctx;
|
struct brcmf_fw *fwctx;
|
||||||
+ struct completion completion;
|
+ struct completion completion;
|
||||||
+ unsigned long time_left;
|
+ unsigned long time_left;
|
||||||
|
char *alt_path;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
|
@@ -710,6 +715,9 @@ int brcmf_fw_get_firmwares(struct device
|
||||||
@@ -678,6 +683,9 @@ int brcmf_fw_get_firmwares(struct device
|
|
||||||
fwctx->dev = dev;
|
fwctx->dev = dev;
|
||||||
fwctx->req = req;
|
fwctx->req = req;
|
||||||
fwctx->done = fw_cb;
|
fwctx->done = fw_cb;
|
||||||
@ -47,9 +47,9 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|||||||
+ init_completion(&completion);
|
+ init_completion(&completion);
|
||||||
+ fwctx->completion = &completion;
|
+ fwctx->completion = &completion;
|
||||||
|
|
||||||
ret = request_firmware_nowait(THIS_MODULE, true, first->path,
|
/* First try alternative board-specific path if any */
|
||||||
fwctx->dev, GFP_KERNEL, fwctx,
|
alt_path = brcm_alt_fw_path(first->path, fwctx->req->board_type);
|
||||||
@@ -685,6 +693,12 @@ int brcmf_fw_get_firmwares(struct device
|
@@ -726,6 +734,12 @@ int brcmf_fw_get_firmwares(struct device
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
brcmf_fw_request_done(NULL, fwctx);
|
brcmf_fw_request_done(NULL, fwctx);
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||||
@@ -2958,6 +2958,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
@@ -2974,6 +2974,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||||
* preference in cfg struct to apply this to
|
* preference in cfg struct to apply this to
|
||||||
* FW later while initializing the dongle
|
* FW later while initializing the dongle
|
||||||
*/
|
*/
|
||||||
|
@ -12,9 +12,9 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||||
@@ -12,6 +12,36 @@
|
@@ -58,6 +58,36 @@ static int brcmf_of_get_country_codes(st
|
||||||
#include "common.h"
|
return 0;
|
||||||
#include "of.h"
|
}
|
||||||
|
|
||||||
+/* TODO: FIXME: Use DT */
|
+/* TODO: FIXME: Use DT */
|
||||||
+static void brcmf_of_probe_cc(struct device *dev,
|
+static void brcmf_of_probe_cc(struct device *dev,
|
||||||
@ -49,12 +49,12 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|||||||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||||
struct brcmf_mp_device *settings)
|
struct brcmf_mp_device *settings)
|
||||||
{
|
{
|
||||||
@@ -43,6 +73,8 @@ void brcmf_of_probe(struct device *dev,
|
@@ -90,6 +120,8 @@ void brcmf_of_probe(struct device *dev,
|
||||||
of_node_put(root);
|
of_node_put(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ brcmf_of_probe_cc(dev, settings);
|
+ brcmf_of_probe_cc(dev, settings);
|
||||||
+
|
+
|
||||||
if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
|
if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
||||||
!of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||||
@@ -2910,6 +2910,63 @@ done:
|
@@ -2921,6 +2921,63 @@ done:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -64,7 +64,7 @@
|
|||||||
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
|
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
int idx, u8 *mac, struct station_info *sinfo)
|
int idx, u8 *mac, struct station_info *sinfo)
|
||||||
{
|
{
|
||||||
@@ -3005,6 +3062,7 @@ static s32 brcmf_inform_single_bss(struc
|
@@ -3021,6 +3078,7 @@ static s32 brcmf_inform_single_bss(struc
|
||||||
struct brcmu_chan ch;
|
struct brcmu_chan ch;
|
||||||
u16 channel;
|
u16 channel;
|
||||||
u32 freq;
|
u32 freq;
|
||||||
@ -72,7 +72,7 @@
|
|||||||
u16 notify_capability;
|
u16 notify_capability;
|
||||||
u16 notify_interval;
|
u16 notify_interval;
|
||||||
u8 *notify_ie;
|
u8 *notify_ie;
|
||||||
@@ -3029,6 +3087,17 @@ static s32 brcmf_inform_single_bss(struc
|
@@ -3045,6 +3103,17 @@ static s32 brcmf_inform_single_bss(struc
|
||||||
band = NL80211_BAND_5GHZ;
|
band = NL80211_BAND_5GHZ;
|
||||||
|
|
||||||
freq = ieee80211_channel_to_frequency(channel, band);
|
freq = ieee80211_channel_to_frequency(channel, band);
|
||||||
@ -90,7 +90,7 @@
|
|||||||
bss_data.chan = ieee80211_get_channel(wiphy, freq);
|
bss_data.chan = ieee80211_get_channel(wiphy, freq);
|
||||||
bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20;
|
bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20;
|
||||||
bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime());
|
bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime());
|
||||||
@@ -5515,6 +5584,7 @@ static struct cfg80211_ops brcmf_cfg8021
|
@@ -5573,6 +5642,7 @@ static struct cfg80211_ops brcmf_cfg8021
|
||||||
.leave_ibss = brcmf_cfg80211_leave_ibss,
|
.leave_ibss = brcmf_cfg80211_leave_ibss,
|
||||||
.get_station = brcmf_cfg80211_get_station,
|
.get_station = brcmf_cfg80211_get_station,
|
||||||
.dump_station = brcmf_cfg80211_dump_station,
|
.dump_station = brcmf_cfg80211_dump_station,
|
||||||
@ -100,7 +100,7 @@
|
|||||||
.add_key = brcmf_cfg80211_add_key,
|
.add_key = brcmf_cfg80211_add_key,
|
||||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||||
@@ -1356,6 +1356,8 @@ int brcmf_attach(struct device *dev)
|
@@ -1361,6 +1361,8 @@ int brcmf_attach(struct device *dev)
|
||||||
|
|
||||||
/* Link to bus module */
|
/* Link to bus module */
|
||||||
drvr->hdrlen = 0;
|
drvr->hdrlen = 0;
|
||||||
@ -109,7 +109,7 @@
|
|||||||
|
|
||||||
/* Attach and link in the protocol */
|
/* Attach and link in the protocol */
|
||||||
ret = brcmf_proto_attach(drvr);
|
ret = brcmf_proto_attach(drvr);
|
||||||
@@ -1438,6 +1440,12 @@ void brcmf_detach(struct device *dev)
|
@@ -1443,6 +1445,12 @@ void brcmf_detach(struct device *dev)
|
||||||
if (drvr == NULL)
|
if (drvr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/compat/main.c
|
--- a/compat/main.c
|
||||||
+++ b/compat/main.c
|
+++ b/compat/main.c
|
||||||
@@ -20,31 +20,6 @@ MODULE_LICENSE("GPL");
|
@@ -19,31 +19,6 @@ MODULE_LICENSE("GPL");
|
||||||
#error "You need a CPTCFG_VERSION"
|
#error "You need a CPTCFG_VERSION"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
--- a/backport-include/linux/kconfig.h
|
|
||||||
+++ b/backport-include/linux/kconfig.h
|
|
||||||
@@ -5,6 +5,8 @@
|
|
||||||
#include_next <linux/kconfig.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
|
|
||||||
+
|
|
||||||
#ifndef __ARG_PLACEHOLDER_1
|
|
||||||
#define __ARG_PLACEHOLDER_1 0,
|
|
||||||
#define config_enabled(cfg) _config_enabled(cfg)
|
|
||||||
@@ -16,6 +18,7 @@
|
|
||||||
* 3.1 - 3.3 had a broken version of this, so undef
|
|
||||||
* (they didn't have __ARG_PLACEHOLDER_1)
|
|
||||||
*/
|
|
||||||
+
|
|
||||||
#undef IS_ENABLED
|
|
||||||
#define IS_ENABLED(option) \
|
|
||||||
(config_enabled(option) || config_enabled(option##_MODULE))
|
|
||||||
@@ -31,6 +34,8 @@
|
|
||||||
#undef IS_BUILTIN
|
|
||||||
#define IS_BUILTIN(option) config_enabled(option)
|
|
||||||
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#ifndef IS_REACHABLE
|
|
||||||
/*
|
|
||||||
* IS_REACHABLE(CONFIG_FOO) evaluates to 1 if the currently compiled
|
|
@ -1,15 +0,0 @@
|
|||||||
--- a/backport-include/linux/rfkill.h
|
|
||||||
+++ b/backport-include/linux/rfkill.h
|
|
||||||
@@ -2,6 +2,12 @@
|
|
||||||
#define __COMPAT_RFKILL_H
|
|
||||||
#include <linux/version.h>
|
|
||||||
|
|
||||||
+#undef CONFIG_RFKILL
|
|
||||||
+#undef CONFIG_RFKILL_FULL
|
|
||||||
+#undef CONFIG_RFKILL_LEDS
|
|
||||||
+#undef CONFIG_RFKILL_MODULE
|
|
||||||
+#undef CONFIG_RFKILL_FULL_MODULE
|
|
||||||
+
|
|
||||||
#if LINUX_VERSION_IS_GEQ(3,10,0)
|
|
||||||
#include_next <linux/rfkill.h>
|
|
||||||
#else
|
|
@ -1,9 +1,9 @@
|
|||||||
--- a/local-symbols
|
--- a/local-symbols
|
||||||
+++ b/local-symbols
|
+++ b/local-symbols
|
||||||
@@ -437,43 +437,6 @@ USB_SIERRA_NET=
|
@@ -421,43 +421,6 @@ USB_VL600=
|
||||||
USB_VL600=
|
|
||||||
USB_NET_CH9200=
|
USB_NET_CH9200=
|
||||||
USB_NET_AQC111=
|
USB_NET_AQC111=
|
||||||
|
USB_RTL8153_ECM=
|
||||||
-SSB_POSSIBLE=
|
-SSB_POSSIBLE=
|
||||||
-SSB=
|
-SSB=
|
||||||
-SSB_SPROM=
|
-SSB_SPROM=
|
||||||
@ -192,10 +192,10 @@
|
|||||||
select BRCMUTIL
|
select BRCMUTIL
|
||||||
--- a/Kconfig.local
|
--- a/Kconfig.local
|
||||||
+++ b/Kconfig.local
|
+++ b/Kconfig.local
|
||||||
@@ -1315,117 +1315,6 @@ config BACKPORTED_USB_NET_CH9200
|
@@ -1267,117 +1267,6 @@ config BACKPORTED_USB_NET_AQC111
|
||||||
config BACKPORTED_USB_NET_AQC111
|
config BACKPORTED_USB_RTL8153_ECM
|
||||||
tristate
|
tristate
|
||||||
default USB_NET_AQC111
|
default USB_RTL8153_ECM
|
||||||
-config BACKPORTED_SSB_POSSIBLE
|
-config BACKPORTED_SSB_POSSIBLE
|
||||||
- tristate
|
- tristate
|
||||||
- default SSB_POSSIBLE
|
- default SSB_POSSIBLE
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
|
||||||
|
Date: Fri, 11 Mar 2022 18:21:04 +0100
|
||||||
|
Subject: [PATCH] headers: fix lockdep_assert_not_held()
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
LOCK_STATE_HELD define was omitted during backport of
|
||||||
|
lockdep_assert_not_held() which leads to build failures of kernels with
|
||||||
|
CONFIG_LOCKDEP=y:
|
||||||
|
|
||||||
|
backports-5.15.8-1/backport-include/linux/lockdep.h:16:47: error: 'LOCK_STATE_HELD' undeclared (first use in this function)
|
||||||
|
|
||||||
|
Fix it by adding missing LOCK_STATE_HELD define.
|
||||||
|
|
||||||
|
References: https://github.com/openwrt/openwrt/pull/9373
|
||||||
|
References: https://lore.kernel.org/backports/20220311194800.452-1-ynezz@true.cz/T/#u
|
||||||
|
Fixes: af58b27b1b1a ("headers: Add lockdep_assert_not_held()")
|
||||||
|
Reported-by: Oskari Rauta <oskari.rauta@gmail.com>
|
||||||
|
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
||||||
|
---
|
||||||
|
backport-include/linux/lockdep.h | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/backport-include/linux/lockdep.h b/backport-include/linux/lockdep.h
|
||||||
|
index ed5ea67894e4..842e24b7ff8f 100644
|
||||||
|
--- a/backport-include/linux/lockdep.h
|
||||||
|
+++ b/backport-include/linux/lockdep.h
|
||||||
|
@@ -11,6 +11,9 @@ struct lockdep_map { };
|
||||||
|
|
||||||
|
#ifndef lockdep_assert_not_held
|
||||||
|
#ifdef CONFIG_LOCKDEP
|
||||||
|
+#ifndef LOCK_STATE_HELD
|
||||||
|
+#define LOCK_STATE_HELD 1
|
||||||
|
+#endif /* LOCK_STATE_HELD */
|
||||||
|
#define lockdep_assert_not_held(l) do { \
|
||||||
|
WARN_ON(debug_locks && \
|
||||||
|
lockdep_is_held(l) == LOCK_STATE_HELD); \
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||||
@@ -5695,6 +5695,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
|
@@ -5699,6 +5699,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
|
||||||
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
||||||
|
|
||||||
static const struct pci_device_id mwl8k_pci_id_table[] = {
|
static const struct pci_device_id mwl8k_pci_id_table[] = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||||
@@ -6280,6 +6280,8 @@ static int mwl8k_probe(struct pci_dev *p
|
@@ -6285,6 +6285,8 @@ static int mwl8k_probe(struct pci_dev *p
|
||||||
|
|
||||||
priv->running_bsses = 0;
|
priv->running_bsses = 0;
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
err_stop_firmware:
|
err_stop_firmware:
|
||||||
@@ -6313,8 +6315,6 @@ static void mwl8k_remove(struct pci_dev
|
@@ -6318,8 +6320,6 @@ static void mwl8k_remove(struct pci_dev
|
||||||
return;
|
return;
|
||||||
priv = hw->priv;
|
priv = hw->priv;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||||
@@ -9416,6 +9416,8 @@ static int rt2800_init_eeprom(struct rt2
|
@@ -9435,6 +9435,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||||
rf = RF3853;
|
rf = RF3853;
|
||||||
else if (rt2x00_rt(rt2x00dev, RT5350))
|
else if (rt2x00_rt(rt2x00dev, RT5350))
|
||||||
rf = RF5350;
|
rf = RF5350;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/local-symbols
|
--- a/local-symbols
|
||||||
+++ b/local-symbols
|
+++ b/local-symbols
|
||||||
@@ -333,6 +333,7 @@ RT2X00_LIB_FIRMWARE=
|
@@ -315,6 +315,7 @@ RT2X00_LIB_FIRMWARE=
|
||||||
RT2X00_LIB_CRYPTO=
|
RT2X00_LIB_CRYPTO=
|
||||||
RT2X00_LIB_LEDS=
|
RT2X00_LIB_LEDS=
|
||||||
RT2X00_LIB_DEBUGFS=
|
RT2X00_LIB_DEBUGFS=
|
||||||
@ -105,7 +105,7 @@
|
|||||||
.drv_init_registers = rt2800mmio_init_registers,
|
.drv_init_registers = rt2800mmio_init_registers,
|
||||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
||||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
||||||
@@ -694,6 +694,7 @@ enum rt2x00_capability_flags {
|
@@ -703,6 +703,7 @@ enum rt2x00_capability_flags {
|
||||||
REQUIRE_HT_TX_DESC,
|
REQUIRE_HT_TX_DESC,
|
||||||
REQUIRE_PS_AUTOWAKE,
|
REQUIRE_PS_AUTOWAKE,
|
||||||
REQUIRE_DELAYED_RFKILL,
|
REQUIRE_DELAYED_RFKILL,
|
||||||
@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Capabilities
|
* Capabilities
|
||||||
@@ -970,6 +971,11 @@ struct rt2x00_dev {
|
@@ -980,6 +981,11 @@ struct rt2x00_dev {
|
||||||
const struct firmware *fw;
|
const struct firmware *fw;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -127,7 +127,7 @@
|
|||||||
DECLARE_KFIFO_PTR(txstatus_fifo, u32);
|
DECLARE_KFIFO_PTR(txstatus_fifo, u32);
|
||||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
@@ -1406,6 +1406,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
|
@@ -1401,6 +1401,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
|
||||||
INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
|
INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
|
||||||
INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
|
INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
|
||||||
|
|
||||||
@ -138,7 +138,7 @@
|
|||||||
/*
|
/*
|
||||||
* Let the driver probe the device to detect the capabilities.
|
* Let the driver probe the device to detect the capabilities.
|
||||||
*/
|
*/
|
||||||
@@ -1549,6 +1553,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
|
@@ -1541,6 +1545,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
|
||||||
* Free the driver data.
|
* Free the driver data.
|
||||||
*/
|
*/
|
||||||
kfree(rt2x00dev->drv_data);
|
kfree(rt2x00dev->drv_data);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#endif /* _RT2X00_PLATFORM_H */
|
#endif /* _RT2X00_PLATFORM_H */
|
||||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
@@ -1012,6 +1012,22 @@ static int rt2x00lib_probe_hw_modes(stru
|
@@ -1007,6 +1007,22 @@ static int rt2x00lib_probe_hw_modes(stru
|
||||||
unsigned int num_rates;
|
unsigned int num_rates;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
@ -37,7 +37,7 @@
|
|||||||
num_rates += 4;
|
num_rates += 4;
|
||||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
||||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
|
||||||
@@ -399,6 +399,7 @@ struct hw_mode_spec {
|
@@ -408,6 +408,7 @@ struct hw_mode_spec {
|
||||||
unsigned int supported_bands;
|
unsigned int supported_bands;
|
||||||
#define SUPPORT_BAND_2GHZ 0x00000001
|
#define SUPPORT_BAND_2GHZ 0x00000001
|
||||||
#define SUPPORT_BAND_5GHZ 0x00000002
|
#define SUPPORT_BAND_5GHZ 0x00000002
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
@@ -990,8 +990,13 @@ static void rt2x00lib_rate(struct ieee80
|
@@ -989,6 +989,12 @@ static void rt2x00lib_rate(struct ieee80
|
||||||
|
|
||||||
void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr)
|
void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr)
|
||||||
{
|
{
|
||||||
+ struct rt2x00_platform_data *pdata;
|
+ struct rt2x00_platform_data *pdata;
|
||||||
const char *mac_addr;
|
+
|
||||||
|
|
||||||
+ pdata = rt2x00dev->dev->platform_data;
|
+ pdata = rt2x00dev->dev->platform_data;
|
||||||
+ if (pdata && pdata->mac_address)
|
+ if (pdata && pdata->mac_address)
|
||||||
+ ether_addr_copy(eeprom_mac_addr, pdata->mac_address);
|
+ ether_addr_copy(eeprom_mac_addr, pdata->mac_address);
|
||||||
+
|
+
|
||||||
mac_addr = of_get_mac_address(rt2x00dev->dev->of_node);
|
of_get_mac_address(rt2x00dev->dev->of_node, eeprom_mac_addr);
|
||||||
if (!IS_ERR(mac_addr))
|
|
||||||
ether_addr_copy(eeprom_mac_addr, mac_addr);
|
if (!is_valid_ether_addr(eeprom_mac_addr)) {
|
||||||
--- a/include/linux/rt2x00_platform.h
|
--- a/include/linux/rt2x00_platform.h
|
||||||
+++ b/include/linux/rt2x00_platform.h
|
+++ b/include/linux/rt2x00_platform.h
|
||||||
@@ -14,6 +14,7 @@
|
@@ -14,6 +14,7 @@
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
@@ -1016,6 +1016,16 @@ static int rt2x00lib_probe_hw_modes(stru
|
@@ -1012,6 +1012,16 @@ static int rt2x00lib_probe_hw_modes(stru
|
||||||
struct ieee80211_rate *rates;
|
struct ieee80211_rate *rates;
|
||||||
unsigned int num_rates;
|
unsigned int num_rates;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include "rt2x00.h"
|
#include "rt2x00.h"
|
||||||
#include "rt2800lib.h"
|
#include "rt2800lib.h"
|
||||||
@@ -9530,6 +9531,17 @@ static int rt2800_init_eeprom(struct rt2
|
@@ -9549,6 +9550,17 @@ static int rt2800_init_eeprom(struct rt2
|
||||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
|
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
|
||||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
|
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
@@ -1344,7 +1344,7 @@ static inline void rt2x00lib_set_if_comb
|
@@ -1340,7 +1340,7 @@ static inline void rt2x00lib_set_if_comb
|
||||||
*/
|
*/
|
||||||
if_limit = &rt2x00dev->if_limits_ap;
|
if_limit = &rt2x00dev->if_limits_ap;
|
||||||
if_limit->max = rt2x00dev->ops->max_ap_intf;
|
if_limit->max = rt2x00dev->ops->max_ap_intf;
|
||||||
|
@ -11,7 +11,7 @@ Tested-by: Christoph Krapp <achterin@googlemail.com>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
|
||||||
@@ -1129,6 +1129,19 @@ static void rt2x00lib_remove_hw(struct r
|
@@ -1125,6 +1125,19 @@ static void rt2x00lib_remove_hw(struct r
|
||||||
kfree(rt2x00dev->spec.channels_info);
|
kfree(rt2x00dev->spec.channels_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ Tested-by: Christoph Krapp <achterin@googlemail.com>
|
|||||||
static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
|
static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
|
||||||
{
|
{
|
||||||
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
||||||
@@ -1210,6 +1223,10 @@ static int rt2x00lib_probe_hw(struct rt2
|
@@ -1206,6 +1219,10 @@ static int rt2x00lib_probe_hw(struct rt2
|
||||||
|
|
||||||
#undef RT2X00_TASKLET_INIT
|
#undef RT2X00_TASKLET_INIT
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user