/* * Copyright (c) 2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all * copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ /** * DOC: declare UCFG APIs exposed by the mlme component */ #ifndef _WLAN_MLME_UCFG_API_H_ #define _WLAN_MLME_UCFG_API_H_ #include #include #include #include #include /** * ucfg_mlme_init() - initialize mlme_ctx context. * * This function initializes the mlme context. * * Return: QDF_STATUS_SUCCESS - in case of success else return error */ QDF_STATUS ucfg_mlme_init(void); /** * ucfg_mlme_deinit() - De initialize mlme_ctx context. * * This function De initializes mlme contex. * * Return: QDF_STATUS_SUCCESS - in case of success else return error */ QDF_STATUS ucfg_mlme_deinit(void); /** * ucfg_mlme_psoc_open() - MLME component Open * @psoc: pointer to psoc object * * Open the MLME component and initialize the MLME strucutre * * Return: QDF Status */ QDF_STATUS ucfg_mlme_psoc_open(struct wlan_objmgr_psoc *psoc); /** * ucfg_mlme_psoc_close() - MLME component close * @psoc: pointer to psoc object * * Close the MLME component and clear the MLME structures * * Return: None */ void ucfg_mlme_psoc_close(struct wlan_objmgr_psoc *psoc); #ifdef CONFIG_VDEV_SM /** * ucfg_mlme_pdev_open() - MLME component pdev Open * @pdev: pointer to pdev object * * Open the MLME component and initialize the MLME pdev strucutre * * Return: QDF Status */ QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev); /** * ucfg_mlme_pdev_close() - MLME component pdev close * @pdev: pointer to pdev object * * close the MLME pdev information * * Return: QDF Status */ QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev); #else /** * ucfg_mlme_pdev_open() - MLME component pdev Open * @pdev: pointer to pdev object * * Open the MLME component and initialize the MLME pdev strucutre * * Return: QDF Status */ static inline QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev) { return QDF_STATUS_SUCCESS; } /** * ucfg_mlme_pdev_close() - MLME component pdev close * @pdev: pointer to pdev object * * close the MLME pdev information * * Return: QDF Status */ static inline QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev) { return QDF_STATUS_SUCCESS; } #endif /** * ucfg_mlme_get_ht_cap_info() - Get the HT cap info config * @psoc: pointer to psoc object * @value: pointer to the value which will be filled for the caller * * Inline UCFG API to be used by HDD/OSIF callers * * Return: QDF Status */ static inline QDF_STATUS ucfg_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc, struct mlme_ht_capabilities_info *ht_cap_info) { return wlan_mlme_get_ht_cap_info(psoc, ht_cap_info); } /** * ucfg_mlme_set_ht_cap_info() - Set the HT cap info config * @psoc: pointer to psoc object * @value: Value that needs to be set from the caller * * Inline UCFG API to be used by HDD/OSIF callers * * Return: QDF Status */ static inline QDF_STATUS ucfg_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc, struct mlme_ht_capabilities_info ht_cap_info) { return wlan_mlme_set_ht_cap_info(psoc, ht_cap_info); } /** * ucfg_mlme_get_ignore_peer_ht_mode() - Get the ignore peer ht mode flag * * @psoc: pointer to psoc object * @value: Value that needs to be set * * Inline UCFG API to be used by HDD/OSIF callers to get the * ignore_peer_ht_opmode flag value * * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE */ static inline QDF_STATUS ucfg_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc, bool *value) { return wlan_mlme_get_ignore_peer_ht_mode(psoc, value); } /** * ucfg_mlme_get_tx_chainmask_1ss() - Get the tx_chainmask_1ss value * * @psoc: pointer to psoc object * @value: Value that needs to be set from the caller * * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS */ static inline QDF_STATUS ucfg_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc, uint8_t *value) { return wlan_mlme_get_tx_chainmask_1ss(psoc, value); } /** * ucfg_mlme_get_num_11b_tx_chains() - Get the number of 11b only tx chains * * @psoc: pointer to psoc object * @value: Value that needs to be set from the caller * * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS */ static inline QDF_STATUS ucfg_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc, uint16_t *value) { return wlan_mlme_get_num_11b_tx_chains(psoc, value); } /** * ucfg_mlme_get_num_11ag_tx_chains() - get the total number of 11a/g tx chains * * @psoc: pointer to psoc object * @value: Value that needs to be set from the caller * * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS */ static inline QDF_STATUS ucfg_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc, uint16_t *value) { return wlan_mlme_get_num_11ag_tx_chains(psoc, value); } /** * ucfg_mlme_configure_chain_mask() - configure chainmask parameters * * @psoc: pointer to psoc object * @session_id: vdev_id * * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS */ static inline QDF_STATUS ucfg_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc, uint8_t session_id) { return wlan_mlme_configure_chain_mask(psoc, session_id); } #endif /* _WLAN_MLME_UCFG_API_H_ */