Prechádzať zdrojové kódy

qcacld-3.0: Destroy NUD tracking work only for STA mode

Currently the NUD tracking is done only for STA mode.
For all the adapters the NUD tracking work is not
created and hence should not be destroyed when the
adapter is cleaned up.

Destroy the NUD tracking work only for the STA adapter.

CRs-Fixed: 2505365
Change-Id: I677a07cb37e2d547e62b7ffebf6d014255a9d237
Rakesh Pillai 5 rokov pred
rodič
commit
79afaed56e
1 zmenil súbory, kde vykonal 9 pridanie a 2 odobranie
  1. 9 2
      core/hdd/src/wlan_hdd_nud_tracking.c

+ 9 - 2
core/hdd/src/wlan_hdd_nud_tracking.c

@@ -64,8 +64,15 @@ void hdd_nud_flush_work(struct hdd_adapter *adapter)
 
 void hdd_nud_deinit_tracking(struct hdd_adapter *adapter)
 {
-	hdd_debug("DeInitialize the NUD tracking");
-	qdf_destroy_work(NULL, &adapter->nud_tracking.nud_event_work);
+	struct hdd_context *hdd_ctx;
+
+	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+
+	if (adapter->device_mode == QDF_STA_MODE &&
+	    hdd_ctx->config->enable_nud_tracking) {
+		hdd_debug("DeInitialize the NUD tracking");
+		qdf_destroy_work(NULL, &adapter->nud_tracking.nud_event_work);
+	}
 }
 
 void hdd_nud_ignore_tracking(struct hdd_adapter *adapter, bool ignoring)