Procházet zdrojové kódy

qcacld-3.0: Initialize async oem data event before WMI INIT

With the new requirement, host can receive oem data event
immediately after it sends WMI INIT command to fw.
To process this event, initialize async oem data event before
it sends the WMI INIT command to fw.

Change-Id: I58cc4fac6c6c0f65305b80d04ab22ba867f2b679
CRs-Fixed: 3262660
Ashish před 2 roky
rodič
revize
368a345073
1 změnil soubory, kde provedl 5 přidání a 3 odebrání
  1. 5 3
      core/hdd/src/wlan_hdd_main.c

+ 5 - 3
core/hdd/src/wlan_hdd_main.c

@@ -14158,8 +14158,6 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
 	hdd_thermal_stats_cmd_init(hdd_ctx);
 	sme_set_cal_failure_event_cb(hdd_ctx->mac_handle,
 				     hdd_cal_fail_send_event);
-	sme_async_oem_event_init(hdd_ctx->mac_handle,
-				 hdd_oem_event_async_cb);
 
 	hdd_exit();
 	return 0;
@@ -14175,7 +14173,6 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
  */
 static void hdd_features_deinit(struct hdd_context *hdd_ctx)
 {
-	sme_async_oem_event_deinit(hdd_ctx->mac_handle);
 	wlan_hdd_gpio_wakeup_deinit(hdd_ctx);
 	wlan_hdd_twt_deinit(hdd_ctx);
 	wlan_hdd_deinit_chan_info(hdd_ctx);
@@ -15554,6 +15551,9 @@ int hdd_register_cb(struct hdd_context *hdd_ctx)
 	if (QDF_IS_STATUS_ERROR(status))
 		hdd_err_rl("Register beacon latency event callback failed");
 
+	sme_async_oem_event_init(mac_handle,
+				 hdd_oem_event_async_cb);
+
 	hdd_exit();
 
 	return ret;
@@ -15581,6 +15581,8 @@ void hdd_deregister_cb(struct hdd_context *hdd_ctx)
 
 	mac_handle = hdd_ctx->mac_handle;
 
+	sme_async_oem_event_deinit(mac_handle);
+
 	sme_deregister_tx_queue_cb(mac_handle);
 
 	sme_reset_link_layer_stats_ind_cb(mac_handle);