wlan_mlme_ucfg_api.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. #include "cfg_ucfg_api.h"
  22. #include "wlan_mlme_main.h"
  23. #include "wlan_mlme_ucfg_api.h"
  24. QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc)
  25. {
  26. QDF_STATUS status;
  27. status = mlme_cfg_on_psoc_enable(psoc);
  28. if (!QDF_IS_STATUS_SUCCESS(status))
  29. mlme_err("Failed to initialize MLME CFG");
  30. return status;
  31. }
  32. void mlme_psoc_close(struct wlan_objmgr_psoc *psoc)
  33. {
  34. /* Clear the MLME CFG Structure */
  35. }
  36. QDF_STATUS wlan_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
  37. struct mlme_ht_capabilities_info
  38. *ht_cap_info)
  39. {
  40. struct wlan_mlme_psoc_obj *mlme_obj;
  41. mlme_obj = mlme_get_psoc_obj(psoc);
  42. if (!mlme_obj) {
  43. mlme_err("Failed to get MLME Obj");
  44. return QDF_STATUS_E_FAILURE;
  45. }
  46. *ht_cap_info = mlme_obj->cfg.ht_caps.ht_cap_info;
  47. return QDF_STATUS_SUCCESS;
  48. }
  49. QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
  50. struct mlme_ht_capabilities_info
  51. ht_cap_info)
  52. {
  53. struct wlan_mlme_psoc_obj *mlme_obj;
  54. mlme_obj = mlme_get_psoc_obj(psoc);
  55. if (!mlme_obj) {
  56. mlme_err("Failed to get MLME Obj");
  57. return QDF_STATUS_E_FAILURE;
  58. }
  59. mlme_obj->cfg.ht_caps.ht_cap_info = ht_cap_info;
  60. return QDF_STATUS_SUCCESS;
  61. }