1 /*
2  * Copyright (c) 2014-2017, 2019 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef __WLAN_HDD_HOST_OFFLOAD_H__
20 #define __WLAN_HDD_HOST_OFFLOAD_H__
21 
22 /**
23  * DOC: wlan_hdd_host_offload.h
24  *
25  * Android WLAN HDD Host Offload API
26  */
27 
28 /* Offload types. */
29 #define WLAN_IPV4_ARP_REPLY_OFFLOAD           0
30 #define WLAN_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD  1
31 
32 /* Enable or disable offload. */
33 #define WLAN_OFFLOAD_DISABLE                     0
34 #define WLAN_OFFLOAD_ENABLE                      0x1
35 #define WLAN_OFFLOAD_BC_FILTER_ENABLE            0x2
36 #define WLAN_OFFLOAD_ARP_AND_BC_FILTER_ENABLE    \
37 			(WLAN_OFFLOAD_ENABLE | WLAN_OFFLOAD_BC_FILTER_ENABLE)
38 
39 /* Offload request. */
40 struct host_offload_req {
41 	uint8_t offloadType;
42 	uint8_t enableOrDisable;
43 	union {
44 		uint8_t hostIpv4Addr[QDF_IPV4_ADDR_SIZE];
45 		uint8_t hostIpv6Addr[QDF_IPV6_ADDR_SIZE];
46 	} params;
47 	struct qdf_mac_addr bssId;
48 };
49 
50 #ifdef FEATURE_WLAN_DIAG_SUPPORT
51 void hdd_wlan_offload_event(uint8_t type, uint8_t state);
52 #else
53 static inline
hdd_wlan_offload_event(uint8_t type,uint8_t state)54 void hdd_wlan_offload_event(uint8_t type, uint8_t state)
55 {
56 }
57 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
58 
59 #endif /* __WLAN_HDD_HOST_OFFLOAD_H__ */
60