son_api.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Copyright (c) 2021, 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. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. /**
  16. * DOC : contains interface prototypes for son api
  17. */
  18. #ifndef _SON_API_H_
  19. #define _SON_API_H_
  20. #include <qdf_types.h>
  21. #include <wlan_objmgr_peer_obj.h>
  22. #include <wlan_objmgr_pdev_obj.h>
  23. #include <reg_services_public_struct.h>
  24. /**
  25. * wlan_son_get_chan_flag() - get chan flag
  26. * @pdev: pointer to pdev
  27. * @freq: qdf_freq_t
  28. * @flag_160: If true, 160 channel info will be obtained;
  29. * otherwise 80+80, 80 channel info will be obtained
  30. * @chan_params: chan parameters
  31. *
  32. * Return: combination of enum qca_wlan_vendor_channel_prop_flags and
  33. * enum qca_wlan_vendor_channel_prop_flags_2
  34. */
  35. uint32_t wlan_son_get_chan_flag(struct wlan_objmgr_pdev *pdev,
  36. qdf_freq_t freq, bool flag_160,
  37. struct ch_params *chan_params);
  38. /**
  39. * wlan_son_peer_set_kickout_allow() - set the peer is allowed to kickout
  40. * @vdev: pointer to vdev
  41. * @peer: pointer to peer
  42. * @kickout_allow: kickout_allow to set
  43. *
  44. * Return: QDF_STATUS_SUCCESS on Success else failure.
  45. */
  46. QDF_STATUS wlan_son_peer_set_kickout_allow(struct wlan_objmgr_vdev *vdev,
  47. struct wlan_objmgr_peer *peer,
  48. bool kickout_allow);
  49. #ifdef WLAN_FEATURE_SON
  50. /**
  51. * wlan_son_peer_is_kickout_allow() - Is peer is allowed to kickout
  52. * @vdev: pointer to vdev
  53. * @macaddr: mac addr of the peer
  54. *
  55. * Return: True if it is allowed to kickout.
  56. */
  57. bool wlan_son_peer_is_kickout_allow(struct wlan_objmgr_vdev *vdev,
  58. uint8_t *macaddr);
  59. /**
  60. * wlan_son_ind_assoc_req_frm() - indicate assoc req frame to son
  61. * @vdev: pointer to vdev
  62. * @is_reassoc: true if it is reassoc req
  63. * @frame: frame body
  64. * @frame_len: frame body length
  65. * @status: assoc req frame is handled successfully
  66. *
  67. * Return: Void
  68. */
  69. void wlan_son_ind_assoc_req_frm(struct wlan_objmgr_vdev *vdev,
  70. uint8_t *macaddr, bool is_reassoc,
  71. uint8_t *frame, uint16_t frame_len,
  72. QDF_STATUS status);
  73. #else
  74. static inline bool wlan_son_peer_is_kickout_allow(struct wlan_objmgr_vdev *vdev,
  75. uint8_t *macaddr)
  76. {
  77. return true;
  78. }
  79. static inline
  80. void wlan_son_ind_assoc_req_frm(struct wlan_objmgr_vdev *vdev,
  81. uint8_t *macaddr, bool is_reassoc,
  82. uint8_t *frame, uint16_t frame_len,
  83. QDF_STATUS status)
  84. {
  85. }
  86. #endif /*WLAN_FEATURE_SON*/
  87. #endif