Selaa lähdekoodia

qcacmn: Make init of dfs->dfs_soc_obj independent of the macros

With the current implementation dfs->dfs_soc_object was initialized in
function dfs_agile_soc_obj_init under the macro QCA_SUPPORT_AGILE_DFS
and ATH_SUPPORT_ZERO_CAC_DFS both of which are disabled for the low
memory profiles. Hence the dfs->dfs_soc_obj was not initialized for these
profiles, this led to a crash when the following access was made in
dfs_is_true_160mhz_supported and dfs_is_restricted_80p80mhz_supported.

psoc = dfs->dfs_soc_obj->psoc
Fix this by unconditionally initializing the dfs->dfs_soc_obj in
wlan_dfs_pdev_obj_create_notification.

Change-Id: I3438464e8efedaf2d62a68bbcf1bda5ee0579deb
Ananya Barat 4 vuotta sitten
vanhempi
sitoutus
f878c39090
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c

+ 4 - 0
umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c

@@ -393,6 +393,7 @@ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev,
 	struct wlan_dfs *dfs = NULL;
 	struct wlan_objmgr_psoc *psoc;
 	struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops;
+	struct dfs_soc_priv_obj *dfs_soc_obj;
 	uint8_t pdev_id;
 	QDF_STATUS status;
 	bool is_5ghz = false;
@@ -453,6 +454,9 @@ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev,
 	dfs->dfs_is_offload_enabled = dfs_tx_ops->dfs_is_tgt_offload(psoc);
 	dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs_offload %d",
 		 dfs->dfs_is_offload_enabled);
+	dfs_soc_obj = wlan_objmgr_psoc_get_comp_private_obj(psoc,
+							    WLAN_UMAC_COMP_DFS);
+	dfs->dfs_soc_obj = dfs_soc_obj;
 	dfs_agile_soc_obj_init(dfs, psoc);
 
 	if (dfs_attach(dfs) == 1) {