From 9341e24bb276a35b9bcdbd8e12386ea1f6a16636 Mon Sep 17 00:00:00 2001 From: bings Date: Fri, 17 Apr 2020 15:14:43 +0800 Subject: [PATCH] qcacld-3.0: ndo_tx_timeout support for 5.6+ kernel New parameter txqueue is added for callback ndo_tx_timeout. Add support for it under the kernel version compilation flag. Change-Id: I0234dade56f65d15a4370404e17ff51a8a73ee4e CRs-Fixed: 2666436 --- core/hdd/inc/wlan_hdd_softap_tx_rx.h | 6 +++++- core/hdd/inc/wlan_hdd_tx_rx.h | 16 ++++++++++++++++ core/hdd/src/wlan_hdd_softap_tx_rx.c | 4 ++++ core/hdd/src/wlan_hdd_tx_rx.c | 14 ++++---------- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_softap_tx_rx.h b/core/hdd/inc/wlan_hdd_softap_tx_rx.h index 883c0fde449c..343d5fd8eaa3 100644 --- a/core/hdd/inc/wlan_hdd_softap_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_softap_tx_rx.h @@ -57,6 +57,7 @@ QDF_STATUS hdd_softap_ipa_start_xmit(qdf_nbuf_t nbuf, qdf_netdev_t dev); /** * hdd_softap_tx_timeout() - TX timeout handler * @dev: pointer to network device + * @txqueue: tx queue * * Function registered as a net_device .ndo_tx_timeout() method for * master mode interfaces (SoftAP/P2P GO), called by the OS if the @@ -64,8 +65,11 @@ QDF_STATUS hdd_softap_ipa_start_xmit(qdf_nbuf_t nbuf, qdf_netdev_t dev); * * Return: None */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)) +void hdd_softap_tx_timeout(struct net_device *dev, unsigned int txqueue); +#else void hdd_softap_tx_timeout(struct net_device *dev); - +#endif /** * hdd_softap_init_tx_rx() - Initialize Tx/Rx module * @adapter: pointer to adapter context diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h index 2f98422203db..f43c6f3903f6 100644 --- a/core/hdd/inc/wlan_hdd_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_tx_rx.h @@ -83,7 +83,23 @@ struct hdd_context; #define SME_QOS_UAPSD_CFG_VO_CHANGED_MASK 0xF8 netdev_tx_t hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev); + +/** + * hdd_tx_timeout() - Wrapper function to protect __hdd_tx_timeout from SSR + * @net_dev: pointer to net_device structure + * @txqueue: tx queue + * + * Function called by OS if there is any timeout during transmission. + * Since HDD simply enqueues packet and returns control to OS right away, + * this would never be invoked + * + * Return: none + */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)) +void hdd_tx_timeout(struct net_device *dev, unsigned int txqueue); +#else void hdd_tx_timeout(struct net_device *dev); +#endif QDF_STATUS hdd_init_tx_rx(struct hdd_adapter *adapter); QDF_STATUS hdd_deinit_tx_rx(struct hdd_adapter *adapter); diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 8cfae7df25bc..f61b7f20ba29 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -814,7 +814,11 @@ static void __hdd_softap_tx_timeout(struct net_device *dev) } } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)) +void hdd_softap_tx_timeout(struct net_device *net_dev, unsigned int txqueue) +#else void hdd_softap_tx_timeout(struct net_device *net_dev) +#endif { struct osif_vdev_sync *vdev_sync; diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index ffd34117ecd7..563fba3c322a 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -1315,17 +1315,11 @@ static void __hdd_tx_timeout(struct net_device *dev) } } -/** - * hdd_tx_timeout() - Wrapper function to protect __hdd_tx_timeout from SSR - * @net_dev: pointer to net_device structure - * - * Function called by OS if there is any timeout during transmission. - * Since HDD simply enqueues packet and returns control to OS right away, - * this would never be invoked - * - * Return: none - */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)) +void hdd_tx_timeout(struct net_device *net_dev, unsigned int txqueue) +#else void hdd_tx_timeout(struct net_device *net_dev) +#endif { struct osif_vdev_sync *vdev_sync;