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 /** 113 * dp_mon_set_reset_mon_mac_filter_1_0() - Set/Reset the monitor mode filter 114 * @pdev: DP pdev handle 115 * @val: Indicate set/reset filter 116 */ 117 void dp_mon_set_reset_mon_mac_filter_1_0(struct dp_pdev *pdev, bool val); 118 119 #ifdef WLAN_RX_PKT_CAPTURE_ENH 120 /** 121 * dp_mon_filter_setup_rx_enh_capture() - Setup the Rx capture mode filters 122 * @pdev: DP pdev handle 123 */ 124 void dp_mon_filter_setup_rx_enh_capture_1_0(struct dp_pdev *pdev); 125 126 /** 127 * dp_mon_filter_reset_rx_enh_capture() - Reset the Rx capture mode filters 128 * @pdev: DP pdev handle 129 */ 130 void dp_mon_filter_reset_rx_enh_capture_1_0(struct dp_pdev *pdev); 131 #else 132 static inline void dp_mon_filter_setup_rx_enh_capture_1_0(struct dp_pdev *pdev) 133 { 134 } 135 136 static inline void dp_mon_filter_reset_rx_enh_capture_1_0(struct dp_pdev *pdev) 137 { 138 } 139 #endif 140 141 /** 142 * dp_mon_filter_setup_mon_mode() - Setup the Rx monitor mode filter 143 * @pdev: DP pdev handle 144 */ 145 void dp_mon_filter_setup_mon_mode_1_0(struct dp_pdev *pdev); 146 147 /** 148 * dp_mon_filter_reset_mon_mode() - Reset the Rx monitor mode filter 149 * @pdev: DP pdev handle 150 */ 151 void dp_mon_filter_reset_mon_mode_1_0(struct dp_pdev *pdev); 152 153 #ifdef WDI_EVENT_ENABLE 154 /** 155 * dp_mon_filter_setup_rx_pkt_log_full() - Setup the Rx pktlog full mode filter 156 * @pdev: DP pdev handle 157 */ 158 void dp_mon_filter_setup_rx_pkt_log_full_1_0(struct dp_pdev *pdev); 159 160 /** 161 * dp_mon_filter_reset_rx_pkt_log_full_1_0() - Reset the Rx pktlog full mode filter 162 * @pdev: DP pdev handle 163 */ 164 void dp_mon_filter_reset_rx_pkt_log_full_1_0(struct dp_pdev *pdev); 165 166 /** 167 * dp_mon_filter_setup_rx_pkt_log_lite() - Setup the Rx pktlog lite mode filter 168 * in the radio object. 169 * @pdev: DP pdev handle 170 */ 171 void dp_mon_filter_setup_rx_pkt_log_lite_1_0(struct dp_pdev *pdev); 172 173 /** 174 * dp_mon_filter_reset_rx_pkt_log_lite() - Reset the Rx pktlog lite mode filter 175 * @pdev: DP pdev handle 176 */ 177 void dp_mon_filter_reset_rx_pkt_log_lite_1_0(struct dp_pdev *pdev); 178 179 /** 180 * dp_mon_filter_setup_rx_pkt_log_cbf() - Setup the Rx pktlog cbf mode filter 181 * in the radio object. 182 * @pdev: DP pdev handle 183 */ 184 void dp_mon_filter_setup_rx_pkt_log_cbf_1_0(struct dp_pdev *pdev); 185 186 /** 187 * dp_mon_filter_reset_rx_pktlog_cbf() - Reset the Rx pktlog cbf mode filter 188 * @pdev: DP pdev handle 189 */ 190 void dp_mon_filter_reset_rx_pktlog_cbf_1_0(struct dp_pdev *pdev); 191 #else 192 static inline void dp_mon_filter_setup_rx_pkt_log_full_1_0(struct dp_pdev *pdev) 193 { 194 } 195 196 static inline void dp_mon_filter_reset_rx_pkt_log_full_1_0(struct dp_pdev *pdev) 197 { 198 } 199 200 static inline void dp_mon_filter_setup_rx_pkt_log_lite_1_0(struct dp_pdev *pdev) 201 { 202 } 203 204 static inline void dp_mon_filter_reset_rx_pkt_log_lite_1_0(struct dp_pdev *pdev) 205 { 206 } 207 208 static inline void dp_mon_filter_setup_rx_pkt_log_cbf_1_0(struct dp_pdev *pdev) 209 { 210 } 211 212 static inline void dp_mon_filter_reset_rx_pktlog_cbf_1_0(struct dp_pdev *pdev) 213 { 214 } 215 #endif 216 217 QDF_STATUS dp_mon_filter_update_1_0(struct dp_pdev *pdev); 218 219 #ifdef QCA_MAC_FILTER_FW_SUPPORT 220 /** 221 * dp_mon_mac_filter_set() - Setup rx monitor mac filter feature 222 * @msg_word: msg word 223 * @htt_tlv_filter: rx ring filter configuration 224 */ 225 void dp_mon_mac_filter_set(uint32_t *msg_word, 226 struct htt_rx_ring_tlv_filter *tlv_filter); 227 #else 228 static inline 229 void dp_mon_mac_filter_set(uint32_t *msg_word, 230 struct htt_rx_ring_tlv_filter *tlv_filter) 231 { 232 } 233 #endif 234 235 #endif /* _DP_MON_FILTER_1_0_H_ */ 236