cdp_txrx_mon.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /**
  27. * @file cdp_txrx_mon.h
  28. * @brief Define the monitor mode API functions
  29. * called by the host control SW and the OS interface module
  30. */
  31. #ifndef _CDP_TXRX_MON_H_
  32. #define _CDP_TXRX_MON_H_
  33. #include "cdp_txrx_handle.h"
  34. static inline void cdp_monitor_set_filter_ucast_data
  35. (ol_txrx_soc_handle soc, struct cdp_pdev *pdev, u_int8_t val)
  36. {
  37. if (soc->ops->mon_ops->txrx_monitor_set_filter_ucast_data)
  38. return soc->ops->mon_ops->txrx_monitor_set_filter_ucast_data
  39. (pdev, val);
  40. return;
  41. }
  42. static inline void cdp_monitor_set_filter_mcast_data
  43. (ol_txrx_soc_handle soc, struct cdp_pdev *pdev, u_int8_t val)
  44. {
  45. if (soc->ops->mon_ops->txrx_monitor_set_filter_mcast_data)
  46. return soc->ops->mon_ops->txrx_monitor_set_filter_mcast_data
  47. (pdev, val);
  48. return;
  49. }
  50. static inline void cdp_monitor_set_filter_non_data
  51. (ol_txrx_soc_handle soc, struct cdp_pdev *pdev, u_int8_t val)
  52. {
  53. if (soc->ops->mon_ops->txrx_monitor_set_filter_non_data)
  54. return soc->ops->mon_ops->txrx_monitor_set_filter_non_data
  55. (pdev, val);
  56. return;
  57. }
  58. static inline u_int8_t cdp_monitor_get_filter_ucast_data(ol_txrx_soc_handle soc,
  59. struct cdp_vdev *vdev_txrx_handle)
  60. {
  61. if (soc->ops->mon_ops->txrx_monitor_get_filter_ucast_data)
  62. return soc->ops->mon_ops->txrx_monitor_get_filter_ucast_data
  63. (vdev_txrx_handle);
  64. return 0;
  65. }
  66. static inline u_int8_t cdp_monitor_get_filter_mcast_data(ol_txrx_soc_handle soc,
  67. struct cdp_vdev *vdev_txrx_handle)
  68. {
  69. if (soc->ops->mon_ops->txrx_monitor_get_filter_mcast_data)
  70. return soc->ops->mon_ops->txrx_monitor_get_filter_mcast_data
  71. (vdev_txrx_handle);
  72. return 0;
  73. }
  74. static inline u_int8_t cdp_monitor_get_filter_non_data(ol_txrx_soc_handle soc,
  75. struct cdp_vdev *vdev_txrx_handle)
  76. {
  77. if (soc->ops->mon_ops->txrx_monitor_get_filter_non_data)
  78. return soc->ops->mon_ops->txrx_monitor_get_filter_non_data
  79. (vdev_txrx_handle);
  80. return 0;
  81. }
  82. static inline int cdp_reset_monitor_mode
  83. (ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
  84. {
  85. if (soc->ops->mon_ops->txrx_reset_monitor_mode)
  86. return soc->ops->mon_ops->txrx_reset_monitor_mode(pdev);
  87. return 0;
  88. }
  89. #endif