summaryrefslogtreecommitdiffstats
path: root/drivers/staging/csr/csr_types.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2012-06-20 01:15:42 +0200
committerGreg Kroah-Hartman2012-06-20 01:37:01 +0200
commit635d2b00e5070378e7bf812acf47fb135c6ab928 (patch)
tree7048a0a511f3d221aa2dfe40aa3a401991f1b175 /drivers/staging/csr/csr_types.h
parentStaging: add CSR Wifi "os helper" module (diff)
downloadkernel-qcow2-linux-635d2b00e5070378e7bf812acf47fb135c6ab928.tar.gz
kernel-qcow2-linux-635d2b00e5070378e7bf812acf47fb135c6ab928.tar.xz
kernel-qcow2-linux-635d2b00e5070378e7bf812acf47fb135c6ab928.zip
Staging: add CSR wifi module
This consists of two modules, the driver, and a "helper" module that is just a wrapper around common kernel functions. The wrapper module will be removed soon, but for now it's needed. These files were based on the csr-linux-wifi-5.0.3-oss.tar.gz package provided by CSR and Blue Giga, and is covered under the license specified in the LICENSE.txt file (basically dual BSD and GPLv2). The files were flattened out of the deep directory mess they were originally in, and a few EXPORT_SYMBOL_GPL() were added in order for everything to link properly with the helper module setup. Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/csr/csr_types.h')
-rw-r--r--drivers/staging/csr/csr_types.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/drivers/staging/csr/csr_types.h b/drivers/staging/csr/csr_types.h
new file mode 100644
index 000000000000..d7d2c5d061fe
--- /dev/null
+++ b/drivers/staging/csr/csr_types.h
@@ -0,0 +1,93 @@
+#ifndef CSR_TYPES_H__
+#define CSR_TYPES_H__
+/*****************************************************************************
+
+ (c) Cambridge Silicon Radio Limited 2010
+ All rights reserved and confidential information of CSR
+
+ Refer to LICENSE.txt included with this source for details
+ on the license terms.
+
+*****************************************************************************/
+
+#ifdef __KERNEL__
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <asm/byteorder.h>
+#include <linux/string.h>
+#else
+#include <stdint.h>
+#include <stddef.h>
+#include <sys/types.h>
+#include <stdarg.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#undef FALSE
+#define FALSE (0)
+
+#undef TRUE
+#define TRUE (1)
+
+/* Basic types */
+typedef size_t CsrSize; /* Return type of sizeof (ISO/IEC 9899:1990 7.1.6) */
+typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointers (ISO/IEC 9899:1990 7.1.6) */
+typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
+#ifdef __KERNEL__
+typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
+#else
+typedef intptr_t CsrIntptr; /* Signed integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
+#endif
+
+/* Unsigned fixed width types */
+typedef uint8_t CsrUint8;
+typedef uint16_t CsrUint16;
+typedef uint32_t CsrUint32;
+
+/* Signed fixed width types */
+typedef int8_t CsrInt8;
+typedef int16_t CsrInt16;
+typedef int32_t CsrInt32;
+
+/* Boolean */
+typedef CsrUint8 CsrBool;
+
+/* String types */
+typedef char CsrCharString;
+typedef CsrUint8 CsrUtf8String;
+typedef CsrUint16 CsrUtf16String; /* 16-bit UTF16 strings */
+typedef CsrUint32 CsrUint24;
+
+/*
+ * 64-bit integers
+ *
+ * Note: If a given compiler does not support 64-bit types, it is
+ * OK to omit these definitions; 32-bit versions of the code using
+ * these types may be available. Consult the relevant documentation
+ * or the customer support group for information on this.
+ */
+#define CSR_HAVE_64_BIT_INTEGERS
+typedef uint64_t CsrUint64;
+typedef int64_t CsrInt64;
+
+/*
+ * Floating point
+ *
+ * Note: If a given compiler does not support floating point, it is
+ * OK to omit these definitions; alternative versions of the code using
+ * these types may be available. Consult the relevant documentation
+ * or the customer support group for information on this.
+ */
+#define CSR_HAVE_FLOATING_POINT
+typedef float CsrFloat;
+typedef double CsrDouble;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif