1 /* 2 * Copyright (c) 2021, The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 #ifndef _DP_MON_FILTER_1_0_H_ 18 #define _DP_MON_FILTER_1_0_H_ 19 20 #ifdef QCA_ENHANCED_STATS_SUPPORT 21 /** 22 * dp_mon_filter_setup_enhanced_stats() - Setup the enhanced stats filter 23 * @pdev: DP pdev handle 24 */ 25 void dp_mon_filter_setup_enhanced_stats_1_0(struct dp_pdev *pdev); 26 27 /*** 28 * dp_mon_filter_reset_enhanced_stats() - Reset the enhanced stats filter 29 * @pdev: DP pdev handle 30 */ 31 void dp_mon_filter_reset_enhanced_stats_1_0(struct dp_pdev *pdev); 32 #else 33 static inline void dp_mon_filter_setup_enhanced_stats_1_0(struct dp_pdev *pdev) 34 { 35 } 36 37 static inline void dp_mon_filter_reset_enhanced_stats_1_0(struct dp_pdev *pdev) 38 { 39 } 40 #endif 41 42 #ifdef QCA_UNDECODED_METADATA_SUPPORT 43 /* 44 * dp_mon_filter_setup_undecoded_metadata_capture() - Setup the filter 45 * for undecoded metadata capture 46 * @pdev: DP pdev handle 47 */ 48 void dp_mon_filter_setup_undecoded_metadata_capture_1_0(struct dp_pdev *pdev); 49 50 /* 51 * dp_mon_filter_reset_undecoded_metadata_capture() - Reset the filter 52 * for undecoded metadata capture 53 * @pdev: DP pdev handle 54 */ 55 void dp_mon_filter_reset_undecoded_metadata_capture_1_0(struct dp_pdev *pdev); 56 #else 57 static inline void 58 dp_mon_filter_setup_undecoded_metadata_capture_1_0(struct dp_pdev *pdev) 59 { 60 } 61 62 static inline void 63 dp_mon_filter_reset_undecoded_metadata_capture_1_0(struct dp_pdev *pdev) 64 { 65 } 66 #endif /* QCA_UNDECODED_METADATA_SUPPORT */ 67 68 #ifdef QCA_MCOPY_SUPPORT 69 /** 70 * dp_mon_filter_setup_mcopy_mode() - Setup the m_copy mode filter 71 * @pdev: DP pdev handle 72 */ 73 void dp_mon_filter_setup_mcopy_mode_1_0(struct dp_pdev *pdev); 74 75 /** 76 * dp_mon_filter_reset_mcopy_mode() - Reset the m_copy mode filter 77 * @pdev: DP pdev handle 78 */ 79 void dp_mon_filter_reset_mcopy_mode_1_0(struct dp_pdev *pdev); 80 #else 81 static inline void dp_mon_filter_setup_mcopy_mode_1_0(struct dp_pdev *pdev) 82 { 83 } 84 85 static inline void dp_mon_filter_reset_mcopy_mode_1_0(struct dp_pdev *pdev) 86 { 87 } 88 #endif 89 90 #if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC) 91 /** 92 * dp_mon_filter_setup_smart_monitor() - Setup the smart monitor mode filter 93 * @pdev: DP pdev handle 94 */ 95 void dp_mon_filter_setup_smart_monitor_1_0(struct dp_pdev *pdev); 96 97 /** 98 * dp_mon_filter_reset_smart_monitor() - Reset the smart monitor mode filter 99 * @pdev: DP pdev handle 100 */ 101 void dp_mon_filter_reset_smart_monitor_1_0(struct dp_pdev *pdev); 102 #else 103 static inline void dp_mon_filter_setup_smart_monitor_1_0(struct dp_pdev *pdev) 104 { 105 } 106 107 static inline void dp_mon_filter_reset_smart_monitor_1_0(struct dp_pdev *pdev) 108 { 109 } 110 #endif 111 112 #ifdef WLAN_RX_PKT_CAPTURE_ENH 113 /** 114 * dp_mon_filter_setup_rx_enh_capture() - Setup the Rx capture mode filters 115 * @pdev: DP pdev handle 116 */ 117 void dp_mon_filter_setup_rx_enh_capture_1_0(struct dp_pdev *pdev); 118 119 /** 120 * dp_mon_filter_reset_rx_enh_capture() - Reset the Rx capture mode filters 121 * @pdev: DP pdev handle 122 */ 123 void dp_mon_filter_reset_rx_enh_capture_1_0(struct dp_pdev *pdev); 124 #else 125 static inline void dp_mon_filter_setup_rx_enh_capture_1_0(struct dp_pdev *pdev) 126 { 127 } 128 129 static inline void dp_mon_filter_reset_rx_enh_capture_1_0(struct dp_pdev *pdev) 130 { 131 } 132 #endif 133 134 /** 135 * dp_mon_filter_setup_mon_mode() - Setup the Rx monitor mode filter 136 * @pdev: DP pdev handle 137 */ 138 void dp_mon_filter_setup_mon_mode_1_0(struct dp_pdev *pdev); 139 140 /** 141 * dp_mon_filter_reset_mon_mode() - Reset the Rx monitor mode filter 142 * @pdev: DP pdev handle 143 */ 144 void dp_mon_filter_reset_mon_mode_1_0(struct dp_pdev *pdev); 145 146 #ifdef WDI_EVENT_ENABLE 147 /** 148 * dp_mon_filter_setup_rx_pkt_log_full() - Setup the Rx pktlog full mode filter 149 * @pdev: DP pdev handle 150 */ 151 void dp_mon_filter_setup_rx_pkt_log_full_1_0(struct dp_pdev *pdev); 152 153 /** 154 * dp_mon_filter_reset_rx_pkt_log_full_1_0() - Reset the Rx pktlog full mode filter 155 * @pdev: DP pdev handle 156 */ 157 void dp_mon_filter_reset_rx_pkt_log_full_1_0(struct dp_pdev *pdev); 158 159 /** 160 * dp_mon_filter_setup_rx_pkt_log_lite() - Setup the Rx pktlog lite mode filter 161 * in the radio object. 162 * @pdev: DP pdev handle 163 */ 164 void dp_mon_filter_setup_rx_pkt_log_lite_1_0(struct dp_pdev *pdev); 165 166 /** 167 * dp_mon_filter_reset_rx_pkt_log_lite() - Reset the Rx pktlog lite mode filter 168 * @pdev: DP pdev handle 169 */ 170 void dp_mon_filter_reset_rx_pkt_log_lite_1_0(struct dp_pdev *pdev); 171 172 /** 173 * dp_mon_filter_setup_rx_pkt_log_cbf() - Setup the Rx pktlog cbf mode filter 174 * in the radio object. 175 * @pdev: DP pdev handle 176 */ 177 void dp_mon_filter_setup_rx_pkt_log_cbf_1_0(struct dp_pdev *pdev); 178 179 /** 180 * dp_mon_filter_reset_rx_pktlog_cbf() - Reset the Rx pktlog cbf mode filter 181 * @pdev: DP pdev handle 182 */ 183 void dp_mon_filter_reset_rx_pktlog_cbf_1_0(struct dp_pdev *pdev); 184 #else 185 static inline void dp_mon_filter_setup_rx_pkt_log_full_1_0(struct dp_pdev *pdev) 186 { 187 } 188 189 static inline void dp_mon_filter_reset_rx_pkt_log_full_1_0(struct dp_pdev *pdev) 190 { 191 } 192 193 static inline void dp_mon_filter_setup_rx_pkt_log_lite_1_0(struct dp_pdev *pdev) 194 { 195 } 196 197 static inline void dp_mon_filter_reset_rx_pkt_log_lite_1_0(struct dp_pdev *pdev) 198 { 199 } 200 201 static inline void dp_mon_filter_setup_rx_pkt_log_cbf_1_0(struct dp_pdev *pdev) 202 { 203 } 204 205 static inline void dp_mon_filter_reset_rx_pktlog_cbf_1_0(struct dp_pdev *pdev) 206 { 207 } 208 #endif 209 210 QDF_STATUS dp_mon_filter_update_1_0(struct dp_pdev *pdev); 211 212 #endif /* _DP_MON_FILTER_1_0_H_ */ 213