Răsfoiți Sursa

qcacld-3.0: Register spectral to DBR in hdd_wlan_start_modules

Since it will takes long time to register spectral to Direct Buffer RX
component, and it will affect wmi ready event handling in pdev open.
So register spectral to dbr after wmi ready event handled.

Change-Id: I51844a708ed69144618e5b0846747601d4d96a9d
CRs-Fixed: 2560822
Wu Gao 5 ani în urmă
părinte
comite
6fc2b727cc

+ 14 - 0
core/hdd/inc/wlan_hdd_spectralscan.h

@@ -207,8 +207,22 @@ int wlan_hdd_cfg80211_spectral_scan_get_status(struct wiphy *wiphy,
 						struct wireless_dev *wdev,
 						const void *data,
 						int data_len);
+
+/**
+ * hdd_spectral_register_to_dbr() - Register spectral to DBR
+ * @hdd_ctx: pointer to hdd context
+ *
+ * This function is that register spectral to Direct Buffer RX component.
+ *
+ * Return: None
+ */
+void hdd_spectral_register_to_dbr(struct hdd_context *hdd_ctx);
 #else
 #define FEATURE_SPECTRAL_SCAN_VENDOR_COMMANDS
+static inline void
+hdd_spectral_register_to_dbr(struct hdd_context *hdd_ctx)
+{
+}
 #endif
 
 #if defined(CNSS_GENL) && defined(WLAN_CONV_SPECTRAL_ENABLE)

+ 7 - 0
core/hdd/src/wlan_hdd_main.c

@@ -3303,6 +3303,13 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit)
 		hdd_register_policy_manager_callback(
 			hdd_ctx->psoc);
 
+		/*
+		 * Call this function before hdd_enable_power_management. Since
+		 * it is required to trigger WMI_PDEV_DMA_RING_CFG_REQ_CMDID
+		 * to FW when power save isn't enable.
+		 */
+		hdd_spectral_register_to_dbr(hdd_ctx);
+
 		hdd_sysfs_create_driver_root_obj();
 		hdd_sysfs_create_version_interface(hdd_ctx->psoc);
 		hdd_sysfs_create_powerstats_interface();

+ 5 - 0
core/hdd/src/wlan_hdd_spectralscan.c

@@ -395,6 +395,11 @@ int wlan_hdd_cfg80211_spectral_scan_get_status(struct wiphy *wiphy,
 	return errno;
 }
 
+void hdd_spectral_register_to_dbr(struct hdd_context *hdd_ctx)
+{
+	ucfg_spectral_register_to_dbr(hdd_ctx->pdev);
+}
+
 #if defined(CNSS_GENL) && defined(WLAN_CONV_SPECTRAL_ENABLE)
 static void spectral_get_version(struct wlan_objmgr_pdev *pdev,
 				 uint32_t *version,