diff --git a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb index 7d2154998..8a89b23b2 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb +++ b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb @@ -22,6 +22,8 @@ SRC_URI = " \ 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://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; \ diff --git a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/0005-qcacld-3.0-module-parameter-to-enable-p2p-support.patch b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/0005-qcacld-3.0-module-parameter-to-enable-p2p-support.patch new file mode 100644 index 000000000..120b19fc0 --- /dev/null +++ b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/0005-qcacld-3.0-module-parameter-to-enable-p2p-support.patch @@ -0,0 +1,51 @@ +From: Isaac Hermida +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 +--- + 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 diff --git a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/0006-qcacld-3.0-use-cfg80211_register_netdevice.patch b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/0006-qcacld-3.0-use-cfg80211_register_netdevice.patch new file mode 100644 index 000000000..e92016f6a --- /dev/null +++ b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/0006-qcacld-3.0-use-cfg80211_register_netdevice.patch @@ -0,0 +1,47 @@ +From: Alan Chen +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 +--- + 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); + /*