i_qdf_nbuf_api_w.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * Copyright (c) 2014-2017,2019 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
  61. * Return: void
  62. */
  63. static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint32_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: void
  72. */
  73. static inline int qdf_nbuf_get_rx_protocol_tag(qdf_nbuf_t buf)
  74. {
  75. return __qdf_nbuf_get_rx_protocol_tag(buf);
  76. }
  77. #endif /* _QDF_NBUF_W_H */