Sfoglia il codice sorgente

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
Srinivas Girigowda 7 anni fa
parent
commit
44cff5c444
1 ha cambiato i file con 23 aggiunte e 0 eliminazioni
  1. 23 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 23 - 0
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);