소스 검색

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 년 전
부모
커밋
79afaed56e
1개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  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)