cdp_txrx_mesh_latency.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: cdp_txrx_mesh_latency.h
  21. * Define the host data path MESH latency API functions
  22. * called by the host control SW and the OS interface module
  23. */
  24. #ifndef _CDP_TXRX_MESH_LATENCY_H_
  25. #define _CDP_TXRX_MESH_LATENCY_H_
  26. #include "cdp_txrx_handle.h"
  27. #ifdef WLAN_SUPPORT_MESH_LATENCY
  28. /**
  29. * cdp_mesh_latency_update_peer_parameter() - find MSCS enabled peer for this
  30. * mac address and validate priority
  31. * @soc: soc context
  32. * @dest_mac: destination mac address
  33. * @service_interval_dl: Service Interval per tid on DL
  34. * @burst_size_dl: Burst size per tid on DL
  35. * @service_interval_ul: Service Interval per tid on UL
  36. * @burst_size_ul: Burst size per tid on UL
  37. * @priority: user priority combination of tid and msdu queue
  38. * @add_or_sub: indicates to add or subtract latency parameter
  39. *
  40. * This function updates per peer per TID mesh latency related parameters.
  41. *
  42. * Return: 0 for non error case, -1 for failure
  43. */
  44. static inline QDF_STATUS
  45. cdp_mesh_latency_update_peer_parameter(ol_txrx_soc_handle soc,
  46. uint8_t *dest_mac, uint32_t service_interval_dl,
  47. uint32_t burst_size_dl, uint32_t service_interval_ul,
  48. uint32_t burst_size_ul, uint16_t priority,
  49. uint8_t add_or_sub)
  50. {
  51. if (!soc || !soc->ops || !soc->ops->mesh_latency_ops) {
  52. return 1;
  53. }
  54. if (soc->ops->mesh_latency_ops->mesh_latency_update_peer_parameter)
  55. return soc->ops->mesh_latency_ops->
  56. mesh_latency_update_peer_parameter(soc,
  57. dest_mac, service_interval_dl,
  58. burst_size_dl, service_interval_ul,
  59. burst_size_ul, priority, add_or_sub);
  60. return 0;
  61. }
  62. #endif
  63. #endif