dp_internal.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (c) 2016 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. #ifndef _DP_INTERNAL_H_
  19. #define _DP_INTERNAL_H_
  20. #if DP_PRINT_ENABLE
  21. #include <stdarg.h> /* va_list */
  22. #include <qdf_types.h> /* qdf_vprint */
  23. enum {
  24. /* FATAL_ERR - print only irrecoverable error messages */
  25. DP_PRINT_LEVEL_FATAL_ERR,
  26. /* ERR - include non-fatal err messages */
  27. DP_PRINT_LEVEL_ERR,
  28. /* WARN - include warnings */
  29. DP_PRINT_LEVEL_WARN,
  30. /* INFO1 - include fundamental, infrequent events */
  31. DP_PRINT_LEVEL_INFO1,
  32. /* INFO2 - include non-fundamental but infrequent events */
  33. DP_PRINT_LEVEL_INFO2,
  34. };
  35. #define dp_print(level, fmt, ...) do { \
  36. if (level <= g_txrx_print_level) \
  37. qdf_print(fmt, ## __VA_ARGS__); \
  38. while (0)
  39. #define DP_PRINT(level, fmt, ...) do { \
  40. dp_print(level, "DP: " fmt, ## __VA_ARGS__); \
  41. while (0)
  42. #else
  43. #define DP_PRINT(level, fmt, ...)
  44. #endif /* DP_PRINT_ENABLE */
  45. extern int dp_peer_find_attach(struct dp_soc *soc);
  46. extern void dp_peer_find_detach(struct dp_soc *soc);
  47. extern void dp_peer_find_hash_add(struct dp_soc *soc, struct dp_peer *peer);
  48. extern void dp_peer_find_hash_remove(struct dp_soc *soc, struct dp_peer *peer);
  49. extern void dp_peer_rx_init(struct dp_pdev *pdev, struct dp_peer *peer);
  50. extern void dp_peer_rx_cleanup(struct dp_vdev *vdev, struct dp_peer *peer);
  51. extern void dp_peer_unref_delete(void *peer_handle);
  52. extern void dp_rx_discard(struct dp_vdev *vdev, struct dp_peer *peer,
  53. unsigned tid, qdf_nbuf_t msdu_list);
  54. #endif /* #ifndef _DP_INTERNAL_H_ */