cdp_txrx_mesh_latency.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 - Service Interval per tid
  34. * @param burst_size - Burst size per tid
  35. * @param priority - user priority combination of tid and msdu queue
  36. * #add_or_sub - indicates to add or substract latency parameter
  37. * @return - 0 for non error case, -1 for failure
  38. */
  39. static inline QDF_STATUS
  40. cdp_mesh_latency_update_peer_parameter(ol_txrx_soc_handle soc,
  41. uint8_t *dest_mac, uint32_t service_interval,
  42. uint32_t burst_size, uint16_t priority, uint8_t add_or_sub)
  43. {
  44. if (!soc || !soc->ops || !soc->ops->mesh_latency_ops) {
  45. return 1;
  46. }
  47. if (soc->ops->mesh_latency_ops->mesh_latency_update_peer_parameter)
  48. return soc->ops->mesh_latency_ops->
  49. mesh_latency_update_peer_parameter(soc,
  50. dest_mac, service_interval,
  51. burst_size, priority, add_or_sub);
  52. return 0;
  53. }
  54. #endif
  55. #endif