Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Jeff Johnson | 557e16f | 2017-01-12 10:42:05 -0800 | [diff] [blame] | 2 | * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 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 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | #ifndef __WLAN_HDD_HOST_OFFLOAD_H__ |
| 20 | #define __WLAN_HDD_HOST_OFFLOAD_H__ |
| 21 | |
Jeff Johnson | 557e16f | 2017-01-12 10:42:05 -0800 | [diff] [blame] | 22 | /** |
| 23 | * DOC: wlan_hdd_host_offload.h |
| 24 | * |
| 25 | * Android WLAN HDD Host Offload API |
| 26 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 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 |
Srinivas Girigowda | 077143e | 2017-03-25 10:47:27 -0700 | [diff] [blame] | 36 | #define WLAN_OFFLOAD_ARP_AND_BC_FILTER_ENABLE \ |
| 37 | (WLAN_OFFLOAD_ENABLE | WLAN_OFFLOAD_BC_FILTER_ENABLE) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 38 | |
| 39 | /* Offload request. */ |
Srinivas Girigowda | 077143e | 2017-03-25 10:47:27 -0700 | [diff] [blame] | 40 | struct host_offload_req { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 41 | uint8_t offloadType; |
| 42 | uint8_t enableOrDisable; |
| 43 | union { |
Srinivas Girigowda | c79a710 | 2015-12-08 15:18:26 -0800 | [diff] [blame] | 44 | uint8_t hostIpv4Addr[SIR_IPV4_ADDR_LEN]; |
| 45 | uint8_t hostIpv6Addr[SIR_MAC_IPV6_ADDR_LEN]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 46 | } params; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 47 | struct qdf_mac_addr bssId; |
Srinivas Girigowda | 077143e | 2017-03-25 10:47:27 -0700 | [diff] [blame] | 48 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 49 | |
Abhishek Singh | 4aad0f7 | 2016-04-27 13:43:29 +0530 | [diff] [blame] | 50 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 51 | void hdd_wlan_offload_event(uint8_t type, uint8_t state); |
| 52 | #else |
| 53 | static inline |
| 54 | void hdd_wlan_offload_event(uint8_t type, uint8_t state) |
| 55 | { |
| 56 | } |
| 57 | #endif /* FEATURE_WLAN_DIAG_SUPPORT */ |
| 58 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 59 | #endif /* __WLAN_HDD_HOST_OFFLOAD_H__ */ |