son_api.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. #else
  60. static inline bool wlan_son_peer_is_kickout_allow(struct wlan_objmgr_vdev *vdev,
  61. uint8_t *macaddr)
  62. {
  63. return true;
  64. }
  65. #endif /*WLAN_FEATURE_SON*/
  66. #endif