xref: /wlan-driver/qcacld-3.0/components/pmo/dispatcher/inc/wlan_pmo_hw_filter_public_struct.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022-2023 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 /**
21  * DOC: This file shall contain all public parameter (struct/macro/enum)
22  * definitions to support hardware filtering configuration. No APIs, or
23  * implementations of APIs, shall be contained within.
24  */
25 
26 #ifndef _WLAN_PMO_HW_FILTER_PUBLIC_STRUCT_H
27 #define _WLAN_PMO_HW_FILTER_PUBLIC_STRUCT_H
28 
29 /**
30  * enum pmo_hw_filter_mode - bitmap for enabled hardware filters
31  * @PMO_HW_FILTER_DISABLED: hardware filter is completely disabled
32  * @PMO_HW_FILTER_NON_ARP_BC: drop all broadcast frames, except ARP
33  * @PMO_HW_FILTER_NON_ICMPV6_MC: drop all multicast frames, except ICMPv6
34  *
35  * The hardware filter is only effective in DTIM mode. Use this configuration
36  * to blanket drop broadcast/multicast packets at the hardware level, without
37  * waking up the firmware.
38  */
39 enum pmo_hw_filter_mode {
40 	PMO_HW_FILTER_DISABLED		= 0,
41 	PMO_HW_FILTER_NON_ARP_BC	= (1 << 0),
42 	PMO_HW_FILTER_NON_ICMPV6_MC	= (1 << 1),
43 };
44 
45 /**
46  * struct pmo_hw_filter_params - hardware filter configuration parameters
47  * @vdev_id: Id of the virtual device to configure
48  * @enable: Enable/Disable the given hw filter modes
49  * @mode_bitmap: the hardware filter mode bitmap to configure
50  */
51 struct pmo_hw_filter_params {
52 	uint8_t vdev_id;
53 	bool enable;
54 	enum pmo_hw_filter_mode mode_bitmap;
55 };
56 
57 #endif /* _WLAN_PMO_HW_FILTER_PUBLIC_STRUCT_H */
58