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 * @rx_param - mgmt_rx_event_params 43 * 44 * Return : QDF_STATUS_E_SUCCESS/QDF_STATUS_E_FAILURE. 45 */ 46 QDF_STATUS iot_sim_cmd_handler(struct wlan_objmgr_vdev *vdev, qdf_nbuf_t buf, 47 struct beacon_tmpl_params *bcn_param, bool tx, 48 struct mgmt_rx_event_params *param); 49 50 /** 51 * wlan_iot_sim_init() - API to init iot_sim component 52 * 53 * This API is invoked from dispatcher init during all component init. 54 * This API will register all required handlers for pdev and peer object 55 * create/delete notification. 56 * 57 * Return: SUCCESS, 58 * Failure 59 */ 60 QDF_STATUS wlan_iot_sim_init(void); 61 62 /* 63 * wlan_iot_sim_deinit() - API to deinit iot_sim component 64 * 65 * This API is invoked from dispatcher deinit during all component deinit. 66 * This API will unregister all registered handlers for pdev and peer object 67 * create/delete notification. 68 * 69 * Return: SUCCESS, 70 * Failure 71 */ 72 QDF_STATUS wlan_iot_sim_deinit(void); 73 74 /** 75 * wlan_lmac_if_iot_sim_register_rx_ops() - Register lmac interface Rx 76 * operations 77 * @rx_ops: Pointer to lmac interface Rx operations structure 78 * 79 * API to register iot_sim related lmac interface Rx operations 80 * 81 * Return: None 82 */ 83 void wlan_lmac_if_iot_sim_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops); 84 85 /** 86 * wlan_register_wmi_iot_sim_cmd_ops() - Register operations related to wmi 87 * commands on iot_sim parameters 88 * @pdev - the physical device object 89 * @cmd_ops - pointer to the structure holding the operations 90 * related to wmi commands on iot_sim parameters 91 * 92 * API to register operations related to wmi commands on iot_sim parameters 93 * 94 * Return: None 95 */ 96 void 97 wlan_register_wmi_iot_sim_cmd_ops(struct wlan_objmgr_pdev *pdev, 98 struct wmi_iot_sim_cmd_ops *cmd_ops); 99 100 #endif /* _WLAN_IOT_SIM_UTILS_API_H_*/ 101