1 /* 2 * Copyright (c) 2014-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 /** 20 * DOC: i_qdf_net_types 21 * This file provides OS dependent net types API's. 22 */ 23 24 #ifndef _I_QDF_NET_TYPES_H 25 #define _I_QDF_NET_TYPES_H 26 27 #include <qdf_types.h> /* uint8_t, etc. */ 28 #include <asm/checksum.h> 29 #include <net/ip6_checksum.h> 30 #include <net/tcp.h> 31 32 typedef struct in6_addr __in6_addr_t; 33 typedef __wsum __wsum_t; 34 35 static inline int32_t __qdf_csum_ipv6(const struct in6_addr *saddr, 36 const struct in6_addr *daddr, 37 __u32 len, unsigned short proto, 38 __wsum sum) 39 { 40 return csum_ipv6_magic((struct in6_addr *)saddr, 41 (struct in6_addr *)daddr, len, proto, sum); 42 } 43 44 #define __QDF_TCPHDR_FIN TCPHDR_FIN 45 #define __QDF_TCPHDR_SYN TCPHDR_SYN 46 #define __QDF_TCPHDR_RST TCPHDR_RST 47 #define __QDF_TCPHDR_PSH TCPHDR_PSH 48 #define __QDF_TCPHDR_ACK TCPHDR_ACK 49 #define __QDF_TCPHDR_URG TCPHDR_URG 50 #define __QDF_TCPHDR_ECE TCPHDR_ECE 51 #define __QDF_TCPHDR_CWR TCPHDR_CWR 52 #endif /* _I_QDF_NET_TYPES_H */ 53