From b791a723caef527ddd77723632ba37e5329c5a69 Mon Sep 17 00:00:00 2001 From: Marek Kwaczynski Date: Sat, 8 Mar 2025 23:07:11 +0000 Subject: [PATCH] qca-wifi-7/mac80211: Add tip patch to fix scanning on WiFi 7 devices Need to unblock chandef as scanning definitions which is used by TIP modules for scanning trigger. Signed-off-by: Marek Kwaczynski --- feeds/qca-wifi-7/mac80211/Makefile | 2 ++ .../0001-mac80211-fix-scan-params.patch | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 feeds/qca-wifi-7/mac80211/patches-tip/pending/0001-mac80211-fix-scan-params.patch diff --git a/feeds/qca-wifi-7/mac80211/Makefile b/feeds/qca-wifi-7/mac80211/Makefile index e57381c92..2b61aeb22 100644 --- a/feeds/qca-wifi-7/mac80211/Makefile +++ b/feeds/qca-wifi-7/mac80211/Makefile @@ -345,6 +345,7 @@ ifneq ($(CONFIG_PACKAGE_kmod-cfg80211),) endif EXTERNAL_PATCH_DIR:=$(CURDIR)/patches-qca +PATCH_TIP_DIR:=$(CURDIR)/patches-tip define Build/Patch $(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches) @@ -360,6 +361,7 @@ define Build/Patch $(call PatchDir,$(PKG_BUILD_DIR),$(EXTERNAL_PATCH_DIR)/ath11k,ath11k/) $(call PatchDir,$(PKG_BUILD_DIR),$(EXTERNAL_PATCH_DIR)/ath12k,ath12k/) $(call PatchDir,$(PKG_BUILD_DIR),$(EXTERNAL_PATCH_DIR)/pending,pending/) + $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_TIP_DIR)/pending,pending/) $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used) endef diff --git a/feeds/qca-wifi-7/mac80211/patches-tip/pending/0001-mac80211-fix-scan-params.patch b/feeds/qca-wifi-7/mac80211/patches-tip/pending/0001-mac80211-fix-scan-params.patch new file mode 100644 index 000000000..f92e9314a --- /dev/null +++ b/feeds/qca-wifi-7/mac80211/patches-tip/pending/0001-mac80211-fix-scan-params.patch @@ -0,0 +1,26 @@ +Index: backports-6.5-rc3/net/wireless/nl80211.c +=================================================================== +--- backports-6.5-rc3.orig/net/wireless/nl80211.c ++++ backports-6.5-rc3/net/wireless/nl80211.c +@@ -10270,14 +10296,15 @@ static int nl80211_trigger_scan(struct s + } + } + +- if (!i) { +- err = -EINVAL; +- goto out_free; ++ if (!chandef_found) { ++ if (!i) { ++ err = -EINVAL; ++ goto out_free; ++ } ++ request->n_channels = i; ++ request->scan_with_freq_info = freq_info_provided; + } + +- request->n_channels = i; +- request->scan_with_freq_info = freq_info_provided; +- + wdev_lock(wdev); + for (i = 0; i < request->n_channels; i++) { + struct ieee80211_channel *chan = request->channels[i];