mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-07 05:53:06 +00:00
rtl8188eu: Remove the PLATFORM_LINUX tests
This configuration parameter is always selected. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
dd606233f2
commit
62ef49de15
46 changed files with 6 additions and 870 deletions
|
@ -39,11 +39,6 @@
|
|||
|
||||
#define CONFIG_RTL8188E
|
||||
|
||||
#define PLATFORM_LINUX
|
||||
|
||||
//#define CONFIG_IOCTL_CFG80211
|
||||
//#define CONFIG_IEEE80211W
|
||||
|
||||
#if defined(CONFIG_PLATFORM_ACTIONS_ATM702X)
|
||||
#ifndef CONFIG_IOCTL_CFG80211
|
||||
#define CONFIG_IOCTL_CFG80211
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
#define _FALSE FALSE
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#include <linux/types.h>
|
||||
#define IN
|
||||
#define OUT
|
||||
|
@ -65,8 +63,6 @@
|
|||
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)
|
||||
|
|
|
@ -161,13 +161,8 @@
|
|||
* 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)
|
||||
extern unsigned long int ntohl(unsigned long int);
|
||||
extern unsigned long int htonl(unsigned long int);
|
||||
#endif
|
||||
extern unsigned short int ntohs(unsigned short int);
|
||||
extern unsigned short int htons(unsigned short int);
|
||||
|
||||
|
@ -178,13 +173,8 @@ extern unsigned short int htons(unsigned short int);
|
|||
#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 htons(x) ___htons(x)
|
||||
#define ntohs(x) ___ntohs(x)
|
||||
|
||||
|
|
|
@ -144,14 +144,12 @@ __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 */
|
||||
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
#include <drv_types_ce.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <drv_types_linux.h>
|
||||
#endif
|
||||
|
||||
typedef enum cust_gpio_modes {
|
||||
WLAN_PWDN_ON,
|
||||
|
|
|
@ -31,18 +31,7 @@
|
|||
#include <osdep_service.h>
|
||||
#include <wlan_bssdef.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
|
||||
|
||||
enum _NIC_VERSION {
|
||||
|
||||
|
@ -323,10 +312,8 @@ struct dvobj_priv
|
|||
u8 * usb_vendor_req_buf;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct usb_interface *pusbintf;
|
||||
struct usb_device *pusbdev;
|
||||
#endif//PLATFORM_LINUX
|
||||
|
||||
|
||||
#endif//CONFIG_USB_HCI
|
||||
|
@ -335,7 +322,6 @@ struct dvobj_priv
|
|||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct pci_dev *ppcidev;
|
||||
|
||||
//PCI MEM map
|
||||
|
@ -365,7 +351,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
|
||||
};
|
||||
|
@ -373,12 +358,9 @@ struct dvobj_priv
|
|||
#define dvobj_to_pwrctl(dvobj) (&(dvobj->pwrctl_priv))
|
||||
#define pwrctl_to_dvobj(pwrctl) container_of(pwrctl, struct dvobj_priv, pwrctl_priv)
|
||||
|
||||
#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;
|
||||
|
@ -393,7 +375,6 @@ static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
|||
return &dvobj->ppcidev->dev;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
enum _IFACE_TYPE {
|
||||
IFACE_PORT0, //mapping to port0 for C/D series chips
|
||||
|
@ -525,15 +506,9 @@ struct _ADAPTER{
|
|||
_thread_hdl_ xmitThread;
|
||||
_thread_hdl_ recvThread;
|
||||
|
||||
#ifndef PLATFORM_LINUX
|
||||
NDIS_STATUS (*dvobj_init)(struct dvobj_priv *dvobj);
|
||||
void (*dvobj_deinit)(struct dvobj_priv *dvobj);
|
||||
#endif
|
||||
|
||||
void (*intf_start)(_adapter * adapter);
|
||||
void (*intf_stop)(_adapter * adapter);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_nic_hdl pnetdev;
|
||||
|
||||
// used by rtw_rereg_nd_name related function
|
||||
|
@ -554,8 +529,6 @@ struct _ADAPTER{
|
|||
struct wireless_dev *rtw_wdev;
|
||||
#endif //CONFIG_IOCTL_CFG80211
|
||||
|
||||
#endif //end of PLATFORM_LINUX
|
||||
|
||||
int net_closed;
|
||||
|
||||
u8 bFWReady;
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
#include <basic_types.h>
|
||||
|
||||
// SPI Header Files
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/spi/spi.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct gspi_data
|
||||
|
@ -37,12 +35,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__
|
||||
|
|
|
@ -24,17 +24,7 @@
|
|||
#include <basic_types.h>
|
||||
|
||||
// SDIO Header Files
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/mmc/sdio_func.h>
|
||||
#endif
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <wdm.h>
|
||||
#include <ntddsd.h>
|
||||
#endif
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <sdcardddk.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct sdio_data
|
||||
{
|
||||
|
@ -44,27 +34,8 @@ 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;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,12 +28,7 @@
|
|||
#include <drv_types.h>
|
||||
#include "wifi.h"
|
||||
|
||||
#if defined PLATFORM_OS_XP
|
||||
#include <ntstrsafe.h>
|
||||
#endif
|
||||
#if defined PLATFORM_LINUX
|
||||
#include <linux/wireless.h>
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include <list.h>
|
||||
|
@ -753,8 +748,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,
|
||||
|
@ -767,8 +760,6 @@ struct ieee80211_security {
|
|||
u16 flags;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
802.11 data frame from AP
|
||||
|
@ -809,8 +800,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;
|
||||
|
@ -821,7 +810,6 @@ struct ieee80211_info_element {
|
|||
u8 len;
|
||||
u8 data[0];
|
||||
} __attribute__ ((packed));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* These are the data types that can make up management packets
|
||||
|
@ -844,9 +832,6 @@ struct ieee80211_info_element {
|
|||
#define IEEE80211_DEFAULT_BASIC_RATE 10
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
|
||||
struct ieee80211_authentication {
|
||||
struct ieee80211_header_data header;
|
||||
u16 algorithm;
|
||||
|
@ -855,7 +840,6 @@ struct ieee80211_authentication {
|
|||
//struct ieee80211_info_element_hdr info_element;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
struct ieee80211_probe_response {
|
||||
struct ieee80211_header_data header;
|
||||
u32 time_stamp[2];
|
||||
|
@ -884,7 +868,6 @@ struct ieee80211_assoc_response_frame {
|
|||
u16 aid;
|
||||
// struct ieee80211_info_element info_element; /* supported rates */
|
||||
} __attribute__ ((packed));
|
||||
#endif
|
||||
|
||||
struct ieee80211_txb {
|
||||
u8 nr_frags;
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#define PMKID_LEN 16
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
|
@ -103,8 +102,6 @@ struct wme_parameter_element {
|
|||
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(a)[1] = ((u16) (val)) >> 8; \
|
||||
|
@ -179,8 +176,6 @@ enum ieee80211_back_parties {
|
|||
WLAN_BACK_TIMER = 2,
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
|
@ -307,9 +302,6 @@ struct ieee80211_mgmt {
|
|||
} __attribute__ ((packed)) u;
|
||||
}__attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* mgmt header + 1 byte category code */
|
||||
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
||||
|
||||
|
|
|
@ -91,8 +91,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;
|
||||
|
@ -114,7 +112,6 @@ struct ip_options {
|
|||
};
|
||||
|
||||
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
|
||||
#endif
|
||||
|
||||
struct iphdr {
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
|
|
|
@ -51,7 +51,6 @@ The protection mechanism is through the pending queue.
|
|||
_mutex ioctl_mutex;
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_USB_HCI
|
||||
// when in USB, IO is through interrupt in/out endpoints
|
||||
struct usb_device *udev;
|
||||
|
@ -63,31 +62,8 @@ The protection mechanism is through the pending queue.
|
|||
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
|
||||
|
||||
};
|
||||
|
||||
|
||||
#ifdef CONFIG_R871X_TEST
|
||||
int rtw_start_pseudo_adhoc(_adapter *padapter);
|
||||
int rtw_stop_pseudo_adhoc(_adapter *padapter);
|
||||
|
@ -104,7 +80,6 @@ void rtw_cancel_dynamic_chk_timer(_adapter *padapter);
|
|||
#endif
|
||||
void rtw_cancel_all_timer(_adapter *padapter);
|
||||
|
||||
#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);
|
||||
|
@ -121,7 +96,6 @@ void rtw_proc_remove_one(struct net_device *dev);
|
|||
static void rtw_proc_init_one(struct net_device *dev){}
|
||||
static void rtw_proc_remove_one(struct net_device *dev){}
|
||||
#endif //!CONFIG_PROC_DEBUG
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
void rtw_ips_dev_unload(_adapter *padapter);
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#define _FALSE 0
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/version.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/compiler.h>
|
||||
|
@ -264,9 +263,7 @@ __inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
|
|||
*bcancelled= _TRUE;//TRUE ==1; FALSE==0
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define RTW_TIMER_HDL_ARGS void *FunctionContext
|
||||
#endif
|
||||
|
||||
#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)
|
||||
|
@ -351,176 +348,6 @@ static inline void rtw_netif_stop_queue(struct net_device *pnetdev)
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif // PLATFORM_LINUX
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
|
||||
#include <ndis.h>
|
||||
#include <ntddk.h>
|
||||
#include <ntddndis.h>
|
||||
#include <ntdef.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb.h>
|
||||
#include <usbioctl.h>
|
||||
#include <usbdlib.h>
|
||||
#endif
|
||||
|
||||
typedef KSEMAPHORE _sema;
|
||||
typedef LIST_ENTRY _list;
|
||||
typedef NDIS_STATUS _OS_STATUS;
|
||||
|
||||
|
||||
typedef NDIS_SPIN_LOCK _lock;
|
||||
|
||||
typedef KMUTEX _mutex;
|
||||
|
||||
typedef KIRQL _irqL;
|
||||
|
||||
// USB_PIPE for WINCE , but handle can be use just integer under windows
|
||||
typedef NDIS_HANDLE _nic_hdl;
|
||||
|
||||
|
||||
typedef NDIS_MINIPORT_TIMER _timer;
|
||||
|
||||
struct __queue {
|
||||
LIST_ENTRY queue;
|
||||
_lock lock;
|
||||
};
|
||||
|
||||
typedef NDIS_PACKET _pkt;
|
||||
typedef NDIS_BUFFER _buffer;
|
||||
typedef struct __queue _queue;
|
||||
|
||||
typedef PKTHREAD _thread_hdl_;
|
||||
typedef void thread_return;
|
||||
typedef void* thread_context;
|
||||
|
||||
typedef NDIS_WORK_ITEM _workitem;
|
||||
|
||||
#define thread_exit() PsTerminateSystemThread(STATUS_SUCCESS);
|
||||
|
||||
#define HZ 10000000
|
||||
#define SEMA_UPBND (0x7FFFFFFF) //8192
|
||||
|
||||
__inline static _list *get_next(_list *list)
|
||||
{
|
||||
return list->Flink;
|
||||
}
|
||||
|
||||
__inline static _list *get_list_head(_queue *queue)
|
||||
{
|
||||
return (&(queue->queue));
|
||||
}
|
||||
|
||||
|
||||
#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member)
|
||||
|
||||
|
||||
__inline static _enter_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
|
||||
__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _enter_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _exit_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _enter_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
KeWaitForSingleObject(pmutex, Executive, KernelMode, FALSE, NULL);
|
||||
}
|
||||
|
||||
|
||||
__inline static _exit_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
KeReleaseMutex(pmutex, FALSE);
|
||||
}
|
||||
|
||||
|
||||
__inline static void rtw_list_delete(_list *plist)
|
||||
{
|
||||
RemoveEntryList(plist);
|
||||
InitializeListHead(plist);
|
||||
}
|
||||
|
||||
__inline static void _init_timer(_timer *ptimer,_nic_hdl nic_hdl,void *pfunc,PVOID cntx)
|
||||
{
|
||||
NdisMInitializeTimer(ptimer, nic_hdl, pfunc, cntx);
|
||||
}
|
||||
|
||||
__inline static void _set_timer(_timer *ptimer,u32 delay_time)
|
||||
{
|
||||
NdisMSetTimer(ptimer,delay_time);
|
||||
}
|
||||
|
||||
__inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
|
||||
{
|
||||
NdisMCancelTimer(ptimer,bcancelled);
|
||||
}
|
||||
|
||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
||||
{
|
||||
|
||||
NdisInitializeWorkItem(pwork, pfunc, cntx);
|
||||
}
|
||||
|
||||
__inline static void _set_workitem(_workitem *pwork)
|
||||
{
|
||||
NdisScheduleWorkItem(pwork);
|
||||
}
|
||||
|
||||
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
|
||||
//
|
||||
// Global Mutex: can only be used at PASSIVE level.
|
||||
//
|
||||
|
||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
while (NdisInterlockedIncrement((PULONG)&(_MutexCounter)) != 1)\
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
NdisMSleep(10000); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
}
|
||||
|
||||
#endif // PLATFORM_OS_XP
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <osdep_ce_service.h>
|
||||
#endif
|
||||
|
||||
#include <rtw_byteorder.h>
|
||||
|
||||
#ifndef BIT
|
||||
|
@ -779,29 +606,23 @@ extern void rtw_yield_os(void);
|
|||
|
||||
__inline static unsigned char _cancel_timer_ex(_timer *ptimer)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return del_timer_sync(ptimer);
|
||||
#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
|
||||
}
|
||||
|
||||
__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)
|
||||
|
@ -811,16 +632,10 @@ __inline static _OS_STATUS res_to_status(sint res)
|
|||
|
||||
__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
|
||||
|
||||
#define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
|
||||
#define RND4(x) (((x >> 2) + (((x & 3) == 0) ? 0: 1)) << 2)
|
||||
|
@ -898,17 +713,10 @@ __inline static u32 bitshift(u32 bitmask)
|
|||
#endif
|
||||
|
||||
//#ifdef __GNUC__
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define STRUCT_PACKED __attribute__ ((packed))
|
||||
#else
|
||||
#define STRUCT_PACKED
|
||||
#endif
|
||||
|
||||
|
||||
// limitation of path length
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define PATH_LENGTH_MAX PATH_MAX
|
||||
#endif
|
||||
|
||||
|
||||
// Suspend lock prevent system from going suspend
|
||||
|
@ -957,7 +765,6 @@ extern struct net_device * rtw_alloc_etherdev(int sizeof_priv);
|
|||
|
||||
extern void rtw_free_netdev(struct net_device * netdev);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define NDEV_FMT "%s"
|
||||
#define NDEV_ARG(ndev) ndev->name
|
||||
#define ADPT_FMT "%s"
|
||||
|
@ -966,24 +773,12 @@ extern void rtw_free_netdev(struct net_device * netdev);
|
|||
#define FUNC_NDEV_ARG(ndev) __func__, ndev->name
|
||||
#define FUNC_ADPT_FMT "%s(%s)"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
|
||||
#else
|
||||
#define NDEV_FMT "%s"
|
||||
#define NDEV_ARG(ndev) ""
|
||||
#define ADPT_FMT "%s"
|
||||
#define ADPT_ARG(adapter) ""
|
||||
#define FUNC_NDEV_FMT "%s"
|
||||
#define FUNC_NDEV_ARG(ndev) __func__
|
||||
#define FUNC_ADPT_FMT "%s"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
|
||||
#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)),(sig), 1)
|
||||
#else //(LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
|
||||
#define rtw_signal_process(pid, sig) kill_proc((pid), (sig), 1)
|
||||
#endif //(LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
extern u64 rtw_modular64(u64 x, u64 y);
|
||||
extern u64 rtw_division64(u64 x, u64 y);
|
||||
|
|
|
@ -157,13 +157,11 @@ 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, struct eeprom_priv * eeprom_priv);
|
||||
extern int retriveAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv);
|
||||
#endif //CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
#endif //__RTL871X_EEPROM_H__
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <osdep_service.h>
|
||||
|
||||
#ifndef CONFIG_RTL8711FW
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <wlan_bssdef.h>
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
|
||||
#include <asm/semaphore.h>
|
||||
|
@ -31,13 +30,10 @@
|
|||
#include <linux/semaphore.h>
|
||||
#endif
|
||||
#include <linux/sem.h>
|
||||
#endif
|
||||
#else
|
||||
#include <wlan_bssdef.h>
|
||||
#endif//CONFIG_RTL8711FW
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_H2CLBK
|
||||
#include <h2clbk.h>
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <osdep_service.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <asm/byteorder.h>
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
|
||||
#include <asm/semaphore.h>
|
||||
|
@ -47,14 +46,9 @@
|
|||
|
||||
#endif //CONFIG_USB_HCI
|
||||
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
|
||||
#define NUM_IOREQ 8
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define MAX_PROT_SZ (64-16)
|
||||
#endif
|
||||
|
||||
#define _IOREADY 0
|
||||
#define _IO_WAIT_COMPLETE 1
|
||||
|
|
|
@ -103,7 +103,7 @@ struct oid_obj_priv {
|
|||
NDIS_STATUS (*oidfuns)(struct oid_par_priv *poid_par_priv);
|
||||
};
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT)
|
||||
#if defined(CONFIG_WIRELESS_EXT)
|
||||
extern struct iw_handler_def rtw_handlers_def;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -123,13 +123,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];
|
||||
|
|
|
@ -290,9 +290,7 @@ struct recv_priv
|
|||
u8 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
|
||||
|
@ -403,10 +401,8 @@ struct recv_buf
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_pkt *pskb;
|
||||
u8 reuse;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -440,9 +440,7 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
|||
u8 *lnkid, u8 *rsnie, u8 *timeoutie, u8 *ftie);
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
void rtw_use_tkipkey_handler(void* FunctionContext);
|
||||
#endif
|
||||
|
||||
void rtw_sec_restore_wep_key(_adapter *adapter);
|
||||
u8 rtw_handle_tkip_countermeasure(_adapter* adapter, const char *caller);
|
||||
|
|
|
@ -324,9 +324,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 {
|
||||
|
@ -558,9 +556,7 @@ struct xmit_priv {
|
|||
USB_TRANSFER usb_transfer_write_port;
|
||||
// USB_TRANSFER usb_transfer_write_mem;
|
||||
#endif
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif
|
||||
//per AC pending irp
|
||||
int beq_cnt;
|
||||
int bkq_cnt;
|
||||
|
@ -574,16 +570,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
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#ifdef CONFIG_SDIO_TX_TASKLET
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif /* PLATFORM_LINUX */
|
||||
#else
|
||||
_thread_hdl_ SdioXmitThread;
|
||||
_sema SdioXmitSema;
|
||||
|
|
|
@ -24,10 +24,7 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <sdio_ops_linux.h>
|
||||
#endif
|
||||
|
||||
extern void sdio_set_intf_ops(struct _io_ops *pops);
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ 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
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), (timeout_ms))
|
||||
|
@ -53,7 +52,6 @@ enum{
|
|||
((timeout_ms) == 0) ||((timeout_ms)*HZ/1000>0)?((timeout_ms)*HZ/1000):1)
|
||||
#endif
|
||||
#include <usb_ops_linux.h>
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
#ifdef CONFIG_RTL8192C
|
||||
void rtl8192cu_set_hw_type(_adapter *padapter);
|
||||
|
|
|
@ -663,7 +663,6 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
* 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;
|
||||
|
@ -672,7 +671,6 @@ 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
|
||||
|
|
|
@ -20,12 +20,8 @@
|
|||
#ifndef __WLAN_BSSDEF_H__
|
||||
#define __WLAN_BSSDEF_H__
|
||||
|
||||
|
||||
#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
|
||||
|
@ -293,9 +289,6 @@ typedef struct _NDIS_802_11_TEST
|
|||
}tt;
|
||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
|
||||
|
||||
#endif //end of #ifdef PLATFORM_LINUX
|
||||
|
||||
#ifndef Ndis802_11APMode
|
||||
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
|
||||
#endif
|
||||
|
|
|
@ -33,8 +33,6 @@ struct pkt_file {
|
|||
SIZE_T buf_len;
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#define NR_XMITFRAME 256
|
||||
|
||||
struct xmit_priv;
|
||||
|
@ -46,8 +44,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
|
||||
|
||||
void rtw_os_xmit_schedule(_adapter *padapter);
|
||||
|
||||
int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue