kernel-module-qualcomm: revert to driver qcacld-2.0

Verbatim copy of the recipes in DEY-3.2, using command:
git restore -s dey-3.2/master -- meta-digi-arm/recipes-kernel/kernel-module-qualcomm

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Isaac Hermida 2022-09-29 12:40:15 +02:00 committed by Javier Viguera
parent bd0eadc16e
commit 7493637f2e
14 changed files with 111 additions and 713 deletions

View File

@ -1,122 +1,84 @@
# Copyright (C) 2016-2022 Digi International. # Copyright (C) 2016-2021 Digi International.
SUMMARY = "Qualcomm's wireless driver for qca65xx" SUMMARY = "Qualcomm's wireless driver for qca65xx"
DESCRIPTION = "qcacld-3.0 module" DESCRIPTION = "qcacld-2.0 module"
LICENSE = "ISC" LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d"
# Reference Qualcomm tag/version # Reference Qualcomm tag/version
PV = "v5.2.0.237G" PV = "v4.0.11.213X"
QCACLD_SRCBRANCH = "wlan-cld3.driver.lnx.2.0.r51-rel" SRCBRANCH = "qca65X4/master"
QCA_WIFI_HOST_CMN_SRCBRANCH = "wlan-cmn.driver.lnx.2.0.r51-rel" SRCREV = "${AUTOREV}"
FW_API_SRCBRANCH = "wlan-api.lnx.1.0.c21.2"
MDM_INIT_SRCBRANCH = "wlan-tools.lnx.1.0.c21.2" QCOM_GIT_URI = "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}/linux/qcacld-2.0.git;protocol=ssh', '${DIGI_GITHUB_GIT}/qcacld-2.0.git;protocol=https', d)}"
SRC_URI = " \ SRC_URI = " \
git://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0.git;protocol=https;branch=${QCACLD_SRCBRANCH};name=qcacld \ ${QCOM_GIT_URI};branch=${SRCBRANCH} \
git://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn.git;protocol=https;branch=${QCA_WIFI_HOST_CMN_SRCBRANCH};destsuffix=qca-wifi-host-cmn;name=qca-wifi-host \
git://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api.git;protocol=https;branch=${FW_API_SRCBRANCH};destsuffix=fw-api;name=fw-api \
git://git.codelinaro.org/clo/le/qcom-opensource/mdm-init.git;protocol=https;branch=${MDM_INIT_SRCBRANCH};destsuffix=mdm-init;name=mdm-init \
file://0001-qcacld-3.0-disable-warnings-as-errors.patch \
file://0002-qcacld-3.0-support-ROME-SDIO-build.patch \
file://0003-qcacld-3.0-cfg-try-to-get-MACs-from-device-tree-entr.patch \
file://0004-qcacld-3.0-Add-proper-check-to-include-qcom-iommu-ut.patch \
file://0005-qcacld-3.0-module-parameter-to-enable-p2p-support.patch \
file://0006-qcacld-3.0-use-cfg80211_register_netdevice.patch \
file://0007-qcacld-3.0-use-ndo_siocdevprivate.patch \
file://0001-qca-wifi-host-cmn-fix-buid-issue-for-Rome-SDIO-inter.patch;patchdir=${WORKDIR}/qca-wifi-host-cmn; \
file://0002-qca-wifi-host-cmn-fix-build-issue-enabling-debug-for.patch;patchdir=${WORKDIR}/qca-wifi-host-cmn; \
file://0003-qca-wifi-host-cmn-fix-panic_notifier_list-undeclared.patch;patchdir=${WORKDIR}/qca-wifi-host-cmn; \
file://0004-qca-wifi-host-cmn-fix-sdio-error-on-unload-driver.patch;patchdir=${WORKDIR}/qca-wifi-host-cmn; \
" "
# Tag 'CHSS.LNX_FSL.5.0-01200-QCA6574AUARMSDIOHZ' in all repos
SRCREV_qcacld = "f1dae2986ae58c68ea740e2c505be9c369547916"
SRCREV_qca-wifi-host = "ca5e999f4f692a45ae9974a7ad92726deaf7497f"
SRCREV_fw-api = "62b94874003ef7aced22bba1a076c1e4b5d5a9a9"
SRCREV_mdm-init = "3fb3bcb9f054eeeb1083bd4f6dbaf733061c5af3"
inherit module
DEPENDS = "virtual/kernel"
# Selects whether the interface is SDIO or PCI # Selects whether the interface is SDIO or PCI
QUALCOMM_WIFI_INTERFACE ?= "sdio" QUALCOMM_WIFI_INTERFACE ?= "sdio"
QUALCOMM_WIFI_INTERFACE:ccimx8x = "pci" QUALCOMM_WIFI_INTERFACE_ccimx8x = "pci"
WLAN_CONFIG_INI = "${@oe.utils.conditional('QUALCOMM_WIFI_INTERFACE', 'sdio' , \ SRC_URI_append = " \
'QCA6574AU.LE.2.2.1_Rome_SDIO_qcacld-3.0.ini', \
'QCA6574AU.LE.2.2.1_Rome_PCIe_qcacld-3.0.ini', d)}"
SRC_URI:append = " \
file://81-qcom-wifi.rules \ file://81-qcom-wifi.rules \
file://qualcomm.sh \
" "
FILES_SDIO = " \ FILES_SDIO = " \
file://modprobe-qualcomm.conf \ file://modprobe-qualcomm.conf \
" "
SRC_URI:append = "${@oe.utils.conditional('QUALCOMM_WIFI_INTERFACE', 'sdio' , '${FILES_SDIO}', '', d)}" SRC_URI_append = "${@oe.utils.conditional('QUALCOMM_WIFI_INTERFACE', 'sdio' , '${FILES_SDIO}', '', d)}"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
WLAN_MODULE_NAME ?= "wlan" inherit module
EXTRA_OEMAKE += "CONFIG_WLAN_FEATURE_11W=y \
CONFIG_LINUX_QCMBR=y \
CONFIG_QCA_CLD_WLAN_PROFILE=qca6174 \
CONFIG_WLAN_DISABLE_EXPORT_SYMBOL=y \
MODNAME=${WLAN_MODULE_NAME} \
"
EXTRA_OEMAKE += "CONFIG_LINUX_QCMBR=y WLAN_OPEN_SOURCE=1"
# Explicity state it is not a QC platform, if not the driver will try to remap
# memory that is not allowed in ARMv6 (kernel commit
# 309caa9cc6ff39d261264ec4ff10e29489afc8f8)
EXTRA_OEMAKE += "CONFIG_NON_QC_PLATFORM=y"
# Flag to compile the debug version (1 - enabled, rest of values - disabled)
EXTRA_OEMAKE += "BUILD_DEBUG_VERSION=0"
# Flags for SDIO interface with wifi # Flags for SDIO interface with wifi
FLAGS_SDIO = "CONFIG_CLD_HL_SDIO_CORE=y" FLAGS_SDIO = "CONFIG_CLD_HL_SDIO_CORE=y"
EXTRA_OEMAKE += "${@oe.utils.conditional('QUALCOMM_WIFI_INTERFACE', 'sdio' , '${FLAGS_SDIO}', '', d)}" EXTRA_OEMAKE += "${@oe.utils.conditional('QUALCOMM_WIFI_INTERFACE', 'sdio' , '${FLAGS_SDIO}', '', d)}"
# Flags for PCI interface with wifi # Flags for PCI interface with wifi
FLAGS_PCI = "CONFIG_ROME_IF=pci" FLAGS_PCI = "CONFIG_ROME_IF=pci CONFIG_HIF_PCI=1 CONFIG_ATH_PCIE_ACCESS_DEBUG=1 CONFIG_ATH_PCIE_MAX_PERF=1"
EXTRA_OEMAKE += "${@oe.utils.conditional('QUALCOMM_WIFI_INTERFACE', 'pci' , '${FLAGS_PCI}', '', d)}" EXTRA_OEMAKE += "${@oe.utils.conditional('QUALCOMM_WIFI_INTERFACE', 'pci' , '${FLAGS_PCI}', '', d)}"
# Flags required for QCA6574
EXTRA_OEMAKE_append_ccimx8x = " CONFIG_ARCH_MSM=n CONFIG_ARCH_QCOM=n CONFIG_ATH_11AC_TXCOMPACT=1"
# Flag to compile the debug version (y - enabled, n - disabled) do_compile_prepend() {
EXTRA_OEMAKE += "BUILD_DEBUG_VERSION=n"
# Flag to define the maximum vdevs interfaces
EXTRA_OEMAKE += "CONFIG_WLAN_MAX_VDEVS=4"
do_compile:prepend() {
export BUILD_VER=${PV} export BUILD_VER=${PV}
} }
do_install:append() { do_install_prepend_ccimx6ul() {
sed -i -e "s/gVhtTxMCS=2/gVhtTxMCS=0/g" ${WORKDIR}/git/firmware_bin/WCNSS_qcom_cfg.ini
}
do_install_append() {
if [ "${QUALCOMM_WIFI_INTERFACE}" = "sdio" ]; then if [ "${QUALCOMM_WIFI_INTERFACE}" = "sdio" ]; then
install -d ${D}${sysconfdir}/modprobe.d install -d ${D}${sysconfdir}/modprobe.d
install -m 0644 ${WORKDIR}/modprobe-qualcomm.conf ${D}${sysconfdir}/modprobe.d/qualcomm.conf install -m 0644 ${WORKDIR}/modprobe-qualcomm.conf ${D}${sysconfdir}/modprobe.d/qualcomm.conf
fi fi
install -d ${D}${base_libdir}/firmware/wlan/ install -d ${D}${base_libdir}/firmware/wlan/
install -m 0644 ${WORKDIR}/mdm-init/wlan_standalone/${WLAN_CONFIG_INI} ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini install -m 0644 ${WORKDIR}/git/firmware_bin/WCNSS_cfg.dat ${D}${base_libdir}/firmware/wlan/cfg.dat
# Set regulatory STRICT mode install -m 0644 ${WORKDIR}/git/firmware_bin/WCNSS_qcom_cfg.ini ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini
sed -i -e "s/gRegulatoryChangeCountry=1/gRegulatoryChangeCountry=0/g" ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini install -d ${D}${sysconfdir}/udev/scripts
# Disable SIFS Burst support install -m 0755 ${WORKDIR}/qualcomm.sh ${D}${sysconfdir}/udev/scripts/
sed -i -e "s/gEnableSifsBurst=1/gEnableSifsBurst=0/g" ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini
# Enable channel bonding on 2.4GHz band
sed -i -e "/^#Channel Bonding/a gChannelBondingMode24GHz=1" ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini
# Disable 802.11d support
sed -i -e "s/g11dSupportEnabled=1/g11dSupportEnabled=0/g" ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini
install -d ${D}${sysconfdir}/udev/rules.d install -d ${D}${sysconfdir}/udev/rules.d
install -m 0644 ${WORKDIR}/81-qcom-wifi.rules ${D}${sysconfdir}/udev/rules.d/ install -m 0644 ${WORKDIR}/81-qcom-wifi.rules ${D}${sysconfdir}/udev/rules.d/
} }
do_install:append:ccimx6ul() { FILES_${PN} += " \
# Set MCS value to MCS0-7 ${sysconfdir}/modprobe.d/qualcomm.conf \
sed -i -e "s/gVhtTxMCS=2/gVhtTxMCS=0/g" ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini
}
FILES:${PN} += " \
${@oe.utils.conditional('QUALCOMM_WIFI_INTERFACE', 'sdio' , '${sysconfdir}/modprobe.d/qualcomm.conf', '', d)} \
${sysconfdir}/udev/ \ ${sysconfdir}/udev/ \
${base_libdir}/firmware/wlan/cfg.dat \
${base_libdir}/firmware/wlan/qcom_cfg.ini \ ${base_libdir}/firmware/wlan/qcom_cfg.ini \
" "

View File

@ -1,115 +0,0 @@
From: Xueqiang Gong <quic_gongx@quicinc.com>
Date: Fri, 1 Apr 2022 15:52:16 +0800
Subject: [PATCH] qca-wifi-host-cmn: fix buid issue for Rome SDIO interface
Change-Id: I0df0490bf9150cc3f57f27f9818dccf98831a615
Signed-off-by: Xueqiang Gong <quic_gongx@quicinc.com>
---
hif/src/dispatcher/multibus.c | 5 +++++
hif/src/hif_main.c | 4 ++++
hif/src/sdio/hif_sdio_dev.h | 2 +-
hif/src/sdio/if_sdio.h | 2 +-
hif/src/sdio/native_sdio/include/hif_internal.h | 4 ++--
hif/src/sdio/native_sdio/src/hif.c | 2 +-
hif/src/sdio/transfer/mailbox.h | 2 +-
7 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/hif/src/dispatcher/multibus.c b/hif/src/dispatcher/multibus.c
index 06e70f01d39c..f9b2b6bb3ea8 100644
--- a/hif/src/dispatcher/multibus.c
+++ b/hif/src/dispatcher/multibus.c
@@ -34,6 +34,11 @@
#include "dummy.h"
#include "qdf_module.h"
+#ifdef HIF_SDIO
+#include "hif_exec.h"
+#endif
+
+
/**
* hif_initialize_default_ops() - initializes default operations values
*
diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c
index b5140cc1e58e..a6b4d438ab77 100644
--- a/hif/src/hif_main.c
+++ b/hif/src/hif_main.c
@@ -972,7 +972,11 @@ void hif_close(struct hif_opaque_softc *hif_ctx)
}
hif_uninit_rri_on_ddr(scn);
+#if (defined(HIF_PCI) || defined(HIF_SNOC) || defined(HIF_AHB) || \
+ defined(HIF_IPCI))
hif_cleanup_static_buf_to_target(scn);
+#endif
+
hif_cpuhp_unregister(scn);
hif_bus_close(scn);
diff --git a/hif/src/sdio/hif_sdio_dev.h b/hif/src/sdio/hif_sdio_dev.h
index 7ee6582e6aa8..544a57e4381a 100644
--- a/hif/src/sdio/hif_sdio_dev.h
+++ b/hif/src/sdio/hif_sdio_dev.h
@@ -157,7 +157,7 @@ QDF_STATUS hif_enable_func(struct hif_softc *ol_sc, struct hif_sdio_dev *device,
QDF_STATUS hif_disable_func(struct hif_sdio_dev *device,
struct sdio_func *func,
bool reset);
-A_STATUS hif_sdio_probe(struct hif_softc *ol_sc,
+QDF_STATUS hif_sdio_probe(struct hif_softc *ol_sc,
struct sdio_func *func,
struct hif_sdio_dev *device);
#endif /* HIF_SDIO_DEV_H_ */
diff --git a/hif/src/sdio/if_sdio.h b/hif/src/sdio/if_sdio.h
index a71e61ecb325..c5ad71b0c062 100644
--- a/hif/src/sdio/if_sdio.h
+++ b/hif/src/sdio/if_sdio.h
@@ -67,7 +67,7 @@ static inline void athdiag_procfs_remove(void)
}
#endif
-#define DMA_MAPPING_ERROR(dev, addr) dma_mapping_error((dev), (addr))
+//#define DMA_MAPPING_ERROR(dev, addr) dma_mapping_error((dev), (addr))
int ath_sdio_probe(void *context, void *hif_handle);
void ath_sdio_remove(void *context, void *hif_handle);
diff --git a/hif/src/sdio/native_sdio/include/hif_internal.h b/hif/src/sdio/native_sdio/include/hif_internal.h
index 41001c848ae9..e5c7df088241 100644
--- a/hif/src/sdio/native_sdio/include/hif_internal.h
+++ b/hif/src/sdio/native_sdio/include/hif_internal.h
@@ -419,8 +419,8 @@ void hif_sdio_quirk_write_cccr(struct hif_softc *ol_sc, struct sdio_func *func);
int hif_sdio_quirk_mod_strength(struct hif_softc *ol_sc,
struct sdio_func *func);
int hif_sdio_quirk_async_intr(struct hif_softc *ol_sc, struct sdio_func *func);
-int hif_sdio_set_bus_speed(struct hif_softc *ol_sc, struct sdio_func *func);
-int hif_sdio_set_bus_width(struct hif_softc *ol_sc, struct sdio_func *func);
+QDF_STATUS hif_sdio_set_bus_speed(struct hif_softc *ol_sc, struct sdio_func *func);
+QDF_STATUS hif_sdio_set_bus_width(struct hif_softc *ol_sc, struct sdio_func *func);
QDF_STATUS hif_sdio_func_disable(struct hif_sdio_dev *device,
struct sdio_func *func,
bool reset);
diff --git a/hif/src/sdio/native_sdio/src/hif.c b/hif/src/sdio/native_sdio/src/hif.c
index 9ca2e21ca724..d52eee248a3e 100644
--- a/hif/src/sdio/native_sdio/src/hif.c
+++ b/hif/src/sdio/native_sdio/src/hif.c
@@ -348,7 +348,7 @@ QDF_STATUS hif_sdio_probe(struct hif_softc *ol_sc,
pld_hif_sdio_get_virt_ramdump_mem(&func->dev,
&scn->ramdump_size);
if (!scn->ramdump_base || !scn->ramdump_size) {
- hf_err("Failed ramdump res alloc - base:%s, len:%lu",
+ hif_err("Failed ramdump res alloc - base:%s, len:%lu",
scn->ramdump_base ? "ok" : "null",
scn->ramdump_size);
} else {
diff --git a/hif/src/sdio/transfer/mailbox.h b/hif/src/sdio/transfer/mailbox.h
index 3e5913215241..36f3e9860ac6 100644
--- a/hif/src/sdio/transfer/mailbox.h
+++ b/hif/src/sdio/transfer/mailbox.h
@@ -20,7 +20,7 @@
#ifndef _MAILBOX_H_
-#define _MAILBOX_H__
+#define _MAILBOX_H_
#include "a_debug.h"
#include "hif_sdio_dev.h"

View File

@ -1,25 +0,0 @@
From: Javier Viguera <javier.viguera@digi.com>
Date: Mon, 13 Jun 2022 17:39:29 +0200
Subject: [PATCH] qcacld-3.0: disable warnings as errors
Building the kernel module under Yocto (with new version of GCC
compiler) is failing because '-Werror' is converting compilation
warnings into errors.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
Kbuild | 1 -
1 file changed, 1 deletion(-)
diff --git a/Kbuild b/Kbuild
index ad086656cca2..50c01ef223c1 100644
--- a/Kbuild
+++ b/Kbuild
@@ -2804,7 +2804,6 @@ ccflags-y += $(INCS)
cppflags-y += -DANI_OS_TYPE_ANDROID=6 \
-Wall\
- -Werror\
-D__linux__
cppflags-$(CONFIG_PTT_SOCK_SVC_ENABLE) += -DPTT_SOCK_SVC_ENABLE

View File

@ -1,49 +0,0 @@
From: Arturo Buzarra <arturo.buzarra@digi.com>
Date: Tue, 17 May 2022 15:50:32 +0200
Subject: [PATCH] qca-wifi-host-cmn: fix build issue enabling debug for SDIO
interface
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
---
hif/src/sdio/native_sdio/src/dev_quirks.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hif/src/sdio/native_sdio/src/dev_quirks.c b/hif/src/sdio/native_sdio/src/dev_quirks.c
index a94ec61d0b62..b5e70a51ddcf 100644
--- a/hif/src/sdio/native_sdio/src/dev_quirks.c
+++ b/hif/src/sdio/native_sdio/src/dev_quirks.c
@@ -267,8 +267,9 @@ void hif_sdio_quirk_write_cccr(struct hif_softc *ol_sc, struct sdio_func *func)
err);
else
hif_info("%s Write CCCR 0x%02X to 0x%02X OK",
+ __func__,
(unsigned int)writecccr1,
- writecccr1value);
+ (unsigned int)writecccr1value);
}
if (writecccr2) {
@@ -281,6 +282,7 @@ void hif_sdio_quirk_write_cccr(struct hif_softc *ol_sc, struct sdio_func *func)
err);
else
hif_info("%s Write CCCR 0x%02X to 0x%02X OK",
+ __func__,
(unsigned int)writecccr2,
(unsigned int)writecccr2value);
}
@@ -294,6 +296,7 @@ void hif_sdio_quirk_write_cccr(struct hif_softc *ol_sc, struct sdio_func *func)
err);
else
hif_info("%s Write CCCR 0x%02X to 0x%02X OK",
+ __func__,
(unsigned int)writecccr3,
(unsigned int)writecccr3value);
}
@@ -307,6 +310,7 @@ void hif_sdio_quirk_write_cccr(struct hif_softc *ol_sc, struct sdio_func *func)
err);
else
hif_info("%s Write CCCR 0x%02X to 0x%02X OK",
+ __func__,
(unsigned int)writecccr4,
(unsigned int)writecccr4value);
}

View File

@ -1,34 +0,0 @@
From: Xueqiang Gong <quic_gongx@quicinc.com>
Date: Fri, 1 Apr 2022 15:37:06 +0800
Subject: [PATCH] qcacld-3.0: support ROME SDIO build
Change-Id: Ifb642aaac6a3da212b0720737e9685b9ea9179ce
Signed-off-by: Xueqiang Gong <quic_gongx@quicinc.com>
---
configs/qca6174_defconfig | 2 +-
core/mac/src/sys/legacy/src/utils/src/parser_api.c | 0
core/sme/inc/csr_api.h | 0
3 files changed, 1 insertion(+), 1 deletion(-)
mode change 100755 => 100644 core/mac/src/sys/legacy/src/utils/src/parser_api.c
mode change 100755 => 100644 core/sme/inc/csr_api.h
diff --git a/configs/qca6174_defconfig b/configs/qca6174_defconfig
index fac64fddf009..b9145ba7cb07 100644
--- a/configs/qca6174_defconfig
+++ b/configs/qca6174_defconfig
@@ -391,8 +391,8 @@ endif
ifeq ($(CONFIG_ROME_IF),sdio)
CONFIG_HIF_SDIO := y
CONFIG_TX_DESC_HI_PRIO_RESERVE := y
- CONFIG_PER_VDEV_TX_DESC_POOL := y
CONFIG_FEATURE_HL_GROUP_CREDIT_FLOW_CONTROL := y
+ CONFIG_TGT_NUM_MSDU_DESC := 0
endif
ifeq ($(CONFIG_ROME_IF),snoc)
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
old mode 100755
new mode 100644
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
old mode 100755
new mode 100644

View File

@ -1,28 +0,0 @@
From: Javier Viguera <javier.viguera@digi.com>
Date: Mon, 13 Jun 2022 17:49:45 +0200
Subject: [PATCH] qca-wifi-host-cmn: fix panic_notifier_list undeclared build
failure
On kernels >= 5.14 a new header file include is needed. Otherwise the
build fails with: "error: 'panic_notifier_list' undeclared"
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
utils/logging/src/wlan_logging_sock_svc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/utils/logging/src/wlan_logging_sock_svc.c b/utils/logging/src/wlan_logging_sock_svc.c
index a1266fed817d..e40779e032dd 100644
--- a/utils/logging/src/wlan_logging_sock_svc.c
+++ b/utils/logging/src/wlan_logging_sock_svc.c
@@ -36,6 +36,10 @@
#include <qdf_event.h>
#include <qdf_module.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)
+#include <linux/panic_notifier.h>
+#endif
+
#ifdef CNSS_GENL
#include <net/cnss_nl.h>
#endif

View File

@ -1,148 +0,0 @@
From: Arturo Buzarra <arturo.buzarra@digi.com>
Date: Wed, 18 May 2022 10:58:20 +0200
Subject: [PATCH] qcacld-3.0: cfg: try to get MACs from device tree entries
before reading 'wlan_mac.bin' file
This commits adds support to read the MAC addresses from symbolic link files
('wlan_macX' files inside 'wlan' directory) pointing to device tree MAC entries
('/proc/device-tree/wireless/mac-addressX').
If this read fails, the 'wlan/wlan_mac.bin' file contents are parsed.
This change avoids the dynamic creation of the 'wlan_mac.bin' configuration file
in runtime, especially for Android.
https://onedigi.atlassian.net/browse/ADK4A-1585
https://onedigi.atlassian.net/browse/DEL-7916
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
(based on qcacld-2.0 0a92f5d9e8df644de74e74f152ed6ff3dd8d3369)
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
---
core/hdd/inc/wlan_hdd_cfg.h | 1 +
core/hdd/inc/wlan_hdd_misc.h | 2 ++
core/hdd/src/wlan_hdd_cfg.c | 65 ++++++++++++++++++++++++++++++++++++
core/hdd/src/wlan_hdd_main.c | 6 ++++
4 files changed, 74 insertions(+)
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 36aa010db916..1527aaf87e12 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -278,6 +278,7 @@ struct hdd_config {
*/
eCsrRoamWmmUserModeType hdd_to_csr_wmm_mode(uint8_t mode);
+QDF_STATUS hdd_update_mac_from_dt(struct hdd_context *hdd_ctx);
QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx);
QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx);
QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx);
diff --git a/core/hdd/inc/wlan_hdd_misc.h b/core/hdd/inc/wlan_hdd_misc.h
index b105df1b3a98..6d9bf450efe1 100644
--- a/core/hdd/inc/wlan_hdd_misc.h
+++ b/core/hdd/inc/wlan_hdd_misc.h
@@ -44,9 +44,11 @@
#ifdef MSM_PLATFORM
#define WLAN_INI_FILE "wlan/qca_cld/" PREFIX "WCNSS_qcom_cfg.ini"
#define WLAN_MAC_FILE "wlan/qca_cld/" PREFIX "wlan_mac.bin"
+#define WLAN_MAC_DT_FILE "wlan/qca_cld/" PREFIX "wlan_mac"
#else
#define WLAN_INI_FILE "wlan/" PREFIX "qcom_cfg.ini"
#define WLAN_MAC_FILE "wlan/" PREFIX "wlan_mac.bin"
+#define WLAN_MAC_DT_FILE "wlan/" PREFIX "wlan_mac"
#endif /* MSM_PLATFORM */
#endif /* WLAN_HDD_MISC_H */
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index b12e42c74c69..c921a9364242 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -199,6 +199,71 @@ int hdd_firmware_request_nowarn(const struct firmware **fw,
}
#endif
+/**
+ * hdd_update_mac_from_dt() - update MAC address from device tree
+ * @hdd_ctx: the pointer to hdd context
+ *
+ * It overwrites the MAC address if device tree entries exist.
+ *
+ * Return: QDF_STATUS_SUCCESS if the MAC address is found from device tree
+ * and overwritten, otherwise QDF_STATUS_E_INVAL
+ */
+QDF_STATUS hdd_update_mac_from_dt(struct hdd_context *hdd_ctx)
+{
+ int status, i = 0;
+ const struct firmware *fw = NULL;
+ char fName[20];
+ int max_mac_addr = QDF_MAX_CONCURRENCY_PERSONA;
+ tSirMacAddr custom_mac_addr;
+
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
+
+ for (i = 0; i < max_mac_addr; i++)
+ {
+ sprintf(fName, WLAN_MAC_DT_FILE "%d", i);
+
+ status = hdd_firmware_request_nowarn(&fw, fName,
+ hdd_ctx->parent_dev);
+ if (!status && fw && fw->data && fw->size)
+ {
+ /* Successfully read mac from device tree */
+ qdf_mem_copy((uint8_t *)&hdd_ctx->provisioned_mac_addr[i].bytes[0],
+ fw->data, QDF_MAC_ADDR_SIZE);
+ hdd_ctx->num_provisioned_addr++;
+ }
+ else
+ {
+ hdd_err("Reading MAC address from device tree failed (%s)", fName);
+ status = 1;
+ }
+ release_firmware(fw);
+ fw = NULL;
+
+ /* Only fail if the first MAC cannot be read. */
+ if (status && i == 0) {
+ qdf_status = QDF_STATUS_E_FAILURE;
+ goto dt_exit;
+ }
+ }
+
+ if (hdd_ctx->num_provisioned_addr != 0 && hdd_ctx->num_provisioned_addr <= max_mac_addr) {
+ hdd_info("%d MAC addresses provided from device tree", hdd_ctx->num_provisioned_addr);
+ } else {
+ hdd_err("invalid number of MAC address provided, nMac = %d", hdd_ctx->num_provisioned_addr);
+ qdf_status = QDF_STATUS_E_INVAL;
+ goto dt_exit;
+ }
+
+ qdf_mem_copy(&custom_mac_addr,
+ &hdd_ctx->provisioned_mac_addr[0].bytes[0],
+ sizeof(tSirMacAddr));
+
+ sme_set_custom_mac_addr(custom_mac_addr);
+
+dt_exit:
+ return qdf_status;
+}
+
/**
* hdd_update_mac_config() - update MAC address from cfg file
* @hdd_ctx: the pointer to hdd context
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 0043de21f10a..03138b61ce5d 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -13590,6 +13590,12 @@ static int hdd_initialize_mac_address(struct hdd_context *hdd_ctx)
return ret;
}
+ status = hdd_update_mac_from_dt(hdd_ctx);
+ if (QDF_IS_STATUS_SUCCESS(status)) {
+ hdd_info("using MAC address from device tree");
+ return 0;
+ }
+
status = hdd_update_mac_config(hdd_ctx);
if (QDF_IS_STATUS_SUCCESS(status)) {
hdd_info("using MAC address from wlan_mac.bin");

View File

@ -1,29 +0,0 @@
From: Isaac Hermida <isaac.hermida@digi.com>
Date: Mon, 18 Jul 2022 09:41:51 +0200
Subject: [PATCH] sdio: fix sdio error on unload driver
macro TARGET_DUMP_FOR_NON_QC_PLATFORM does not exist, and that code does not
apply for our platform, so remove that to avoid unload driver error.
https://onedigi.atlassian.net/browse/DEL-7986
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
---
hif/src/sdio/native_sdio/src/hif.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hif/src/sdio/native_sdio/src/hif.c b/hif/src/sdio/native_sdio/src/hif.c
index d52eee248a3e..d4804070f500 100644
--- a/hif/src/sdio/native_sdio/src/hif.c
+++ b/hif/src/sdio/native_sdio/src/hif.c
@@ -893,10 +893,6 @@ static A_STATUS hif_sdio_remove(void *context, void *hif_handle)
athdiag_procfs_remove();
-#ifndef TARGET_DUMP_FOR_NON_QC_PLATFORM
- iounmap(scn->ramdump_base);
-#endif
-
HIF_EXIT();
return 0;

View File

@ -1,27 +0,0 @@
From: Yue Ma <yuem@codeaurora.org>
Date: Wed, 30 Jun 2021 17:22:34 -0700
Subject: [PATCH] qcacld-3.0: Add proper check to include qcom-iommu-util.h
qcom-iommu-util.h is a QCOM only file for MSM platforms, so only
include it when MSM_PLATFORM is defined to avoid build issues
from other non-QCOM platforms like X86.
Change-Id: I5f32fbe05abe4d7aff451031f0859f774ce1c507
CRs-fixed: 3721214
---
core/cds/src/cds_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c
index d135759ac426..4fddb614889d 100644
--- a/core/cds/src/cds_api.c
+++ b/core/cds/src/cds_api.c
@@ -36,7 +36,7 @@
#include "wlan_hdd_power.h"
#include "wlan_hdd_tsf.h"
#include <linux/vmalloc.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)) && defined(MSM_PLATFORM)
#include <linux/qcom-iommu-util.h>
#endif
#include <scheduler_core.h>

View File

@ -1,51 +0,0 @@
From: Isaac Hermida <isaac.hermida@digi.com>
Date: Wed, 22 Jun 2022 10:51:01 +0200
Subject: [PATCH] add a module parameter to enable p2p support
enable or disable the P2P support based on the enable_p2p module
parameter.
(partial cherry-pick of dbdf5ff9a3f9c6ae0a153395c382384b3dfc7738
in qcacld-2.0)
https://onedigi.atlassian.net/browse/DEL-7986
https://onedigi.atlassian.net/browse/DEL-6503
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
---
core/hdd/src/wlan_hdd_main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 03138b61ce5d..a866a90110f6 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -271,6 +271,10 @@ static struct attribute *attrs[] = {
#endif
#endif
+#ifdef WLAN_OPEN_P2P_INTERFACE
+static int enable_p2p = -1;
+#endif
+
/* the Android framework expects this param even though we don't use it */
#define BUF_LEN 20
static char fwpath_buffer[BUF_LEN];
@@ -15005,6 +15009,10 @@ static QDF_STATUS hdd_open_p2p_interface(struct hdd_context *hdd_ctx)
bool p2p_dev_addr_admin;
bool is_p2p_locally_administered = false;
+ hdd_info("P2P interface %s", enable_p2p == 1 ? "enabled" : "disabled");
+ if (enable_p2p != 1)
+ return QDF_STATUS_SUCCESS;
+
cfg_p2p_get_device_addr_admin(hdd_ctx->psoc, &p2p_dev_addr_admin);
if (p2p_dev_addr_admin) {
@@ -19521,3 +19529,6 @@ static const struct kernel_param_ops timer_multiplier_ops = {
module_param_cb(timer_multiplier, &timer_multiplier_ops, NULL, 0644);
+#ifdef WLAN_OPEN_P2P_INTERFACE
+module_param(enable_p2p, int, S_IRUSR | S_IRGRP | S_IROTH);
+#endif

View File

@ -1,47 +0,0 @@
From: Alan Chen <quic_alache@quicinc.com>
Date: Thu, 17 Feb 2022 13:30:20 -0800
Subject: [PATCH] qcacld-3.0: Use cfg80211_register_netdevice() for kernel
5.12+
For Kernel 5.12+ in order to be in line with cfg80211 changes
in upstream code, use cfg80211_register_netdevice() and
cfg80211_unregister_netdevice() when request to register device is
coming from add virtual interface.
(partial cherry pick from commit 40a7b4a2f97c7f2dc62944963a72f0f0c64d83c6)
https://onedigi.atlassian.net/browse/DEL-7986
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
---
core/hdd/src/wlan_hdd_main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index a866a90110f6..235b53cbb94c 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -5577,7 +5577,11 @@ static QDF_STATUS hdd_register_interface(struct hdd_adapter *adapter, bool rtnl_
}
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
+ ret = cfg80211_register_netdevice(dev);
+#else
ret = register_netdevice(dev);
+#endif
if (ret) {
hdd_err("register_netdevice(%s) failed, err = 0x%x",
dev->name, ret);
@@ -6289,7 +6293,11 @@ static void hdd_cleanup_adapter(struct hdd_context *hdd_ctx,
if (test_bit(NET_DEVICE_REGISTERED, &adapter->event_flags)) {
if (rtnl_held)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
+ cfg80211_unregister_netdevice(dev);
+#else
unregister_netdevice(dev);
+#endif
else
unregister_netdev(dev);
/*

View File

@ -1,84 +0,0 @@
From: Isaac Hermida <isaac.hermida@digi.com>
Date: Wed, 17 Aug 2022 19:02:13 +0200
Subject: [PATCH] use ndo_siocdevprivate instead for kernel 5.15+
See kernel commits
b9067f5dc4a07c8e24e01a1b277c6722d91be39e
a554bf96b49db4c208e305ae92546422e9489380
This solves the FTM mode in kernel 5.15+
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
---
core/hdd/src/wlan_hdd_hostapd.c | 4 ++++
core/hdd/src/wlan_hdd_ioctl.c | 6 +++++-
core/hdd/src/wlan_hdd_ioctl.h | 6 +++++-
core/hdd/src/wlan_hdd_main.c | 4 ++++
4 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 2f35e9c5e7e3..2da3202deae6 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -3534,7 +3534,11 @@ const struct net_device_ops net_ops_struct = {
.ndo_tx_timeout = hdd_softap_tx_timeout,
.ndo_get_stats = hdd_get_stats,
.ndo_set_mac_address = hdd_hostapd_set_mac_address,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
+ .ndo_siocdevprivate = hdd_ioctl,
+#else
.ndo_do_ioctl = hdd_ioctl,
+#endif
.ndo_change_mtu = hdd_hostapd_change_mtu,
.ndo_select_queue = hdd_select_queue,
};
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index b9edfc990f89..b4adf00a29c0 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -7617,7 +7617,11 @@ exit:
*
* Return: 0 on success, non-zero on error
*/
-int hdd_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
+int hdd_ioctl(struct net_device *net_dev, struct ifreq *ifr,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
+ void __user *data,
+#endif
+ int cmd)
{
struct osif_vdev_sync *vdev_sync;
int errno;
diff --git a/core/hdd/src/wlan_hdd_ioctl.h b/core/hdd/src/wlan_hdd_ioctl.h
index 042942ef14ae..578778192376 100644
--- a/core/hdd/src/wlan_hdd_ioctl.h
+++ b/core/hdd/src/wlan_hdd_ioctl.h
@@ -25,7 +25,11 @@
extern struct sock *cesium_nl_srv_sock;
-int hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
+int hdd_ioctl(struct net_device *dev, struct ifreq *ifr,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
+ void __user *,
+#endif
+ int cmd);
int wlan_hdd_set_mc_rate(struct hdd_adapter *adapter, int target_rate);
/**
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 235b53cbb94c..6e13104dada2 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -5367,7 +5367,11 @@ static const struct net_device_ops wlan_drv_ops = {
.ndo_set_features = hdd_set_features,
.ndo_tx_timeout = hdd_tx_timeout,
.ndo_get_stats = hdd_get_stats,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
+ .ndo_siocdevprivate = hdd_ioctl,
+#else
.ndo_do_ioctl = hdd_ioctl,
+#endif
.ndo_set_mac_address = hdd_set_mac_address,
.ndo_select_queue = hdd_select_queue,
.ndo_set_rx_mode = hdd_set_multicast_list,

View File

@ -1,4 +1,4 @@
# Load Qualcomm wireless module (sdio) # Load Qualcomm wireless module (sdio)
SUBSYSTEM=="sdio", ACTION=="add", ENV{MODALIAS}=="sdio:c00v0271d050A", RUN="/sbin/modprobe wlan" SUBSYSTEM=="sdio", ACTION=="add", ENV{MODALIAS}=="sdio:c00v0271d050A", RUN="/etc/udev/scripts/qualcomm.sh"
# Load Qualcomm wireless module (pci) # Load Qualcomm wireless module (pci)
SUBSYSTEM=="pci", ACTION=="add", ENV{MODALIAS}=="pci:v0000168Cd0000003Esv*sd*bc*sc*i*", RUN="/sbin/modprobe wlan" SUBSYSTEM=="pci", ACTION=="add", ENV{MODALIAS}=="pci:v0000168Cd0000003Esv*sd*bc*sc*i*", RUN="/etc/udev/scripts/qualcomm.sh"

View File

@ -0,0 +1,73 @@
#!/bin/sh
#
# Copyright (c) 2017,2018 Digi International Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# At this point of the boot (udev script), the system log (syslog) is not
# available yet, so use the kernel log buffer from userspace.
log() {
printf "<$1>qca65x4: $2\n" >/dev/kmsg
}
# Get the permissions of the filesystem containing the given path
get_filesystem_access() {
[ -z "${1}" ] && return
fs_device="$(df ${1} | awk 'NR==2 { print $1 }')"
fs_access="$(awk -v dev="${fs_device}" '$0 ~ dev { print substr($4,1,2) }' < /proc/mounts)"
echo ${fs_access}
}
# Get the mount point of the filesystem containing the given path
get_filesystem_mount_point() {
[ -z "${1}" ] && return
fs_device="$(df ${1} | awk 'NR==2 { print $1 }')"
fs_mount_point="$(awk -v dev="${fs_device}" '$0 ~ dev { print $2 }' < /proc/mounts)"
echo ${fs_mount_point}
}
# Remount the filesystem containing the given path as 'read-write' if it was
# mounted as 'read-only'.
set_filesystem_rw_access() {
[ -z "${1}" ] && return
if [ "$(get_filesystem_access ${1})" = "ro" ]; then
mount -o remount,rw $(get_filesystem_mount_point ${1})
fi
}
# Do nothing if the wireless node does not exist on the device tree
[ -d "/proc/device-tree/wireless" ] || exit 0
# Do nothing if the module is already loaded
grep -qws 'wlan' /proc/modules && exit 0
FS_ORIGINAL_ACCESS="$(get_filesystem_access ${FIRMWARE_DIR})"
# Load the wireless module with the params defined in modprobe.d/qualcomm.conf
# and reduce the console log level to avoid debug messages at boot time
LOGLEVEL="$(sed -ne 's,^kernel.printk[^=]*=[[:blank:]]*\(.*\)$,\1,g;T;p' /etc/sysctl.conf 2>/dev/null)"
[ -n "${LOGLEVEL}" ] && sysctl -q -w kernel.printk="${LOGLEVEL}"
modprobe wlan
# Verify the interface is present
[ -d "/sys/class/net/wlan0" ] || log "3" "[ERROR] Loading wlan module"
# Restore the filesystem with the original access permissions if it has been
# changed inside the script.
if [ "$(get_filesystem_access ${FIRMWARE_DIR})" != "${FS_ORIGINAL_ACCESS}" ]; then
mount -o remount,${FS_ORIGINAL_ACCESS} $(get_filesystem_mount_point ${FIRMWARE_DIR})
fi