1 /*
2 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
3 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for
6 * any purpose with or without fee is hereby granted, provided that the
7 * above copyright notice and this permission notice appear in all
8 * copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
18 */
19
20 #ifndef __WLAN_HDD_RX_MONITOR_H
21 #define __WLAN_HDD_RX_MONITOR_H
22
23 struct ol_txrx_ops;
24
25 #ifdef FEATURE_MONITOR_MODE_SUPPORT
26 int hdd_enable_monitor_mode(struct net_device *dev);
27
28 /**
29 * hdd_disable_monitor_mode() - Disable monitor mode
30 *
31 * This function invokes cdp interface API to disable
32 * monitor mode configuration on the hardware. In this
33 * case sends HTT messages to FW to reset hardware rings
34 *
35 * Return: 0 for success; non-zero for failure
36 */
37 int hdd_disable_monitor_mode(void);
38 #else
hdd_enable_monitor_mode(struct net_device * dev)39 static inline int hdd_enable_monitor_mode(struct net_device *dev)
40 {
41 return 0;
42 }
43
hdd_disable_monitor_mode(void)44 static inline int hdd_disable_monitor_mode(void)
45 {
46 return 0;
47 }
48
49 #endif /* FEATURE_MONITOR_MODE_SUPPORT */
50
51 #endif /* __WLAN_HDD_RX_MONITOR_H */
52
53