1 /* 2 * Copyright (c) 2019 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /** 20 * DOC: wlan_vdev_mgr_utils_api.h 21 * 22 * This file provides declaration for APIs used for psoc enable/disable 23 */ 24 25 #ifndef __WLAN_VDEV_MGR_UTILS_API_H__ 26 #define __WLAN_VDEV_MGR_UTILS_API_H__ 27 28 #include <wlan_objmgr_psoc_obj.h> 29 #include <include/wlan_vdev_mlme.h> 30 #include <wlan_vdev_mgr_ucfg_api.h> 31 #include <cdp_txrx_cmn_struct.h> 32 33 /** 34 * wlan_util_vdev_get_cdp_txrx_opmode - get cdp txrx opmode from qdf mode 35 * @vdev: pointer to vdev object 36 * 37 * Return: wlan_opmode 38 */ 39 enum wlan_op_mode 40 wlan_util_vdev_get_cdp_txrx_opmode(struct wlan_objmgr_vdev *vdev); 41 42 /** 43 * wlan_util_vdev_get_cdp_txrx_subtype - get cdp txrx subtype from qdf mode 44 * @vdev: pointer to vdev object 45 * 46 * Return: wlan_opmode 47 */ 48 enum wlan_op_subtype 49 wlan_util_vdev_get_cdp_txrx_subtype(struct wlan_objmgr_vdev *vdev); 50 51 /** 52 * wlan_util_vdev_mlme_set_ratemask_config) – common MLME API to set 53 * ratemask configuration and send it to FW 54 * @vdev_mlme: pointer to vdev_mlme object 55 * 56 * Return: QDF_STATUS - Success or Failure 57 */ 58 QDF_STATUS 59 wlan_util_vdev_mlme_set_ratemask_config(struct vdev_mlme_obj *vdev_mlme); 60 61 /** 62 * wlan_util_vdev_mlme_set_param() – common MLME API to fill common 63 * parameters of vdev_mlme object 64 * @vdev_mlme: pointer to vdev_mlme object 65 * @param_id: param id for which the value should be set 66 * @param_value: value that should bem set to the parameter 67 * 68 * Return: QDF_STATUS - Success or Failure 69 */ 70 QDF_STATUS wlan_util_vdev_mlme_set_param(struct vdev_mlme_obj *vdev_mlme, 71 enum wlan_mlme_cfg_id param_id, 72 struct wlan_vdev_mgr_cfg mlme_cfg); 73 74 /** 75 * wlan_util_vdev_mlme_get_param() – common MLME API to get common 76 * parameters of vdev_mlme object 77 * @vdev_mlme: pointer to vdev_mlme object 78 * @param_id: param id for which the value should be set 79 * @param_value: value that should bem set to the parameter 80 * 81 * Return: QDF_STATUS - Success or Failure 82 */ 83 void wlan_util_vdev_mlme_get_param(struct vdev_mlme_obj *vdev_mlme, 84 enum wlan_mlme_cfg_id param_id, 85 uint32_t *param_value); 86 87 /** 88 * wlan_util_vdev_get_param() – common MLME API to get common 89 * parameters of vdev_mlme object 90 * @vdev: pointer to vdev object 91 * @param_id: param id for which the value should be set 92 * @param_value: value that should bem set to the parameter 93 * 94 * Return: QDF_STATUS - Success or Failure 95 */ 96 void wlan_util_vdev_get_param(struct wlan_objmgr_vdev *vdev, 97 enum wlan_mlme_cfg_id param_id, 98 uint32_t *param_value); 99 100 #endif /* __WLAN_VDEV_MGR_UTILS_API_H__ */ 101