From cabbb92abd0c8dac2fb5ec753df4dbeefff7d40a Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 15 Oct 2023 23:40:49 +0800 Subject: [PATCH] mac80211: ath11k: add ipq60xx support --- package/kernel/mac80211/ath.mk | 6 +++--- ...k-Disable-coldboot-calibration-for-IPQ6018.patch | 13 +++++++++++++ .../patches/build/990-add_kernel_6.6_support.patch | 10 +++++----- 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 package/kernel/mac80211/patches/ath11k/906-ath11k-Disable-coldboot-calibration-for-IPQ6018.patch diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk index 5b030ebf3..6f5d17cef 100644 --- a/package/kernel/mac80211/ath.mk +++ b/package/kernel/mac80211/ath.mk @@ -102,7 +102,7 @@ define KernelPackage/ath/config bool "Atheros wireless debugging" help Say Y, if you want to debug atheros wireless drivers. - Only ath9k & ath10k make use of this. + Only ath9k & ath10k & ath11k make use of this. config PACKAGE_ATH_DFS bool "Enable DFS support" @@ -349,7 +349,7 @@ define KernelPackage/ath11k/config config ATH11K_THERMAL bool "Enable thermal sensors and throttling support" depends on PACKAGE_kmod-ath11k - default y if TARGET_ipq807x + default y if TARGET_qualcommax endef @@ -357,7 +357,7 @@ define KernelPackage/ath11k-ahb $(call KernelPackage/mac80211/Default) TITLE:=Qualcomm 802.11ax AHB wireless chipset support URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k - DEPENDS+= @(TARGET_ipq60xx||TARGET_ipq807x) +kmod-ath11k +kmod-qrtr-smd + DEPENDS+= @TARGET_qualcommax +kmod-ath11k +kmod-qrtr-smd FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_ahb.ko AUTOLOAD:=$(call AutoProbe,ath11k_ahb) endef diff --git a/package/kernel/mac80211/patches/ath11k/906-ath11k-Disable-coldboot-calibration-for-IPQ6018.patch b/package/kernel/mac80211/patches/ath11k/906-ath11k-Disable-coldboot-calibration-for-IPQ6018.patch new file mode 100644 index 000000000..39a11d722 --- /dev/null +++ b/package/kernel/mac80211/patches/ath11k/906-ath11k-Disable-coldboot-calibration-for-IPQ6018.patch @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath11k/core.c ++++ b/drivers/net/wireless/ath/ath11k/core.c +@@ -168,8 +168,8 @@ static struct ath11k_hw_params ath11k_hw + .supports_shadow_regs = false, + .idle_ps = false, + .supports_sta_ps = false, +- .coldboot_cal_mm = true, +- .coldboot_cal_ftm = true, ++ .coldboot_cal_mm = false, ++ .coldboot_cal_ftm = false, + .cbcal_restart_fw = true, + .fw_mem_mode = 0, + .num_vdevs = 16 + 1, diff --git a/package/kernel/mac80211/patches/build/990-add_kernel_6.6_support.patch b/package/kernel/mac80211/patches/build/990-add_kernel_6.6_support.patch index 074c23b6e..2ced0316d 100644 --- a/package/kernel/mac80211/patches/build/990-add_kernel_6.6_support.patch +++ b/package/kernel/mac80211/patches/build/990-add_kernel_6.6_support.patch @@ -1,6 +1,6 @@ --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c -@@ -165,12 +165,21 @@ +@@ -148,12 +148,21 @@ static SIMPLE_DEV_PM_OPS(wiphy_pm_ops, w #define WIPHY_PM_OPS NULL #endif @@ -24,7 +24,7 @@ .name = "ieee80211", --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -16175,8 +16175,14 @@ +@@ -16158,8 +16158,14 @@ static u32 nl80211_internal_flags[] = { #undef SELECTOR }; @@ -39,7 +39,7 @@ { struct cfg80211_registered_device *rdev = NULL; struct wireless_dev *wdev = NULL; -@@ -16276,8 +16282,14 @@ +@@ -16259,8 +16265,14 @@ out_unlock: return err; } @@ -82,7 +82,7 @@ #include "mvm.h" --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1468,6 +1468,7 @@ +@@ -1435,6 +1435,7 @@ enum mac80211_rx_encoding { RX_ENC_HT, RX_ENC_VHT, RX_ENC_HE, @@ -90,7 +90,7 @@ }; /** -@@ -1530,8 +1531,18 @@ +@@ -1497,8 +1498,18 @@ struct ieee80211_rx_status { u32 flag; u16 freq: 13, freq_offset: 1; u8 enc_flags;