rt_config.h

来自「AMLOGIC DPF source code」· C头文件 代码 · 共 299 行

H
299
字号
/***************************************************************************  * RT2x00 SourceForge Project - http://rt2x00.sourceforge.net              *  *                                                                         *  *   This program is free software; you can redistribute it and/or modify  *  *   it under the terms of the GNU General Public License as published by  *  *   the Free Software Foundation; either version 2 of the License, or     *  *   (at your option) any later version.                                   *  *                                                                         *  *   This program is distributed in the hope that it will be useful,       *  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *  *   GNU General Public License for more details.                          *  *                                                                         *  *   You should have received a copy of the GNU General Public License     *  *   along with this program; if not, write to the                         *  *   Free Software Foundation, Inc.,                                       *  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *  *                                                                         *  *   Licensed under the GNU GPL                                            *  *   Original code supplied under license from RaLink Inc, 2004.           *  ***************************************************************************//***************************************************************************  *	Module Name:	rt_config.h * *	Abstract: * *	Revision History: *	Who		When		What *	--------	----------	------------------------------- *	Name		Date		Modification logs *	Jan Lee		2005-06-01	Release *	RobinC		02-06-2005	usb_kill_urb fixes for kernels =>2.6.7 *	MathiasK	04-07-2005	endian fix ***************************************************************************/#ifndef	__RT_CONFIG_H__#define	__RT_CONFIG_H__#define PROFILE_PATH        "/etc/Wireless/RT2570STA/RT2570STA.dat"#define NIC_DEVICE_NAME     "RT2500USBSTA"#define DRV_MAJORVERSION	1#define DRV_MINORVERSION	0#define DRV_SUBVERSION		0#define DRV_TESTVERSION		0#define DRV_YEAR		2006#define DRV_MONTH		6#define DRV_DAY			18#define DRV_NAME		"rt2570"#define DRV_VERSION		"1.0.0 - CVS"#define DRV_RELDATE		"CVS"#define INIT_FROM_EEPROM#define RT2570_DBG	1#if 0/* Operational parameters that are set at compile time. */#if !defined(__OPTIMIZE__)  ||  !defined(__KERNEL__)//#warning  You must compile this file with the correct options!//#warning  See the last lines of the source file.//#error  You must compile this driver with "-O".#endif#endif // ! AVOS#ifdef AVOS#include "includes.h"#include "errno.h"#include "drivers/usb/core/usb.h"#include "drivers/usb/core/usb_common.h"#include "drivers/usb/net/usbnet.h"#include "lwip/sys.h"#include "lwip/netif.h"#else  // AVOS#include <linux/module.h>#include <linux/version.h>#include <linux/kernel.h>#include <linux/string.h>#include <linux/timer.h>#include <linux/errno.h>#include <linux/ioport.h>//#include <linux/interrupt.h>#include <linux/pci.h>#include <linux/netdevice.h>#include <linux/etherdevice.h>#include <linux/skbuff.h>#include <linux/init.h>#include <linux/delay.h>#include <linux/ethtool.h>#include <linux/wireless.h>#include <linux/proc_fs.h>#include <linux/delay.h>#include <linux/if_arp.h>#include <linux/ctype.h>#include <linux/sched.h>#include <linux/smp_lock.h>#include <linux/kmod.h>#include <linux/slab.h>//usb header files#include <linux/usb.h>#if LINUX_VERSION_CODE >= 0x20407#include <linux/mii.h>#endif#include <asm/processor.h>      /* Processor type for cache alignment. */#include <asm/bitops.h>#include <asm/io.h>#include <asm/irq.h>#include <asm/uaccess.h>#include <asm/atomic.h>#endif // AVOS// The type definition has to be placed before including rt2460.h#ifdef AVOS#define CHAR            char#define INT             int#define UINT            u32_t#define USHORT          u16_t#define UCHAR           u8_t#define BOOLEAN         u8_t//#define LARGE_INTEGER s64#define ULONGLONG       u32_t#define VOID            voidtypedef VOID            *PVOID;typedef CHAR            *PCHAR;typedef UCHAR           *PUCHAR;typedef USHORT		    *PUSHORT;typedef LONG            *PLONG;typedef ULONG           *PULONG;typedef union _LARGE_INTEGER {    struct {        ULONG LowPart;        LONG HighPart;    }vv;    struct {        ULONG LowPart;        LONG HighPart;    } u;    //s64 QuadPart;} LARGE_INTEGER;#else  // AOVS#ifndef ULONG#define CHAR            char#define INT             int#define UINT            u32#define ULONG           u32#define USHORT          u16#define UCHAR           u8#define BOOLEAN         u8//#define LARGE_INTEGER s64#define VOID            void#define LONG            int#define ULONGLONG       u64typedef VOID            *PVOID;typedef CHAR            *PCHAR;typedef UCHAR           *PUCHAR;typedef USHORT          *PUSHORT;typedef LONG            *PLONG;typedef ULONG           *PULONG;typedef union _LARGE_INTEGER {    struct {        ULONG LowPart;        LONG HighPart;    }vv;    struct {        ULONG LowPart;        LONG HighPart;    } u;    s64 QuadPart;} LARGE_INTEGER;#endif // ULONG#endif // AVOS#ifdef AVOS#ifdef __BIG_ENDIAN#undef __BIG_ENDIAN#endif /* __BIG_ENDIAN */#define atomic_t            int#ifdef AVOSatomic_t atomic_read( atomic_t * num );void atomic_set( atomic_t * num, int val );void atomic_dec( atomic_t * num );void atomic_inc( atomic_t * num );void atomic_add( int i, atomic_t * num );#else#define atomic_read(x)		    (*(x))#define atomic_set(x, y)	    (*(x)=(y))#define atomic_dec(x)		    ((*(x))--)#define atomic_inc(x)		    ((*(x))++)#define atomic_inc_and_test(v)	(++(*v) == 0)#define atomic_dec_and_test(v)	(--(*v) == 0)#define atomic_add(i,x)		    (*(x)+=i)#endif // AVOS#define __cpu_to_le16(x) 	((__u16)(x))#define __cpu_to_le32(x) 	((__u32)(x))#define time_after(a,b)         ((long)(b) - (long)(a) < 0)#define jiffies                 AVTimeGet()#endif /* AVOS */#define IN#define OUT#define TRUE        1#define FALSE       0#define ETH_LENGTH_OF_ADDRESS   6#define NDIS_STATUS                             INT#define NDIS_STATUS_SUCCESS                     0x00#define NDIS_STATUS_FAILURE                     0x01#define NDIS_STATUS_RESOURCES                   0x03#define NDIS_STATUS_MEDIA_DISCONNECT            0x04#define NDIS_STATUS_MEDIA_CONNECT               0x05#define NDIS_STATUS_RESET                       0x06////	Hardware related header files//#include	"rt2570.h"#ifdef __BIG_ENDIAN//#warning Compiling for big endian machine.#define BIG_ENDIAN#endif /* __BIG_ENDIAN */////	Miniport defined header files//#include    "rtmp_type.h"#include    "rtmp_def.h"#include    "oid.h"#include    "mlme.h"#include    "md5.h"#include    "wpa.h"#include    "sha1.h"#include    "rt2570sw.h"//#include    "Stdincl.h"#include    "rtusb.h"#ifdef AVOS#define rtusb_submit_urb(purb) usb_submit_urb(purb) #else  // AVOS#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)#define rtusb_submit_urb(purb) usb_submit_urb(purb, GFP_ATOMIC) #else#define rtusb_submit_urb(purb) usb_submit_urb(purb) #endif#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,7))	#define usb_kill_urb  usb_unlink_urb#endif#endif // AVOS#define __BH#define RHEL#ifndef KERNEL_VERSION#define KERNEL_VERSION(a,b,c) ((a)*65536+(b)*256+(c))#endif#ifndef USB_ST_NOERROR#define USB_ST_NOERROR 0#endifstruct rt2570_data {    list_t head;    void *data;};extern uint32_t _perfStarTime;extern uint32_t _perfFiniTime;extern uint32_t _perfDiffTime;#define PERF_INIT_RTC()     *(volatile unsigned *)0x01000530 = (0x00000303)#define PERF_READ_RTC()     READ_VOLATILE_UINT32((volatile unsigned *) 0x01000544)void perfTimerInit();void perfTimerStart();void perfTimerStop();uint32_t perfTimerGet();#define RT2570_STACK_SIZE 1024#endif	// __RT_CONFIG_H__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?