diff options
author | David S. Miller <davem@davemloft.net> | 2013-08-04 04:36:46 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-04 04:36:46 (GMT) |
commit | 0e76a3a587fc7abda2badf249053b427baad255e (patch) | |
tree | 646a1da67dc25654552028225ca4b7a0a8043cc9 /drivers/staging/csr/unifi_os.h | |
parent | fba3679d34511c42bf452e89dda457a1219eb43a (diff) | |
parent | 72a67a94bcba71a5fddd6b3596a20604d2b5dcd6 (diff) | |
download | linux-fsl-qoriq-0e76a3a587fc7abda2badf249053b427baad255e.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge net into net-next to setup some infrastructure Eric
Dumazet needs for usbnet changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/staging/csr/unifi_os.h')
-rw-r--r-- | drivers/staging/csr/unifi_os.h | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/drivers/staging/csr/unifi_os.h b/drivers/staging/csr/unifi_os.h deleted file mode 100644 index 56a2698..0000000 --- a/drivers/staging/csr/unifi_os.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * --------------------------------------------------------------------------- - * - * FILE: os_linux/unifi_os.h - * - * PURPOSE: - * This header file provides the OS-dependent facilities for a linux - * environment. - * - * Copyright (C) 2005-2008 by Cambridge Silicon Radio Ltd. - * - * Refer to LICENSE.txt included with this source code for details on - * the license terms. - * - * --------------------------------------------------------------------------- - */ -#ifndef __UNIFI_OS_LINUX_H__ -#define __UNIFI_OS_LINUX_H__ 1 - -#include <linux/kernel.h> -#include <linux/time.h> -#include <linux/list.h> -#include <linux/delay.h> -#include <linux/string.h> - -/* - * Needed for core/signals.c - */ -#include <stddef.h> - - -/* Define INLINE directive*/ -#define INLINE inline - -/* Malloc and free */ -CsrResult unifi_net_data_malloc(void *ospriv, bulk_data_desc_t *bulk_data_slot, unsigned int size); -void unifi_net_data_free(void *ospriv, bulk_data_desc_t *bulk_data_slot); -#define CSR_WIFI_ALIGN_BYTES 4 -CsrResult unifi_net_dma_align(void *ospriv, bulk_data_desc_t *bulk_data_slot); - -/* - * Byte Order - * Note that __le*_to_cpu and __cpu_to_le* return an unsigned value! - */ -#ifdef __KERNEL__ -#define unifi2host_16(n) (__le16_to_cpu((n))) -#define unifi2host_32(n) (__le32_to_cpu((n))) -#define host2unifi_16(n) (__cpu_to_le16((n))) -#define host2unifi_32(n) (__cpu_to_le32((n))) -#endif - -/* Module parameters */ -extern int unifi_debug; - -/* debugging */ -#ifdef UNIFI_DEBUG -/* - * unifi_debug is a verbosity level for debug messages - * UDBG0 msgs are always printed if UNIFI_DEBUG is defined - * UDBG1 msgs are printed if UNIFI_DEBUG is defined and unifi_debug > 0 - * etc. - */ - -#define ASSERT(cond) \ - do { \ - if (!(cond)) { \ - printk("Assertion failed in %s at %s:%d: %s\n", \ - __FUNCTION__, __FILE__, __LINE__, #cond); \ - } \ - } while (0) - - -void unifi_dump(void *ospriv, int lvl, const char *msg, void *mem, u16 len); -void dump(void *mem, u16 len); -void dump16(void *mem, u16 len); -#ifdef CSR_WIFI_HIP_DEBUG_OFFLINE -void dump_str(void *mem, u16 len); -#endif /* CSR_WIFI_HIP_DEBUG_OFFLINE */ - -void unifi_error(void* ospriv, const char *fmt, ...); -void unifi_warning(void* ospriv, const char *fmt, ...); -void unifi_notice(void* ospriv, const char *fmt, ...); -void unifi_info(void* ospriv, const char *fmt, ...); - -void unifi_trace(void* ospriv, int level, const char *fmt, ...); - -#else - -/* Stubs */ - -#define ASSERT(cond) - -static inline void unifi_dump(void *ospriv, int lvl, const char *msg, void *mem, u16 len) {} -static inline void dump(void *mem, u16 len) {} -static inline void dump16(void *mem, u16 len) {} -#ifdef CSR_WIFI_HIP_DEBUG_OFFLINE -static inline void dump_str(void *mem, u16 len) {} -#endif /* CSR_WIFI_HIP_DEBUG_OFFLINE */ - -void unifi_error_nop(void* ospriv, const char *fmt, ...); -void unifi_trace_nop(void* ospriv, int level, const char *fmt, ...); -#define unifi_error if(1);else unifi_error_nop -#define unifi_warning if(1);else unifi_error_nop -#define unifi_notice if(1);else unifi_error_nop -#define unifi_info if(1);else unifi_error_nop -#define unifi_trace if(1);else unifi_trace_nop - -#endif /* UNIFI_DEBUG */ - - -/* Different levels of diagnostic detail... */ -#define UDBG0 0 /* always prints in debug build */ -#define UDBG1 1 -#define UDBG2 2 -#define UDBG3 3 -#define UDBG4 4 -#define UDBG5 5 -#define UDBG6 6 -#define UDBG7 7 - - -#endif /* __UNIFI_OS_LINUX_H__ */ |