From 44cff5c444a3ca5a8afaed63031a32910e1da415 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Mon, 16 Apr 2018 15:49:30 -0700 Subject: [PATCH] qcacld-3.0: Log netdev tx queue state at user triggered disconnect Framework shall trigger disconnect for many reasons, one of them is NUD failure. The motive to print tx queue state whenever disconnect is triggered from the userspace is to see the state of the tx queue at the time of disconnect. Change-Id: I73f6359f6823de4781ed94b1d4f19c4a0a198879 CRs-Fixed: 2225547 --- core/hdd/src/wlan_hdd_cfg80211.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index f7f691e37f38..322a4c632ed1 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -19774,6 +19774,28 @@ static const char *hdd_ieee80211_reason_code_to_str(uint16_t reason) } } +/** + * hdd_print_netdev_txq_status() - print netdev tx queue status + * @dev: Pointer to network device + * + * This function is used to print netdev tx queue status + * + * Return: none + */ +static void hdd_print_netdev_txq_status(struct net_device *dev) +{ + unsigned int i; + + if (!dev) + return; + + for (i = 0; i < dev->num_tx_queues; i++) { + struct netdev_queue *txq = netdev_get_tx_queue(dev, i); + + hdd_info("netdev tx queue[%u] state: 0x%lx", i, txq->state); + } +} + /** * __wlan_hdd_cfg80211_disconnect() - cfg80211 disconnect api * @wiphy: Pointer to wiphy @@ -19808,6 +19830,7 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy, MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_CFG80211_DISCONNECT, adapter->session_id, reason)); + hdd_print_netdev_txq_status(dev); hdd_debug("Device_mode %s(%d) reason code(%d)", hdd_device_mode_to_string(adapter->device_mode), adapter->device_mode, reason);