i_qdf_nbuf_api_w.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. * Copyright (c) 2014-2017,2019-2020 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. * DOC: i_qdf_nbuf_api_w.h
  20. *
  21. * Platform specific qdf_nbuf_public network buffer API
  22. * This file defines the network buffer abstraction.
  23. * Included by qdf_nbuf.h and should not be included
  24. * directly from other files.
  25. */
  26. #ifndef _QDF_NBUF_W_H
  27. #define _QDF_NBUF_W_H
  28. static inline void *qdf_nbuf_get_tx_fctx(qdf_nbuf_t buf)
  29. {
  30. return __qdf_nbuf_get_tx_fctx(buf);
  31. }
  32. static inline void *qdf_nbuf_get_rx_fctx(qdf_nbuf_t buf)
  33. {
  34. return __qdf_nbuf_get_rx_fctx(buf);
  35. }
  36. static inline void
  37. qdf_nbuf_set_tx_fctx_type(qdf_nbuf_t buf, void *ctx, uint8_t type)
  38. {
  39. __qdf_nbuf_set_tx_fctx_type(buf, ctx, type);
  40. }
  41. static inline void
  42. qdf_nbuf_set_rx_fctx_type(qdf_nbuf_t buf, void *ctx, uint8_t type)
  43. {
  44. __qdf_nbuf_set_rx_fctx_type(buf, ctx, type);
  45. }
  46. static inline void *
  47. qdf_nbuf_get_ext_cb(qdf_nbuf_t buf)
  48. {
  49. return __qdf_nbuf_get_ext_cb(buf);
  50. }
  51. static inline void
  52. qdf_nbuf_set_ext_cb(qdf_nbuf_t buf, void *ref)
  53. {
  54. __qdf_nbuf_set_ext_cb(buf, ref);
  55. }
  56. /**
  57. * qdf_nbuf_set_rx_protocol_tag() - set given value in protocol_tag
  58. * field of buf(skb->cb)
  59. * @buf: Network buffer
  60. * @val: Value to be set in the nbuf
  61. * Return: None
  62. */
  63. static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint16_t val)
  64. {
  65. __qdf_nbuf_set_rx_protocol_tag(buf, val);
  66. }
  67. /**
  68. * qdf_nbuf_get_rx_protocol_tag() - Get the value of protocol_tag
  69. * field of buf(skb->cb)
  70. * @buf: Network buffer
  71. * Return: Value of Rx protocol tag in the nbuf
  72. */
  73. static inline uint16_t qdf_nbuf_get_rx_protocol_tag(qdf_nbuf_t buf)
  74. {
  75. return __qdf_nbuf_get_rx_protocol_tag(buf);
  76. }
  77. /**
  78. * qdf_nbuf_set_rx_flow_tag() - set given value in flow tag field
  79. * of buf(skb->cb)
  80. * @buf: Network buffer
  81. * @val: Value of Rx flow tag to be set in the nbuf
  82. * Return: None
  83. */
  84. static inline void qdf_nbuf_set_rx_flow_tag(qdf_nbuf_t buf, uint16_t val)
  85. {
  86. __qdf_nbuf_set_rx_flow_tag(buf, val);
  87. }
  88. /**
  89. * qdf_nbuf_get_rx_flow_tag() - Get the value of flow_tag
  90. * field of buf(skb->cb)
  91. * @buf: Network buffer
  92. * Return: Value of the Rx flow tag in the nbuf
  93. */
  94. static inline uint16_t qdf_nbuf_get_rx_flow_tag(qdf_nbuf_t buf)
  95. {
  96. return __qdf_nbuf_get_rx_flow_tag(buf);
  97. }
  98. /**
  99. * qdf_nbuf_set_exc_frame() - set exception frame flag
  100. * @buf: Network buffer whose cb is to set exception frame flag
  101. * @value: exception frame flag, value 0 or 1.
  102. *
  103. * Return: none
  104. */
  105. static inline void qdf_nbuf_set_exc_frame(qdf_nbuf_t buf, uint8_t value)
  106. {
  107. }
  108. #endif /* _QDF_NBUF_W_H */