mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 20:43:40 +00:00
rtl8188eu: Remove special code for Windows and FreeBSD from include/
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
d8ced1a187
commit
841934da48
50 changed files with 180 additions and 1844 deletions
|
@ -36,46 +36,6 @@
|
|||
#define _FALSE FALSE
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
typedef signed char s8;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef signed short s16;
|
||||
typedef unsigned short u16;
|
||||
|
||||
typedef signed long s32;
|
||||
typedef unsigned long u32;
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef signed int sint;
|
||||
|
||||
|
||||
typedef signed long long s64;
|
||||
typedef unsigned long long u64;
|
||||
|
||||
#ifdef NDIS50_MINIPORT
|
||||
|
||||
#define NDIS_MAJOR_VERSION 5
|
||||
#define NDIS_MINOR_VERSION 0
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef NDIS51_MINIPORT
|
||||
|
||||
#define NDIS_MAJOR_VERSION 5
|
||||
#define NDIS_MINOR_VERSION 1
|
||||
|
||||
#endif
|
||||
|
||||
typedef NDIS_PROC proc_t;
|
||||
|
||||
typedef LONG atomic_t;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
|
@ -110,53 +70,6 @@
|
|||
typedef __kernel_ssize_t SSIZE_T;
|
||||
#define FIELD_OFFSET(s, field) ((SSIZE_T)&((s *)(0))->field)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
|
||||
typedef signed char s8;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef signed short s16;
|
||||
typedef unsigned short u16;
|
||||
|
||||
typedef signed int s32;
|
||||
typedef unsigned int u32;
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef signed int sint;
|
||||
typedef long atomic_t;
|
||||
|
||||
typedef signed long long s64;
|
||||
typedef unsigned long long u64;
|
||||
#define IN
|
||||
#define OUT
|
||||
#define VOID void
|
||||
#define NDIS_OID uint
|
||||
#define NDIS_STATUS uint
|
||||
|
||||
#ifndef PVOID
|
||||
typedef void *PVOID;
|
||||
/* #define PVOID (void *) */
|
||||
#endif
|
||||
typedef u32 dma_addr_t;
|
||||
#define UCHAR u8
|
||||
#define USHORT u16
|
||||
#define UINT u32
|
||||
#define ULONG u32
|
||||
|
||||
typedef void (*proc_t)(void *);
|
||||
|
||||
typedef unsigned int __kernel_size_t;
|
||||
typedef int __kernel_ssize_t;
|
||||
|
||||
typedef __kernel_size_t SIZE_T;
|
||||
typedef __kernel_ssize_t SSIZE_T;
|
||||
#define FIELD_OFFSET(s, field) ((SSIZE_T)&((s *)(0))->field)
|
||||
|
||||
#endif
|
||||
|
||||
#define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T))
|
||||
#define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1)
|
||||
|
||||
|
|
|
@ -98,49 +98,46 @@
|
|||
*/
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_WINDOWS) || defined(PLATFORM_MPIXEL) || defined(PLATFORM_FREEBSD)
|
||||
/*
|
||||
* inside the kernel, we can use nicknames;
|
||||
* outside of it, we must avoid POSIX namespace pollution...
|
||||
*/
|
||||
#define cpu_to_le64 __cpu_to_le64
|
||||
#define le64_to_cpu __le64_to_cpu
|
||||
#define cpu_to_le32 __cpu_to_le32
|
||||
#define le32_to_cpu __le32_to_cpu
|
||||
#define cpu_to_le16 __cpu_to_le16
|
||||
#define le16_to_cpu __le16_to_cpu
|
||||
#define cpu_to_be64 __cpu_to_be64
|
||||
#define be64_to_cpu __be64_to_cpu
|
||||
#define cpu_to_be32 __cpu_to_be32
|
||||
#define be32_to_cpu __be32_to_cpu
|
||||
#define cpu_to_be16 __cpu_to_be16
|
||||
#define be16_to_cpu __be16_to_cpu
|
||||
#define cpu_to_le64p __cpu_to_le64p
|
||||
#define le64_to_cpup __le64_to_cpup
|
||||
#define cpu_to_le32p __cpu_to_le32p
|
||||
#define le32_to_cpup __le32_to_cpup
|
||||
#define cpu_to_le16p __cpu_to_le16p
|
||||
#define le16_to_cpup __le16_to_cpup
|
||||
#define cpu_to_be64p __cpu_to_be64p
|
||||
#define be64_to_cpup __be64_to_cpup
|
||||
#define cpu_to_be32p __cpu_to_be32p
|
||||
#define be32_to_cpup __be32_to_cpup
|
||||
#define cpu_to_be16p __cpu_to_be16p
|
||||
#define be16_to_cpup __be16_to_cpup
|
||||
#define cpu_to_le64s __cpu_to_le64s
|
||||
#define le64_to_cpus __le64_to_cpus
|
||||
#define cpu_to_le32s __cpu_to_le32s
|
||||
#define le32_to_cpus __le32_to_cpus
|
||||
#define cpu_to_le16s __cpu_to_le16s
|
||||
#define le16_to_cpus __le16_to_cpus
|
||||
#define cpu_to_be64s __cpu_to_be64s
|
||||
#define be64_to_cpus __be64_to_cpus
|
||||
#define cpu_to_be32s __cpu_to_be32s
|
||||
#define be32_to_cpus __be32_to_cpus
|
||||
#define cpu_to_be16s __cpu_to_be16s
|
||||
#define be16_to_cpus __be16_to_cpus
|
||||
#endif
|
||||
|
||||
/*
|
||||
* inside the kernel, we can use nicknames;
|
||||
* outside of it, we must avoid POSIX namespace pollution...
|
||||
*/
|
||||
#define cpu_to_le64 __cpu_to_le64
|
||||
#define le64_to_cpu __le64_to_cpu
|
||||
#define cpu_to_le32 __cpu_to_le32
|
||||
#define le32_to_cpu __le32_to_cpu
|
||||
#define cpu_to_le16 __cpu_to_le16
|
||||
#define le16_to_cpu __le16_to_cpu
|
||||
#define cpu_to_be64 __cpu_to_be64
|
||||
#define be64_to_cpu __be64_to_cpu
|
||||
#define cpu_to_be32 __cpu_to_be32
|
||||
#define be32_to_cpu __be32_to_cpu
|
||||
#define cpu_to_be16 __cpu_to_be16
|
||||
#define be16_to_cpu __be16_to_cpu
|
||||
#define cpu_to_le64p __cpu_to_le64p
|
||||
#define le64_to_cpup __le64_to_cpup
|
||||
#define cpu_to_le32p __cpu_to_le32p
|
||||
#define le32_to_cpup __le32_to_cpup
|
||||
#define cpu_to_le16p __cpu_to_le16p
|
||||
#define le16_to_cpup __le16_to_cpup
|
||||
#define cpu_to_be64p __cpu_to_be64p
|
||||
#define be64_to_cpup __be64_to_cpup
|
||||
#define cpu_to_be32p __cpu_to_be32p
|
||||
#define be32_to_cpup __be32_to_cpup
|
||||
#define cpu_to_be16p __cpu_to_be16p
|
||||
#define be16_to_cpup __be16_to_cpup
|
||||
#define cpu_to_le64s __cpu_to_le64s
|
||||
#define le64_to_cpus __le64_to_cpus
|
||||
#define cpu_to_le32s __cpu_to_le32s
|
||||
#define le32_to_cpus __le32_to_cpus
|
||||
#define cpu_to_le16s __cpu_to_le16s
|
||||
#define le16_to_cpus __le16_to_cpus
|
||||
#define cpu_to_be64s __cpu_to_be64s
|
||||
#define be64_to_cpus __be64_to_cpus
|
||||
#define cpu_to_be32s __cpu_to_be32s
|
||||
#define be32_to_cpus __be32_to_cpus
|
||||
#define cpu_to_be16s __cpu_to_be16s
|
||||
#define be16_to_cpus __be16_to_cpus
|
||||
|
||||
/*
|
||||
* Handle ntohl and suches. These have various compatibility
|
||||
|
@ -165,19 +162,10 @@
|
|||
* Do the prototypes. Somebody might want to take the
|
||||
* address or some such sick thing..
|
||||
*/
|
||||
#if defined(PLATFORM_LINUX) || (defined(__GLIBC__) && __GLIBC__ >= 2)
|
||||
extern __u32 ntohl(__u32);
|
||||
extern __u32 htonl(__u32);
|
||||
#else /* defined(PLATFORM_LINUX) || (defined (__GLIBC__) && __GLIBC__ >= 2) */
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern unsigned long int ntohl(unsigned long int);
|
||||
extern unsigned long int htonl(unsigned long int);
|
||||
#endif
|
||||
#endif
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern unsigned short int ntohs(unsigned short int);
|
||||
extern unsigned short int htons(unsigned short int);
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) || defined(PLATFORM_MPIXEL)
|
||||
|
||||
|
@ -186,27 +174,11 @@
|
|||
#define ___ntohl(x) __be32_to_cpu(x)
|
||||
#define ___ntohs(x) __be16_to_cpu(x)
|
||||
|
||||
#if defined(PLATFORM_LINUX) || (defined(__GLIBC__) && __GLIBC__ >= 2)
|
||||
#define htonl(x) ___htonl(x)
|
||||
#define ntohl(x) ___ntohl(x)
|
||||
#else
|
||||
#define htonl(x) ((unsigned long)___htonl(x))
|
||||
#define ntohl(x) ((unsigned long)___ntohl(x))
|
||||
#endif
|
||||
#define htonl(x) ___htonl(x)
|
||||
#define ntohl(x) ___ntohl(x)
|
||||
#define htons(x) ___htons(x)
|
||||
#define ntohs(x) ___ntohs(x)
|
||||
|
||||
#endif /* OPTIMIZE */
|
||||
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
|
||||
#define htonl(x) __cpu_to_be32(x)
|
||||
#define ntohl(x) __be32_to_cpu(x)
|
||||
#define htons(x) __cpu_to_be16(x)
|
||||
#define ntohs(x) __be16_to_cpu(x)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_BYTEORDER_GENERIC_H */
|
||||
|
|
|
@ -109,24 +109,15 @@ __inline static __u64 __arch__swab64(__u64 x)
|
|||
#define __swab64(x) __fswab64(x)
|
||||
#endif /* __swab16 */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
__inline static __u16 __fswab16(__u16 x)
|
||||
#else
|
||||
__inline static const __u16 __fswab16(__u16 x)
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
{
|
||||
return __arch__swab16(x);
|
||||
}
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
__inline static __u32 __fswab32(__u32 x)
|
||||
#else
|
||||
__inline static const __u32 __fswab32(__u32 x)
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
{
|
||||
return __arch__swab32(x);
|
||||
}
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_WINDOWS)
|
||||
#define swab16 __swab16
|
||||
#define swab32 __swab32
|
||||
#define swab64 __swab64
|
||||
|
@ -136,6 +127,5 @@ __inline static __u64 __arch__swab64(__u64 x)
|
|||
#define swab16s __swab16s
|
||||
#define swab32s __swab32s
|
||||
#define swab64s __swab64s
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_BYTEORDER_SWAB_H */
|
||||
|
|
|
@ -144,13 +144,11 @@ __inline static__ void __swahb32s(__u32 *addr)
|
|||
*/
|
||||
#endif /* __BYTEORDER_HAS_U64__ */
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
#define swahw32 __swahw32
|
||||
#define swahb32 __swahb32
|
||||
#define swahw32p __swahw32p
|
||||
#define swahb32p __swahb32p
|
||||
#define swahw32s __swahw32s
|
||||
#define swahb32s __swahb32s
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_BYTEORDER_SWABB_H */
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <drv_types_xp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <drv_types_ce.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <drv_types_linux.h>
|
||||
#endif
|
||||
#include <drv_types_linux.h>
|
||||
|
||||
typedef enum cust_gpio_modes {
|
||||
WLAN_PWDN_ON,
|
||||
|
|
|
@ -22,12 +22,6 @@
|
|||
#include "autoconf.h"
|
||||
#include "hal_ic_cfg.h"
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MCC_MODE) && (!defined(CONFIG_CONCURRENT_MODE))
|
||||
|
||||
#error "Enable CONCURRENT_MODE before enable MCC MODE\n"
|
||||
|
|
|
@ -39,17 +39,7 @@
|
|||
#include <net/arp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <drv_types_xp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <drv_types_ce.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <drv_types_linux.h>
|
||||
#endif
|
||||
#include <drv_types_linux.h>
|
||||
|
||||
enum _NIC_VERSION {
|
||||
|
||||
|
@ -924,13 +914,11 @@ struct dvobj_priv {
|
|||
|
||||
struct rtw_traffic_statistics traffic_stat;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_thread_hdl_ rtnl_lock_holder;
|
||||
|
||||
#if defined(CONFIG_IOCTL_CFG80211) && defined(RTW_SINGLE_WIPHY)
|
||||
struct wiphy *wiphy;
|
||||
#endif
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#ifdef CONFIG_SWTIMER_BASED_TXBCN
|
||||
struct timer_list txbcn_timer;
|
||||
|
@ -977,40 +965,8 @@ struct dvobj_priv {
|
|||
u8 *usb_vendor_req_buf;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
/* related device objects */
|
||||
PDEVICE_OBJECT pphysdevobj;/* pPhysDevObj; */
|
||||
PDEVICE_OBJECT pfuncdevobj;/* pFuncDevObj; */
|
||||
PDEVICE_OBJECT pnextdevobj;/* pNextDevObj; */
|
||||
|
||||
u8 nextdevstacksz;/* unsigned char NextDeviceStackSize; */ /* = (CHAR)CEdevice->pUsbDevObj->StackSize + 1; */
|
||||
|
||||
/* urb for control diescriptor request */
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
struct _URB_CONTROL_DESCRIPTOR_REQUEST descriptor_urb;
|
||||
PUSB_CONFIGURATION_DESCRIPTOR pconfig_descriptor;/* UsbConfigurationDescriptor; */
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
WCHAR active_path[MAX_ACTIVE_REG_PATH]; /* adapter regpath */
|
||||
USB_EXTENSION usb_extension;
|
||||
|
||||
_nic_hdl pipehdls_r8192c[0x10];
|
||||
#endif
|
||||
|
||||
u32 config_descriptor_len;/* ULONG UsbConfigurationDescriptorLength; */
|
||||
#endif/* PLATFORM_WINDOWS */
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct usb_interface *pusbintf;
|
||||
struct usb_device *pusbdev;
|
||||
#endif/* PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
struct usb_interface *pusbintf;
|
||||
struct usb_device *pusbdev;
|
||||
#endif/* PLATFORM_FREEBSD */
|
||||
|
||||
#endif/* CONFIG_USB_HCI */
|
||||
|
||||
|
@ -1018,7 +974,6 @@ struct dvobj_priv {
|
|||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct pci_dev *ppcidev;
|
||||
|
||||
/* PCI MEM map */
|
||||
|
@ -1060,7 +1015,6 @@ struct dvobj_priv {
|
|||
u8 b_support_aspm; /* If it supports ASPM, Offset[560h] = 0x40, otherwise Offset[560h] = 0x00. */
|
||||
u8 b_support_backdoor;
|
||||
u8 bdma64;
|
||||
#endif/* PLATFORM_LINUX */
|
||||
|
||||
#endif/* CONFIG_PCI_HCI */
|
||||
|
||||
|
@ -1113,13 +1067,9 @@ static inline void dev_clr_drv_stopped(struct dvobj_priv *dvobj)
|
|||
#define dev_is_surprise_removed(dvobj) (ATOMIC_READ(&dvobj->bSurpriseRemoved) == _TRUE)
|
||||
#define dev_is_drv_stopped(dvobj) (ATOMIC_READ(&dvobj->bDriverStopped) == _TRUE)
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
||||
{
|
||||
/* todo: get interface type from dvobj and the return the dev accordingly */
|
||||
#ifdef RTW_DVOBJ_CHIP_HW_TYPE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
return &dvobj->pusbintf->dev;
|
||||
#endif
|
||||
|
@ -1133,7 +1083,6 @@ static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
|||
return &dvobj->ppcidev->dev;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
_adapter *dvobj_get_port0_adapter(struct dvobj_priv *dvobj);
|
||||
_adapter *dvobj_get_unregisterd_adapter(struct dvobj_priv *dvobj);
|
||||
|
@ -1222,7 +1171,7 @@ struct _ADAPTER {
|
|||
struct recv_priv recvpriv;
|
||||
struct sta_priv stapriv;
|
||||
struct security_priv securitypriv;
|
||||
_lock security_key_mutex; /* add for CONFIG_IEEE80211W, none 11w also can use */
|
||||
spinlock_t security_key_mutex; /* add for CONFIG_IEEE80211W, non 11w also can use */
|
||||
struct registry_priv registrypriv;
|
||||
|
||||
struct led_priv ledpriv;
|
||||
|
@ -1301,10 +1250,6 @@ struct _ADAPTER {
|
|||
_thread_hdl_ recvThread;
|
||||
|
||||
u8 registered;
|
||||
#ifndef PLATFORM_LINUX
|
||||
NDIS_STATUS(*dvobj_init)(struct dvobj_priv *dvobj);
|
||||
void (*dvobj_deinit)(struct dvobj_priv *dvobj);
|
||||
#endif
|
||||
|
||||
u32(*intf_init)(struct dvobj_priv *dvobj);
|
||||
void (*intf_deinit)(struct dvobj_priv *dvobj);
|
||||
|
@ -1315,18 +1260,6 @@ struct _ADAPTER {
|
|||
void (*intf_start)(_adapter *adapter);
|
||||
void (*intf_stop)(_adapter *adapter);
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
_nic_hdl hndis_adapter;/* hNdisAdapter(NDISMiniportAdapterHandle); */
|
||||
_nic_hdl hndis_config;/* hNdisConfiguration; */
|
||||
NDIS_STRING fw_img;
|
||||
|
||||
u32 NdisPacketFilter;
|
||||
u8 MCList[MAX_MCAST_LIST_NUM][6];
|
||||
u32 MCAddrCount;
|
||||
#endif /* end of PLATFORM_WINDOWS */
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_nic_hdl pnetdev;
|
||||
char old_ifname[IFNAMSIZ];
|
||||
|
||||
|
@ -1359,13 +1292,6 @@ struct _ADAPTER {
|
|||
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
_nic_hdl pifp;
|
||||
int bup;
|
||||
_lock glock;
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
int net_closed;
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#define __DRV_TYPES_GSPI_H__
|
||||
|
||||
/* SPI Header Files */
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/gpio.h>
|
||||
|
@ -33,7 +32,6 @@
|
|||
#include <mach/hardware.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <custom_gpio.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct gspi_data {
|
||||
|
@ -43,12 +41,10 @@ typedef struct gspi_data {
|
|||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct spi_device *func;
|
||||
|
||||
struct workqueue_struct *priv_wq;
|
||||
struct delayed_work irq_work;
|
||||
#endif
|
||||
} GSPI_DATA, *PGSPI_DATA;
|
||||
|
||||
#endif /* #ifndef __DRV_TYPES_GSPI_H__ */
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#define __DRV_TYPES_PCI_H__
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/pci.h>
|
||||
#endif
|
||||
#include <linux/pci.h>
|
||||
|
||||
|
||||
#define INTEL_VENDOR_ID 0x8086
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#define __DRV_TYPES_SDIO_H__
|
||||
|
||||
/* SDIO Header Files */
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/mmc/sdio_func.h>
|
||||
#include <linux/mmc/sdio_ids.h>
|
||||
|
||||
|
@ -34,17 +33,6 @@
|
|||
#include <linux/gpio.h>
|
||||
#include <custom_gpio.h>
|
||||
#endif /* CONFIG_PLATFORM_SPRD */
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <wdm.h>
|
||||
#include <ntddsd.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <sdcardddk.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct sdio_data {
|
||||
u8 func_number;
|
||||
|
@ -53,27 +41,9 @@ typedef struct sdio_data {
|
|||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct sdio_func *func;
|
||||
_thread_hdl_ sys_sdio_irq_thd;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PDEVICE_OBJECT pphysdevobj;
|
||||
PDEVICE_OBJECT pfuncdevobj;
|
||||
PDEVICE_OBJECT pnextdevobj;
|
||||
SDBUS_INTERFACE_STANDARD sdbusinft;
|
||||
u8 nextdevstacksz;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
SD_DEVICE_HANDLE hDevice;
|
||||
SD_CARD_RCA sd_rca;
|
||||
SD_CARD_INTERFACE card_intf;
|
||||
BOOLEAN enableIsarWithStatus;
|
||||
WCHAR active_path[MAX_ACTIVE_REG_PATH];
|
||||
SD_HOST_BLOCK_CAPABILITY sd_host_blk_cap;
|
||||
#endif
|
||||
} SDIO_DATA, *PSDIO_DATA;
|
||||
|
||||
#define dvobj_to_sdio_func(d) ((d)->intf_data.func)
|
||||
|
|
|
@ -20,11 +20,4 @@
|
|||
#ifndef __SDIO_OSINTF_H__
|
||||
#define __SDIO_OSINTF_H__
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
extern NDIS_STATUS ce_sd_get_dev_hdl(PADAPTER padapter);
|
||||
SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, PADAPTER padapter);
|
||||
extern void sd_setup_irs(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,15 +21,6 @@
|
|||
#define __IEEE80211_H
|
||||
|
||||
|
||||
#ifndef CONFIG_RTL8711FW
|
||||
|
||||
#if defined PLATFORM_OS_XP
|
||||
#include <ntstrsafe.h>
|
||||
#endif
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
#define MGMT_QUEUE_NUM 5
|
||||
|
||||
#define ETH_ALEN 6
|
||||
|
@ -502,8 +493,6 @@ enum eap_type {
|
|||
|
||||
#define P80211_OUI_LEN 3
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) || defined(PLATFORM_FREEBSD)
|
||||
|
||||
struct ieee80211_snap_hdr {
|
||||
|
||||
u8 dsap; /* always 0xAA */
|
||||
|
@ -513,24 +502,6 @@ struct ieee80211_snap_hdr {
|
|||
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
struct ieee80211_snap_hdr {
|
||||
|
||||
u8 dsap; /* always 0xAA */
|
||||
u8 ssap; /* always 0xAA */
|
||||
u8 ctrl; /* always 0x03 */
|
||||
u8 oui[P80211_OUI_LEN]; /* organizational universal id */
|
||||
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
|
||||
|
||||
#define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE)
|
||||
|
@ -989,7 +960,6 @@ struct ieee80211_frag_entry {
|
|||
u8 dst_addr[ETH_ALEN];
|
||||
};
|
||||
|
||||
#ifndef PLATFORM_FREEBSD /* Baron BSD has already defined */
|
||||
struct ieee80211_stats {
|
||||
uint tx_unicast_frames;
|
||||
uint tx_multicast_frames;
|
||||
|
@ -1013,7 +983,7 @@ struct ieee80211_stats {
|
|||
uint rx_message_in_msg_fragments;
|
||||
uint rx_message_in_bad_msg_fragments;
|
||||
};
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
struct ieee80211_softmac_stats {
|
||||
uint rx_ass_ok;
|
||||
uint rx_ass_err;
|
||||
|
@ -1058,8 +1028,6 @@ struct ieee80211_softmac_stats {
|
|||
#define BIP_AAD_SIZE 20
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
struct ieee80211_security {
|
||||
u16 active_key:2,
|
||||
enabled:1,
|
||||
|
@ -1072,26 +1040,6 @@ struct ieee80211_security {
|
|||
u16 flags;
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
struct ieee80211_security {
|
||||
u16 active_key:2,
|
||||
enabled:1,
|
||||
auth_mode:2,
|
||||
auth_algo:4,
|
||||
unicast_uses_group:1;
|
||||
u8 key_sizes[WEP_KEYS];
|
||||
u8 keys[WEP_KEYS][WEP_KEY_LEN];
|
||||
u8 level;
|
||||
u16 flags;
|
||||
} ;
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
802.11 data frame from AP
|
||||
|
@ -1132,8 +1080,6 @@ struct ieee80211_header_data {
|
|||
#define MFIE_TYPE_RATES_EX 50
|
||||
#define MFIE_TYPE_GENERIC 221
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
struct ieee80211_info_element_hdr {
|
||||
u8 id;
|
||||
u8 len;
|
||||
|
@ -1144,25 +1090,6 @@ struct ieee80211_info_element {
|
|||
u8 len;
|
||||
u8 data[0];
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
struct ieee80211_info_element_hdr {
|
||||
u8 id;
|
||||
u8 len;
|
||||
} ;
|
||||
|
||||
struct ieee80211_info_element {
|
||||
u8 id;
|
||||
u8 len;
|
||||
u8 data[0];
|
||||
} ;
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* These are the data types that can make up management packets
|
||||
|
@ -1184,10 +1111,6 @@ struct ieee80211_info_element {
|
|||
#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
|
||||
#define IEEE80211_DEFAULT_BASIC_RATE 10
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
|
||||
struct ieee80211_authentication {
|
||||
struct ieee80211_header_data header;
|
||||
u16 algorithm;
|
||||
|
@ -1225,58 +1148,6 @@ struct ieee80211_assoc_response_frame {
|
|||
u16 aid;
|
||||
/* struct ieee80211_info_element info_element; supported rates */
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct ieee80211_authentication {
|
||||
struct ieee80211_header_data header;
|
||||
u16 algorithm;
|
||||
u16 transaction;
|
||||
u16 status;
|
||||
/* struct ieee80211_info_element_hdr info_element; */
|
||||
} ;
|
||||
|
||||
|
||||
struct ieee80211_probe_response {
|
||||
struct ieee80211_header_data header;
|
||||
u32 time_stamp[2];
|
||||
u16 beacon_interval;
|
||||
u16 capability;
|
||||
struct ieee80211_info_element info_element;
|
||||
} ;
|
||||
|
||||
struct ieee80211_probe_request {
|
||||
struct ieee80211_header_data header;
|
||||
/*struct ieee80211_info_element info_element;*/
|
||||
} ;
|
||||
|
||||
struct ieee80211_assoc_request_frame {
|
||||
struct rtw_ieee80211_hdr_3addr header;
|
||||
u16 capability;
|
||||
u16 listen_interval;
|
||||
/* u8 current_ap[ETH_ALEN]; */
|
||||
struct ieee80211_info_element_hdr info_element;
|
||||
} ;
|
||||
|
||||
struct ieee80211_assoc_response_frame {
|
||||
struct rtw_ieee80211_hdr_3addr header;
|
||||
u16 capability;
|
||||
u16 status;
|
||||
u16 aid;
|
||||
/* struct ieee80211_info_element info_element; supported rates */
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
struct ieee80211_txb {
|
||||
u8 nr_frags;
|
||||
|
@ -1373,8 +1244,6 @@ join_res:
|
|||
> 0: TID
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_FREEBSD /* Baron BSD has already defined */
|
||||
|
||||
enum ieee80211_state {
|
||||
|
||||
/* the card is not linked at all */
|
||||
|
@ -1413,7 +1282,6 @@ enum ieee80211_state {
|
|||
IEEE80211_LINKED_SCANNING,
|
||||
|
||||
};
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
|
||||
#define DEFAULT_FTS 2346
|
||||
|
@ -1426,12 +1294,6 @@ enum ieee80211_state {
|
|||
#define PORT_FMT "%u"
|
||||
#define PORT_ARG(x) ntohs(*((u16 *)(x)))
|
||||
|
||||
#ifdef PLATFORM_FREEBSD /* Baron change func to macro */
|
||||
#define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff))
|
||||
#define is_broadcast_mac_addr(Addr) ((((Addr[0]) & 0xff) == 0xff) && (((Addr[1]) & 0xff) == 0xff) && \
|
||||
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
|
||||
(((Addr[5]) & 0xff) == 0xff))
|
||||
#else
|
||||
extern __inline int is_multicast_mac_addr(const u8 *addr)
|
||||
{
|
||||
return (addr[0] != 0xff) && (0x01 & addr[0]);
|
||||
|
@ -1448,7 +1310,6 @@ extern __inline int is_zero_mac_addr(const u8 *addr)
|
|||
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
|
||||
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
|
||||
}
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
||||
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
|
||||
|
@ -1608,9 +1469,7 @@ enum rtw_ieee80211_ft_actioncode {
|
|||
|
||||
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
|
||||
* 00:50:F2 */
|
||||
#ifndef PLATFORM_FREEBSD /* Baron BSD has defined */
|
||||
#define WME_OUI_TYPE 2
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
#define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0
|
||||
#define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1
|
||||
#define WME_OUI_SUBTYPE_TSPEC_ELEMENT 2
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#define PMKID_LEN 16
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
|
@ -103,29 +102,6 @@ struct wme_parameter_element {
|
|||
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
||||
u8 version[2]; /* little endian */
|
||||
};
|
||||
|
||||
struct rsn_ie_hdr {
|
||||
u8 elem_id; /* WLAN_EID_RSN */
|
||||
u8 len;
|
||||
u8 version[2]; /* little endian */
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(a)[1] = ((u16) (val)) >> 8; \
|
||||
|
@ -200,8 +176,6 @@ enum ieee80211_back_parties {
|
|||
WLAN_BACK_TIMER = 2,
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
|
@ -272,21 +246,6 @@ struct ieee80211_mgmt {
|
|||
u8 status_code;
|
||||
u8 variable[0];
|
||||
} __attribute__((packed)) wme_action;
|
||||
#if 0
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 element_id;
|
||||
u8 length;
|
||||
struct ieee80211_channel_sw_ie sw_elem;
|
||||
} __attribute__((packed)) chan_switch;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u8 element_id;
|
||||
u8 length;
|
||||
struct ieee80211_msrment_ie msr_elem;
|
||||
} __attribute__((packed)) measurement;
|
||||
#endif
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
|
@ -328,146 +287,6 @@ struct ieee80211_mgmt {
|
|||
} __attribute__((packed)) u;
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
u8 da[6];
|
||||
u8 sa[6];
|
||||
u8 bssid[6];
|
||||
u16 seq_ctrl;
|
||||
union {
|
||||
struct {
|
||||
u16 auth_alg;
|
||||
u16 auth_transaction;
|
||||
u16 status_code;
|
||||
/* possibly followed by Challenge text */
|
||||
u8 variable[0];
|
||||
} auth;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} deauth;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} assoc_req;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 status_code;
|
||||
u16 aid;
|
||||
/* followed by Supported rates */
|
||||
u8 variable[0];
|
||||
} assoc_resp, reassoc_resp;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
u8 current_ap[6];
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} reassoc_req;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} disassoc;
|
||||
#if 0
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
u16 capab_info;
|
||||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
||||
u8 variable[0];
|
||||
} beacon;
|
||||
struct {
|
||||
/* only variable items: SSID, Supported rates */
|
||||
u8 variable[0];
|
||||
} probe_req;
|
||||
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
u16 capab_info;
|
||||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params */
|
||||
u8 variable[0];
|
||||
} probe_resp;
|
||||
#endif
|
||||
struct {
|
||||
u8 category;
|
||||
union {
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u8 status_code;
|
||||
u8 variable[0];
|
||||
} wme_action;
|
||||
#if 0
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 element_id;
|
||||
u8 length;
|
||||
struct ieee80211_channel_sw_ie sw_elem;
|
||||
} chan_switch;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u8 element_id;
|
||||
u8 length;
|
||||
struct ieee80211_msrment_ie msr_elem;
|
||||
} measurement;
|
||||
#endif
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
u16 start_seq_num;
|
||||
} addba_req;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 status;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
} addba_resp;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u16 params;
|
||||
u16 reason_code;
|
||||
} delba;
|
||||
struct {
|
||||
u8 action_code;
|
||||
/* capab_info for open and confirm,
|
||||
* reason for close
|
||||
*/
|
||||
u16 aux;
|
||||
/* Followed in plink_confirm by status
|
||||
* code, AID and supported rates,
|
||||
* and directly by supported rates in
|
||||
* plink_open and plink_close
|
||||
*/
|
||||
u8 variable[0];
|
||||
} plink_action;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 variable[0];
|
||||
} mesh_action;
|
||||
} u;
|
||||
} action;
|
||||
} u;
|
||||
} ;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
/* mgmt header + 1 byte category code */
|
||||
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
||||
|
||||
|
|
|
@ -90,8 +90,6 @@
|
|||
#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
|
||||
#define IPOPT_TS_PRESPEC 3 /* specified modules only */
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
struct ip_options {
|
||||
__u32 faddr; /* Saved first hop address */
|
||||
unsigned char optlen;
|
||||
|
@ -113,7 +111,6 @@ struct ip_options {
|
|||
};
|
||||
|
||||
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
|
||||
#endif
|
||||
|
||||
struct iphdr {
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define __MLME_OSDEP_H_
|
||||
|
||||
|
||||
#if defined(PLATFORM_WINDOWS) || defined(PLATFORM_MPIXEL)
|
||||
#if defined(PLATFORM_MPIXEL)
|
||||
extern int time_after(u32 now, u32 old);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ struct intf_priv {
|
|||
_mutex ioctl_mutex;
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_USB_HCI
|
||||
/* when in USB, IO is through interrupt in/out endpoints */
|
||||
struct usb_device *udev;
|
||||
|
@ -60,28 +59,6 @@ struct intf_priv {
|
|||
u8 bio_irp_timeout;
|
||||
u8 bio_timer_cancel;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
/* below is for io_rwmem... */
|
||||
PMDL pmdl;
|
||||
PSDBUS_REQUEST_PACKET sdrp;
|
||||
PSDBUS_REQUEST_PACKET recv_sdrp;
|
||||
PSDBUS_REQUEST_PACKET xmit_sdrp;
|
||||
|
||||
PIRP piorw_irp;
|
||||
|
||||
#endif
|
||||
#ifdef CONFIG_USB_HCI
|
||||
PURB piorw_urb;
|
||||
PIRP piorw_irp;
|
||||
u8 io_irp_cnt;
|
||||
u8 bio_irp_pending;
|
||||
_sema io_retevt;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -107,7 +84,6 @@ void rtw_cancel_all_timer(_adapter *padapter);
|
|||
|
||||
uint loadparam(_adapter *adapter);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
|
||||
|
||||
int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname);
|
||||
|
@ -137,13 +113,6 @@ void rtw_ndev_notifier_unregister(void);
|
|||
u8 rtw_rtnl_lock_needed(struct dvobj_priv *dvobj);
|
||||
void rtw_set_rtnl_lock_holder(struct dvobj_priv *dvobj, _thread_hdl_ thd_hdl);
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
extern int rtw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
|
||||
#endif
|
||||
|
||||
void rtw_ips_dev_unload(_adapter *padapter);
|
||||
|
||||
#ifdef CONFIG_IPS
|
||||
|
|
|
@ -38,21 +38,7 @@
|
|||
#define _FALSE 0
|
||||
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
#include <osdep_service_bsd.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <osdep_service_linux.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <osdep_service_xp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <osdep_service_ce.h>
|
||||
#endif
|
||||
#include <osdep_service_linux.h>
|
||||
|
||||
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
|
||||
#define RTW_DECLARE_TIMER_HDL(name) void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
|
||||
|
@ -294,9 +280,7 @@ extern void _rtw_init_listhead(_list *list);
|
|||
extern u32 rtw_is_list_empty(_list *phead);
|
||||
extern void rtw_list_insert_head(_list *plist, _list *phead);
|
||||
extern void rtw_list_insert_tail(_list *plist, _list *phead);
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern void rtw_list_delete(_list *plist);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
extern void _rtw_init_sema(_sema *sema, int init_val);
|
||||
extern void _rtw_free_sema(_sema *sema);
|
||||
|
@ -346,90 +330,40 @@ extern void rtw_init_timer(struct timer_list *ptimer, void *padapter, void *pfun
|
|||
|
||||
__inline static unsigned char _cancel_timer_ex(struct timer_list *ptimer)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return del_timer_sync(ptimer);
|
||||
#endif
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
_cancel_timer(ptimer, 0);
|
||||
return 0;
|
||||
#endif
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 bcancelled;
|
||||
|
||||
_cancel_timer(ptimer, &bcancelled);
|
||||
|
||||
return bcancelled;
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline void thread_enter(char *name)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
|
||||
daemonize("%s", name);
|
||||
#endif
|
||||
allow_signal(SIGTERM);
|
||||
#endif
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
printf("%s", "RTKTHREAD_enter");
|
||||
#endif
|
||||
}
|
||||
|
||||
__inline static void flush_signals_thread(void)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
if (signal_pending(current))
|
||||
flush_signals(current);
|
||||
#endif
|
||||
}
|
||||
|
||||
__inline static _OS_STATUS res_to_status(sint res)
|
||||
{
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined (PLATFORM_MPIXEL) || defined (PLATFORM_FREEBSD)
|
||||
return res;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
if (res == _SUCCESS)
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
else
|
||||
return NDIS_STATUS_FAILURE;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
__inline static void rtw_dump_stack(void)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
dump_stack();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define rtw_warn_on(condition) WARN_ON(condition)
|
||||
#else
|
||||
#define rtw_warn_on(condition) do {} while (0)
|
||||
#endif
|
||||
|
||||
__inline static int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *parg4)
|
||||
{
|
||||
int ret = _TRUE;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
if (((uint)parg1) <= 0x7fffffff ||
|
||||
((uint)parg2) <= 0x7fffffff ||
|
||||
((uint)parg3) <= 0x7fffffff ||
|
||||
((uint)parg4) <= 0x7fffffff) {
|
||||
ret = _FALSE;
|
||||
KeBugCheckEx(0x87110000, (ULONG_PTR)parg1, (ULONG_PTR)parg2, (ULONG_PTR)parg3, (ULONG_PTR)parg4);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
#define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
|
||||
|
@ -557,11 +491,7 @@ extern int rtw_is_file_readable_with_size(const char *path, u32 *sz);
|
|||
extern int rtw_retrieve_from_file(const char *path, u8 *buf, u32 sz);
|
||||
extern int rtw_store_to_file(const char *path, u8 *buf, u32 sz);
|
||||
|
||||
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern void rtw_free_netdev(struct net_device *netdev);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
|
||||
extern u64 rtw_modular64(u64 x, u64 y);
|
||||
extern u64 rtw_division64(u64 x, u64 y);
|
||||
|
@ -687,10 +617,6 @@ char alpha_to_upper(char c);
|
|||
/*
|
||||
* Write formatted output to sized buffer
|
||||
*/
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define rtw_sprintf(buf, size, format, arg...) snprintf(buf, size, format, ##arg)
|
||||
#else /* !PLATFORM_LINUX */
|
||||
#error "NOT DEFINE \"rtw_sprintf\"!!"
|
||||
#endif /* !PLATFORM_LINUX */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -381,11 +381,7 @@ static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len)
|
|||
}
|
||||
static inline unsigned char *skb_pull(struct sk_buff *skb, unsigned int len)
|
||||
{
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
return __skb_pull(skb, len);
|
||||
#else
|
||||
return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len);
|
||||
#endif //PLATFORM_FREEBSD
|
||||
}
|
||||
static inline u32 skb_queue_len(const struct sk_buff_head *list_)
|
||||
{
|
||||
|
|
|
@ -57,12 +57,10 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf);
|
|||
|
||||
void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
#include <linux/netdevice.h> /* struct napi_struct */
|
||||
|
||||
int rtw_recv_napi_poll(struct napi_struct *, int budget);
|
||||
#endif /* CONFIG_RTW_NAPI */
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#endif /* */
|
||||
|
|
|
@ -27,18 +27,14 @@
|
|||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
|
|
@ -22,25 +22,21 @@
|
|||
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#else
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
#elif defined(CONFIG_PCI_HCI)
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
|
|
|
@ -23,24 +23,20 @@
|
|||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#else
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
|
|
@ -27,22 +27,18 @@
|
|||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
|
|
@ -27,22 +27,18 @@
|
|||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
|
|
@ -27,22 +27,18 @@
|
|||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
|
|
@ -23,27 +23,23 @@
|
|||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /*32k*/
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (24576) */ /* 24k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
|
||||
#undef MAX_RECVBUF_SZ
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (32768) /*32k*/
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (24576) */ /* 24k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
|
||||
#undef MAX_RECVBUF_SZ
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
|
|
@ -23,23 +23,19 @@
|
|||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (24576) */ /* 24k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (24576) */ /* 24k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
|
|
@ -39,15 +39,11 @@
|
|||
|
||||
/* recv_buffer must be large than usb agg size */
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024)
|
||||
#else /* !PLATFORM_OS_CE */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (32768)
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000)
|
||||
#endif
|
||||
#endif /* PLATFORM_OS_CE */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (32768)
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000)
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
/* rtl8822bu_ops.c */
|
||||
|
|
|
@ -31,11 +31,7 @@
|
|||
#define MAX_RSPSZ 512
|
||||
#define MAX_EVTSZ 1024
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define CMDBUFF_ALIGN_SZ 4
|
||||
#else
|
||||
#define CMDBUFF_ALIGN_SZ 512
|
||||
#endif
|
||||
#define CMDBUFF_ALIGN_SZ 512
|
||||
|
||||
struct cmd_obj {
|
||||
_adapter *padapter;
|
||||
|
@ -118,9 +114,6 @@ struct evt_priv {
|
|||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
u8 *c2h_mem;
|
||||
u8 *allocated_c2h_mem;
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pc2h_mdl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
|
|
@ -33,37 +33,18 @@ enum {
|
|||
|
||||
#define DRIVER_PREFIX "RTW: "
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
extern void rtl871x_cedbg(const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#define RTW_PRINT do {} while (0)
|
||||
#define RTW_ERR do {} while (0)
|
||||
#define RTW_WARN do {} while (0)
|
||||
#define RTW_INFO do {} while (0)
|
||||
#define RTW_DBG do {} while (0)
|
||||
#define RTW_PRINT_SEL do {} while (0)
|
||||
#define _RTW_PRINT do {} while (0)
|
||||
#define _RTW_ERR do {} while (0)
|
||||
#define _RTW_WARN do {} while (0)
|
||||
#define _RTW_INFO do {} while (0)
|
||||
#define _RTW_DBG do {} while (0)
|
||||
#define _RTW_PRINT_SEL do {} while (0)
|
||||
#else
|
||||
#define RTW_PRINT(x, ...) do {} while (0)
|
||||
#define RTW_ERR(x, ...) do {} while (0)
|
||||
#define RTW_WARN(x,...) do {} while (0)
|
||||
#define RTW_INFO(x,...) do {} while (0)
|
||||
#define RTW_DBG(x,...) do {} while (0)
|
||||
#define RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
#define _RTW_PRINT(x, ...) do {} while (0)
|
||||
#define _RTW_ERR(x, ...) do {} while (0)
|
||||
#define _RTW_WARN(x,...) do {} while (0)
|
||||
#define _RTW_INFO(x,...) do {} while (0)
|
||||
#define _RTW_DBG(x,...) do {} while (0)
|
||||
#define _RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
#endif
|
||||
#define RTW_PRINT(x, ...) do {} while (0)
|
||||
#define RTW_ERR(x, ...) do {} while (0)
|
||||
#define RTW_WARN(x,...) do {} while (0)
|
||||
#define RTW_INFO(x,...) do {} while (0)
|
||||
#define RTW_DBG(x,...) do {} while (0)
|
||||
#define RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
#define _RTW_PRINT(x, ...) do {} while (0)
|
||||
#define _RTW_ERR(x, ...) do {} while (0)
|
||||
#define _RTW_WARN(x,...) do {} while (0)
|
||||
#define _RTW_INFO(x,...) do {} while (0)
|
||||
#define _RTW_DBG(x,...) do {} while (0)
|
||||
#define _RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
|
||||
#define RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
|
||||
#define RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
|
||||
|
|
|
@ -110,12 +110,10 @@ extern void eeprom_read_sz(_adapter *padapter, u16 reg, u8 *data, u32 sz);
|
|||
|
||||
extern void read_eeprom_content_by_attrib(_adapter *padapter);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
extern int isAdaptorInfoFileValid(void);
|
||||
extern int storeAdaptorInfoFile(char *path, u8 *efuse_data);
|
||||
extern int retriveAdaptorInfoFile(char *path, u8 *efuse_data);
|
||||
#endif /* CONFIG_ADAPTOR_INFO_CACHING_FILE */
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#endif /* __RTL871X_EEPROM_H__ */
|
||||
|
|
|
@ -234,12 +234,10 @@ extern const u8 _mac_hidden_proto_to_hal_proto_cap[];
|
|||
|
||||
u8 mac_hidden_wl_func_to_hal_wl_func(u8 func);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepatch, u8 *buf, u32 len);
|
||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
||||
u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size);
|
||||
u32 rtw_read_macaddr_from_file(const char *path, u8 *buf);
|
||||
#endif /* CONFIG_EFUSE_CONFIG_FILE */
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,12 +23,7 @@
|
|||
|
||||
#define NUM_IOREQ 8
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#define MAX_PROT_SZ 64
|
||||
#endif
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define MAX_PROT_SZ (64-16)
|
||||
#endif
|
||||
#define MAX_PROT_SZ (64-16)
|
||||
|
||||
#define _IOREADY 0
|
||||
#define _IO_WAIT_COMPLETE 1
|
||||
|
@ -146,48 +141,11 @@ struct io_req {
|
|||
u8 *pbuf;
|
||||
_sema sema;
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#ifdef CONFIG_USB_HCI
|
||||
/* URB handler for rtw_write_mem */
|
||||
USB_TRANSFER usb_transfer_write_mem;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt);
|
||||
u8 *cnxt;
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pmdl;
|
||||
PIRP pirp;
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
PSDBUS_REQUEST_PACKET sdrp;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct intf_hdl {
|
||||
|
||||
#if 0
|
||||
u32 intf_option;
|
||||
u32 bus_status;
|
||||
u32 do_flush;
|
||||
u8 *adapter;
|
||||
u8 *intf_dev;
|
||||
struct intf_priv *pintfpriv;
|
||||
u8 cnt;
|
||||
void (*intf_hdl_init)(u8 *priv);
|
||||
void (*intf_hdl_unload)(u8 *priv);
|
||||
void (*intf_hdl_open)(u8 *priv);
|
||||
void (*intf_hdl_close)(u8 *priv);
|
||||
struct _io_ops io_ops;
|
||||
/* u8 intf_status;//moved to struct intf_priv */
|
||||
u16 len;
|
||||
u16 done_len;
|
||||
#endif
|
||||
_adapter *padapter;
|
||||
struct dvobj_priv *pintf_dev;/* pointer to &(padapter->dvobjpriv); */
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#ifndef _RTW_IOCTL_H_
|
||||
#define _RTW_IOCTL_H_
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
/* 00 - Success
|
||||
* 11 - Error */
|
||||
#define STATUS_SUCCESS (0x00000000L)
|
||||
|
@ -80,7 +79,6 @@
|
|||
#define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L) /* cause 49 */
|
||||
#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L) /* cause 93 */
|
||||
#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L) /* cause 3 */
|
||||
#endif /* #ifndef PLATFORM_WINDOWS */
|
||||
|
||||
|
||||
#ifndef OID_802_11_CAPABILITY
|
||||
|
@ -152,145 +150,14 @@ struct oid_obj_priv {
|
|||
NDIS_STATUS(*oidfuns)(struct oid_par_priv *poid_par_priv);
|
||||
};
|
||||
|
||||
#if (defined(CONFIG_MP_INCLUDED) && defined(_RTW_MP_IOCTL_C_)) || \
|
||||
(defined(PLATFORM_WINDOWS) && defined(_RTW_IOCTL_RTL_C_))
|
||||
#if (defined(CONFIG_MP_INCLUDED) && defined(_RTW_MP_IOCTL_C_))
|
||||
static NDIS_STATUS oid_null_function(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
int TranslateNdisPsToRtPs(IN NDIS_802_11_POWER_MODE ndisPsMode);
|
||||
|
||||
/* OID Handler for Segment 1 */
|
||||
NDIS_STATUS oid_gen_supported_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_hardware_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_media_supported_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_media_in_use_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_lookahead_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_frame_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_link_speed_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_transmit_buffer_space_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_receive_buffer_space_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_transmit_block_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_receive_block_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_vendor_id_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_vendor_description_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_current_packet_filter_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_current_lookahead_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_driver_version_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_total_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_protocol_options_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_mac_options_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_media_connect_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_send_packets_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_vendor_driver_version_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 2 */
|
||||
NDIS_STATUS oid_gen_physical_medium_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
/* OID Handler for Segment 3 */
|
||||
NDIS_STATUS oid_gen_xmit_ok_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_rcv_ok_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_xmit_error_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_rcv_error_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_rcv_no_buffer_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 4 */
|
||||
NDIS_STATUS oid_802_3_permanent_address_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_current_address_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_multicast_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_maximum_list_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_mac_options_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 5 */
|
||||
NDIS_STATUS oid_802_3_rcv_error_alignment_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_one_collision_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_more_collisions_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 6 */
|
||||
NDIS_STATUS oid_802_3_xmit_deferred_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_max_collisions_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_rcv_overrun_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_underrun_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_heartbeat_failure_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_times_crs_lost_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_late_collisions_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 7 */
|
||||
NDIS_STATUS oid_pnp_capabilities_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_set_power_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_query_power_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_add_wake_up_pattern_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_remove_wake_up_pattern_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_wake_up_pattern_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_enable_wake_up_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 8 */
|
||||
NDIS_STATUS oid_802_11_bssid_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_ssid_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_infrastructure_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_add_wep_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_remove_wep_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_disassociate_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_authentication_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_privacy_filter_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_bssid_list_scan_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_encryption_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_reload_defaults_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_add_key_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_remove_key_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_association_information_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_test_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_media_stream_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_capability_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_pmkid_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 9 */
|
||||
NDIS_STATUS oid_802_11_network_types_supported_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_network_type_in_use_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_tx_power_level_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rssi_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rssi_trigger_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_fragmentation_threshold_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rts_threshold_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_number_of_antennas_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rx_antenna_selected_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_tx_antenna_selected_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_supported_rates_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_desired_rates_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_configuration_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_power_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_bssid_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 10 */
|
||||
NDIS_STATUS oid_802_11_statistics_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment ED */
|
||||
NDIS_STATUS oid_rt_mh_vender_id_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
void Set_802_3_MULTICAST_LIST(ADAPTER *pAdapter, UCHAR *MCListbuf, ULONG MCListlen, BOOLEAN bAcceptAllMulticast);
|
||||
|
||||
#endif/* end of PLATFORM_WINDOWS */
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT)
|
||||
#if defined(CONFIG_WIRELESS_EXT)
|
||||
extern struct iw_handler_def rtw_handlers_def;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -20,11 +20,4 @@
|
|||
#ifndef _RTW_IOCTL_QUERY_H_
|
||||
#define _RTW_IOCTL_QUERY_H_
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 query_802_11_capability(_adapter *padapter, u8 *pucBuf, u32 *pulOutLen);
|
||||
u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,29 +28,6 @@ typedef struct _BSSIDInfo {
|
|||
NDIS_802_11_PMKID_VALUE PMKID;
|
||||
} BSSIDInfo, *PBSSIDInfo;
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
typedef struct _NDIS_802_11_PMKID {
|
||||
u32 Length;
|
||||
u32 BSSIDInfoCount;
|
||||
BSSIDInfo BSSIDInfo[1];
|
||||
} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 rtw_set_802_11_reload_defaults(_adapter *padapter, NDIS_802_11_RELOAD_DEFAULTS reloadDefaults);
|
||||
u8 rtw_set_802_11_test(_adapter *padapter, NDIS_802_11_TEST *test);
|
||||
u8 rtw_set_802_11_pmkid(_adapter *pdapter, NDIS_802_11_PMKID *pmkid);
|
||||
|
||||
u8 rtw_pnp_set_power_sleep(_adapter *padapter);
|
||||
u8 rtw_pnp_set_power_wakeup(_adapter *padapter);
|
||||
|
||||
void rtw_pnp_resume_wk(void *context);
|
||||
void rtw_pnp_sleep_wk(void *context);
|
||||
|
||||
#endif
|
||||
|
||||
u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key);
|
||||
u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode);
|
||||
u8 rtw_set_802_11_bssid(_adapter *padapter, u8 *bssid);
|
||||
|
|
|
@ -994,39 +994,31 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, sint state)
|
|||
*/
|
||||
static inline void clr_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
||||
{
|
||||
_irqL irqL;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
_clr_fwstate_(pmlmepriv, state);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static inline void up_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
_irqL irqL;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
pmlmepriv->num_of_scanned++;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
u8 rtw_is_adapter_up(_adapter *padapter);
|
||||
|
||||
__inline static void down_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
_irqL irqL;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
pmlmepriv->num_of_scanned--;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
__inline static void set_scanned_network_val(struct mlme_priv *pmlmepriv, sint val)
|
||||
{
|
||||
_irqL irqL;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
pmlmepriv->num_of_scanned = val;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
extern u16 rtw_get_capability(WLAN_BSSID_EX *bss);
|
||||
|
|
|
@ -44,13 +44,7 @@ struct mp_xmit_frame {
|
|||
u8 *mem_addr;
|
||||
u32 sz[8];
|
||||
|
||||
#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX)
|
||||
PURB pxmit_urb[8];
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PIRP pxmit_irp[8];
|
||||
#endif
|
||||
|
||||
u8 bpending[8];
|
||||
sint ac_tag[8];
|
||||
|
@ -71,21 +65,6 @@ struct mp_wiparam {
|
|||
|
||||
typedef void(*wi_act_func)(void *padapter);
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
struct mp_wi_cntx {
|
||||
u8 bmpdrv_unload;
|
||||
|
||||
/* Work Item */
|
||||
NDIS_WORK_ITEM mp_wi;
|
||||
NDIS_EVENT mp_wi_evt;
|
||||
_lock mp_wi_lock;
|
||||
u8 bmp_wi_progress;
|
||||
wi_act_func curractfunc;
|
||||
/* Variable needed in each implementation of CurrActFunc. */
|
||||
struct mp_wiparam param;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct mp_tx {
|
||||
u8 stop;
|
||||
u32 count, sended;
|
||||
|
@ -411,31 +390,6 @@ struct mp_priv {
|
|||
struct wlan_network mp_network;
|
||||
NDIS_802_11_MAC_ADDRESS network_macaddr;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u32 rx_testcnt;
|
||||
u32 rx_testcnt1;
|
||||
u32 rx_testcnt2;
|
||||
u32 tx_testcnt;
|
||||
u32 tx_testcnt1;
|
||||
|
||||
struct mp_wi_cntx wi_cntx;
|
||||
|
||||
u8 h2c_result;
|
||||
u8 h2c_seqnum;
|
||||
u16 h2c_cmdcode;
|
||||
u8 h2c_resp_parambuf[512];
|
||||
_lock h2c_lock;
|
||||
_lock wkitm_lock;
|
||||
u32 h2c_cmdcnt;
|
||||
NDIS_EVENT h2c_cmd_evt;
|
||||
NDIS_EVENT c2h_set;
|
||||
NDIS_EVENT h2c_clr;
|
||||
NDIS_EVENT cpwm_int;
|
||||
|
||||
NDIS_EVENT scsir_full_evt;
|
||||
NDIS_EVENT scsiw_empty_evt;
|
||||
#endif
|
||||
|
||||
u8 *pallocated_mp_xmitframe_buf;
|
||||
u8 *pmp_xmtframe_buf;
|
||||
_queue free_mp_xmitqueue;
|
||||
|
|
|
@ -78,24 +78,7 @@ typedef struct _DR_VARIABLE_STRUCT_ {
|
|||
/* int mp_start_joinbss(_adapter *padapter, NDIS_802_11_SSID *pssid); */
|
||||
|
||||
/* void _irqlevel_changed_(_irqL *irqlevel, BOOLEANunsigned char bLower); */
|
||||
#ifdef PLATFORM_OS_XP
|
||||
static void _irqlevel_changed_(_irqL *irqlevel, u8 bLower)
|
||||
{
|
||||
|
||||
if (bLower == LOWER) {
|
||||
*irqlevel = KeGetCurrentIrql();
|
||||
|
||||
if (*irqlevel > PASSIVE_LEVEL)
|
||||
KeLowerIrql(PASSIVE_LEVEL);
|
||||
} else {
|
||||
if (KeGetCurrentIrql() == PASSIVE_LEVEL)
|
||||
KeRaiseIrql(DISPATCH_LEVEL, irqlevel);
|
||||
}
|
||||
|
||||
}
|
||||
#else
|
||||
#define _irqlevel_changed_(a, b)
|
||||
#endif
|
||||
|
||||
/* oid_rtl_seg_81_80_00 */
|
||||
NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
|
|
@ -20,40 +20,25 @@
|
|||
#ifndef _RTW_RECV_H_
|
||||
#define _RTW_RECV_H_
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#define NR_RECVBUFF 1024/* 512 */ /* 128 */
|
||||
#ifdef CONFIG_SINGLE_RECV_BUF
|
||||
#define NR_RECVBUFF (1)
|
||||
#else
|
||||
#if defined(CONFIG_GSPI_HCI)
|
||||
#define NR_RECVBUFF (32)
|
||||
#elif defined(CONFIG_SDIO_HCI)
|
||||
#define NR_RECVBUFF (8)
|
||||
#else
|
||||
#define NR_RECVBUFF (16)
|
||||
#define NR_RECVBUFF (8)
|
||||
#endif
|
||||
#elif defined(PLATFORM_OS_CE)
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#define NR_RECVBUFF (128)
|
||||
#else
|
||||
#define NR_RECVBUFF (4)
|
||||
#endif
|
||||
#else /* PLATFORM_LINUX /PLATFORM_BSD */
|
||||
#endif /* CONFIG_SINGLE_RECV_BUF */
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define NR_PREALLOC_RECV_SKB (rtw_rtkm_get_nr_recv_skb()>>1)
|
||||
#else /*!CONFIG_PREALLOC_RX_SKB_BUFFER */
|
||||
#define NR_PREALLOC_RECV_SKB 8
|
||||
#endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */
|
||||
|
||||
#ifdef CONFIG_SINGLE_RECV_BUF
|
||||
#define NR_RECVBUFF (1)
|
||||
#else
|
||||
#if defined(CONFIG_GSPI_HCI)
|
||||
#define NR_RECVBUFF (32)
|
||||
#elif defined(CONFIG_SDIO_HCI)
|
||||
#define NR_RECVBUFF (8)
|
||||
#else
|
||||
#define NR_RECVBUFF (8)
|
||||
#endif
|
||||
#endif /* CONFIG_SINGLE_RECV_BUF */
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define NR_PREALLOC_RECV_SKB (rtw_rtkm_get_nr_recv_skb()>>1)
|
||||
#else /*!CONFIG_PREALLOC_RX_SKB_BUFFER */
|
||||
#define NR_PREALLOC_RECV_SKB 8
|
||||
#endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */
|
||||
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
#define RTL_NAPI_WEIGHT (32)
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
#define RTL_NAPI_WEIGHT (32)
|
||||
#endif
|
||||
|
||||
#define NR_RECVFRAME 256
|
||||
|
@ -355,18 +340,6 @@ struct recv_priv {
|
|||
|
||||
_adapter *adapter;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
_nic_hdl RxPktPoolHdl;
|
||||
_nic_hdl RxBufPoolHdl;
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pbytecnt_mdl;
|
||||
#endif
|
||||
uint counter; /* record the number that up-layer will return to drv; only when counter==0 can we release recv_priv */
|
||||
NDIS_EVENT recv_resource_evt ;
|
||||
#endif
|
||||
|
||||
|
||||
u32 is_any_non_be_pkts;
|
||||
|
||||
u64 rx_bytes;
|
||||
|
@ -385,22 +358,14 @@ struct recv_priv {
|
|||
ATOMIC_T rx_pending_cnt;
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
PURB int_in_urb;
|
||||
#endif
|
||||
|
||||
u8 *int_in_buf;
|
||||
#endif /* CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
|
||||
#endif
|
||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
struct task irq_prepare_beacon_tasklet;
|
||||
struct task recv_tasklet;
|
||||
#else /* PLATFORM_FREEBSD */
|
||||
struct tasklet_struct irq_prepare_beacon_tasklet;
|
||||
struct tasklet_struct recv_tasklet;
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
struct sk_buff_head free_recv_skb_queue;
|
||||
struct sk_buff_head rx_skb_queue;
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
|
@ -411,8 +376,6 @@ struct recv_priv {
|
|||
struct ifqueue rx_indicate_queue;
|
||||
#endif /* CONFIG_RX_INDICATE_QUEUE */
|
||||
|
||||
#endif /* defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) */
|
||||
|
||||
u8 *pallocated_recv_buf;
|
||||
u8 *precv_buf; /* 4 alignment */
|
||||
_queue free_recv_buf_queue;
|
||||
|
@ -500,31 +463,16 @@ struct recv_buf {
|
|||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
|
||||
PURB purb;
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
u32 alloc_sz;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PIRP pirp;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
USB_TRANSFER usb_transfer_read_port;
|
||||
#endif
|
||||
|
||||
u8 irp_pending;
|
||||
int transfer_len;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_pkt *pskb;
|
||||
#endif
|
||||
#ifdef PLATFORM_FREEBSD /* skb solution */
|
||||
struct sk_buff *pskb;
|
||||
#endif /* PLATFORM_FREEBSD */ /* skb solution */
|
||||
};
|
||||
|
||||
|
||||
|
@ -774,9 +722,6 @@ __inline static _buffer *get_rxbuf_desc(union recv_frame *precvframe)
|
|||
|
||||
if (precvframe == NULL)
|
||||
return NULL;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
NdisQueryPacket(precvframe->u.hdr.pkt, NULL, NULL, &buf_desc, NULL);
|
||||
#endif
|
||||
|
||||
return buf_desc;
|
||||
}
|
||||
|
@ -797,13 +742,6 @@ __inline static union recv_frame *pkt_to_recvframe(_pkt *pkt)
|
|||
|
||||
u8 *buf_star;
|
||||
union recv_frame *precv_frame;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
_buffer *buf_desc;
|
||||
uint len;
|
||||
|
||||
NdisQueryPacket(pkt, NULL, NULL, &buf_desc, &len);
|
||||
NdisQueryBufferSafe(buf_desc, &buf_star, &len, HighPagePriority);
|
||||
#endif
|
||||
precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
|
||||
|
||||
return precv_frame;
|
||||
|
|
|
@ -192,9 +192,6 @@ struct security_priv {
|
|||
u32 ndisencryptstatus; /* NDIS_802_11_ENCRYPTION_STATUS */
|
||||
|
||||
NDIS_802_11_WEP ndiswep;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 KeyMaterial[16];/* variable length depending on above field. */
|
||||
#endif
|
||||
|
||||
u8 assoc_info[600];
|
||||
u8 szofcapability[256]; /* for wpa2 usage */
|
||||
|
|
|
@ -65,9 +65,6 @@
|
|||
#define NR_XMITBUFF (128)
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define XMITBUF_ALIGN_SZ 4
|
||||
#else
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#define XMITBUF_ALIGN_SZ 4
|
||||
#else
|
||||
|
@ -77,7 +74,6 @@
|
|||
#define XMITBUF_ALIGN_SZ 512
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* xmit extension buff defination */
|
||||
#define MAX_XMIT_EXTBUF_SZ (1536)
|
||||
|
@ -508,9 +504,7 @@ struct submit_ctx {
|
|||
u32 submit_time; /* */
|
||||
u32 timeout_ms; /* <0: not synchronous, 0: wait forever, >0: up to ms waiting */
|
||||
int status; /* status for operation */
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct completion done;
|
||||
#endif
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -563,18 +557,8 @@ struct xmit_buf {
|
|||
u8 bulkout_id; /* for halmac */
|
||||
#endif /* RTW_HALMAC */
|
||||
|
||||
#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
|
||||
PURB pxmit_urb[8];
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PIRP pxmit_irp[8];
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
USB_TRANSFER usb_transfer_write_port;
|
||||
#endif
|
||||
|
||||
u8 bpending[8];
|
||||
|
||||
|
@ -590,11 +574,6 @@ struct xmit_buf {
|
|||
u32 ff_hwaddr;
|
||||
u8 pg_num;
|
||||
u8 agg_num;
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pxmitbuf_mdl;
|
||||
PIRP pxmitbuf_irp;
|
||||
PSDBUS_REQUEST_PACKET pxmitbuf_sdrp;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
|
@ -762,16 +741,7 @@ struct xmit_priv {
|
|||
_sema tx_retevt;/* all tx return event; */
|
||||
u8 txirp_cnt;
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
USB_TRANSFER usb_transfer_write_port;
|
||||
/* USB_TRANSFER usb_transfer_write_mem; */
|
||||
#endif
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
struct task xmit_tasklet;
|
||||
#endif
|
||||
/* per AC pending irp */
|
||||
int beq_cnt;
|
||||
int bkq_cnt;
|
||||
|
@ -785,16 +755,12 @@ struct xmit_priv {
|
|||
struct rtw_tx_ring tx_ring[PCI_MAX_TX_QUEUE_COUNT];
|
||||
int txringcount[PCI_MAX_TX_QUEUE_COUNT];
|
||||
u8 beaconDMAing; /* flag of indicating beacon is transmiting to HW by DMA */
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
#ifdef CONFIG_SDIO_TX_TASKLET
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif /* PLATFORM_LINUX */
|
||||
#else
|
||||
_thread_hdl_ SdioXmitThread;
|
||||
_sema SdioXmitSema;
|
||||
|
|
|
@ -26,35 +26,10 @@
|
|||
#define SDIO_ERR_VAL16 0xFFFF
|
||||
#define SDIO_ERR_VAL32 0xFFFFFFFF
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <sdio_ops_linux.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <sdio_ops_xp.h>
|
||||
struct async_context {
|
||||
PMDL pmdl;
|
||||
PSDBUS_REQUEST_PACKET sdrp;
|
||||
unsigned char *r_buf;
|
||||
unsigned char *padapter;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <sdio_ops_ce.h>
|
||||
#endif
|
||||
|
||||
#endif /* PLATFORM_WINDOWS */
|
||||
|
||||
|
||||
extern void sdio_set_intf_ops(_adapter *padapter, struct _io_ops *pops);
|
||||
|
||||
#if 0
|
||||
extern void sdio_func1cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
|
||||
extern void sdio_func1cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
|
||||
#endif
|
||||
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);
|
||||
|
|
|
@ -25,30 +25,4 @@
|
|||
#include <drv_types.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
|
||||
|
||||
extern u8 sdbus_cmd52r_ce(struct intf_priv *pintfpriv, u32 addr);
|
||||
|
||||
|
||||
extern void sdbus_cmd52w_ce(struct intf_priv *pintfpriv, u32 addr, u8 val8);
|
||||
|
||||
|
||||
uint sdbus_read_blocks_to_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
|
||||
extern uint sdbus_read_bytes_to_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
|
||||
|
||||
extern uint sdbus_write_blocks_from_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf, u8 async);
|
||||
|
||||
extern uint sdbus_write_bytes_from_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
extern u8 sdbus_func1cmd52r_ce(struct intf_priv *pintfpriv, u32 addr);
|
||||
extern void sdbus_func1cmd52w_ce(struct intf_priv *pintfpriv, u32 addr, u8 val8);
|
||||
extern uint sdbus_read_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata);
|
||||
extern uint sdbus_write_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata);
|
||||
extern void sdio_read_int(_adapter *padapter, u32 addr, u8 sz, void *pdata);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,29 +26,4 @@
|
|||
#include <osdep_intf.h>
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
|
||||
|
||||
extern u8 sdbus_cmd52r_xp(struct intf_priv *pintfpriv, u32 addr);
|
||||
|
||||
|
||||
extern void sdbus_cmd52w_xp(struct intf_priv *pintfpriv, u32 addr, u8 val8);
|
||||
|
||||
|
||||
uint sdbus_read_blocks_to_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
|
||||
extern uint sdbus_read_bytes_to_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
|
||||
|
||||
extern uint sdbus_write_blocks_from_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf, u8 async);
|
||||
|
||||
extern uint sdbus_write_bytes_from_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
extern u8 sdbus_func1cmd52r_xp(struct intf_priv *pintfpriv, u32 addr);
|
||||
extern void sdbus_func1cmd52w_xp(struct intf_priv *pintfpriv, u32 addr, u8 val8);
|
||||
extern uint sdbus_read_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata);
|
||||
extern uint sdbus_write_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata);
|
||||
extern void sdio_read_int(_adapter *padapter, u32 addr, u8 sz, void *pdata);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,11 +20,4 @@
|
|||
#ifndef __SDIO_OSINTF_H__
|
||||
#define __SDIO_OSINTF_H__
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
extern NDIS_STATUS ce_sd_get_dev_hdl(PADAPTER padapter);
|
||||
SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, PADAPTER padapter);
|
||||
extern void sd_setup_irs(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -35,9 +35,7 @@ enum {
|
|||
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
||||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <usb_ops_linux.h>
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#ifdef CONFIG_RTL8188E
|
||||
void rtl8188eu_set_hw_type(struct dvobj_priv *pdvobj);
|
||||
|
|
|
@ -775,7 +775,6 @@ typedef enum _ELEMENT_ID {
|
|||
* This structure refers to "HT BlockAckReq" as
|
||||
* described in 802.11n draft section 7.2.1.7.1
|
||||
*/
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW)
|
||||
struct rtw_ieee80211_bar {
|
||||
unsigned short frame_control;
|
||||
unsigned short duration;
|
||||
|
@ -784,17 +783,11 @@ struct rtw_ieee80211_bar {
|
|||
unsigned short control;
|
||||
unsigned short start_seq_num;
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
/* 802.11 BAR control masks */
|
||||
#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
|
||||
#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW) || defined(PLATFORM_FREEBSD)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* struct rtw_ieee80211_ht_cap - HT capabilities
|
||||
*
|
||||
|
@ -865,77 +858,6 @@ struct ADDBA_request {
|
|||
unsigned short BA_starting_seqctrl;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct rtw_ieee80211_ht_cap {
|
||||
unsigned short cap_info;
|
||||
unsigned char ampdu_params_info;
|
||||
unsigned char supp_mcs_set[16];
|
||||
unsigned short extended_ht_cap_info;
|
||||
unsigned int tx_BF_cap_info;
|
||||
unsigned char antenna_selection_info;
|
||||
};
|
||||
|
||||
|
||||
struct ieee80211_ht_addt_info {
|
||||
unsigned char control_chan;
|
||||
unsigned char ht_param;
|
||||
unsigned short operation_mode;
|
||||
unsigned short stbc_param;
|
||||
unsigned char basic_set[16];
|
||||
};
|
||||
|
||||
struct HT_caps_element {
|
||||
union {
|
||||
struct {
|
||||
unsigned short HT_caps_info;
|
||||
unsigned char AMPDU_para;
|
||||
unsigned char MCS_rate[16];
|
||||
unsigned short HT_ext_caps;
|
||||
unsigned int Beamforming_caps;
|
||||
unsigned char ASEL_caps;
|
||||
} HT_cap_element;
|
||||
unsigned char HT_cap[26];
|
||||
};
|
||||
};
|
||||
|
||||
struct HT_info_element {
|
||||
unsigned char primary_channel;
|
||||
unsigned char infos[5];
|
||||
unsigned char MCS_rate[16];
|
||||
};
|
||||
|
||||
struct AC_param {
|
||||
unsigned char ACI_AIFSN;
|
||||
unsigned char CW;
|
||||
unsigned short TXOP_limit;
|
||||
};
|
||||
|
||||
struct WMM_para_element {
|
||||
unsigned char QoS_info;
|
||||
unsigned char reserved;
|
||||
struct AC_param ac_param[4];
|
||||
};
|
||||
|
||||
struct ADDBA_request {
|
||||
unsigned char dialog_token;
|
||||
unsigned short BA_para_set;
|
||||
unsigned short BA_timeout_value;
|
||||
unsigned short BA_starting_seqctrl;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_FACTOR {
|
||||
MAX_AMPDU_FACTOR_8K = 0,
|
||||
MAX_AMPDU_FACTOR_16K = 1,
|
||||
|
@ -943,7 +865,6 @@ typedef enum _HT_CAP_AMPDU_FACTOR {
|
|||
MAX_AMPDU_FACTOR_64K = 3,
|
||||
} HT_CAP_AMPDU_FACTOR;
|
||||
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
AMPDU_DENSITY_VALUE_0 = 0 , /* For no restriction */
|
||||
AMPDU_DENSITY_VALUE_1 = 1 , /* For 1/4 us */
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
|
||||
#define MAX_IE_SZ 768
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#define NDIS_802_11_LENGTH_SSID 32
|
||||
#define NDIS_802_11_LENGTH_RATES 8
|
||||
#define NDIS_802_11_LENGTH_RATES_EX 16
|
||||
|
@ -35,11 +32,9 @@ typedef long NDIS_802_11_RSSI; /* in dBm */
|
|||
typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */
|
||||
typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */
|
||||
|
||||
|
||||
typedef ULONG NDIS_802_11_KEY_INDEX;
|
||||
typedef unsigned long long NDIS_802_11_KEY_RSC;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_SSID {
|
||||
ULONG SsidLength;
|
||||
UCHAR Ssid[32];
|
||||
|
@ -60,7 +55,6 @@ typedef struct _NDIS_802_11_CONFIGURATION_FH {
|
|||
ULONG DwellTime; /* units are Kusec */
|
||||
} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
|
||||
|
||||
|
||||
/*
|
||||
FW will only save the channel number in DSConfig.
|
||||
ODI Handler will convert the channel number to freq. number.
|
||||
|
@ -73,8 +67,6 @@ typedef struct _NDIS_802_11_CONFIGURATION {
|
|||
NDIS_802_11_CONFIGURATION_FH FHConfig;
|
||||
} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
|
||||
|
||||
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
|
||||
Ndis802_11IBSS,
|
||||
Ndis802_11Infrastructure,
|
||||
|
@ -84,30 +76,20 @@ typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
|
|||
Ndis802_11Monitor,
|
||||
} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_FIXED_IEs {
|
||||
UCHAR Timestamp[8];
|
||||
USHORT BeaconInterval;
|
||||
USHORT Capabilities;
|
||||
} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_VARIABLE_IEs {
|
||||
UCHAR ElementID;
|
||||
UCHAR Length;
|
||||
UCHAR data[1];
|
||||
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
Length is the 4 bytes multiples of the sume of
|
||||
sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG)
|
||||
+ sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION)
|
||||
|
@ -117,29 +99,6 @@ Except the IELength, all other fields are fixed length. Therefore, we can define
|
|||
partial sum.
|
||||
|
||||
*/
|
||||
#if 0
|
||||
typedef struct _NDIS_WLAN_BSSID_EX {
|
||||
ULONG Length;
|
||||
NDIS_802_11_MAC_ADDRESS MacAddress;
|
||||
UCHAR Reserved[2];/* [0]: IS beacon frame, [1]:optimum_antenna=>For antenna diversity; */
|
||||
NDIS_802_11_SSID Ssid;
|
||||
ULONG Privacy;
|
||||
NDIS_802_11_RSSI Rssi;
|
||||
NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
|
||||
NDIS_802_11_CONFIGURATION Configuration;
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
|
||||
NDIS_802_11_RATES_EX SupportedRates;
|
||||
ULONG IELength;
|
||||
UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
|
||||
} NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_BSSID_LIST_EX {
|
||||
ULONG NumberOfItems;
|
||||
NDIS_WLAN_BSSID_EX Bssid[1];
|
||||
} NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
|
||||
#endif
|
||||
|
||||
typedef enum _NDIS_802_11_AUTHENTICATION_MODE {
|
||||
Ndis802_11AuthModeOpen,
|
||||
Ndis802_11AuthModeShared,
|
||||
|
@ -168,7 +127,6 @@ typedef enum _NDIS_802_11_WEP_STATUS {
|
|||
} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
|
||||
NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
|
||||
|
||||
|
||||
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
||||
#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
|
||||
#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
|
||||
|
@ -270,254 +228,6 @@ typedef struct _NDIS_802_11_TEST {
|
|||
} tt;
|
||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
|
||||
|
||||
#endif /* end of #ifdef PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
|
||||
#define NDIS_802_11_LENGTH_SSID 32
|
||||
#define NDIS_802_11_LENGTH_RATES 8
|
||||
#define NDIS_802_11_LENGTH_RATES_EX 16
|
||||
|
||||
typedef unsigned char NDIS_802_11_MAC_ADDRESS[6];
|
||||
typedef long NDIS_802_11_RSSI; /* in dBm */
|
||||
typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */
|
||||
typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */
|
||||
|
||||
|
||||
typedef ULONG NDIS_802_11_KEY_INDEX;
|
||||
typedef unsigned long long NDIS_802_11_KEY_RSC;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_SSID {
|
||||
ULONG SsidLength;
|
||||
UCHAR Ssid[32];
|
||||
} NDIS_802_11_SSID, *PNDIS_802_11_SSID;
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_TYPE {
|
||||
Ndis802_11FH,
|
||||
Ndis802_11DS,
|
||||
Ndis802_11OFDM5,
|
||||
Ndis802_11OFDM24,
|
||||
Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */
|
||||
} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
|
||||
|
||||
typedef struct _NDIS_802_11_CONFIGURATION_FH {
|
||||
ULONG Length; /* Length of structure */
|
||||
ULONG HopPattern; /* As defined by 802.11, MSB set */
|
||||
ULONG HopSet; /* to one if non-802.11 */
|
||||
ULONG DwellTime; /* units are Kusec */
|
||||
} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
|
||||
|
||||
|
||||
/*
|
||||
FW will only save the channel number in DSConfig.
|
||||
ODI Handler will convert the channel number to freq. number.
|
||||
*/
|
||||
typedef struct _NDIS_802_11_CONFIGURATION {
|
||||
ULONG Length; /* Length of structure */
|
||||
ULONG BeaconPeriod; /* units are Kusec */
|
||||
ULONG ATIMWindow; /* units are Kusec */
|
||||
ULONG DSConfig; /* channel number */
|
||||
NDIS_802_11_CONFIGURATION_FH FHConfig;
|
||||
} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
|
||||
|
||||
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
|
||||
Ndis802_11IBSS,
|
||||
Ndis802_11Infrastructure,
|
||||
Ndis802_11AutoUnknown,
|
||||
Ndis802_11InfrastructureMax, /* Not a real value, defined as upper bound */
|
||||
Ndis802_11APMode
|
||||
} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_FIXED_IEs {
|
||||
UCHAR Timestamp[8];
|
||||
USHORT BeaconInterval;
|
||||
USHORT Capabilities;
|
||||
} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_VARIABLE_IEs {
|
||||
UCHAR ElementID;
|
||||
UCHAR Length;
|
||||
UCHAR data[1];
|
||||
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
Length is the 4 bytes multiples of the sume of
|
||||
sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG)
|
||||
+ sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION)
|
||||
+ sizeof (NDIS_802_11_RATES_EX) + IELength
|
||||
|
||||
Except the IELength, all other fields are fixed length. Therefore, we can define a marco to present the
|
||||
partial sum.
|
||||
|
||||
*/
|
||||
#if 0
|
||||
typedef struct _NDIS_WLAN_BSSID_EX {
|
||||
ULONG Length;
|
||||
NDIS_802_11_MAC_ADDRESS MacAddress;
|
||||
UCHAR Reserved[2];/* [0]: IS beacon frame, [1]:optimum_antenna=>For antenna diversity; */
|
||||
NDIS_802_11_SSID Ssid;
|
||||
ULONG Privacy;
|
||||
NDIS_802_11_RSSI Rssi;
|
||||
NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
|
||||
NDIS_802_11_CONFIGURATION Configuration;
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
|
||||
NDIS_802_11_RATES_EX SupportedRates;
|
||||
ULONG IELength;
|
||||
UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
|
||||
} NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_BSSID_LIST_EX {
|
||||
ULONG NumberOfItems;
|
||||
NDIS_WLAN_BSSID_EX Bssid[1];
|
||||
} NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
|
||||
#endif
|
||||
|
||||
typedef enum _NDIS_802_11_AUTHENTICATION_MODE {
|
||||
Ndis802_11AuthModeOpen,
|
||||
Ndis802_11AuthModeShared,
|
||||
Ndis802_11AuthModeAutoSwitch,
|
||||
Ndis802_11AuthModeWPA,
|
||||
Ndis802_11AuthModeWPAPSK,
|
||||
Ndis802_11AuthModeWPANone,
|
||||
Ndis802_11AuthModeMax /* Not a real mode, defined as upper bound */
|
||||
} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
|
||||
|
||||
typedef enum _NDIS_802_11_WEP_STATUS {
|
||||
Ndis802_11WEPEnabled,
|
||||
Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
|
||||
Ndis802_11WEPDisabled,
|
||||
Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
|
||||
Ndis802_11WEPKeyAbsent,
|
||||
Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
|
||||
Ndis802_11WEPNotSupported,
|
||||
Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
|
||||
Ndis802_11Encryption2Enabled,
|
||||
Ndis802_11Encryption2KeyAbsent,
|
||||
Ndis802_11Encryption3Enabled,
|
||||
Ndis802_11Encryption3KeyAbsent
|
||||
} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
|
||||
NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
|
||||
|
||||
|
||||
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
||||
#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
|
||||
#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
|
||||
|
||||
#define NDIS_802_11_AI_RESFI_CAPABILITIES 1
|
||||
#define NDIS_802_11_AI_RESFI_STATUSCODE 2
|
||||
#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
|
||||
|
||||
typedef struct _NDIS_802_11_AI_REQFI {
|
||||
USHORT Capabilities;
|
||||
USHORT ListenInterval;
|
||||
NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
|
||||
} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
|
||||
|
||||
typedef struct _NDIS_802_11_AI_RESFI {
|
||||
USHORT Capabilities;
|
||||
USHORT StatusCode;
|
||||
USHORT AssociationId;
|
||||
} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
|
||||
|
||||
typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION {
|
||||
ULONG Length;
|
||||
USHORT AvailableRequestFixedIEs;
|
||||
NDIS_802_11_AI_REQFI RequestFixedIEs;
|
||||
ULONG RequestIELength;
|
||||
ULONG OffsetRequestIEs;
|
||||
USHORT AvailableResponseFixedIEs;
|
||||
NDIS_802_11_AI_RESFI ResponseFixedIEs;
|
||||
ULONG ResponseIELength;
|
||||
ULONG OffsetResponseIEs;
|
||||
} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
|
||||
|
||||
typedef enum _NDIS_802_11_RELOAD_DEFAULTS {
|
||||
Ndis802_11ReloadWEPKeys
|
||||
} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
|
||||
|
||||
|
||||
/* Key mapping keys require a BSSID */
|
||||
typedef struct _NDIS_802_11_KEY {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG KeyIndex;
|
||||
ULONG KeyLength; /* length of key in bytes */
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
NDIS_802_11_KEY_RSC KeyRSC;
|
||||
UCHAR KeyMaterial[32]; /* variable length depending on above field */
|
||||
} NDIS_802_11_KEY, *PNDIS_802_11_KEY;
|
||||
|
||||
typedef struct _NDIS_802_11_REMOVE_KEY {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG KeyIndex;
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
|
||||
|
||||
typedef struct _NDIS_802_11_WEP {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG KeyIndex; /* 0 is the per-client key, 1-N are the global keys */
|
||||
ULONG KeyLength; /* length of key in bytes */
|
||||
UCHAR KeyMaterial[16];/* variable length depending on above field */
|
||||
} NDIS_802_11_WEP, *PNDIS_802_11_WEP;
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST {
|
||||
ULONG Length; /* Length of structure */
|
||||
NDIS_802_11_MAC_ADDRESS Bssid;
|
||||
ULONG Flags;
|
||||
} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
|
||||
|
||||
typedef enum _NDIS_802_11_STATUS_TYPE {
|
||||
Ndis802_11StatusType_Authentication,
|
||||
Ndis802_11StatusType_MediaStreamMode,
|
||||
Ndis802_11StatusType_PMKID_CandidateList,
|
||||
Ndis802_11StatusTypeMax /* not a real type, defined as an upper bound */
|
||||
} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
|
||||
|
||||
typedef struct _NDIS_802_11_STATUS_INDICATION {
|
||||
NDIS_802_11_STATUS_TYPE StatusType;
|
||||
} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
|
||||
|
||||
/* mask for authentication/integrity fields */
|
||||
#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
|
||||
#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
|
||||
#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
|
||||
#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
|
||||
#define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
|
||||
|
||||
/* MIC check time, 60 seconds. */
|
||||
#define MIC_CHECK_TIME 60000000
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_EVENT {
|
||||
NDIS_802_11_STATUS_INDICATION Status;
|
||||
NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
|
||||
} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
|
||||
|
||||
typedef struct _NDIS_802_11_TEST {
|
||||
ULONG Length;
|
||||
ULONG Type;
|
||||
union {
|
||||
NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
|
||||
NDIS_802_11_RSSI RssiTrigger;
|
||||
} tt;
|
||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
|
||||
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
#ifndef Ndis802_11APMode
|
||||
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
|
||||
#endif
|
||||
|
@ -545,10 +255,6 @@ typedef struct _WLAN_BCN_INFO {
|
|||
/* temporally add #pragma pack for structure alignment issue of
|
||||
* WLAN_BSSID_EX and get_WLAN_BSSID_EX_sz()
|
||||
*/
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
typedef struct _WLAN_BSSID_EX {
|
||||
ULONG Length;
|
||||
NDIS_802_11_MAC_ADDRESS MacAddress;
|
||||
|
@ -564,13 +270,8 @@ typedef struct _WLAN_BSSID_EX {
|
|||
ULONG IELength;
|
||||
UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
|
||||
}
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
__attribute__((packed))
|
||||
#endif
|
||||
WLAN_BSSID_EX, *PWLAN_BSSID_EX;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#define BSS_EX_IES(bss_ex) ((bss_ex)->IEs)
|
||||
#define BSS_EX_IES_LEN(bss_ex) ((bss_ex)->IELength)
|
||||
|
@ -580,28 +281,7 @@ WLAN_BSSID_EX, *PWLAN_BSSID_EX;
|
|||
|
||||
__inline static uint get_WLAN_BSSID_EX_sz(WLAN_BSSID_EX *bss)
|
||||
{
|
||||
#if 0
|
||||
uint t_len;
|
||||
|
||||
t_len = sizeof(ULONG)
|
||||
+ sizeof(NDIS_802_11_MAC_ADDRESS)
|
||||
+ 2
|
||||
+ sizeof(NDIS_802_11_SSID)
|
||||
+ sizeof(ULONG)
|
||||
+ sizeof(NDIS_802_11_RSSI)
|
||||
+ sizeof(NDIS_802_11_NETWORK_TYPE)
|
||||
+ sizeof(NDIS_802_11_CONFIGURATION)
|
||||
+ sizeof(NDIS_802_11_NETWORK_INFRASTRUCTURE)
|
||||
+ sizeof(NDIS_802_11_RATES_EX)
|
||||
/* all new member add here */
|
||||
+ sizeof(WLAN_PHY_INFO)
|
||||
/* all new member add here */
|
||||
+ sizeof(ULONG)
|
||||
+ bss->IELength;
|
||||
return t_len;
|
||||
#else
|
||||
return sizeof(WLAN_BSSID_EX) - MAX_IE_SZ + bss->IELength;
|
||||
#endif
|
||||
}
|
||||
|
||||
struct wlan_network {
|
||||
|
@ -613,10 +293,6 @@ struct wlan_network {
|
|||
int join_res;
|
||||
WLAN_BSSID_EX network; /* must be the last item */
|
||||
WLAN_BCN_INFO BcnInfo;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
unsigned char iebuf[MAX_IE_SZ];
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
enum VRTL_CARRIER_SENSE {
|
||||
|
@ -657,7 +333,6 @@ enum UAPSD_MAX_SP {
|
|||
* WPA2
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_OS_CE
|
||||
typedef struct _PMKID_CANDIDATE {
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
ULONG Flags;
|
||||
|
@ -684,7 +359,5 @@ typedef struct _NDIS_802_11_CAPABILITY {
|
|||
NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
|
||||
|
||||
} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* #ifndef WLAN_BSSDEF_H_ */
|
||||
|
|
|
@ -30,40 +30,6 @@ struct pkt_file {
|
|||
SIZE_T buf_len;
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb.h>
|
||||
#include <usbdlib.h>
|
||||
#include <usbioctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
#define NR_XMITFRAME 64
|
||||
#else
|
||||
#define NR_XMITFRAME 128
|
||||
#endif
|
||||
|
||||
#define ETH_ALEN 6
|
||||
|
||||
extern NDIS_STATUS rtw_xmit_entry(
|
||||
IN _nic_hdl cnxt,
|
||||
IN NDIS_PACKET *pkt,
|
||||
IN UINT flags
|
||||
);
|
||||
|
||||
#endif /* PLATFORM_WINDOWS */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
#define NR_XMITFRAME 256
|
||||
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||
extern void rtw_xmit_entry_wrap(struct ifnet *pifp);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#define NR_XMITFRAME 256
|
||||
|
||||
struct xmit_priv;
|
||||
|
@ -75,8 +41,6 @@ struct xmit_buf;
|
|||
extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
void rtw_os_xmit_schedule(_adapter *padapter);
|
||||
|
||||
int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag);
|
||||
|
|
Loading…
Reference in a new issue