diff --git a/include/custom_gpio.h b/include/custom_gpio.h index c7c442b..a65c989 100644 --- a/include/custom_gpio.h +++ b/include/custom_gpio.h @@ -18,10 +18,6 @@ #include #include -#ifdef PLATFORM_OS_CE - #include -#endif - #ifdef PLATFORM_LINUX #include #endif diff --git a/include/drv_types.h b/include/drv_types.h index 3c266f0..0bc36a0 100644 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -34,10 +34,6 @@ #include #endif -#ifdef PLATFORM_OS_CE - #include -#endif - typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER; #include diff --git a/include/drv_types_ce.h b/include/drv_types_ce.h deleted file mode 100644 index c00dea8..0000000 --- a/include/drv_types_ce.h +++ /dev/null @@ -1,86 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2017 Realtek Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - *****************************************************************************/ -#ifndef __DRV_TYPES_CE_H__ -#define __DRV_TYPES_CE_H__ - -#include -#include - -#include - -#define MAX_ACTIVE_REG_PATH 256 - -#define MAX_MCAST_LIST_NUM 32 - - - -/* for ioctl */ -#define MAKE_DRIVER_VERSION(_MainVer, _MinorVer) ((((u32)(_MainVer))<<16)+_MinorVer) - -#define NIC_HEADER_SIZE 14 /* !< can be moved to typedef.h */ -#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */ -#define NIC_MAX_SEND_PACKETS 10 /* max number of send packets the MiniportSendPackets function can accept, can be moved to typedef.h */ -#define NIC_VENDOR_DRIVER_VERSION MAKE_DRIVER_VERSION(0, 001) /* !< can be moved to typedef.h */ -#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */ - -typedef struct _MP_REG_ENTRY { - - NDIS_STRING RegName; /* variable name text */ - BOOLEAN bRequired; /* 1->required, 0->optional */ - - u8 Type; /* NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString */ - uint FieldOffset; /* offset to MP_ADAPTER field */ - uint FieldSize; /* size (in bytes) of the field */ - -#ifdef UNDER_AMD64 - u64 Default; -#else - u32 Default; /* default value to use */ -#endif - - u32 Min; /* minimum value allowed */ - u32 Max; /* maximum value allowed */ -} MP_REG_ENTRY, *PMP_REG_ENTRY; - -#ifdef CONFIG_USB_HCI -typedef struct _USB_EXTENSION { - LPCUSB_FUNCS _lpUsbFuncs; - USB_HANDLE _hDevice; - PVOID pAdapter; - -#if 0 - USB_ENDPOINT_DESCRIPTOR _endpACLIn; - USB_ENDPOINT_DESCRIPTOR _endpACLOutHigh; - USB_ENDPOINT_DESCRIPTOR _endpACLOutNormal; - - USB_PIPE pPipeIn; - USB_PIPE pPipeOutNormal; - USB_PIPE pPipeOutHigh; -#endif - -} USB_EXTENSION, *PUSB_EXTENSION; -#endif - - -typedef struct _OCTET_STRING { - u8 *Octet; - u16 Length; -} OCTET_STRING, *POCTET_STRING; - - - - - -#endif diff --git a/include/drv_types_sdio.h b/include/drv_types_sdio.h index bd1d620..27eb516 100644 --- a/include/drv_types_sdio.h +++ b/include/drv_types_sdio.h @@ -28,10 +28,6 @@ #endif /* CONFIG_PLATFORM_SPRD */ #endif -#ifdef PLATFORM_OS_CE - #include -#endif - #define RTW_SDIO_CLK_33M 33000000 #define RTW_SDIO_CLK_40M 40000000 #define RTW_SDIO_CLK_80M 80000000 @@ -52,14 +48,6 @@ typedef struct sdio_data { u8 sd3_bus_mode; #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) diff --git a/include/gspi_osintf.h b/include/gspi_osintf.h index 6393f77..a94e656 100644 --- a/include/gspi_osintf.h +++ b/include/gspi_osintf.h @@ -16,10 +16,4 @@ #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 diff --git a/include/osdep_service.h b/include/osdep_service.h index e3e9829..2baa01a 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -45,10 +45,6 @@ #include #endif -#ifdef PLATFORM_OS_CE - #include -#endif - /* #include */ #ifndef BIT diff --git a/include/osdep_service_ce.h b/include/osdep_service_ce.h deleted file mode 100644 index f45cb60..0000000 --- a/include/osdep_service_ce.h +++ /dev/null @@ -1,200 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2017 Realtek Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - *****************************************************************************/ - -#ifndef __OSDEP_CE_SERVICE_H_ -#define __OSDEP_CE_SERVICE_H_ - - -#include -#include - -#ifdef CONFIG_SDIO_HCI -#include "SDCardDDK.h" -#endif - -#ifdef CONFIG_USB_HCI -#include -#endif - -typedef HANDLE _sema; -typedef LIST_ENTRY _list; -typedef NDIS_STATUS _OS_STATUS; - -typedef NDIS_SPIN_LOCK _lock; - -typedef HANDLE _rwlock; //Mutex - -typedef u32 _irqL; - -typedef NDIS_HANDLE _nic_hdl; - -struct rtw_timer_list { - NDIS_MINIPORT_TIMER ndis_timer; - void (*function)(void *); - void *arg; -}; - -struct __queue { - LIST_ENTRY queue; - _lock lock; -}; - -typedef NDIS_PACKET _pkt; -typedef NDIS_BUFFER _buffer; -typedef struct __queue _queue; - -typedef HANDLE _thread_hdl_; -typedef DWORD thread_return; -typedef void* thread_context; -typedef NDIS_WORK_ITEM _workitem; - - - -#define SEMA_UPBND (0x7FFFFFFF) //8192 - -__inline static _list *get_prev(_list *list) -{ - return list->Blink; -} - -__inline static _list *get_next(_list *list) -{ - return list->Flink; -} - -__inline static _list *get_list_head(_queue *queue) -{ - return (&(queue->queue)); -} - -#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member) - -__inline static void _enter_critical(_lock *plock, _irqL *pirqL) -{ - NdisAcquireSpinLock(plock); -} - -__inline static void _exit_critical(_lock *plock, _irqL *pirqL) -{ - NdisReleaseSpinLock(plock); -} - -__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL) -{ - NdisDprAcquireSpinLock(plock); -} - -__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL) -{ - NdisDprReleaseSpinLock(plock); -} - - -__inline static void _enter_hwio_critical(_rwlock *prwlock, _irqL *pirqL) -{ - WaitForSingleObject(*prwlock, INFINITE ); - -} - -__inline static void _exit_hwio_critical(_rwlock *prwlock, _irqL *pirqL) -{ - ReleaseMutex(*prwlock); -} - -__inline static void rtw_list_delete(_list *plist) -{ - RemoveEntryList(plist); - InitializeListHead(plist); -} - -static inline void timer_hdl( - IN PVOID SystemSpecific1, - IN PVOID FunctionContext, - IN PVOID SystemSpecific2, - IN PVOID SystemSpecific3) -{ - _timer *timer = (_timer *)FunctionContext; - - timer->function(timer->arg); -} - -static inline void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc, void *cntx) -{ - ptimer->function = pfunc; - ptimer->arg = cntx; - NdisMInitializeTimer(&ptimer->ndis_timer, nic_hdl, timer_hdl, ptimer); -} - -static inline void _set_timer(_timer *ptimer, u32 delay_time) -{ - NdisMSetTimer(ptimer, delay_time); -} - -static inline 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)); \ -} - -// limitation of path length -#define PATH_LENGTH_MAX MAX_PATH - -//Atomic integer operations -#define atomic_t LONG - -#define NDEV_FMT "%s" -#define NDEV_ARG(ndev) "" -#define ADPT_FMT "%s" -#define ADPT_ARG(adapter) "" -#define FUNC_NDEV_FMT "%s" -#define FUNC_NDEV_ARG(ndev) __func__ -#define FUNC_ADPT_FMT "%s" -#define FUNC_ADPT_ARG(adapter) __func__ - -#define STRUCT_PACKED - - -#endif - diff --git a/include/rtl8188e_recv.h b/include/rtl8188e_recv.h index 92425a8..ca23265 100644 --- a/include/rtl8188e_recv.h +++ b/include/rtl8188e_recv.h @@ -22,18 +22,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 */ diff --git a/include/rtl8188f_recv.h b/include/rtl8188f_recv.h index 6366b81..d4a725d 100644 --- a/include/rtl8188f_recv.h +++ b/include/rtl8188f_recv.h @@ -17,24 +17,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_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 /* !MAX_RECVBUF_SZ */ #elif defined(CONFIG_PCI_HCI) diff --git a/include/rtl8192e_recv.h b/include/rtl8192e_recv.h index 6ccb8e9..c19a980 100644 --- a/include/rtl8192e_recv.h +++ b/include/rtl8192e_recv.h @@ -18,28 +18,24 @@ #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 */ - #ifdef CONFIG_PLATFORM_NOVATEK_NT72668 - #undef MAX_RECVBUF_SZ - #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ - #endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */ + #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 */ + #ifdef CONFIG_PLATFORM_NOVATEK_NT72668 + #undef MAX_RECVBUF_SZ + #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ + #endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */ #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8192f_recv.h b/include/rtl8192f_recv.h index 989551b..9fb931a 100644 --- a/include/rtl8192f_recv.h +++ b/include/rtl8192f_recv.h @@ -22,22 +22,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 (32768) /* 32k */ - #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 (32768) /* 32k */ #endif + /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #else + #define MAX_RECVBUF_SZ (4000) /* about 4K */ #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8703b_recv.h b/include/rtl8703b_recv.h index e796e6e..09672d2 100644 --- a/include/rtl8703b_recv.h +++ b/include/rtl8703b_recv.h @@ -22,22 +22,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 */ diff --git a/include/rtl8710b_recv.h b/include/rtl8710b_recv.h index f99c331..2b78b02 100644 --- a/include/rtl8710b_recv.h +++ b/include/rtl8710b_recv.h @@ -21,23 +21,19 @@ #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 (15360) /* 15k < 16k */ - /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ - /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ - /* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */ - #endif + #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ + /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ + /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ + /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ + /* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */ #endif #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8723b_recv.h b/include/rtl8723b_recv.h index cf5e18b..5e92713 100644 --- a/include/rtl8723b_recv.h +++ b/include/rtl8723b_recv.h @@ -22,22 +22,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 */ diff --git a/include/rtl8723d_recv.h b/include/rtl8723d_recv.h index 03539a8..f19ad69 100644 --- a/include/rtl8723d_recv.h +++ b/include/rtl8723d_recv.h @@ -22,22 +22,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 */ diff --git a/include/rtl8812a_recv.h b/include/rtl8812a_recv.h index bf1d4b6..5fa06e5 100644 --- a/include/rtl8812a_recv.h +++ b/include/rtl8812a_recv.h @@ -18,27 +18,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 */ diff --git a/include/rtl8814a_recv.h b/include/rtl8814a_recv.h index c6792d8..68da633 100644 --- a/include/rtl8814a_recv.h +++ b/include/rtl8814a_recv.h @@ -18,23 +18,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 */ diff --git a/include/rtl8822bu_hal.h b/include/rtl8822bu_hal.h index 39618c9..9c44032 100644 --- a/include/rtl8822bu_hal.h +++ b/include/rtl8822bu_hal.h @@ -34,22 +34,18 @@ /* 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 - #ifdef CONFIG_PLATFORM_NOVATEK_NT72668 - #define MAX_RECVBUF_SZ (15360) /* 15k */ - #elif defined(CONFIG_PLATFORM_HISILICON) - /* use 16k to workaround for HISILICON platform */ - #define MAX_RECVBUF_SZ (16384) - #else - #define MAX_RECVBUF_SZ (32768) - #endif + #ifndef CONFIG_MINIMAL_MEMORY_USAGE + #ifdef CONFIG_PLATFORM_NOVATEK_NT72668 + #define MAX_RECVBUF_SZ (15360) /* 15k */ + #elif defined(CONFIG_PLATFORM_HISILICON) + /* use 16k to workaround for HISILICON platform */ + #define MAX_RECVBUF_SZ (16384) #else - #define MAX_RECVBUF_SZ (4000) + #define MAX_RECVBUF_SZ (32768) #endif - #endif /* PLATFORM_OS_CE */ + #else + #define MAX_RECVBUF_SZ (4000) + #endif #endif /* !MAX_RECVBUF_SZ */ /* rtl8822bu_ops.c */ diff --git a/include/rtw_cmd.h b/include/rtw_cmd.h index 1b07a7e..f608eb1 100644 --- a/include/rtw_cmd.h +++ b/include/rtw_cmd.h @@ -26,11 +26,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; diff --git a/include/rtw_debug.h b/include/rtw_debug.h index 984aaf8..ccd8d3e 100644 --- a/include/rtw_debug.h +++ b/include/rtw_debug.h @@ -28,10 +28,6 @@ enum { #define DRIVER_PREFIX "RTW: " -#ifdef PLATFORM_OS_CE -extern void rtl871x_cedbg(const char *fmt, ...); -#endif - #define RTW_PRINT(x, ...) do {} while (0) #define RTW_ERR(x, ...) do {} while (0) #define RTW_WARN(x,...) do {} while (0) diff --git a/include/rtw_io.h b/include/rtw_io.h index 4a06dac..5a29d24 100644 --- a/include/rtw_io.h +++ b/include/rtw_io.h @@ -134,13 +134,6 @@ 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; diff --git a/include/rtw_recv.h b/include/rtw_recv.h index 698ae66..22e37d4 100644 --- a/include/rtw_recv.h +++ b/include/rtw_recv.h @@ -19,14 +19,6 @@ #define RTW_RX_MSDU_ACT_INDICATE BIT0 #define RTW_RX_MSDU_ACT_FORWARD BIT1 -#if defined(PLATFORM_OS_CE) - #ifdef CONFIG_SDIO_HCI - #define NR_RECVBUFF (128) - #else - #define NR_RECVBUFF (4) - #endif -#else /* PLATFORM_LINUX /PLATFORM_BSD */ - #ifdef CONFIG_SINGLE_RECV_BUF #define NR_RECVBUFF (1) #else @@ -47,7 +39,6 @@ #ifdef CONFIG_RTW_NAPI #define RTL_NAPI_WEIGHT (32) #endif -#endif #if defined(CONFIG_RTL8821C) && defined(CONFIG_SDIO_HCI) && defined(CONFIG_RECV_THREAD_MODE) #ifdef NR_RECVBUFF @@ -512,10 +503,6 @@ PURB purb; dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */ u32 alloc_sz; -#ifdef PLATFORM_OS_CE - USB_TRANSFER usb_transfer_read_port; -#endif - u8 irp_pending; int transfer_len; diff --git a/include/rtw_xmit.h b/include/rtw_xmit.h index ebadfcf..2ac6101 100644 --- a/include/rtw_xmit.h +++ b/include/rtw_xmit.h @@ -61,17 +61,13 @@ #define NR_XMITBUFF (128) #endif -#ifdef PLATFORM_OS_CE +#ifdef CONFIG_PCI_HCI #define XMITBUF_ALIGN_SZ 4 #else - #ifdef CONFIG_PCI_HCI - #define XMITBUF_ALIGN_SZ 4 + #ifdef USB_XMITBUF_ALIGN_SZ + #define XMITBUF_ALIGN_SZ (USB_XMITBUF_ALIGN_SZ) #else - #ifdef USB_XMITBUF_ALIGN_SZ - #define XMITBUF_ALIGN_SZ (USB_XMITBUF_ALIGN_SZ) - #else - #define XMITBUF_ALIGN_SZ 512 - #endif + #define XMITBUF_ALIGN_SZ 512 #endif #endif @@ -600,10 +596,6 @@ struct xmit_buf { PURB pxmit_urb[8]; dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */ -#ifdef PLATFORM_OS_CE - USB_TRANSFER usb_transfer_write_port; -#endif - u8 bpending[8]; sint last[8]; @@ -784,10 +776,6 @@ 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 diff --git a/include/sdio_ops_ce.h b/include/sdio_ops_ce.h deleted file mode 100644 index d542cb7..0000000 --- a/include/sdio_ops_ce.h +++ /dev/null @@ -1,49 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2017 Realtek Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - *****************************************************************************/ -#ifndef _SDIO_OPS_WINCE_H_ -#define _SDIO_OPS_WINCE_H_ - -#include -#include -#include -#include - - -#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 diff --git a/include/sdio_osintf.h b/include/sdio_osintf.h index 7c2abd1..2bff22f 100644 --- a/include/sdio_osintf.h +++ b/include/sdio_osintf.h @@ -15,11 +15,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 diff --git a/include/wlan_bssdef.h b/include/wlan_bssdef.h index 3106cfc..bfaea09 100644 --- a/include/wlan_bssdef.h +++ b/include/wlan_bssdef.h @@ -413,34 +413,5 @@ enum UAPSD_MAX_SP { * WPA2 */ -#ifndef PLATFORM_OS_CE -typedef struct _PMKID_CANDIDATE { - NDIS_802_11_MAC_ADDRESS BSSID; - ULONG Flags; -} PMKID_CANDIDATE, *PPMKID_CANDIDATE; - -typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST { - ULONG Version; /* Version of the structure */ - ULONG NumCandidates; /* No. of pmkid candidates */ - PMKID_CANDIDATE CandidateList[1]; -} NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST; - - -typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION { - NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported; - NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported; - -} NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION; - -typedef struct _NDIS_802_11_CAPABILITY { - ULONG Length; - ULONG Version; - ULONG NoOfPMKIDs; - ULONG NoOfAuthEncryptPairsSupported; - NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1]; - -} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY; -#endif - #endif /* #ifndef WLAN_BSSDEF_H_ */ diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 41cbfd6..49969a4 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -845,18 +845,10 @@ void _rtw_init_sema(_sema *sema, int init_val) #endif -#ifdef PLATFORM_OS_CE - if (*sema == NULL) - *sema = CreateSemaphore(NULL, init_val, SEMA_UPBND, NULL); -#endif - } void _rtw_free_sema(_sema *sema) { -#ifdef PLATFORM_OS_CE - CloseHandle(*sema); -#endif } @@ -869,9 +861,6 @@ void _rtw_up_sema(_sema *sema) #endif -#ifdef PLATFORM_OS_CE - ReleaseSemaphore(*sema, 1, NULL); -#endif } u32 _rtw_down_sema(_sema *sema) @@ -886,12 +875,6 @@ u32 _rtw_down_sema(_sema *sema) #endif -#ifdef PLATFORM_OS_CE - if (WAIT_OBJECT_0 == WaitForSingleObject(*sema, INFINITE)) - return _SUCCESS; - else - return _FAIL; -#endif } inline void thread_exit(_completion *comp) @@ -900,10 +883,6 @@ inline void thread_exit(_completion *comp) complete_and_exit(comp, 0); #endif -#ifdef PLATFORM_OS_CE - ExitThread(STATUS_SUCCESS); -#endif - } inline void _rtw_init_completion(_completion *comp) @@ -936,10 +915,6 @@ void _rtw_mutex_init(_mutex *pmutex) #endif #endif - -#ifdef PLATFORM_OS_CE - *pmutex = CreateMutex(NULL, _FALSE, NULL); -#endif } void _rtw_mutex_free(_mutex *pmutex); @@ -953,9 +928,6 @@ void _rtw_mutex_free(_mutex *pmutex) #endif -#ifdef PLATFORM_OS_CE - -#endif } void _rtw_spinlock_init(_lock *plock)