qdf_lro.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. * Permission to use, copy, modify, and/or distribute this software for
  7. * any purpose with or without fee is hereby granted, provided that the
  8. * above copyright notice and this permission notice appear in all
  9. * copies.
  10. *
  11. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  12. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  13. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  14. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  15. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  16. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  17. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  18. * PERFORMANCE OF THIS SOFTWARE.
  19. */
  20. /*
  21. * This file was originally distributed by Qualcomm Atheros, Inc.
  22. * under proprietary terms before Copyright ownership was assigned
  23. * to the Linux Foundation.
  24. */
  25. /**
  26. * DOC: Large Receive Offload API
  27. * This file defines the Large receive offload API.
  28. */
  29. #ifndef _QDF_LRO_H
  30. #define _QDF_LRO_H
  31. #include <qdf_nbuf.h>
  32. #include <i_qdf_lro.h>
  33. /**
  34. * @qdf_nbuf_t - Platform indepedent LRO context abstraction
  35. */
  36. typedef __qdf_lro_ctx_t qdf_lro_ctx_t;
  37. #if defined(FEATURE_LRO)
  38. qdf_lro_ctx_t qdf_lro_init(void);
  39. void qdf_lro_deinit(qdf_lro_ctx_t lro_ctx);
  40. bool qdf_lro_update_info(qdf_lro_ctx_t lro_ctx, qdf_nbuf_t nbuf);
  41. void qdf_lro_flow_free(qdf_nbuf_t nbuf);
  42. void qdf_lro_flush_pkt(struct iphdr *iph,
  43. struct tcphdr *tcph, qdf_lro_ctx_t lro_ctx);
  44. void qdf_lro_flush(qdf_lro_ctx_t lro_ctx);
  45. #else
  46. static inline qdf_lro_ctx_t qdf_lro_init(void)
  47. {
  48. return NULL;
  49. }
  50. static inline void qdf_lro_deinit(qdf_lro_ctx_t lro_ctx)
  51. {
  52. }
  53. static inline void qdf_lro_flush_pkt(struct iphdr *iph,
  54. struct tcphdr *tcph, qdf_lro_ctx_t lro_ctx)
  55. {
  56. }
  57. static inline void qdf_lro_flush(qdf_lro_ctx_t lro_ctx)
  58. {
  59. }
  60. #endif /* FEATURE_LRO */
  61. #endif