cdp_txrx_mesh_latency.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (c) 2020-2021 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. * @file cdp_txrx_mesh_latency.h
  20. * @brief Define the host data path MESH latency API functions
  21. * called by the host control SW and the OS interface module
  22. */
  23. #ifndef _CDP_TXRX_MESH_LATENCY_H_
  24. #define _CDP_TXRX_MESH_LATENCY_H_
  25. #include "cdp_txrx_handle.h"
  26. #ifdef WLAN_SUPPORT_MESH_LATENCY
  27. /**
  28. * @brief find MSCS enabled peer for this mac address and validate priority
  29. * @details
  30. * This function updates per peer per TID mesh latency related parameters.
  31. *
  32. * @param dest_mac - destination mac address
  33. * @param service_interval_dl - Service Interval per tid on DL
  34. * @param burst_size_dl - Burst size per tid on DL
  35. * @param service_interval_ul - Service Interval per tid on UL
  36. * @param burst_size_ul - Burst size per tid on UL
  37. * @param priority - user priority combination of tid and msdu queue
  38. * @add_or_sub - indicates to add or subtract latency parameter
  39. * @return - 0 for non error case, -1 for failure
  40. */
  41. static inline QDF_STATUS
  42. cdp_mesh_latency_update_peer_parameter(ol_txrx_soc_handle soc,
  43. uint8_t *dest_mac, uint32_t service_interval_dl,
  44. uint32_t burst_size_dl, uint32_t service_interval_ul,
  45. uint32_t burst_size_ul, uint16_t priority,
  46. uint8_t add_or_sub)
  47. {
  48. if (!soc || !soc->ops || !soc->ops->mesh_latency_ops) {
  49. return 1;
  50. }
  51. if (soc->ops->mesh_latency_ops->mesh_latency_update_peer_parameter)
  52. return soc->ops->mesh_latency_ops->
  53. mesh_latency_update_peer_parameter(soc,
  54. dest_mac, service_interval_dl,
  55. burst_size_dl, service_interval_ul,
  56. burst_size_ul, priority, add_or_sub);
  57. return 0;
  58. }
  59. #endif
  60. #endif