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 #ifndef _WLAN_IOT_SIM_UTILS_API_H_ 18 #define _WLAN_IOT_SIM_UTILS_API_H_ 19 20 #include <wlan_objmgr_cmn.h> 21 #include <wlan_lmac_if_def.h> 22 #include <wmi_unified_param.h> 23 #include "include/wlan_pdev_mlme.h" 24 #include "wlan_pdev_mlme_api.h" 25 26 /* Forward Declarations */ 27 struct wmi_iot_sim_cmd_ops; 28 29 /** 30 * struct iot_sim_cbacks - IOT Sim callbacks 31 * @reg_beacon_trigger_handler: reg_beacon_trigger_handler 32 */ 33 struct iot_sim_cbacks { 34 void (*update_beacon_trigger)(mlme_pdev_ext_t *); 35 }; 36 37 /** 38 * iot_sim_cmd_handler() - IOT SIM frame handler function 39 * @vdev - vdev object. 40 * @buf - skb 41 * @tx - TRUE in case of Tx 42 * 43 * Return : QDF_STATUS_E_SUCCESS/QDF_STATUS_E_FAILURE. 44 */ 45 QDF_STATUS iot_sim_cmd_handler(struct wlan_objmgr_vdev *vdev, qdf_nbuf_t buf, 46 struct beacon_tmpl_params *param, bool tx); 47 48 /** 49 * wlan_iot_sim_init() - API to init iot_sim component 50 * 51 * This API is invoked from dispatcher init during all component init. 52 * This API will register all required handlers for pdev and peer object 53 * create/delete notification. 54 * 55 * Return: SUCCESS, 56 * Failure 57 */ 58 QDF_STATUS wlan_iot_sim_init(void); 59 60 /* 61 * wlan_iot_sim_deinit() - API to deinit iot_sim component 62 * 63 * This API is invoked from dispatcher deinit during all component deinit. 64 * This API will unregister all registered handlers for pdev and peer object 65 * create/delete notification. 66 * 67 * Return: SUCCESS, 68 * Failure 69 */ 70 QDF_STATUS wlan_iot_sim_deinit(void); 71 72 /** 73 * wlan_lmac_if_iot_sim_register_rx_ops() - Register lmac interface Rx 74 * operations 75 * @rx_ops: Pointer to lmac interface Rx operations structure 76 * 77 * API to register iot_sim related lmac interface Rx operations 78 * 79 * Return: None 80 */ 81 void wlan_lmac_if_iot_sim_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops); 82 83 /** 84 * wlan_register_wmi_iot_sim_cmd_ops() - Register operations related to wmi 85 * commands on iot_sim parameters 86 * @pdev - the physical device object 87 * @cmd_ops - pointer to the structure holding the operations 88 * related to wmi commands on iot_sim parameters 89 * 90 * API to register operations related to wmi commands on iot_sim parameters 91 * 92 * Return: None 93 */ 94 void 95 wlan_register_wmi_iot_sim_cmd_ops(struct wlan_objmgr_pdev *pdev, 96 struct wmi_iot_sim_cmd_ops *cmd_ops); 97 98 #endif /* _WLAN_IOT_SIM_UTILS_API_H_*/ 99