1 /* 2 * Copyright (c) 2020, The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 #include <wmi_unified_api.h> 18 #include <target_if_iot_sim.h> 19 #include <init_deinit_lmac.h> 20 #include <target_if.h> 21 #include <qdf_module.h> 22 23 QDF_STATUS 24 target_if_iot_sim_send_cmd(struct wlan_objmgr_pdev *pdev, 25 struct simulation_test_params *param) 26 { 27 if (pdev && pdev->tgt_if_handle) { 28 struct wmi_unified *wmi_hdl; 29 30 wmi_hdl = pdev->tgt_if_handle->wmi_handle; 31 return wmi_unified_simulation_test_cmd_send(wmi_hdl, param); 32 } else 33 return QDF_STATUS_E_FAILURE; 34 } 35 36 void target_if_iot_sim_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) 37 { 38 tx_ops->iot_sim_tx_ops.iot_sim_send_cmd = 39 target_if_iot_sim_send_cmd; 40 } 41 42 qdf_export_symbol(target_if_iot_sim_register_tx_ops); 43 44