Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2018 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 | * DOC: define internal APIs related to the mlme component |
| 20 | */ |
| 21 | |
| 22 | #include "cfg_ucfg_api.h" |
| 23 | #include "wlan_mlme_main.h" |
| 24 | #include "wlan_mlme_ucfg_api.h" |
| 25 | |
| 26 | QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc) |
| 27 | { |
| 28 | QDF_STATUS status; |
| 29 | |
| 30 | status = mlme_cfg_on_psoc_enable(psoc); |
| 31 | if (!QDF_IS_STATUS_SUCCESS(status)) |
| 32 | mlme_err("Failed to initialize MLME CFG"); |
| 33 | |
| 34 | return status; |
| 35 | } |
| 36 | |
| 37 | void mlme_psoc_close(struct wlan_objmgr_psoc *psoc) |
| 38 | { |
| 39 | /* Clear the MLME CFG Structure */ |
| 40 | } |
| 41 | |
| 42 | QDF_STATUS wlan_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc, |
| 43 | struct mlme_ht_capabilities_info |
| 44 | *ht_cap_info) |
| 45 | { |
| 46 | struct wlan_mlme_psoc_obj *mlme_obj; |
| 47 | |
| 48 | mlme_obj = mlme_get_psoc_obj(psoc); |
| 49 | if (!mlme_obj) { |
| 50 | mlme_err("Failed to get MLME Obj"); |
| 51 | return QDF_STATUS_E_FAILURE; |
| 52 | } |
| 53 | |
| 54 | *ht_cap_info = mlme_obj->cfg.ht_caps.ht_cap_info; |
| 55 | |
| 56 | return QDF_STATUS_SUCCESS; |
| 57 | } |
| 58 | |
| 59 | QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc, |
| 60 | struct mlme_ht_capabilities_info |
| 61 | ht_cap_info) |
| 62 | { |
| 63 | struct wlan_mlme_psoc_obj *mlme_obj; |
| 64 | |
| 65 | mlme_obj = mlme_get_psoc_obj(psoc); |
| 66 | if (!mlme_obj) { |
| 67 | mlme_err("Failed to get MLME Obj"); |
| 68 | return QDF_STATUS_E_FAILURE; |
| 69 | } |
| 70 | |
| 71 | mlme_obj->cfg.ht_caps.ht_cap_info = ht_cap_info; |
| 72 | |
| 73 | return QDF_STATUS_SUCCESS; |
| 74 | } |