kernel-module-qualcomm: use siocdevprivate for privates ioctls
Fix the way to register custom ioctls for kernel 5.15+. Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
parent
d4f4b40abd
commit
548efe4f6f
|
|
@ -24,6 +24,7 @@ SRC_URI = " \
|
|||
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; \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
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,
|
||||
Loading…
Reference in New Issue