Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: delete all duplicated endian crap from rtl8712 driver

This driver had headers like big_endian.h, little_endian.h, swab.h
and yet we can throw them all in the trash can and the thing
still builds on x86-64 and ppc, just by deleting the references
to the deleted files.

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

-539
-94
drivers/staging/rtl8712/big_endian.h
··· 1 - /****************************************************************************** 2 - * 3 - * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. 4 - * 5 - * This program is free software; you can redistribute it and/or modify it 6 - * under the terms of version 2 of the GNU General Public License as 7 - * published by the Free Software Foundation. 8 - * 9 - * This program is distributed in the hope that it will be useful, but WITHOUT 10 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 - * more details. 13 - * 14 - * You should have received a copy of the GNU General Public License along with 15 - * this program; if not, write to the Free Software Foundation, Inc., 16 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 17 - * 18 - * Modifications for inclusion into the Linux staging tree are 19 - * Copyright(c) 2010 Larry Finger. All rights reserved. 20 - * 21 - * Contact information: 22 - * WLAN FAE <wlanfae@realtek.com> 23 - * Larry Finger <Larry.Finger@lwfinger.net> 24 - * 25 - ******************************************************************************/ 26 - #ifndef _LINUX_BYTEORDER_BIG_ENDIAN_H 27 - #define _LINUX_BYTEORDER_BIG_ENDIAN_H 28 - 29 - #ifndef __BIG_ENDIAN 30 - #define __BIG_ENDIAN 4321 31 - #endif 32 - #ifndef __BIG_ENDIAN_BITFIELD 33 - #define __BIG_ENDIAN_BITFIELD 34 - #endif 35 - 36 - #include "swab.h" 37 - 38 - #define __constant_htonl(x) ((__u32)(x)) 39 - #define __constant_ntohl(x) ((__u32)(x)) 40 - #define __constant_htons(x) ((__u16)(x)) 41 - #define __constant_ntohs(x) ((__u16)(x)) 42 - #define __constant_cpu_to_le64(x) ___constant_swab64((x)) 43 - #define __constant_le64_to_cpu(x) ___constant_swab64((x)) 44 - #define __constant_cpu_to_le32(x) ___constant_swab32((x)) 45 - #define __constant_le32_to_cpu(x) ___constant_swab32((x)) 46 - #define __constant_cpu_to_le16(x) ___constant_swab16((x)) 47 - #define __constant_le16_to_cpu(x) ___constant_swab16((x)) 48 - #define __constant_cpu_to_be64(x) ((__u64)(x)) 49 - #define __constant_be64_to_cpu(x) ((__u64)(x)) 50 - #define __constant_cpu_to_be32(x) ((__u32)(x)) 51 - #define __constant_be32_to_cpu(x) ((__u32)(x)) 52 - #define __constant_cpu_to_be16(x) ((__u16)(x)) 53 - #define __constant_be16_to_cpu(x) ((__u16)(x)) 54 - #define __cpu_to_le64(x) __swab64((x)) 55 - #define __le64_to_cpu(x) __swab64((x)) 56 - #define __cpu_to_le32(x) __swab32((x)) 57 - #define __le32_to_cpu(x) __swab32((x)) 58 - #define __cpu_to_le16(x) __swab16((x)) 59 - #define __le16_to_cpu(x) __swab16((x)) 60 - #define __cpu_to_be64(x) ((__u64)(x)) 61 - #define __be64_to_cpu(x) ((__u64)(x)) 62 - #define __cpu_to_be32(x) ((__u32)(x)) 63 - #define __be32_to_cpu(x) ((__u32)(x)) 64 - #define __cpu_to_be16(x) ((__u16)(x)) 65 - #define __be16_to_cpu(x) ((__u16)(x)) 66 - #define __cpu_to_le64p(x) __swab64p((x)) 67 - #define __le64_to_cpup(x) __swab64p((x)) 68 - #define __cpu_to_le32p(x) __swab32p((x)) 69 - #define __le32_to_cpup(x) __swab32p((x)) 70 - #define __cpu_to_le16p(x) __swab16p((x)) 71 - #define __le16_to_cpup(x) __swab16p((x)) 72 - #define __cpu_to_be64p(x) (*(__u64 *)(x)) 73 - #define __be64_to_cpup(x) (*(__u64 *)(x)) 74 - #define __cpu_to_be32p(x) (*(__u32 *)(x)) 75 - #define __be32_to_cpup(x) (*(__u32 *)(x)) 76 - #define __cpu_to_be16p(x) (*(__u16 *)(x)) 77 - #define __be16_to_cpup(x) (*(__u16 *)(x)) 78 - #define __cpu_to_le64s(x) __swab64s((x)) 79 - #define __le64_to_cpus(x) __swab64s((x)) 80 - #define __cpu_to_le32s(x) __swab32s((x)) 81 - #define __le32_to_cpus(x) __swab32s((x)) 82 - #define __cpu_to_le16s(x) __swab16s((x)) 83 - #define __le16_to_cpus(x) __swab16s((x)) 84 - #define __cpu_to_be64s(x) do {} while (0) 85 - #define __be64_to_cpus(x) do {} while (0) 86 - #define __cpu_to_be32s(x) do {} while (0) 87 - #define __be32_to_cpus(x) do {} while (0) 88 - #define __cpu_to_be16s(x) do {} while (0) 89 - #define __be16_to_cpus(x) do {} while (0) 90 - 91 - #include "generic.h" 92 - 93 - #endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */ 94 -
-178
drivers/staging/rtl8712/generic.h
··· 1 - /****************************************************************************** 2 - * 3 - * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. 4 - * 5 - * This program is free software; you can redistribute it and/or modify it 6 - * under the terms of version 2 of the GNU General Public License as 7 - * published by the Free Software Foundation. 8 - * 9 - * This program is distributed in the hope that it will be useful, but WITHOUT 10 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 - * more details. 13 - * 14 - * You should have received a copy of the GNU General Public License along with 15 - * this program; if not, write to the Free Software Foundation, Inc., 16 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 17 - * 18 - * Modifications for inclusion into the Linux staging tree are 19 - * Copyright(c) 2010 Larry Finger. All rights reserved. 20 - * 21 - * Contact information: 22 - * WLAN FAE <wlanfae@realtek.com> 23 - * Larry Finger <Larry.Finger@lwfinger.net> 24 - * 25 - ******************************************************************************/ 26 - #ifndef _LINUX_BYTEORDER_GENERIC_H 27 - #define _LINUX_BYTEORDER_GENERIC_H 28 - 29 - /* 30 - * linux/byteorder_generic.h 31 - * Generic Byte-reordering support 32 - * 33 - * Francois-Rene Rideau <fare@tunes.org> 19970707 34 - * gathered all the good ideas from all asm-foo/byteorder.h into one file, 35 - * cleaned them up. 36 - * I hope it is compliant with non-GCC compilers. 37 - * I decided to put __BYTEORDER_HAS_U64__ in byteorder.h, 38 - * because I wasn't sure it would be ok to put it in types.h 39 - * Upgraded it to 2.1.43 40 - * Francois-Rene Rideau <fare@tunes.org> 19971012 41 - * Upgraded it to 2.1.57 42 - * to please Linus T., replaced huge #ifdef's between little/big endian 43 - * by nestedly #include'd files. 44 - * Francois-Rene Rideau <fare@tunes.org> 19971205 45 - * Made it to 2.1.71; now a facelift: 46 - * Put files under include/linux/byteorder/ 47 - * Split swab from generic support. 48 - * 49 - * TODO: 50 - * = Regular kernel maintainers could also replace all these manual 51 - * byteswap macros that remain, disseminated among drivers, 52 - * after some grep or the sources... 53 - * = Linus might want to rename all these macros and files to fit his taste, 54 - * to fit his personal naming scheme. 55 - * = it seems that a few drivers would also appreciate 56 - * nybble swapping support... 57 - * = every architecture could add their byteswap macro in asm/byteorder.h 58 - * see how some architectures already do (i386, alpha, ppc, etc) 59 - * = cpu_to_beXX and beXX_to_cpu might some day need to be well 60 - * distinguished throughout the kernel. This is not the case currently, 61 - * since little endian, big endian, and pdp endian machines needn't it. 62 - * But this might be the case for, say, a port of Linux to 20/21 bit 63 - * architectures (and F21 Linux addict around?). 64 - */ 65 - 66 - /* 67 - * The following macros are to be defined by <asm/byteorder.h>: 68 - * 69 - * Conversion of long and short int between network and host format 70 - * ntohl(__u32 x) 71 - * ntohs(__u16 x) 72 - * htonl(__u32 x) 73 - * htons(__u16 x) 74 - * It seems that some programs (which? where? or perhaps a standard? POSIX?) 75 - * might like the above to be functions, not macros (why?). 76 - * if that's true, then detect them, and take measures. 77 - * Anyway, the measure is: define only ___ntohl as a macro instead, 78 - * and in a separate file, have 79 - * unsigned long inline ntohl(x){return ___ntohl(x);} 80 - * 81 - * The same for constant arguments 82 - * __constant_ntohl(__u32 x) 83 - * __constant_ntohs(__u16 x) 84 - * __constant_htonl(__u32 x) 85 - * __constant_htons(__u16 x) 86 - * 87 - * Conversion of XX-bit integers (16- 32- or 64-) 88 - * between native CPU format and little/big endian format 89 - * 64-bit stuff only defined for proper architectures 90 - * cpu_to_[bl]eXX(__uXX x) 91 - * [bl]eXX_to_cpu(__uXX x) 92 - * 93 - * The same, but takes a pointer to the value to convert 94 - * cpu_to_[bl]eXXp(__uXX x) 95 - * [bl]eXX_to_cpup(__uXX x) 96 - * 97 - * The same, but change in situ 98 - * cpu_to_[bl]eXXs(__uXX x) 99 - * [bl]eXX_to_cpus(__uXX x) 100 - * 101 - * See asm-foo/byteorder.h for examples of how to provide 102 - * architecture-optimized versions 103 - * 104 - */ 105 - 106 - 107 - /* 108 - * inside the kernel, we can use nicknames; 109 - * outside of it, we must avoid POSIX namespace pollution... 110 - */ 111 - #define cpu_to_le64 __cpu_to_le64 112 - #define le64_to_cpu __le64_to_cpu 113 - #define cpu_to_le32 __cpu_to_le32 114 - #define le32_to_cpu __le32_to_cpu 115 - #define cpu_to_le16 __cpu_to_le16 116 - #define le16_to_cpu __le16_to_cpu 117 - #define cpu_to_be64 __cpu_to_be64 118 - #define be64_to_cpu __be64_to_cpu 119 - #define cpu_to_be32 __cpu_to_be32 120 - #define be32_to_cpu __be32_to_cpu 121 - #define cpu_to_be16 __cpu_to_be16 122 - #define be16_to_cpu __be16_to_cpu 123 - #define cpu_to_le64p __cpu_to_le64p 124 - #define le64_to_cpup __le64_to_cpup 125 - #define cpu_to_le32p __cpu_to_le32p 126 - #define le32_to_cpup __le32_to_cpup 127 - #define cpu_to_le16p __cpu_to_le16p 128 - #define le16_to_cpup __le16_to_cpup 129 - #define cpu_to_be64p __cpu_to_be64p 130 - #define be64_to_cpup __be64_to_cpup 131 - #define cpu_to_be32p __cpu_to_be32p 132 - #define be32_to_cpup __be32_to_cpup 133 - #define cpu_to_be16p __cpu_to_be16p 134 - #define be16_to_cpup __be16_to_cpup 135 - #define cpu_to_le64s __cpu_to_le64s 136 - #define le64_to_cpus __le64_to_cpus 137 - #define cpu_to_le32s __cpu_to_le32s 138 - #define le32_to_cpus __le32_to_cpus 139 - #define cpu_to_le16s __cpu_to_le16s 140 - #define le16_to_cpus __le16_to_cpus 141 - #define cpu_to_be64s __cpu_to_be64s 142 - #define be64_to_cpus __be64_to_cpus 143 - #define cpu_to_be32s __cpu_to_be32s 144 - #define be32_to_cpus __be32_to_cpus 145 - #define cpu_to_be16s __cpu_to_be16s 146 - #define be16_to_cpus __be16_to_cpus 147 - 148 - 149 - /* 150 - * Handle ntohl and suches. These have various compatibility 151 - * issues - like we want to give the prototype even though we 152 - * also have a macro for them in case some strange program 153 - * wants to take the address of the thing or something.. 154 - * 155 - * Note that these used to return a "long" in libc5, even though 156 - * long is often 64-bit these days.. Thus the casts. 157 - * 158 - * They have to be macros in order to do the constant folding 159 - * correctly - if the argument passed into a inline function 160 - * it is no longer constant according to gcc.. 161 - */ 162 - 163 - #undef ntohl 164 - #undef ntohs 165 - #undef htonl 166 - #undef htons 167 - 168 - /* 169 - * Do the prototypes. Somebody might want to take the 170 - * address or some such sick thing.. 171 - */ 172 - extern __u32 ntohl(__u32); 173 - extern __u32 htonl(__u32); 174 - extern unsigned short int ntohs(unsigned short int); 175 - extern unsigned short int htons(unsigned short int); 176 - 177 - #endif /* _LINUX_BYTEORDER_GENERIC_H */ 178 -
-1
drivers/staging/rtl8712/hal_init.c
··· 36 36 37 37 #include "osdep_service.h" 38 38 #include "drv_types.h" 39 - #include "rtl871x_byteorder.h" 40 39 #include "usb_osintf.h" 41 40 42 41 #define FWBUFF_ALIGN_SZ 512
-94
drivers/staging/rtl8712/little_endian.h
··· 1 - /****************************************************************************** 2 - * 3 - * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. 4 - * 5 - * This program is free software; you can redistribute it and/or modify it 6 - * under the terms of version 2 of the GNU General Public License as 7 - * published by the Free Software Foundation. 8 - * 9 - * This program is distributed in the hope that it will be useful, but WITHOUT 10 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 - * more details. 13 - * 14 - * You should have received a copy of the GNU General Public License along with 15 - * this program; if not, write to the Free Software Foundation, Inc., 16 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 17 - * 18 - * Modifications for inclusion into the Linux staging tree are 19 - * Copyright(c) 2010 Larry Finger. All rights reserved. 20 - * 21 - * Contact information: 22 - * WLAN FAE <wlanfae@realtek.com> 23 - * Larry Finger <Larry.Finger@lwfinger.net> 24 - * 25 - ******************************************************************************/ 26 - #ifndef _LINUX_BYTEORDER_LITTLE_ENDIAN_H 27 - #define _LINUX_BYTEORDER_LITTLE_ENDIAN_H 28 - 29 - #ifndef __LITTLE_ENDIAN 30 - #define __LITTLE_ENDIAN 1234 31 - #endif 32 - #ifndef __LITTLE_ENDIAN_BITFIELD 33 - #define __LITTLE_ENDIAN_BITFIELD 34 - #endif 35 - 36 - #include "swab.h" 37 - 38 - #define __constant_htonl(x) ___constant_swab32((x)) 39 - #define __constant_ntohl(x) ___constant_swab32((x)) 40 - #define __constant_htons(x) ___constant_swab16((x)) 41 - #define __constant_ntohs(x) ___constant_swab16((x)) 42 - #define __constant_cpu_to_le64(x) ((__u64)(x)) 43 - #define __constant_le64_to_cpu(x) ((__u64)(x)) 44 - #define __constant_cpu_to_le32(x) ((__u32)(x)) 45 - #define __constant_le32_to_cpu(x) ((__u32)(x)) 46 - #define __constant_cpu_to_le16(x) ((__u16)(x)) 47 - #define __constant_le16_to_cpu(x) ((__u16)(x)) 48 - #define __constant_cpu_to_be64(x) ___constant_swab64((x)) 49 - #define __constant_be64_to_cpu(x) ___constant_swab64((x)) 50 - #define __constant_cpu_to_be32(x) ___constant_swab32((x)) 51 - #define __constant_be32_to_cpu(x) ___constant_swab32((x)) 52 - #define __constant_cpu_to_be16(x) ___constant_swab16((x)) 53 - #define __constant_be16_to_cpu(x) ___constant_swab16((x)) 54 - #define __cpu_to_le64(x) ((__u64)(x)) 55 - #define __le64_to_cpu(x) ((__u64)(x)) 56 - #define __cpu_to_le32(x) ((__u32)(x)) 57 - #define __le32_to_cpu(x) ((__u32)(x)) 58 - #define __cpu_to_le16(x) ((__u16)(x)) 59 - #define __le16_to_cpu(x) ((__u16)(x)) 60 - #define __cpu_to_be64(x) __swab64((x)) 61 - #define __be64_to_cpu(x) __swab64((x)) 62 - #define __cpu_to_be32(x) __swab32((x)) 63 - #define __be32_to_cpu(x) __swab32((x)) 64 - #define __cpu_to_be16(x) __swab16((x)) 65 - #define __be16_to_cpu(x) __swab16((x)) 66 - #define __cpu_to_le64p(x) (*(__u64 *)(x)) 67 - #define __le64_to_cpup(x) (*(__u64 *)(x)) 68 - #define __cpu_to_le32p(x) (*(__u32 *)(x)) 69 - #define __le32_to_cpup(x) (*(__u32 *)(x)) 70 - #define __cpu_to_le16p(x) (*(__u16 *)(x)) 71 - #define __le16_to_cpup(x) (*(__u16 *)(x)) 72 - #define __cpu_to_be64p(x) __swab64p((x)) 73 - #define __be64_to_cpup(x) __swab64p((x)) 74 - #define __cpu_to_be32p(x) __swab32p((x)) 75 - #define __be32_to_cpup(x) __swab32p((x)) 76 - #define __cpu_to_be16p(x) __swab16p((x)) 77 - #define __be16_to_cpup(x) __swab16p((x)) 78 - #define __cpu_to_le64s(x) do {} while (0) 79 - #define __le64_to_cpus(x) do {} while (0) 80 - #define __cpu_to_le32s(x) do {} while (0) 81 - #define __le32_to_cpus(x) do {} while (0) 82 - #define __cpu_to_le16s(x) do {} while (0) 83 - #define __le16_to_cpus(x) do {} while (0) 84 - #define __cpu_to_be64s(x) __swab64s((x)) 85 - #define __be64_to_cpus(x) __swab64s((x)) 86 - #define __cpu_to_be32s(x) __swab32s((x)) 87 - #define __be32_to_cpus(x) __swab32s((x)) 88 - #define __cpu_to_be16s(x) __swab16s((x)) 89 - #define __be16_to_cpus(x) __swab16s((x)) 90 - 91 - #include "generic.h" 92 - 93 - #endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */ 94 -
-2
drivers/staging/rtl8712/osdep_service.h
··· 106 106 schedule_work(pwork); 107 107 } 108 108 109 - #include "rtl871x_byteorder.h" 110 - 111 109 #ifndef BIT 112 110 #define BIT(x) (1 << (x)) 113 111 #endif
-1
drivers/staging/rtl8712/rtl8712_cmd.c
··· 50 50 #include "drv_types.h" 51 51 #include "recv_osdep.h" 52 52 #include "mlme_osdep.h" 53 - #include "rtl871x_byteorder.h" 54 53 #include "rtl871x_ioctl_set.h" 55 54 56 55 static void check_hw_pbc(struct _adapter *padapter)
-1
drivers/staging/rtl8712/rtl8712_xmit.c
··· 30 30 31 31 #include "osdep_service.h" 32 32 #include "drv_types.h" 33 - #include "rtl871x_byteorder.h" 34 33 #include "wifi.h" 35 34 #include "osdep_intf.h" 36 35 #include "usb_ops.h"
-32
drivers/staging/rtl8712/rtl871x_byteorder.h
··· 1 - /****************************************************************************** 2 - * 3 - * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. 4 - * 5 - * This program is free software; you can redistribute it and/or modify it 6 - * under the terms of version 2 of the GNU General Public License as 7 - * published by the Free Software Foundation. 8 - * 9 - * This program is distributed in the hope that it will be useful, but WITHOUT 10 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 - * more details. 13 - * 14 - * You should have received a copy of the GNU General Public License along with 15 - * this program; if not, write to the Free Software Foundation, Inc., 16 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 17 - * 18 - * 19 - ******************************************************************************/ 20 - #ifndef _RTL871X_BYTEORDER_H_ 21 - #define _RTL871X_BYTEORDER_H_ 22 - 23 - #if defined(__LITTLE_ENDIAN) 24 - # include "little_endian.h" 25 - #elif defined(__BIG_ENDIAN) 26 - # include "big_endian.h" 27 - #else 28 - # error "Must be LITTLE/BIG Endian Host" 29 - #endif 30 - 31 - #endif /* _RTL871X_BYTEORDER_H_ */ 32 -
-1
drivers/staging/rtl8712/rtl871x_cmd.c
··· 50 50 #include "drv_types.h" 51 51 #include "recv_osdep.h" 52 52 #include "mlme_osdep.h" 53 - #include "rtl871x_byteorder.h" 54 53 55 54 /* 56 55 Caller and the r8712_cmd_thread can protect cmd_q by spin_lock.
-1
drivers/staging/rtl8712/rtl871x_xmit.c
··· 30 30 31 31 #include "osdep_service.h" 32 32 #include "drv_types.h" 33 - #include "rtl871x_byteorder.h" 34 33 #include "wifi.h" 35 34 #include "osdep_intf.h" 36 35 #include "usb_ops.h"
-131
drivers/staging/rtl8712/swab.h
··· 1 - /****************************************************************************** 2 - * 3 - * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. 4 - * 5 - * This program is free software; you can redistribute it and/or modify it 6 - * under the terms of version 2 of the GNU General Public License as 7 - * published by the Free Software Foundation. 8 - * 9 - * This program is distributed in the hope that it will be useful, but WITHOUT 10 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 - * more details. 13 - * 14 - * You should have received a copy of the GNU General Public License along with 15 - * this program; if not, write to the Free Software Foundation, Inc., 16 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 17 - * 18 - * Modifications for inclusion into the Linux staging tree are 19 - * Copyright(c) 2010 Larry Finger. All rights reserved. 20 - * 21 - * Contact information: 22 - * WLAN FAE <wlanfae@realtek.com> 23 - * Larry Finger <Larry.Finger@lwfinger.net> 24 - * 25 - ******************************************************************************/ 26 - #ifndef _LINUX_BYTEORDER_SWAB_H 27 - #define _LINUX_BYTEORDER_SWAB_H 28 - 29 - #ifndef __u16 30 - #define __u16 unsigned short 31 - #endif 32 - 33 - #ifndef __u32 34 - #define __u32 unsigned int 35 - #endif 36 - 37 - #ifndef __u8 38 - #define __u8 unsigned char 39 - #endif 40 - 41 - #ifndef __u64 42 - #define __u64 unsigned long long 43 - #endif 44 - 45 - 46 - static inline __u16 ___swab16(__u16 x) 47 - { 48 - __u16 __x = x; 49 - return (__u16)( 50 - (((__u16)(__x) & (__u16)0x00ffU) << 8) | 51 - (((__u16)(__x) & (__u16)0xff00U) >> 8)); 52 - 53 - } 54 - 55 - static inline __u32 ___swab32(__u32 x) 56 - { 57 - __u32 __x = (x); 58 - return (__u32)( 59 - (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | 60 - (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | 61 - (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | 62 - (((__u32)(__x) & (__u32)0xff000000UL) >> 24)); 63 - } 64 - 65 - static inline __u64 ___swab64(__u64 x) 66 - { 67 - __u64 __x = (x); 68 - 69 - return (__u64)( \ 70 - (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | \ 71 - (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | \ 72 - (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | \ 73 - (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | \ 74 - (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | \ 75 - (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ 76 - (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | \ 77 - (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56)); 78 - } 79 - 80 - #ifndef __arch__swab16 81 - static inline __u16 __arch__swab16(__u16 x) 82 - { 83 - return ___swab16(x); 84 - } 85 - 86 - #endif 87 - 88 - #ifndef __arch__swab32 89 - static inline __u32 __arch__swab32(__u32 x) 90 - { 91 - __u32 __tmp = (x) ; 92 - return ___swab32(__tmp); 93 - } 94 - #endif 95 - 96 - #ifndef __arch__swab64 97 - 98 - static inline __u64 __arch__swab64(__u64 x) 99 - { 100 - __u64 __tmp = (x) ; 101 - return ___swab64(__tmp); 102 - } 103 - 104 - 105 - #endif 106 - 107 - #define __swab16(x) __fswab16(x) 108 - #define __swab32(x) __fswab32(x) 109 - #define __swab64(x) __fswab64(x) 110 - 111 - static inline const __u16 __fswab16(__u16 x) 112 - { 113 - return __arch__swab16(x); 114 - } 115 - static inline const __u32 __fswab32(__u32 x) 116 - { 117 - return __arch__swab32(x); 118 - } 119 - 120 - #define swab16 __swab16 121 - #define swab32 __swab32 122 - #define swab64 __swab64 123 - #define swab16p __swab16p 124 - #define swab32p __swab32p 125 - #define swab64p __swab64p 126 - #define swab16s __swab16s 127 - #define swab32s __swab32s 128 - #define swab64s __swab64s 129 - 130 - #endif /* _LINUX_BYTEORDER_SWAB_H */ 131 -
-1
drivers/staging/rtl8712/usb_ops.c
··· 33 33 #include "osdep_intf.h" 34 34 #include "usb_ops.h" 35 35 #include "recv_osdep.h" 36 - #include "rtl871x_byteorder.h" 37 36 38 37 static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) 39 38 {
-1
drivers/staging/rtl8712/wifi.h
··· 26 26 #ifndef _WIFI_H_ 27 27 #define _WIFI_H_ 28 28 29 - #include "rtl871x_byteorder.h" 30 29 #include <linux/compiler.h> 31 30 32 31 #ifdef BIT
-1
drivers/staging/rtl8712/xmit_linux.c
··· 35 35 #include "osdep_service.h" 36 36 #include "drv_types.h" 37 37 38 - #include "rtl871x_byteorder.h" 39 38 #include "wifi.h" 40 39 #include "mlme_osdep.h" 41 40 #include "xmit_osdep.h"