mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-15 01:19:36 +00:00
rtl8188eu: Remove more files that are not needed
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
642f6effc3
commit
6882712849
12 changed files with 0 additions and 1915 deletions
|
@ -1,91 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef __DRV_TYPES_CE_H__
|
|
||||||
#define __DRV_TYPES_CE_H__
|
|
||||||
|
|
||||||
#include <drv_conf.h>
|
|
||||||
#include <osdep_service.h>
|
|
||||||
|
|
||||||
#include <Sdcardddk.h>
|
|
||||||
|
|
||||||
#define MAX_ACTIVE_REG_PATH 256
|
|
||||||
|
|
||||||
#define MAX_MCAST_LIST_NUM 32
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* for ioctl */
|
|
||||||
#define MAKE_DRIVER_VERSION(_MainVer, _MinorVer) ((((u32)(_MainVer))<<16)+_MinorVer)
|
|
||||||
|
|
||||||
#define NIC_HEADER_SIZE 14 /* !< can be moved to typedef.h */
|
|
||||||
#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */
|
|
||||||
#define NIC_MAX_SEND_PACKETS 10 /* max number of send packets the MiniportSendPackets function can accept, can be moved to typedef.h */
|
|
||||||
#define NIC_VENDOR_DRIVER_VERSION MAKE_DRIVER_VERSION(0, 001) /* !< can be moved to typedef.h */
|
|
||||||
#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */
|
|
||||||
|
|
||||||
typedef struct _MP_REG_ENTRY {
|
|
||||||
|
|
||||||
NDIS_STRING RegName; /* variable name text */
|
|
||||||
BOOLEAN bRequired; /* 1->required, 0->optional */
|
|
||||||
|
|
||||||
u8 Type; /* NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString */
|
|
||||||
uint FieldOffset; /* offset to MP_ADAPTER field */
|
|
||||||
uint FieldSize; /* size (in bytes) of the field */
|
|
||||||
|
|
||||||
#ifdef UNDER_AMD64
|
|
||||||
u64 Default;
|
|
||||||
#else
|
|
||||||
u32 Default; /* default value to use */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
u32 Min; /* minimum value allowed */
|
|
||||||
u32 Max; /* maximum value allowed */
|
|
||||||
} MP_REG_ENTRY, *PMP_REG_ENTRY;
|
|
||||||
|
|
||||||
#ifdef CONFIG_USB_HCI
|
|
||||||
typedef struct _USB_EXTENSION {
|
|
||||||
LPCUSB_FUNCS _lpUsbFuncs;
|
|
||||||
USB_HANDLE _hDevice;
|
|
||||||
PVOID pAdapter;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
USB_ENDPOINT_DESCRIPTOR _endpACLIn;
|
|
||||||
USB_ENDPOINT_DESCRIPTOR _endpACLOutHigh;
|
|
||||||
USB_ENDPOINT_DESCRIPTOR _endpACLOutNormal;
|
|
||||||
|
|
||||||
USB_PIPE pPipeIn;
|
|
||||||
USB_PIPE pPipeOutNormal;
|
|
||||||
USB_PIPE pPipeOutHigh;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} USB_EXTENSION, *PUSB_EXTENSION;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _OCTET_STRING {
|
|
||||||
u8 *Octet;
|
|
||||||
u16 Length;
|
|
||||||
} OCTET_STRING, *POCTET_STRING;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,269 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef __DRV_TYPES_PCI_H__
|
|
||||||
#define __DRV_TYPES_PCI_H__
|
|
||||||
|
|
||||||
|
|
||||||
#include <linux/pci.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define INTEL_VENDOR_ID 0x8086
|
|
||||||
#define SIS_VENDOR_ID 0x1039
|
|
||||||
#define ATI_VENDOR_ID 0x1002
|
|
||||||
#define ATI_DEVICE_ID 0x7914
|
|
||||||
#define AMD_VENDOR_ID 0x1022
|
|
||||||
|
|
||||||
#define PCI_MAX_BRIDGE_NUMBER 255
|
|
||||||
#define PCI_MAX_DEVICES 32
|
|
||||||
#define PCI_MAX_FUNCTION 8
|
|
||||||
|
|
||||||
#define PCI_CONF_ADDRESS 0x0CF8 /* PCI Configuration Space Address */
|
|
||||||
#define PCI_CONF_DATA 0x0CFC /* PCI Configuration Space Data */
|
|
||||||
|
|
||||||
#define PCI_CLASS_BRIDGE_DEV 0x06
|
|
||||||
#define PCI_SUBCLASS_BR_PCI_TO_PCI 0x04
|
|
||||||
|
|
||||||
#define PCI_CAPABILITY_ID_PCI_EXPRESS 0x10
|
|
||||||
|
|
||||||
#define U1DONTCARE 0xFF
|
|
||||||
#define U2DONTCARE 0xFFFF
|
|
||||||
#define U4DONTCARE 0xFFFFFFFF
|
|
||||||
|
|
||||||
#define PCI_VENDER_ID_REALTEK 0x10ec
|
|
||||||
|
|
||||||
#define HAL_HW_PCI_8180_DEVICE_ID 0x8180
|
|
||||||
#define HAL_HW_PCI_8185_DEVICE_ID 0x8185 /* 8185 or 8185b */
|
|
||||||
#define HAL_HW_PCI_8188_DEVICE_ID 0x8188 /* 8185b */
|
|
||||||
#define HAL_HW_PCI_8198_DEVICE_ID 0x8198 /* 8185b */
|
|
||||||
#define HAL_HW_PCI_8190_DEVICE_ID 0x8190 /* 8190 */
|
|
||||||
#define HAL_HW_PCI_8723E_DEVICE_ID 0x8723 /* 8723E */
|
|
||||||
#define HAL_HW_PCI_8192_DEVICE_ID 0x8192 /* 8192 PCI-E */
|
|
||||||
#define HAL_HW_PCI_8192SE_DEVICE_ID 0x8192 /* 8192 SE */
|
|
||||||
#define HAL_HW_PCI_8174_DEVICE_ID 0x8174 /* 8192 SE */
|
|
||||||
#define HAL_HW_PCI_8173_DEVICE_ID 0x8173 /* 8191 SE Crab */
|
|
||||||
#define HAL_HW_PCI_8172_DEVICE_ID 0x8172 /* 8191 SE RE */
|
|
||||||
#define HAL_HW_PCI_8171_DEVICE_ID 0x8171 /* 8191 SE Unicron */
|
|
||||||
#define HAL_HW_PCI_0045_DEVICE_ID 0x0045 /* 8190 PCI for Ceraga */
|
|
||||||
#define HAL_HW_PCI_0046_DEVICE_ID 0x0046 /* 8190 Cardbus for Ceraga */
|
|
||||||
#define HAL_HW_PCI_0044_DEVICE_ID 0x0044 /* 8192e PCIE for Ceraga */
|
|
||||||
#define HAL_HW_PCI_0047_DEVICE_ID 0x0047 /* 8192e Express Card for Ceraga */
|
|
||||||
#define HAL_HW_PCI_700F_DEVICE_ID 0x700F
|
|
||||||
#define HAL_HW_PCI_701F_DEVICE_ID 0x701F
|
|
||||||
#define HAL_HW_PCI_DLINK_DEVICE_ID 0x3304
|
|
||||||
#define HAL_HW_PCI_8188EE_DEVICE_ID 0x8179
|
|
||||||
|
|
||||||
#define HAL_MEMORY_MAPPED_IO_RANGE_8190PCI 0x1000 /* 8190 support 16 pages of IO registers */
|
|
||||||
#define HAL_HW_PCI_REVISION_ID_8190PCI 0x00
|
|
||||||
#define HAL_MEMORY_MAPPED_IO_RANGE_8192PCIE 0x4000 /* 8192 support 16 pages of IO registers */
|
|
||||||
#define HAL_HW_PCI_REVISION_ID_8192PCIE 0x01
|
|
||||||
#define HAL_MEMORY_MAPPED_IO_RANGE_8192SE 0x4000 /* 8192 support 16 pages of IO registers */
|
|
||||||
#define HAL_HW_PCI_REVISION_ID_8192SE 0x10
|
|
||||||
#define HAL_HW_PCI_REVISION_ID_8192CE 0x1
|
|
||||||
#define HAL_MEMORY_MAPPED_IO_RANGE_8192CE 0x4000 /* 8192 support 16 pages of IO registers */
|
|
||||||
#define HAL_HW_PCI_REVISION_ID_8192DE 0x0
|
|
||||||
#define HAL_MEMORY_MAPPED_IO_RANGE_8192DE 0x4000 /* 8192 support 16 pages of IO registers */
|
|
||||||
|
|
||||||
enum pci_bridge_vendor {
|
|
||||||
PCI_BRIDGE_VENDOR_INTEL = 0x0,/* 0b'0000,0001 */
|
|
||||||
PCI_BRIDGE_VENDOR_ATI, /* = 0x02, */ /* 0b'0000,0010 */
|
|
||||||
PCI_BRIDGE_VENDOR_AMD, /* = 0x04, */ /* 0b'0000,0100 */
|
|
||||||
PCI_BRIDGE_VENDOR_SIS ,/* = 0x08, */ /* 0b'0000,1000 */
|
|
||||||
PCI_BRIDGE_VENDOR_UNKNOWN, /* = 0x40, */ /* 0b'0100,0000 */
|
|
||||||
PCI_BRIDGE_VENDOR_MAX ,/* = 0x80 */
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/* copy this data structor defination from MSDN SDK */
|
|
||||||
typedef struct _PCI_COMMON_CONFIG {
|
|
||||||
u16 VendorID;
|
|
||||||
u16 DeviceID;
|
|
||||||
u16 Command;
|
|
||||||
u16 Status;
|
|
||||||
u8 RevisionID;
|
|
||||||
u8 ProgIf;
|
|
||||||
u8 SubClass;
|
|
||||||
u8 BaseClass;
|
|
||||||
u8 CacheLineSize;
|
|
||||||
u8 LatencyTimer;
|
|
||||||
u8 HeaderType;
|
|
||||||
u8 BIST;
|
|
||||||
|
|
||||||
union {
|
|
||||||
struct _PCI_HEADER_TYPE_0 {
|
|
||||||
u32 BaseAddresses[6];
|
|
||||||
u32 CIS;
|
|
||||||
u16 SubVendorID;
|
|
||||||
u16 SubSystemID;
|
|
||||||
u32 ROMBaseAddress;
|
|
||||||
u8 CapabilitiesPtr;
|
|
||||||
u8 Reserved1[3];
|
|
||||||
u32 Reserved2;
|
|
||||||
|
|
||||||
u8 InterruptLine;
|
|
||||||
u8 InterruptPin;
|
|
||||||
u8 MinimumGrant;
|
|
||||||
u8 MaximumLatency;
|
|
||||||
} type0;
|
|
||||||
#if 0
|
|
||||||
struct _PCI_HEADER_TYPE_1 {
|
|
||||||
ULONG BaseAddresses[PCI_TYPE1_ADDRESSES];
|
|
||||||
UCHAR PrimaryBusNumber;
|
|
||||||
UCHAR SecondaryBusNumber;
|
|
||||||
UCHAR SubordinateBusNumber;
|
|
||||||
UCHAR SecondaryLatencyTimer;
|
|
||||||
UCHAR IOBase;
|
|
||||||
UCHAR IOLimit;
|
|
||||||
USHORT SecondaryStatus;
|
|
||||||
USHORT MemoryBase;
|
|
||||||
USHORT MemoryLimit;
|
|
||||||
USHORT PrefetchableMemoryBase;
|
|
||||||
USHORT PrefetchableMemoryLimit;
|
|
||||||
ULONG PrefetchableMemoryBaseUpper32;
|
|
||||||
ULONG PrefetchableMemoryLimitUpper32;
|
|
||||||
USHORT IOBaseUpper;
|
|
||||||
USHORT IOLimitUpper;
|
|
||||||
ULONG Reserved2;
|
|
||||||
ULONG ExpansionROMBase;
|
|
||||||
UCHAR InterruptLine;
|
|
||||||
UCHAR InterruptPin;
|
|
||||||
USHORT BridgeControl;
|
|
||||||
} type1;
|
|
||||||
|
|
||||||
struct _PCI_HEADER_TYPE_2 {
|
|
||||||
ULONG BaseAddress;
|
|
||||||
UCHAR CapabilitiesPtr;
|
|
||||||
UCHAR Reserved2;
|
|
||||||
USHORT SecondaryStatus;
|
|
||||||
UCHAR PrimaryBusNumber;
|
|
||||||
UCHAR CardbusBusNumber;
|
|
||||||
UCHAR SubordinateBusNumber;
|
|
||||||
UCHAR CardbusLatencyTimer;
|
|
||||||
ULONG MemoryBase0;
|
|
||||||
ULONG MemoryLimit0;
|
|
||||||
ULONG MemoryBase1;
|
|
||||||
ULONG MemoryLimit1;
|
|
||||||
USHORT IOBase0_LO;
|
|
||||||
USHORT IOBase0_HI;
|
|
||||||
USHORT IOLimit0_LO;
|
|
||||||
USHORT IOLimit0_HI;
|
|
||||||
USHORT IOBase1_LO;
|
|
||||||
USHORT IOBase1_HI;
|
|
||||||
USHORT IOLimit1_LO;
|
|
||||||
USHORT IOLimit1_HI;
|
|
||||||
UCHAR InterruptLine;
|
|
||||||
UCHAR InterruptPin;
|
|
||||||
USHORT BridgeControl;
|
|
||||||
USHORT SubVendorID;
|
|
||||||
USHORT SubSystemID;
|
|
||||||
ULONG LegacyBaseAddress;
|
|
||||||
UCHAR Reserved3[56];
|
|
||||||
ULONG SystemControl;
|
|
||||||
UCHAR MultiMediaControl;
|
|
||||||
UCHAR GeneralStatus;
|
|
||||||
UCHAR Reserved4[2];
|
|
||||||
UCHAR GPIO0Control;
|
|
||||||
UCHAR GPIO1Control;
|
|
||||||
UCHAR GPIO2Control;
|
|
||||||
UCHAR GPIO3Control;
|
|
||||||
ULONG IRQMuxRouting;
|
|
||||||
UCHAR RetryStatus;
|
|
||||||
UCHAR CardControl;
|
|
||||||
UCHAR DeviceControl;
|
|
||||||
UCHAR Diagnostic;
|
|
||||||
} type2;
|
|
||||||
#endif
|
|
||||||
} u;
|
|
||||||
|
|
||||||
u8 DeviceSpecific[108];
|
|
||||||
} PCI_COMMON_CONFIG , *PPCI_COMMON_CONFIG;
|
|
||||||
|
|
||||||
typedef struct _RT_PCI_CAPABILITIES_HEADER {
|
|
||||||
u8 CapabilityID;
|
|
||||||
u8 Next;
|
|
||||||
} RT_PCI_CAPABILITIES_HEADER, *PRT_PCI_CAPABILITIES_HEADER;
|
|
||||||
|
|
||||||
struct pci_priv {
|
|
||||||
BOOLEAN pci_clk_req;
|
|
||||||
|
|
||||||
u8 pciehdr_offset;
|
|
||||||
/* PCIeCap is only differece between B-cut and C-cut. */
|
|
||||||
/* Configuration Space offset 72[7:4] */
|
|
||||||
/* 0: A/B cut */
|
|
||||||
/* 1: C cut and later. */
|
|
||||||
u8 pcie_cap;
|
|
||||||
u8 linkctrl_reg;
|
|
||||||
|
|
||||||
u8 busnumber;
|
|
||||||
u8 devnumber;
|
|
||||||
u8 funcnumber;
|
|
||||||
|
|
||||||
u8 pcibridge_busnum;
|
|
||||||
u8 pcibridge_devnum;
|
|
||||||
u8 pcibridge_funcnum;
|
|
||||||
u8 pcibridge_vendor;
|
|
||||||
u16 pcibridge_vendorid;
|
|
||||||
u16 pcibridge_deviceid;
|
|
||||||
u8 pcibridge_pciehdr_offset;
|
|
||||||
u8 pcibridge_linkctrlreg;
|
|
||||||
|
|
||||||
u8 amd_l1_patch;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct _RT_ISR_CONTENT {
|
|
||||||
union {
|
|
||||||
u32 IntArray[2];
|
|
||||||
u32 IntReg4Byte;
|
|
||||||
u16 IntReg2Byte;
|
|
||||||
};
|
|
||||||
} RT_ISR_CONTENT, *PRT_ISR_CONTENT;
|
|
||||||
|
|
||||||
/* #define RegAddr(addr) (addr + 0xB2000000UL) */
|
|
||||||
/* some platform macros will def here */
|
|
||||||
static inline void NdisRawWritePortUlong(u32 port, u32 val)
|
|
||||||
{
|
|
||||||
outl(val, port);
|
|
||||||
/* writel(val, (u8 *)RegAddr(port)); */
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void NdisRawWritePortUchar(u32 port, u8 val)
|
|
||||||
{
|
|
||||||
outb(val, port);
|
|
||||||
/* writeb(val, (u8 *)RegAddr(port)); */
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void NdisRawReadPortUchar(u32 port, u8 *pval)
|
|
||||||
{
|
|
||||||
*pval = inb(port);
|
|
||||||
/* *pval = readb((u8 *)RegAddr(port)); */
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void NdisRawReadPortUshort(u32 port, u16 *pval)
|
|
||||||
{
|
|
||||||
*pval = inw(port);
|
|
||||||
/* *pval = readw((u8 *)RegAddr(port)); */
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void NdisRawReadPortUlong(u32 port, u32 *pval)
|
|
||||||
{
|
|
||||||
*pval = inl(port);
|
|
||||||
/* *pval = readl((u8 *)RegAddr(port)); */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,93 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef __DRV_TYPES_XP_H__
|
|
||||||
#define __DRV_TYPES_XP_H__
|
|
||||||
|
|
||||||
#include <drv_conf.h>
|
|
||||||
#include <osdep_service.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_MCAST_LIST_NUM 32
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* for ioctl */
|
|
||||||
#define MAKE_DRIVER_VERSION(_MainVer, _MinorVer) ((((u32)(_MainVer))<<16)+_MinorVer)
|
|
||||||
|
|
||||||
#define NIC_HEADER_SIZE 14 /* !< can be moved to typedef.h */
|
|
||||||
#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */
|
|
||||||
#define NIC_MAX_SEND_PACKETS 10 /* max number of send packets the MiniportSendPackets function can accept, can be moved to typedef.h */
|
|
||||||
#define NIC_VENDOR_DRIVER_VERSION MAKE_DRIVER_VERSION(0, 001) /* !< can be moved to typedef.h */
|
|
||||||
#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */
|
|
||||||
|
|
||||||
|
|
||||||
#undef ON_VISTA
|
|
||||||
/* added by Jackson */
|
|
||||||
#ifndef ON_VISTA
|
|
||||||
/*
|
|
||||||
* Bus driver versions
|
|
||||||
* */
|
|
||||||
|
|
||||||
#define SDBUS_DRIVER_VERSION_1 0x100
|
|
||||||
#define SDBUS_DRIVER_VERSION_2 0x200
|
|
||||||
|
|
||||||
#define SDP_FUNCTION_TYPE 4
|
|
||||||
#define SDP_BUS_DRIVER_VERSION 5
|
|
||||||
#define SDP_BUS_WIDTH 6
|
|
||||||
#define SDP_BUS_CLOCK 7
|
|
||||||
#define SDP_BUS_INTERFACE_CONTROL 8
|
|
||||||
#define SDP_HOST_BLOCK_LENGTH 9
|
|
||||||
#define SDP_FUNCTION_BLOCK_LENGTH 10
|
|
||||||
#define SDP_FN0_BLOCK_LENGTH 11
|
|
||||||
#define SDP_FUNCTION_INT_ENABLE 12
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _MP_REG_ENTRY {
|
|
||||||
|
|
||||||
NDIS_STRING RegName; /* variable name text */
|
|
||||||
BOOLEAN bRequired; /* 1->required, 0->optional */
|
|
||||||
|
|
||||||
u8 Type; /* NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString */
|
|
||||||
uint FieldOffset; /* offset to MP_ADAPTER field */
|
|
||||||
uint FieldSize; /* size (in bytes) of the field */
|
|
||||||
|
|
||||||
#ifdef UNDER_AMD64
|
|
||||||
u64 Default;
|
|
||||||
#else
|
|
||||||
u32 Default; /* default value to use */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
u32 Min; /* minimum value allowed */
|
|
||||||
u32 Max; /* maximum value allowed */
|
|
||||||
} MP_REG_ENTRY, *PMP_REG_ENTRY;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _OCTET_STRING {
|
|
||||||
u8 *Octet;
|
|
||||||
u16 Length;
|
|
||||||
} OCTET_STRING, *POCTET_STRING;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,745 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2013 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef __OSDEP_BSD_SERVICE_H_
|
|
||||||
#define __OSDEP_BSD_SERVICE_H_
|
|
||||||
|
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/systm.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/sockio.h>
|
|
||||||
#include <sys/sysctl.h>
|
|
||||||
#include <sys/lock.h>
|
|
||||||
#include <sys/mutex.h>
|
|
||||||
#include <sys/mbuf.h>
|
|
||||||
#include <sys/kernel.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/systm.h>
|
|
||||||
#include <sys/malloc.h>
|
|
||||||
#include <sys/module.h>
|
|
||||||
#include <sys/bus.h>
|
|
||||||
#include <sys/endian.h>
|
|
||||||
#include <sys/kdb.h>
|
|
||||||
#include <sys/kthread.h>
|
|
||||||
#include <sys/malloc.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <machine/atomic.h>
|
|
||||||
#include <machine/bus.h>
|
|
||||||
#include <machine/resource.h>
|
|
||||||
#include <sys/rman.h>
|
|
||||||
|
|
||||||
#include <net/bpf.h>
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <net/if_arp.h>
|
|
||||||
#include <net/ethernet.h>
|
|
||||||
#include <net/if_dl.h>
|
|
||||||
#include <net/if_media.h>
|
|
||||||
#include <net/if_types.h>
|
|
||||||
#include <net/route.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <netinet/in_systm.h>
|
|
||||||
#include <netinet/in_var.h>
|
|
||||||
#include <netinet/if_ether.h>
|
|
||||||
#include <if_ether.h>
|
|
||||||
|
|
||||||
#include <net80211/ieee80211_var.h>
|
|
||||||
#include <net80211/ieee80211_regdomain.h>
|
|
||||||
#include <net80211/ieee80211_radiotap.h>
|
|
||||||
#include <net80211/ieee80211_ratectl.h>
|
|
||||||
|
|
||||||
#include <dev/usb/usb.h>
|
|
||||||
#include <dev/usb/usbdi.h>
|
|
||||||
#include "usbdevs.h"
|
|
||||||
|
|
||||||
#define USB_DEBUG_VAR rum_debug
|
|
||||||
#include <dev/usb/usb_debug.h>
|
|
||||||
|
|
||||||
#if 1 //Baron porting from linux, it's all temp solution, needs to check again
|
|
||||||
#include <sys/sema.h>
|
|
||||||
#include <sys/pcpu.h> /* XXX for PCPU_GET */
|
|
||||||
// typedef struct semaphore _sema;
|
|
||||||
typedef struct sema _sema;
|
|
||||||
// typedef spinlock_t _lock;
|
|
||||||
typedef struct mtx _lock;
|
|
||||||
typedef struct mtx _mutex;
|
|
||||||
typedef struct timer_list _timer;
|
|
||||||
struct list_head {
|
|
||||||
struct list_head *next, *prev;
|
|
||||||
};
|
|
||||||
struct __queue {
|
|
||||||
struct list_head queue;
|
|
||||||
_lock lock;
|
|
||||||
};
|
|
||||||
|
|
||||||
//typedef struct sk_buff _pkt;
|
|
||||||
typedef struct mbuf _pkt;
|
|
||||||
typedef struct mbuf _buffer;
|
|
||||||
|
|
||||||
typedef struct __queue _queue;
|
|
||||||
typedef struct list_head _list;
|
|
||||||
typedef int _OS_STATUS;
|
|
||||||
//typedef u32 _irqL;
|
|
||||||
typedef unsigned long _irqL;
|
|
||||||
typedef struct ifnet * _nic_hdl;
|
|
||||||
|
|
||||||
typedef pid_t _thread_hdl_;
|
|
||||||
// typedef struct thread _thread_hdl_;
|
|
||||||
typedef void thread_return;
|
|
||||||
typedef void* thread_context;
|
|
||||||
|
|
||||||
//#define thread_exit() complete_and_exit(NULL, 0)
|
|
||||||
|
|
||||||
#define thread_exit() do{printf("%s", "RTKTHREAD_exit");}while(0)
|
|
||||||
|
|
||||||
typedef void timer_hdl_return;
|
|
||||||
typedef void* timer_hdl_context;
|
|
||||||
typedef struct work_struct _workitem;
|
|
||||||
|
|
||||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
|
||||||
/* emulate a modern version */
|
|
||||||
#define LINUX_VERSION_CODE KERNEL_VERSION(2, 6, 35)
|
|
||||||
|
|
||||||
#define WIRELESS_EXT -1
|
|
||||||
#define HZ hz
|
|
||||||
#define spin_lock_irqsave mtx_lock_irqsave
|
|
||||||
#define spin_lock_bh mtx_lock_irqsave
|
|
||||||
#define mtx_lock_irqsave(lock, x) mtx_lock(lock)//{local_irq_save((x)); mtx_lock_spin((lock));}
|
|
||||||
//#define IFT_RTW 0xf9 //ifnet allocate type for RTW
|
|
||||||
#define free_netdev if_free
|
|
||||||
#define LIST_CONTAINOR(ptr, type, member) \
|
|
||||||
((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
|
|
||||||
#define container_of(p,t,n) (t*)((p)-&(((t*)0)->n))
|
|
||||||
/*
|
|
||||||
* Linux timers are emulated using FreeBSD callout functions
|
|
||||||
* (and taskqueue functionality).
|
|
||||||
*
|
|
||||||
* Currently no timer stats functionality.
|
|
||||||
*
|
|
||||||
* See (linux_compat) processes.c
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
struct timer_list {
|
|
||||||
|
|
||||||
/* FreeBSD callout related fields */
|
|
||||||
struct callout callout;
|
|
||||||
|
|
||||||
//timeout function
|
|
||||||
void (*function)(void*);
|
|
||||||
//argument
|
|
||||||
void *arg;
|
|
||||||
|
|
||||||
};
|
|
||||||
struct workqueue_struct;
|
|
||||||
struct work_struct;
|
|
||||||
typedef void (*work_func_t)(struct work_struct *work);
|
|
||||||
/* Values for the state of an item of work (work_struct) */
|
|
||||||
typedef enum work_state {
|
|
||||||
WORK_STATE_UNSET = 0,
|
|
||||||
WORK_STATE_CALLOUT_PENDING = 1,
|
|
||||||
WORK_STATE_TASK_PENDING = 2,
|
|
||||||
WORK_STATE_WORK_CANCELLED = 3
|
|
||||||
} work_state_t;
|
|
||||||
|
|
||||||
struct work_struct {
|
|
||||||
struct task task; /* FreeBSD task */
|
|
||||||
work_state_t state; /* the pending or otherwise state of work. */
|
|
||||||
work_func_t func;
|
|
||||||
};
|
|
||||||
#define spin_unlock_irqrestore mtx_unlock_irqrestore
|
|
||||||
#define spin_unlock_bh mtx_unlock_irqrestore
|
|
||||||
#define mtx_unlock_irqrestore(lock,x) mtx_unlock(lock);
|
|
||||||
extern void _rtw_spinlock_init(_lock *plock);
|
|
||||||
|
|
||||||
//modify private structure to match freebsd
|
|
||||||
#define BITS_PER_LONG 32
|
|
||||||
union ktime {
|
|
||||||
s64 tv64;
|
|
||||||
#if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR)
|
|
||||||
struct {
|
|
||||||
#ifdef __BIG_ENDIAN
|
|
||||||
s32 sec, nsec;
|
|
||||||
#else
|
|
||||||
s32 nsec, sec;
|
|
||||||
#endif
|
|
||||||
} tv;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
#define kmemcheck_bitfield_begin(name)
|
|
||||||
#define kmemcheck_bitfield_end(name)
|
|
||||||
#define CHECKSUM_NONE 0
|
|
||||||
typedef unsigned char *sk_buff_data_t;
|
|
||||||
typedef union ktime ktime_t; /* Kill this */
|
|
||||||
|
|
||||||
void rtw_mtx_lock(_lock *plock);
|
|
||||||
|
|
||||||
void rtw_mtx_unlock(_lock *plock);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* struct sk_buff - socket buffer
|
|
||||||
* @next: Next buffer in list
|
|
||||||
* @prev: Previous buffer in list
|
|
||||||
* @sk: Socket we are owned by
|
|
||||||
* @tstamp: Time we arrived
|
|
||||||
* @dev: Device we arrived on/are leaving by
|
|
||||||
* @transport_header: Transport layer header
|
|
||||||
* @network_header: Network layer header
|
|
||||||
* @mac_header: Link layer header
|
|
||||||
* @_skb_refdst: destination entry (with norefcount bit)
|
|
||||||
* @sp: the security path, used for xfrm
|
|
||||||
* @cb: Control buffer. Free for use by every layer. Put private vars here
|
|
||||||
* @len: Length of actual data
|
|
||||||
* @data_len: Data length
|
|
||||||
* @mac_len: Length of link layer header
|
|
||||||
* @hdr_len: writable header length of cloned skb
|
|
||||||
* @csum: Checksum (must include start/offset pair)
|
|
||||||
* @csum_start: Offset from skb->head where checksumming should start
|
|
||||||
* @csum_offset: Offset from csum_start where checksum should be stored
|
|
||||||
* @local_df: allow local fragmentation
|
|
||||||
* @cloned: Head may be cloned (check refcnt to be sure)
|
|
||||||
* @nohdr: Payload reference only, must not modify header
|
|
||||||
* @pkt_type: Packet class
|
|
||||||
* @fclone: skbuff clone status
|
|
||||||
* @ip_summed: Driver fed us an IP checksum
|
|
||||||
* @priority: Packet queueing priority
|
|
||||||
* @users: User count - see {datagram,tcp}.c
|
|
||||||
* @protocol: Packet protocol from driver
|
|
||||||
* @truesize: Buffer size
|
|
||||||
* @head: Head of buffer
|
|
||||||
* @data: Data head pointer
|
|
||||||
* @tail: Tail pointer
|
|
||||||
* @end: End pointer
|
|
||||||
* @destructor: Destruct function
|
|
||||||
* @mark: Generic packet mark
|
|
||||||
* @nfct: Associated connection, if any
|
|
||||||
* @ipvs_property: skbuff is owned by ipvs
|
|
||||||
* @peeked: this packet has been seen already, so stats have been
|
|
||||||
* done for it, don't do them again
|
|
||||||
* @nf_trace: netfilter packet trace flag
|
|
||||||
* @nfctinfo: Relationship of this skb to the connection
|
|
||||||
* @nfct_reasm: netfilter conntrack re-assembly pointer
|
|
||||||
* @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
|
|
||||||
* @skb_iif: ifindex of device we arrived on
|
|
||||||
* @rxhash: the packet hash computed on receive
|
|
||||||
* @queue_mapping: Queue mapping for multiqueue devices
|
|
||||||
* @tc_index: Traffic control index
|
|
||||||
* @tc_verd: traffic control verdict
|
|
||||||
* @ndisc_nodetype: router type (from link layer)
|
|
||||||
* @dma_cookie: a cookie to one of several possible DMA operations
|
|
||||||
* done by skb DMA functions
|
|
||||||
* @secmark: security marking
|
|
||||||
* @vlan_tci: vlan tag control information
|
|
||||||
*/
|
|
||||||
|
|
||||||
struct sk_buff {
|
|
||||||
/* These two members must be first. */
|
|
||||||
struct sk_buff *next;
|
|
||||||
struct sk_buff *prev;
|
|
||||||
|
|
||||||
ktime_t tstamp;
|
|
||||||
|
|
||||||
struct sock *sk;
|
|
||||||
//struct net_device *dev;
|
|
||||||
struct ifnet *dev;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the control buffer. It is free to use for every
|
|
||||||
* layer. Please put your private variables there. If you
|
|
||||||
* want to keep them across layers you have to do a skb_clone()
|
|
||||||
* first. This is owned by whoever has the skb queued ATM.
|
|
||||||
*/
|
|
||||||
char cb[48] __aligned(8);
|
|
||||||
|
|
||||||
unsigned long _skb_refdst;
|
|
||||||
#ifdef CONFIG_XFRM
|
|
||||||
struct sec_path *sp;
|
|
||||||
#endif
|
|
||||||
unsigned int len,
|
|
||||||
data_len;
|
|
||||||
u16 mac_len,
|
|
||||||
hdr_len;
|
|
||||||
union {
|
|
||||||
u32 csum;
|
|
||||||
struct {
|
|
||||||
u16 csum_start;
|
|
||||||
u16 csum_offset;
|
|
||||||
}smbol2;
|
|
||||||
}smbol1;
|
|
||||||
u32 priority;
|
|
||||||
kmemcheck_bitfield_begin(flags1);
|
|
||||||
u8 local_df:1,
|
|
||||||
cloned:1,
|
|
||||||
ip_summed:2,
|
|
||||||
nohdr:1,
|
|
||||||
nfctinfo:3;
|
|
||||||
u8 pkt_type:3,
|
|
||||||
fclone:2,
|
|
||||||
ipvs_property:1,
|
|
||||||
peeked:1,
|
|
||||||
nf_trace:1;
|
|
||||||
kmemcheck_bitfield_end(flags1);
|
|
||||||
u16 protocol;
|
|
||||||
|
|
||||||
void (*destructor)(struct sk_buff *skb);
|
|
||||||
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
|
||||||
struct nf_conntrack *nfct;
|
|
||||||
struct sk_buff *nfct_reasm;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
|
||||||
struct nf_bridge_info *nf_bridge;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int skb_iif;
|
|
||||||
#ifdef CONFIG_NET_SCHED
|
|
||||||
u16 tc_index; /* traffic control index */
|
|
||||||
#ifdef CONFIG_NET_CLS_ACT
|
|
||||||
u16 tc_verd; /* traffic control verdict */
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
u32 rxhash;
|
|
||||||
|
|
||||||
kmemcheck_bitfield_begin(flags2);
|
|
||||||
u16 queue_mapping:16;
|
|
||||||
#ifdef CONFIG_IPV6_NDISC_NODETYPE
|
|
||||||
u8 ndisc_nodetype:2,
|
|
||||||
deliver_no_wcard:1;
|
|
||||||
#else
|
|
||||||
u8 deliver_no_wcard:1;
|
|
||||||
#endif
|
|
||||||
kmemcheck_bitfield_end(flags2);
|
|
||||||
|
|
||||||
/* 0/14 bit hole */
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_DMA
|
|
||||||
dma_cookie_t dma_cookie;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_NETWORK_SECMARK
|
|
||||||
u32 secmark;
|
|
||||||
#endif
|
|
||||||
union {
|
|
||||||
u32 mark;
|
|
||||||
u32 dropcount;
|
|
||||||
}symbol3;
|
|
||||||
|
|
||||||
u16 vlan_tci;
|
|
||||||
|
|
||||||
sk_buff_data_t transport_header;
|
|
||||||
sk_buff_data_t network_header;
|
|
||||||
sk_buff_data_t mac_header;
|
|
||||||
/* These elements must be at the end, see alloc_skb() for details. */
|
|
||||||
sk_buff_data_t tail;
|
|
||||||
sk_buff_data_t end;
|
|
||||||
unsigned char *head,
|
|
||||||
*data;
|
|
||||||
unsigned int truesize;
|
|
||||||
atomic_t users;
|
|
||||||
};
|
|
||||||
struct sk_buff_head {
|
|
||||||
/* These two members must be first. */
|
|
||||||
struct sk_buff *next;
|
|
||||||
struct sk_buff *prev;
|
|
||||||
|
|
||||||
u32 qlen;
|
|
||||||
_lock lock;
|
|
||||||
};
|
|
||||||
#define skb_tail_pointer(skb) skb->tail
|
|
||||||
static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
|
|
||||||
{
|
|
||||||
unsigned char *tmp = skb_tail_pointer(skb);
|
|
||||||
//SKB_LINEAR_ASSERT(skb);
|
|
||||||
skb->tail += len;
|
|
||||||
skb->len += len;
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len)
|
|
||||||
{
|
|
||||||
skb->len -= len;
|
|
||||||
if(skb->len < skb->data_len)
|
|
||||||
printf("%s(),%d,error!\n",__FUNCTION__,__LINE__);
|
|
||||||
return skb->data += len;
|
|
||||||
}
|
|
||||||
static inline unsigned char *skb_pull(struct sk_buff *skb, unsigned int len)
|
|
||||||
{
|
|
||||||
return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len);
|
|
||||||
}
|
|
||||||
static inline u32 skb_queue_len(const struct sk_buff_head *list_)
|
|
||||||
{
|
|
||||||
return list_->qlen;
|
|
||||||
}
|
|
||||||
static inline void __skb_insert(struct sk_buff *newsk,
|
|
||||||
struct sk_buff *prev, struct sk_buff *next,
|
|
||||||
struct sk_buff_head *list)
|
|
||||||
{
|
|
||||||
newsk->next = next;
|
|
||||||
newsk->prev = prev;
|
|
||||||
next->prev = prev->next = newsk;
|
|
||||||
list->qlen++;
|
|
||||||
}
|
|
||||||
static inline void __skb_queue_before(struct sk_buff_head *list,
|
|
||||||
struct sk_buff *next,
|
|
||||||
struct sk_buff *newsk)
|
|
||||||
{
|
|
||||||
__skb_insert(newsk, next->prev, next, list);
|
|
||||||
}
|
|
||||||
static inline void skb_queue_tail(struct sk_buff_head *list,
|
|
||||||
struct sk_buff *newsk)
|
|
||||||
{
|
|
||||||
mtx_lock(&list->lock);
|
|
||||||
__skb_queue_before(list, (struct sk_buff *)list, newsk);
|
|
||||||
mtx_unlock(&list->lock);
|
|
||||||
}
|
|
||||||
static inline struct sk_buff *skb_peek(struct sk_buff_head *list_)
|
|
||||||
{
|
|
||||||
struct sk_buff *list = ((struct sk_buff *)list_)->next;
|
|
||||||
if (list == (struct sk_buff *)list_)
|
|
||||||
list = NULL;
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
|
|
||||||
{
|
|
||||||
struct sk_buff *next, *prev;
|
|
||||||
|
|
||||||
list->qlen--;
|
|
||||||
next = skb->next;
|
|
||||||
prev = skb->prev;
|
|
||||||
skb->next = skb->prev = NULL;
|
|
||||||
next->prev = prev;
|
|
||||||
prev->next = next;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline struct sk_buff *skb_dequeue(struct sk_buff_head *list)
|
|
||||||
{
|
|
||||||
mtx_lock(&list->lock);
|
|
||||||
|
|
||||||
struct sk_buff *skb = skb_peek(list);
|
|
||||||
if (skb)
|
|
||||||
__skb_unlink(skb, list);
|
|
||||||
|
|
||||||
mtx_unlock(&list->lock);
|
|
||||||
|
|
||||||
return skb;
|
|
||||||
}
|
|
||||||
static inline void skb_reserve(struct sk_buff *skb, int len)
|
|
||||||
{
|
|
||||||
skb->data += len;
|
|
||||||
skb->tail += len;
|
|
||||||
}
|
|
||||||
static inline void __skb_queue_head_init(struct sk_buff_head *list)
|
|
||||||
{
|
|
||||||
list->prev = list->next = (struct sk_buff *)list;
|
|
||||||
list->qlen = 0;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* This function creates a split out lock class for each invocation;
|
|
||||||
* this is needed for now since a whole lot of users of the skb-queue
|
|
||||||
* infrastructure in drivers have different locking usage (in hardirq)
|
|
||||||
* than the networking core (in softirq only). In the long run either the
|
|
||||||
* network layer or drivers should need annotation to consolidate the
|
|
||||||
* main types of usage into 3 classes.
|
|
||||||
*/
|
|
||||||
static inline void skb_queue_head_init(struct sk_buff_head *list)
|
|
||||||
{
|
|
||||||
_rtw_spinlock_init(&list->lock);
|
|
||||||
__skb_queue_head_init(list);
|
|
||||||
}
|
|
||||||
unsigned long copy_from_user(void *to, const void *from, unsigned long n);
|
|
||||||
unsigned long copy_to_user(void *to, const void *from, unsigned long n);
|
|
||||||
struct sk_buff * dev_alloc_skb(unsigned int size);
|
|
||||||
struct sk_buff *skb_clone(const struct sk_buff *skb);
|
|
||||||
void dev_kfree_skb_any(struct sk_buff *skb);
|
|
||||||
#endif //Baron porting from linux, it's all temp solution, needs to check again
|
|
||||||
|
|
||||||
|
|
||||||
#if 1 // kenny add Linux compatibility code for Linux USB driver
|
|
||||||
#include <dev/usb/usb_compat_linux.h>
|
|
||||||
|
|
||||||
#define __init // __attribute ((constructor))
|
|
||||||
#define __exit // __attribute ((destructor))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Definitions for module_init and module_exit macros.
|
|
||||||
*
|
|
||||||
* These macros will use the SYSINIT framework to call a specified
|
|
||||||
* function (with no arguments) on module loading or unloading.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
void module_init_exit_wrapper(void *arg);
|
|
||||||
|
|
||||||
#define module_init(initfn) \
|
|
||||||
SYSINIT(mod_init_ ## initfn, \
|
|
||||||
SI_SUB_KLD, SI_ORDER_FIRST, \
|
|
||||||
module_init_exit_wrapper, initfn)
|
|
||||||
|
|
||||||
#define module_exit(exitfn) \
|
|
||||||
SYSUNINIT(mod_exit_ ## exitfn, \
|
|
||||||
SI_SUB_KLD, SI_ORDER_ANY, \
|
|
||||||
module_init_exit_wrapper, exitfn)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The usb_register and usb_deregister functions are used to register
|
|
||||||
* usb drivers with the usb subsystem.
|
|
||||||
*/
|
|
||||||
int usb_register(struct usb_driver *driver);
|
|
||||||
int usb_deregister(struct usb_driver *driver);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* usb_get_dev and usb_put_dev - increment/decrement the reference count
|
|
||||||
* of the usb device structure.
|
|
||||||
*
|
|
||||||
* Original body of usb_get_dev:
|
|
||||||
*
|
|
||||||
* if (dev)
|
|
||||||
* get_device(&dev->dev);
|
|
||||||
* return dev;
|
|
||||||
*
|
|
||||||
* Reference counts are not currently used in this compatibility
|
|
||||||
* layer. So these functions will do nothing.
|
|
||||||
*/
|
|
||||||
static inline struct usb_device *
|
|
||||||
usb_get_dev(struct usb_device *dev)
|
|
||||||
{
|
|
||||||
return dev;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
usb_put_dev(struct usb_device *dev)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// rtw_usb_compat_linux
|
|
||||||
int rtw_usb_submit_urb(struct urb *urb, uint16_t mem_flags);
|
|
||||||
int rtw_usb_unlink_urb(struct urb *urb);
|
|
||||||
int rtw_usb_clear_halt(struct usb_device *dev, struct usb_host_endpoint *uhe);
|
|
||||||
int rtw_usb_control_msg(struct usb_device *dev, struct usb_host_endpoint *uhe,
|
|
||||||
uint8_t request, uint8_t requesttype,
|
|
||||||
uint16_t value, uint16_t index, void *data,
|
|
||||||
uint16_t size, usb_timeout_t timeout);
|
|
||||||
int rtw_usb_set_interface(struct usb_device *dev, uint8_t iface_no, uint8_t alt_index);
|
|
||||||
int rtw_usb_setup_endpoint(struct usb_device *dev,
|
|
||||||
struct usb_host_endpoint *uhe, usb_size_t bufsize);
|
|
||||||
struct urb *rtw_usb_alloc_urb(uint16_t iso_packets, uint16_t mem_flags);
|
|
||||||
struct usb_host_endpoint *rtw_usb_find_host_endpoint(struct usb_device *dev, uint8_t type, uint8_t ep);
|
|
||||||
struct usb_host_interface *rtw_usb_altnum_to_altsetting(const struct usb_interface *intf, uint8_t alt_index);
|
|
||||||
struct usb_interface *rtw_usb_ifnum_to_if(struct usb_device *dev, uint8_t iface_no);
|
|
||||||
void *rtw_usbd_get_intfdata(struct usb_interface *intf);
|
|
||||||
void rtw_usb_linux_register(void *arg);
|
|
||||||
void rtw_usb_linux_deregister(void *arg);
|
|
||||||
void rtw_usb_linux_free_device(struct usb_device *dev);
|
|
||||||
void rtw_usb_free_urb(struct urb *urb);
|
|
||||||
void rtw_usb_init_urb(struct urb *urb);
|
|
||||||
void rtw_usb_kill_urb(struct urb *urb);
|
|
||||||
void rtw_usb_set_intfdata(struct usb_interface *intf, void *data);
|
|
||||||
void rtw_usb_fill_bulk_urb(struct urb *urb, struct usb_device *udev,
|
|
||||||
struct usb_host_endpoint *uhe, void *buf,
|
|
||||||
int length, usb_complete_t callback, void *arg);
|
|
||||||
int rtw_usb_bulk_msg(struct usb_device *udev, struct usb_host_endpoint *uhe,
|
|
||||||
void *data, int len, uint16_t *pactlen, usb_timeout_t timeout);
|
|
||||||
void *usb_get_intfdata(struct usb_interface *intf);
|
|
||||||
int usb_linux_init_endpoints(struct usb_device *udev);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct urb * PURB;
|
|
||||||
|
|
||||||
typedef unsigned gfp_t;
|
|
||||||
#define __GFP_WAIT ((gfp_t)0x10u) /* Can wait and reschedule? */
|
|
||||||
#define __GFP_HIGH ((gfp_t)0x20u) /* Should access emergency pools? */
|
|
||||||
#define __GFP_IO ((gfp_t)0x40u) /* Can start physical IO? */
|
|
||||||
#define __GFP_FS ((gfp_t)0x80u) /* Can call down to low-level FS? */
|
|
||||||
#define __GFP_COLD ((gfp_t)0x100u) /* Cache-cold page required */
|
|
||||||
#define __GFP_NOWARN ((gfp_t)0x200u) /* Suppress page allocation failure warning */
|
|
||||||
#define __GFP_REPEAT ((gfp_t)0x400u) /* Retry the allocation. Might fail */
|
|
||||||
#define __GFP_NOFAIL ((gfp_t)0x800u) /* Retry for ever. Cannot fail */
|
|
||||||
#define __GFP_NORETRY ((gfp_t)0x1000u)/* Do not retry. Might fail */
|
|
||||||
#define __GFP_NO_GROW ((gfp_t)0x2000u)/* Slab internal usage */
|
|
||||||
#define __GFP_COMP ((gfp_t)0x4000u)/* Add compound page metadata */
|
|
||||||
#define __GFP_ZERO ((gfp_t)0x8000u)/* Return zeroed page on success */
|
|
||||||
#define __GFP_NOMEMALLOC ((gfp_t)0x10000u) /* Don't use emergency reserves */
|
|
||||||
#define __GFP_HARDWALL ((gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */
|
|
||||||
|
|
||||||
/* This equals 0, but use constants in case they ever change */
|
|
||||||
#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH)
|
|
||||||
/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */
|
|
||||||
#define GFP_ATOMIC (__GFP_HIGH)
|
|
||||||
#define GFP_NOIO (__GFP_WAIT)
|
|
||||||
#define GFP_NOFS (__GFP_WAIT | __GFP_IO)
|
|
||||||
#define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS)
|
|
||||||
#define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL)
|
|
||||||
#define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \
|
|
||||||
__GFP_HIGHMEM)
|
|
||||||
|
|
||||||
|
|
||||||
#endif // kenny add Linux compatibility code for Linux USB
|
|
||||||
|
|
||||||
__inline static _list *get_next(_list *list)
|
|
||||||
{
|
|
||||||
return list->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static _list *get_list_head(_queue *queue)
|
|
||||||
{
|
|
||||||
return (&(queue->queue));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define LIST_CONTAINOR(ptr, type, member) \
|
|
||||||
((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
|
|
||||||
|
|
||||||
|
|
||||||
__inline static void _enter_critical(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
spin_lock_irqsave(plock, *pirqL);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _exit_critical(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
spin_unlock_irqrestore(plock, *pirqL);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
spin_lock_irqsave(plock, *pirqL);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
spin_unlock_irqrestore(plock, *pirqL);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _enter_critical_bh(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
spin_lock_bh(plock, *pirqL);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _exit_critical_bh(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
spin_unlock_bh(plock, *pirqL);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _enter_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
|
|
||||||
mtx_lock(pmutex);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
__inline static void _exit_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
|
|
||||||
mtx_unlock(pmutex);
|
|
||||||
|
|
||||||
}
|
|
||||||
static inline void __list_del(struct list_head * prev, struct list_head * next)
|
|
||||||
{
|
|
||||||
next->prev = prev;
|
|
||||||
prev->next = next;
|
|
||||||
}
|
|
||||||
static inline void INIT_LIST_HEAD(struct list_head *list)
|
|
||||||
{
|
|
||||||
list->next = list;
|
|
||||||
list->prev = list;
|
|
||||||
}
|
|
||||||
__inline static void rtw_list_delete(_list *plist)
|
|
||||||
{
|
|
||||||
__list_del(plist->prev, plist->next);
|
|
||||||
INIT_LIST_HEAD(plist);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _init_timer(struct timer_list *ptimer,_nic_hdl padapter,void *pfunc,void* cntx)
|
|
||||||
{
|
|
||||||
ptimer->function = pfunc;
|
|
||||||
ptimer->arg = cntx;
|
|
||||||
callout_init(&ptimer->callout, CALLOUT_MPSAFE);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _set_timer(struct timer_list *ptimer,u32 delay_time)
|
|
||||||
{
|
|
||||||
// mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
|
|
||||||
if(ptimer->function && ptimer->arg){
|
|
||||||
rtw_mtx_lock(NULL);
|
|
||||||
callout_reset(&ptimer->callout, delay_time,ptimer->function, ptimer->arg);
|
|
||||||
rtw_mtx_unlock(NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _cancel_timer(struct timer_list *ptimer,u8 *bcancelled)
|
|
||||||
{
|
|
||||||
// del_timer_sync(ptimer);
|
|
||||||
// *bcancelled= _TRUE;//TRUE ==1; FALSE==0
|
|
||||||
rtw_mtx_lock(NULL);
|
|
||||||
callout_drain(&ptimer->callout);
|
|
||||||
rtw_mtx_unlock(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
|
||||||
{
|
|
||||||
printf("%s Not implement yet! \n",__FUNCTION__);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _set_workitem(_workitem *pwork)
|
|
||||||
{
|
|
||||||
printf("%s Not implement yet! \n",__FUNCTION__);
|
|
||||||
// schedule_work(pwork);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Global Mutex: can only be used at PASSIVE level.
|
|
||||||
//
|
|
||||||
|
|
||||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
|
||||||
{ \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
|
||||||
{ \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ATOMIC_INIT(i) { (i) }
|
|
||||||
|
|
||||||
static __inline void thread_enter(char *name);
|
|
||||||
|
|
||||||
//Atomic integer operations
|
|
||||||
typedef uint32_t ATOMIC_T ;
|
|
||||||
|
|
||||||
#define rtw_netdev_priv(netdev) (((struct ifnet *)netdev)->if_softc)
|
|
||||||
|
|
||||||
#define rtw_free_netdev(netdev) if_free((netdev))
|
|
||||||
|
|
||||||
#define NDEV_FMT "%s"
|
|
||||||
#define NDEV_ARG(ndev) ""
|
|
||||||
#define ADPT_FMT "%s"
|
|
||||||
#define ADPT_ARG(adapter) ""
|
|
||||||
#define FUNC_NDEV_FMT "%s"
|
|
||||||
#define FUNC_NDEV_ARG(ndev) __func__
|
|
||||||
#define FUNC_ADPT_FMT "%s"
|
|
||||||
#define FUNC_ADPT_ARG(adapter) __func__
|
|
||||||
|
|
||||||
#define STRUCT_PACKED
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,192 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __OSDEP_CE_SERVICE_H_
|
|
||||||
#define __OSDEP_CE_SERVICE_H_
|
|
||||||
|
|
||||||
|
|
||||||
#include <ndis.h>
|
|
||||||
#include <ntddndis.h>
|
|
||||||
|
|
||||||
#ifdef CONFIG_SDIO_HCI
|
|
||||||
#include "SDCardDDK.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_USB_HCI
|
|
||||||
#include <usbdi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef HANDLE _sema;
|
|
||||||
typedef LIST_ENTRY _list;
|
|
||||||
typedef NDIS_STATUS _OS_STATUS;
|
|
||||||
|
|
||||||
typedef NDIS_SPIN_LOCK _lock;
|
|
||||||
|
|
||||||
typedef HANDLE _rwlock; //Mutex
|
|
||||||
|
|
||||||
typedef u32 _irqL;
|
|
||||||
|
|
||||||
typedef NDIS_HANDLE _nic_hdl;
|
|
||||||
|
|
||||||
|
|
||||||
typedef NDIS_MINIPORT_TIMER _timer;
|
|
||||||
|
|
||||||
struct __queue {
|
|
||||||
LIST_ENTRY queue;
|
|
||||||
_lock lock;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef NDIS_PACKET _pkt;
|
|
||||||
typedef NDIS_BUFFER _buffer;
|
|
||||||
typedef struct __queue _queue;
|
|
||||||
|
|
||||||
typedef HANDLE _thread_hdl_;
|
|
||||||
typedef DWORD thread_return;
|
|
||||||
typedef void* thread_context;
|
|
||||||
typedef NDIS_WORK_ITEM _workitem;
|
|
||||||
|
|
||||||
#define thread_exit() ExitThread(STATUS_SUCCESS); return 0;
|
|
||||||
|
|
||||||
|
|
||||||
#define SEMA_UPBND (0x7FFFFFFF) //8192
|
|
||||||
|
|
||||||
__inline static _list *get_prev(_list *list)
|
|
||||||
{
|
|
||||||
return list->Blink;
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static _list *get_next(_list *list)
|
|
||||||
{
|
|
||||||
return list->Flink;
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static _list *get_list_head(_queue *queue)
|
|
||||||
{
|
|
||||||
return (&(queue->queue));
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member)
|
|
||||||
|
|
||||||
__inline static void _enter_critical(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisAcquireSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _exit_critical(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisReleaseSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisDprAcquireSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisDprReleaseSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
__inline static void _enter_hwio_critical(_rwlock *prwlock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
WaitForSingleObject(*prwlock, INFINITE );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _exit_hwio_critical(_rwlock *prwlock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
ReleaseMutex(*prwlock);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void rtw_list_delete(_list *plist)
|
|
||||||
{
|
|
||||||
RemoveEntryList(plist);
|
|
||||||
InitializeListHead(plist);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define RTW_TIMER_HDL_ARGS IN PVOID SystemSpecific1, IN PVOID FunctionContext, IN PVOID SystemSpecific2, IN PVOID SystemSpecific3
|
|
||||||
|
|
||||||
__inline static void _init_timer(struct timer_list *ptimer,_nic_hdl nic_hdl,void *pfunc,PVOID cntx)
|
|
||||||
{
|
|
||||||
NdisMInitializeTimer(ptimer, nic_hdl, pfunc, cntx);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _set_timer(struct timer_list *ptimer,u32 delay_time)
|
|
||||||
{
|
|
||||||
NdisMSetTimer(ptimer,delay_time);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _cancel_timer(struct timer_list *ptimer,u8 *bcancelled)
|
|
||||||
{
|
|
||||||
NdisMCancelTimer(ptimer,bcancelled);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
|
||||||
{
|
|
||||||
|
|
||||||
NdisInitializeWorkItem(pwork, pfunc, cntx);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _set_workitem(_workitem *pwork)
|
|
||||||
{
|
|
||||||
NdisScheduleWorkItem(pwork);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ATOMIC_INIT(i) { (i) }
|
|
||||||
|
|
||||||
//
|
|
||||||
// Global Mutex: can only be used at PASSIVE level.
|
|
||||||
//
|
|
||||||
|
|
||||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
|
||||||
{ \
|
|
||||||
while (NdisInterlockedIncrement((PULONG)&(_MutexCounter)) != 1)\
|
|
||||||
{ \
|
|
||||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
|
||||||
NdisMSleep(10000); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
|
||||||
{ \
|
|
||||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
|
||||||
}
|
|
||||||
|
|
||||||
// limitation of path length
|
|
||||||
#define PATH_LENGTH_MAX MAX_PATH
|
|
||||||
|
|
||||||
//Atomic integer operations
|
|
||||||
#define ATOMIC_T LONG
|
|
||||||
|
|
||||||
#define NDEV_FMT "%s"
|
|
||||||
#define NDEV_ARG(ndev) ""
|
|
||||||
#define ADPT_FMT "%s"
|
|
||||||
#define ADPT_ARG(adapter) ""
|
|
||||||
#define FUNC_NDEV_FMT "%s"
|
|
||||||
#define FUNC_NDEV_ARG(ndev) __func__
|
|
||||||
#define FUNC_ADPT_FMT "%s"
|
|
||||||
#define FUNC_ADPT_ARG(adapter) __func__
|
|
||||||
|
|
||||||
#define STRUCT_PACKED
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,202 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2013 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef __OSDEP_LINUX_SERVICE_H_
|
|
||||||
#define __OSDEP_LINUX_SERVICE_H_
|
|
||||||
|
|
||||||
#include <ndis.h>
|
|
||||||
#include <ntddk.h>
|
|
||||||
#include <ntddndis.h>
|
|
||||||
#include <ntdef.h>
|
|
||||||
|
|
||||||
#ifdef CONFIG_USB_HCI
|
|
||||||
#include <usb.h>
|
|
||||||
#include <usbioctl.h>
|
|
||||||
#include <usbdlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef KSEMAPHORE _sema;
|
|
||||||
typedef LIST_ENTRY _list;
|
|
||||||
typedef NDIS_STATUS _OS_STATUS;
|
|
||||||
|
|
||||||
|
|
||||||
typedef NDIS_SPIN_LOCK _lock;
|
|
||||||
|
|
||||||
typedef KMUTEX _mutex;
|
|
||||||
|
|
||||||
typedef KIRQL _irqL;
|
|
||||||
|
|
||||||
// USB_PIPE for WINCE , but handle can be use just integer under windows
|
|
||||||
typedef NDIS_HANDLE _nic_hdl;
|
|
||||||
|
|
||||||
|
|
||||||
typedef NDIS_MINIPORT_TIMER _timer;
|
|
||||||
|
|
||||||
struct __queue {
|
|
||||||
LIST_ENTRY queue;
|
|
||||||
_lock lock;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef NDIS_PACKET _pkt;
|
|
||||||
typedef NDIS_BUFFER _buffer;
|
|
||||||
typedef struct __queue _queue;
|
|
||||||
|
|
||||||
typedef PKTHREAD _thread_hdl_;
|
|
||||||
typedef void thread_return;
|
|
||||||
typedef void* thread_context;
|
|
||||||
|
|
||||||
typedef NDIS_WORK_ITEM _workitem;
|
|
||||||
|
|
||||||
#define thread_exit() PsTerminateSystemThread(STATUS_SUCCESS);
|
|
||||||
|
|
||||||
#define HZ 10000000
|
|
||||||
#define SEMA_UPBND (0x7FFFFFFF) //8192
|
|
||||||
|
|
||||||
__inline static _list *get_next(_list *list)
|
|
||||||
{
|
|
||||||
return list->Flink;
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static _list *get_list_head(_queue *queue)
|
|
||||||
{
|
|
||||||
return (&(queue->queue));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member)
|
|
||||||
|
|
||||||
|
|
||||||
__inline static _enter_critical(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisAcquireSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static _exit_critical(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisReleaseSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisDprAcquireSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisDprReleaseSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _enter_critical_bh(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisDprAcquireSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _exit_critical_bh(_lock *plock, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
NdisDprReleaseSpinLock(plock);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static _enter_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
KeWaitForSingleObject(pmutex, Executive, KernelMode, FALSE, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
__inline static _exit_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
|
||||||
{
|
|
||||||
KeReleaseMutex(pmutex, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
__inline static void rtw_list_delete(_list *plist)
|
|
||||||
{
|
|
||||||
RemoveEntryList(plist);
|
|
||||||
InitializeListHead(plist);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define RTW_TIMER_HDL_ARGS IN PVOID SystemSpecific1, IN PVOID FunctionContext, IN PVOID SystemSpecific2, IN PVOID SystemSpecific3
|
|
||||||
|
|
||||||
__inline static void _init_timer(struct timer_list *ptimer,_nic_hdl nic_hdl,void *pfunc,PVOID cntx)
|
|
||||||
{
|
|
||||||
NdisMInitializeTimer(ptimer, nic_hdl, pfunc, cntx);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _set_timer(struct timer_list *ptimer,u32 delay_time)
|
|
||||||
{
|
|
||||||
NdisMSetTimer(ptimer,delay_time);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _cancel_timer(struct timer_list *ptimer,u8 *bcancelled)
|
|
||||||
{
|
|
||||||
NdisMCancelTimer(ptimer,bcancelled);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
|
||||||
{
|
|
||||||
|
|
||||||
NdisInitializeWorkItem(pwork, pfunc, cntx);
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void _set_workitem(_workitem *pwork)
|
|
||||||
{
|
|
||||||
NdisScheduleWorkItem(pwork);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define ATOMIC_INIT(i) { (i) }
|
|
||||||
|
|
||||||
//
|
|
||||||
// Global Mutex: can only be used at PASSIVE level.
|
|
||||||
//
|
|
||||||
|
|
||||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
|
||||||
{ \
|
|
||||||
while (NdisInterlockedIncrement((PULONG)&(_MutexCounter)) != 1)\
|
|
||||||
{ \
|
|
||||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
|
||||||
NdisMSleep(10000); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
|
||||||
{ \
|
|
||||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
|
||||||
}
|
|
||||||
|
|
||||||
// limitation of path length
|
|
||||||
#define PATH_LENGTH_MAX MAX_PATH
|
|
||||||
|
|
||||||
//Atomic integer operations
|
|
||||||
#define ATOMIC_T LONG
|
|
||||||
|
|
||||||
|
|
||||||
#define NDEV_FMT "%s"
|
|
||||||
#define NDEV_ARG(ndev) ""
|
|
||||||
#define ADPT_FMT "%s"
|
|
||||||
#define ADPT_ARG(adapter) ""
|
|
||||||
#define FUNC_NDEV_FMT "%s"
|
|
||||||
#define FUNC_NDEV_ARG(ndev) __func__
|
|
||||||
#define FUNC_ADPT_FMT "%s"
|
|
||||||
#define FUNC_ADPT_ARG(adapter) __func__
|
|
||||||
|
|
||||||
#define STRUCT_PACKED
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef __SDIO_HAL_H__
|
|
||||||
#define __SDIO_HAL_H__
|
|
||||||
|
|
||||||
void sd_int_dpc(PADAPTER padapter);
|
|
||||||
u8 rtw_set_hal_ops(_adapter *padapter);
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8188E
|
|
||||||
void rtl8188es_set_hal_ops(PADAPTER padapter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8723B
|
|
||||||
void rtl8723bs_set_hal_ops(PADAPTER padapter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8821A
|
|
||||||
void rtl8821as_set_hal_ops(PADAPTER padapter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8192E
|
|
||||||
void rtl8192es_set_hal_ops(PADAPTER padapter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8703B
|
|
||||||
void rtl8703bs_set_hal_ops(PADAPTER padapter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8723D
|
|
||||||
void rtl8723ds_set_hal_ops(PADAPTER padapter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8188F
|
|
||||||
void rtl8188fs_set_hal_ops(PADAPTER padapter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __SDIO_HAL_H__ */
|
|
|
@ -1,136 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef __SDIO_OPS_H__
|
|
||||||
#define __SDIO_OPS_H__
|
|
||||||
|
|
||||||
|
|
||||||
/* Follow mac team suggestion, default I/O fail return value is 0xFF */
|
|
||||||
#define SDIO_ERR_VAL8 0xFF
|
|
||||||
#define SDIO_ERR_VAL16 0xFFFF
|
|
||||||
#define SDIO_ERR_VAL32 0xFFFFFFFF
|
|
||||||
|
|
||||||
#include <sdio_ops_linux.h>
|
|
||||||
|
|
||||||
extern void sdio_set_intf_ops(_adapter *padapter, struct _io_ops *pops);
|
|
||||||
|
|
||||||
extern u8 SdioLocalCmd52Read1Byte(PADAPTER padapter, u32 addr);
|
|
||||||
extern void SdioLocalCmd52Write1Byte(PADAPTER padapter, u32 addr, u8 v);
|
|
||||||
extern s32 _sdio_local_read(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
|
|
||||||
extern s32 sdio_local_read(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
|
|
||||||
extern s32 _sdio_local_write(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
|
|
||||||
extern s32 sdio_local_write(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
|
|
||||||
|
|
||||||
u32 _sdio_read32(PADAPTER padapter, u32 addr);
|
|
||||||
s32 _sdio_write32(PADAPTER padapter, u32 addr, u32 val);
|
|
||||||
|
|
||||||
extern void sd_int_hdl(PADAPTER padapter);
|
|
||||||
extern u8 CheckIPSStatus(PADAPTER padapter);
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8188E
|
|
||||||
extern void InitInterrupt8188ESdio(PADAPTER padapter);
|
|
||||||
extern void EnableInterrupt8188ESdio(PADAPTER padapter);
|
|
||||||
extern void DisableInterrupt8188ESdio(PADAPTER padapter);
|
|
||||||
extern void UpdateInterruptMask8188ESdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
|
|
||||||
extern u8 HalQueryTxBufferStatus8189ESdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxOQTBufferStatus8189ESdio(PADAPTER padapter);
|
|
||||||
extern void ClearInterrupt8188ESdio(PADAPTER padapter);
|
|
||||||
#endif /* CONFIG_RTL8188E */
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8821A
|
|
||||||
extern void InitInterrupt8821AS(PADAPTER padapter);
|
|
||||||
extern void EnableInterrupt8821AS(PADAPTER padapter);
|
|
||||||
extern void DisableInterrupt8821AS(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxBufferStatus8821AS(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxOQTBufferStatus8821ASdio(PADAPTER padapter);
|
|
||||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
|
||||||
void ClearInterrupt8821AS(PADAPTER padapter);
|
|
||||||
#endif /* defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) */
|
|
||||||
#endif /* CONFIG_RTL8821A */
|
|
||||||
|
|
||||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
|
||||||
#ifdef CONFIG_RTL8821C
|
|
||||||
u8 rtw_hal_enable_cpwm2(_adapter *adapter);
|
|
||||||
#endif
|
|
||||||
extern u8 RecvOnePkt(PADAPTER padapter);
|
|
||||||
#endif /* CONFIG_WOWLAN */
|
|
||||||
#ifdef CONFIG_RTL8723B
|
|
||||||
extern void InitInterrupt8723BSdio(PADAPTER padapter);
|
|
||||||
extern void InitSysInterrupt8723BSdio(PADAPTER padapter);
|
|
||||||
extern void EnableInterrupt8723BSdio(PADAPTER padapter);
|
|
||||||
extern void DisableInterrupt8723BSdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxBufferStatus8723BSdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxOQTBufferStatus8723BSdio(PADAPTER padapter);
|
|
||||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
|
||||||
extern void DisableInterruptButCpwm28723BSdio(PADAPTER padapter);
|
|
||||||
extern void ClearInterrupt8723BSdio(PADAPTER padapter);
|
|
||||||
#endif /* CONFIG_WOWLAN */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8192E
|
|
||||||
extern void InitInterrupt8192ESdio(PADAPTER padapter);
|
|
||||||
extern void EnableInterrupt8192ESdio(PADAPTER padapter);
|
|
||||||
extern void DisableInterrupt8192ESdio(PADAPTER padapter);
|
|
||||||
extern void UpdateInterruptMask8192ESdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
|
|
||||||
extern u8 HalQueryTxBufferStatus8192ESdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxOQTBufferStatus8192ESdio(PADAPTER padapter);
|
|
||||||
extern void ClearInterrupt8192ESdio(PADAPTER padapter);
|
|
||||||
#endif /* CONFIG_RTL8192E */
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8703B
|
|
||||||
extern void InitInterrupt8703BSdio(PADAPTER padapter);
|
|
||||||
extern void InitSysInterrupt8703BSdio(PADAPTER padapter);
|
|
||||||
extern void EnableInterrupt8703BSdio(PADAPTER padapter);
|
|
||||||
extern void DisableInterrupt8703BSdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxBufferStatus8703BSdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxOQTBufferStatus8703BSdio(PADAPTER padapter);
|
|
||||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
|
||||||
extern void DisableInterruptButCpwm28703BSdio(PADAPTER padapter);
|
|
||||||
extern void ClearInterrupt8703BSdio(PADAPTER padapter);
|
|
||||||
#endif /* CONFIG_WOWLAN */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8723D
|
|
||||||
extern void InitInterrupt8723DSdio(PADAPTER padapter);
|
|
||||||
extern void InitSysInterrupt8723DSdio(PADAPTER padapter);
|
|
||||||
extern void EnableInterrupt8723DSdio(PADAPTER padapter);
|
|
||||||
extern void DisableInterrupt8723DSdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxBufferStatus8723DSdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxOQTBufferStatus8723DSdio(PADAPTER padapter);
|
|
||||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
|
||||||
extern void DisableInterruptButCpwm28723dSdio(PADAPTER padapter);
|
|
||||||
extern void ClearInterrupt8723DSdio(PADAPTER padapter);
|
|
||||||
#endif /* CONFIG_WOWLAN */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8188F
|
|
||||||
extern void InitInterrupt8188FSdio(PADAPTER padapter);
|
|
||||||
extern void InitSysInterrupt8188FSdio(PADAPTER padapter);
|
|
||||||
extern void EnableInterrupt8188FSdio(PADAPTER padapter);
|
|
||||||
extern void DisableInterrupt8188FSdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxBufferStatus8188FSdio(PADAPTER padapter);
|
|
||||||
extern u8 HalQueryTxOQTBufferStatus8188FSdio(PADAPTER padapter);
|
|
||||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
|
||||||
extern void DisableInterruptButCpwm28188FSdio(PADAPTER padapter);
|
|
||||||
extern void ClearInterrupt8188FSdio(PADAPTER padapter);
|
|
||||||
#endif /* defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !__SDIO_OPS_H__ */
|
|
|
@ -1,28 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef _SDIO_OPS_WINCE_H_
|
|
||||||
#define _SDIO_OPS_WINCE_H_
|
|
||||||
|
|
||||||
#include <drv_conf.h>
|
|
||||||
#include <osdep_service.h>
|
|
||||||
#include <drv_types.h>
|
|
||||||
#include <osdep_intf.h>
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,53 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef __SDIO_OPS_LINUX_H__
|
|
||||||
#define __SDIO_OPS_LINUX_H__
|
|
||||||
|
|
||||||
#ifndef RTW_HALMAC
|
|
||||||
u8 sd_f0_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
|
|
||||||
void sd_f0_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err);
|
|
||||||
|
|
||||||
s32 _sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata);
|
|
||||||
s32 _sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata);
|
|
||||||
s32 sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata);
|
|
||||||
s32 sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata);
|
|
||||||
|
|
||||||
u8 _sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
|
|
||||||
u8 sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
|
|
||||||
u16 sd_read16(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
|
|
||||||
u32 _sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
|
|
||||||
u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
|
|
||||||
void sd_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err);
|
|
||||||
void sd_write16(struct intf_hdl *pintfhdl, u32 addr, u16 v, s32 *err);
|
|
||||||
void _sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err);
|
|
||||||
void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err);
|
|
||||||
#endif /* RTW_HALMAC */
|
|
||||||
|
|
||||||
s32 _sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
|
|
||||||
s32 sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
|
|
||||||
s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
|
|
||||||
s32 sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
|
|
||||||
|
|
||||||
void rtw_sdio_set_irq_thd(struct dvobj_priv *dvobj, _thread_hdl_ thd_hdl);
|
|
||||||
int __must_check rtw_sdio_raw_read(struct dvobj_priv *d, int addr,
|
|
||||||
void *buf, size_t len, bool fixed);
|
|
||||||
int __must_check rtw_sdio_raw_write(struct dvobj_priv *d, int addr,
|
|
||||||
void *buf, size_t len, bool fixed);
|
|
||||||
#endif
|
|
|
@ -1,29 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef _SDIO_OPS_XP_H_
|
|
||||||
#define _SDIO_OPS_XP_H_
|
|
||||||
|
|
||||||
#include <drv_conf.h>
|
|
||||||
#include <osdep_service.h>
|
|
||||||
#include <drv_types.h>
|
|
||||||
#include <osdep_intf.h>
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,23 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
||||||
*
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
#ifndef __SDIO_OSINTF_H__
|
|
||||||
#define __SDIO_OSINTF_H__
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in a new issue