From b57a6d5bd685e7442de65769c28241a6d505a3ea Mon Sep 17 00:00:00 2001 From: nakul kachhwaha Date: Mon, 18 May 2020 14:44:51 +0530 Subject: [PATCH] qcacmn: Fix compilation issue in iot sim module Fixing the compilation in iot sim module by properly dereferencing tx ops from psoc. Change-Id: If60d5350502e50f2ebc64bd6b03787e7fe860546 CRs-Fixed: 2688627 --- iot_sim/dispatcher/src/wlan_iot_sim_tgt_api.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/iot_sim/dispatcher/src/wlan_iot_sim_tgt_api.c b/iot_sim/dispatcher/src/wlan_iot_sim_tgt_api.c index c2179bcd9503..bcc686345783 100644 --- a/iot_sim/dispatcher/src/wlan_iot_sim_tgt_api.c +++ b/iot_sim/dispatcher/src/wlan_iot_sim_tgt_api.c @@ -39,7 +39,18 @@ QDF_STATUS tgt_send_simulation_cmd(struct wlan_objmgr_pdev *pdev, struct simulation_test_params *param) { struct wlan_objmgr_psoc *psoc = NULL; + struct wlan_lmac_if_tx_ops *tx_ops; psoc = wlan_pdev_get_psoc(pdev); - return psoc->soc_cb.tx_ops.iot_sim_tx_ops.iot_sim_send_cmd(pdev, param); + + if (!psoc) { + iot_sim_err("psoc is NULL"); + return QDF_STATUS_E_NULL_VALUE; + } + tx_ops = wlan_psoc_get_lmac_if_txops(psoc); + if (!tx_ops) { + iot_sim_err("tx_ops is NULL"); + return QDF_STATUS_E_NULL_VALUE; + } + return tx_ops->iot_sim_tx_ops.iot_sim_send_cmd(pdev, param); }