blob: 8d94bcfa3f581c404655e5458ef436e079366160 [file] [log] [blame]
Mukul Sharmad75a6672017-06-22 15:40:53 +05301/*
Jeff Johnsonb4c29962017-10-07 19:35:14 -07002 * Copyright (c) 2017 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 * DOC: Declare various struct, macros which shall be used in
20 * pmo ns offload feature.
21 *
22 * Note: This file shall not contain public API's prototype/declarations.
23 *
24 */
Mukul Sharmad75a6672017-06-22 15:40:53 +053025
26#ifndef _WLAN_PMO_NS_PUBLIC_STRUCT_H_
27#define _WLAN_PMO_NS_PUBLIC_STRUCT_H_
28
29#include "wlan_pmo_common_public_struct.h"
30
31/**
32 * struct pmo_ns_offload_params - pmo ns offload parameters
33 * @enable: true when ns offload enable
34 * @num_ns_offload_count: total ns entries
35 * @src_ipv6_addr: in request source ipv 6 address
36 * @self_ipv6_addr: self ipv6 address
37 * @target_ipv6_addr: target ipv6 address
38 * @self_macaddr: self mac address
39 * @src_ipv6_addr_valid: true if source ipv6 address is valid else false
40 * @target_ipv6_addr_valid: target ipv6 address are valid or not
41 * @target_ipv6_addr_ac_type: target ipv6 address type (unicast or anycast)
42 * @slot_idx: slot index
43 */
44struct pmo_ns_offload_params {
45 uint8_t enable;
46 uint32_t num_ns_offload_count;
47 uint8_t src_ipv6_addr[PMO_MAC_IPV6_ADDR_LEN];
48 uint8_t self_ipv6_addr[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]
49 [PMO_MAC_IPV6_ADDR_LEN];
50 uint8_t target_ipv6_addr[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]
51 [PMO_MAC_IPV6_ADDR_LEN];
52 struct qdf_mac_addr self_macaddr;
53 uint8_t src_ipv6_addr_valid;
54 uint8_t target_ipv6_addr_valid[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
55 uint8_t target_ipv6_addr_ac_type[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
56 uint8_t slot_idx;
57 struct qdf_mac_addr bssid;
58};
59
60/**
61 * struct pmo_ns_req - pmo ns request
62 * @psoc: objmgr psoc
63 * @vdev_id: vdev id on which arp offload needed
64 * @trigger: context from where arp offload triggered
65 * @count: ns entries count
66 * @ipv6_addr: ipv6 address array
67 * @ipv6_addr_type: ipv6 address type (unicast/anycast) array
68 */
69struct pmo_ns_req {
70 struct wlan_objmgr_psoc *psoc;
71 uint8_t vdev_id;
72 enum pmo_offload_trigger trigger;
73 uint32_t count;
74 uint8_t ipv6_addr[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]
75 [PMO_MAC_IPV6_ADDR_LEN];
76 uint8_t ipv6_addr_type[PMO_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
77};
78#endif /* end of _WLAN_PMO_NS_PUBLIC_STRUCT_H_ */