Browse Source

qcacld-3.0: CLD change for cdp_pdev_attach

CLD change for cdp_pdev_attach

Change-Id: Ib4c536bc5d4a94ed0456e976cfc32b0ccdc9aa65
CRs-Fixed: 3077258
Jinwei Chen 3 years ago
parent
commit
21e1618550
2 changed files with 13 additions and 8 deletions
  1. 5 2
      core/cds/src/cds_api.c
  2. 8 6
      core/dp/txrx/ol_txrx.c

+ 5 - 2
core/cds/src/cds_api.c

@@ -935,6 +935,7 @@ QDF_STATUS cds_dp_open(struct wlan_objmgr_psoc *psoc)
 	QDF_STATUS qdf_status;
 	struct dp_txrx_config dp_config;
 	struct hdd_context *hdd_ctx;
+	struct cdp_pdev_attach_params pdev_params = { 0 };
 
 
 	hdd_ctx = gp_cds_context->hdd_context;
@@ -943,9 +944,11 @@ QDF_STATUS cds_dp_open(struct wlan_objmgr_psoc *psoc)
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	pdev_params.htc_handle = gp_cds_context->htc_ctx;
+	pdev_params.qdf_osdev = gp_cds_context->qdf_ctx;
+	pdev_params.pdev_id = 0;
 	qdf_status = cdp_pdev_attach(cds_get_context(QDF_MODULE_ID_SOC),
-				     gp_cds_context->htc_ctx,
-				     gp_cds_context->qdf_ctx, 0);
+				     &pdev_params);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		/* Critical Error ...  Cannot proceed further */
 		cds_alert("Failed to open TXRX");

+ 8 - 6
core/dp/txrx/ol_txrx.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -857,7 +858,7 @@ static inline void ol_txrx_debugfs_exit(ol_txrx_pdev_handle pdev)
  */
 static QDF_STATUS
 ol_txrx_pdev_attach(ol_txrx_soc_handle soc,
-		    HTC_HANDLE htc_pdev, qdf_device_t osdev, uint8_t pdev_id)
+		    struct cdp_pdev_attach_params *params)
 {
 	struct ol_txrx_soc_t *ol_soc = cdp_soc_t_to_ol_txrx_soc_t(soc);
 	struct ol_txrx_pdev_t *pdev;
@@ -865,7 +866,7 @@ ol_txrx_pdev_attach(ol_txrx_soc_handle soc,
 	QDF_STATUS status;
 	int i, tid;
 
-	if (pdev_id == OL_TXRX_INVALID_PDEV_ID)
+	if (params->pdev_id == OL_TXRX_INVALID_PDEV_ID)
 		return QDF_STATUS_E_INVAL;
 
 	pdev = qdf_mem_malloc(sizeof(*pdev));
@@ -891,10 +892,10 @@ ol_txrx_pdev_attach(ol_txrx_soc_handle soc,
 
 	/* store provided params */
 	pdev->ctrl_pdev = cfg_pdev;
-	pdev->osdev = osdev;
-	pdev->id = pdev_id;
+	pdev->osdev = params->qdf_osdev;
+	pdev->id = params->pdev_id;
 	pdev->soc = ol_soc;
-	ol_soc->pdev_list[pdev_id] = pdev;
+	ol_soc->pdev_list[params->pdev_id] = pdev;
 
 	for (i = 0; i < htt_num_sec_types; i++)
 		pdev->sec_types[i] = (enum ol_sec_type)i;
@@ -936,7 +937,8 @@ ol_txrx_pdev_attach(ol_txrx_soc_handle soc,
 	ol_txrx_pdev_grp_stats_init(pdev);
 
 	pdev->htt_pdev =
-		htt_pdev_alloc(pdev, cfg_pdev, htc_pdev, osdev);
+		htt_pdev_alloc(pdev, cfg_pdev,
+			       params->htc_handle, params->qdf_osdev);
 	if (!pdev->htt_pdev) {
 		status = QDF_STATUS_E_FAILURE;
 		goto fail3;