rtl8188eu: Delete some unused header files

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-03-13 16:43:34 -05:00
parent d26bbefc3a
commit 03bcc1a3e2
22 changed files with 0 additions and 3443 deletions

View file

@ -1,74 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __DRV_TYPES_CE_H__
#define __DRV_TYPES_CE_H__
#include <drv_conf.h>
#include <osdep_service.h>
#include <Sdcardddk.h>
#define MAX_ACTIVE_REG_PATH 256
#define MAX_MCAST_LIST_NUM 32
//for ioctl
#define MAKE_DRIVER_VERSION(_MainVer,_MinorVer) ((((u32)(_MainVer))<<16)+_MinorVer)
#define NIC_HEADER_SIZE 14 //!< can be moved to typedef.h
#define NIC_MAX_PACKET_SIZE 1514 //!< can be moved to typedef.h
#define NIC_MAX_SEND_PACKETS 10 // max number of send packets the MiniportSendPackets function can accept, can be moved to typedef.h
#define NIC_VENDOR_DRIVER_VERSION MAKE_DRIVER_VERSION(0,001) //!< can be moved to typedef.h
#define NIC_MAX_PACKET_SIZE 1514 //!< can be moved to typedef.h
typedef struct _MP_REG_ENTRY
{
NDIS_STRING RegName; // variable name text
bool bRequired; // 1 -> required, 0 -> optional
u8 Type; // NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString
uint FieldOffset; // offset to MP_ADAPTER field
uint FieldSize; // size (in bytes) of the field
#ifdef UNDER_AMD64
u64 Default;
#else
u32 Default; // default value to use
#endif
u32 Min; // minimum value allowed
u32 Max; // maximum value allowed
} MP_REG_ENTRY, *PMP_REG_ENTRY;
typedef struct _USB_EXTENSION {
LPCUSB_FUNCS _lpUsbFuncs;
USB_HANDLE _hDevice;
void * pAdapter;
} USB_EXTENSION, *PUSB_EXTENSION;
typedef struct _OCTET_STRING{
u8 *Octet;
u16 Length;
} OCTET_STRING, *POCTET_STRING;
#endif

View file

@ -1,44 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __DRV_TYPES_GSPI_H__
#define __DRV_TYPES_GSPI_H__
#include <drv_conf.h>
#include <basic_types.h>
// SPI Header Files
#include <linux/spi/spi.h>
typedef struct gspi_data
{
u8 func_number;
u8 tx_block_mode;
u8 rx_block_mode;
u32 block_transfer_len;
struct spi_device *func;
struct workqueue_struct *priv_wq;
struct delayed_work irq_work;
} GSPI_DATA, *PGSPI_DATA;
#endif // #ifndef __DRV_TYPES_GSPI_H__

View file

@ -1,41 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __DRV_TYPES_SDIO_H__
#define __DRV_TYPES_SDIO_H__
#include <drv_conf.h>
#include <basic_types.h>
// SDIO Header Files
#include <linux/mmc/sdio_func.h>
typedef struct sdio_data
{
u8 func_number;
u8 tx_block_mode;
u8 rx_block_mode;
u32 block_transfer_len;
struct sdio_func *func;
_thread_hdl_ sys_sdio_irq_thd;
} SDIO_DATA, *PSDIO_DATA;
#endif

View file

@ -1,94 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __DRV_TYPES_XP_H__
#define __DRV_TYPES_XP_H__
#include <drv_conf.h>
#include <osdep_service.h>
#define MAX_MCAST_LIST_NUM 32
//for ioctl
#define MAKE_DRIVER_VERSION(_MainVer,_MinorVer) ((((u32)(_MainVer))<<16)+_MinorVer)
#define NIC_HEADER_SIZE 14 //!< can be moved to typedef.h
#define NIC_MAX_PACKET_SIZE 1514 //!< can be moved to typedef.h
#define NIC_MAX_SEND_PACKETS 10 // max number of send packets the MiniportSendPackets function can accept, can be moved to typedef.h
#define NIC_VENDOR_DRIVER_VERSION MAKE_DRIVER_VERSION(0,001) //!< can be moved to typedef.h
#define NIC_MAX_PACKET_SIZE 1514 //!< can be moved to typedef.h
#undef ON_VISTA
//added by Jackson
#ifndef ON_VISTA
//
// Bus driver versions
//
#define SDBUS_DRIVER_VERSION_1 0x100
#define SDBUS_DRIVER_VERSION_2 0x200
#define SDP_FUNCTION_TYPE 4
#define SDP_BUS_DRIVER_VERSION 5
#define SDP_BUS_WIDTH 6
#define SDP_BUS_CLOCK 7
#define SDP_BUS_INTERFACE_CONTROL 8
#define SDP_HOST_BLOCK_LENGTH 9
#define SDP_FUNCTION_BLOCK_LENGTH 10
#define SDP_FN0_BLOCK_LENGTH 11
#define SDP_FUNCTION_INT_ENABLE 12
#endif
typedef struct _MP_REG_ENTRY
{
NDIS_STRING RegName; // variable name text
bool bRequired; // 1 -> required, 0 -> optional
u8 Type; // NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString
uint FieldOffset; // offset to MP_ADAPTER field
uint FieldSize; // size (in bytes) of the field
#ifdef UNDER_AMD64
u64 Default;
#else
u32 Default; // default value to use
#endif
u32 Min; // minimum value allowed
u32 Max; // maximum value allowed
} MP_REG_ENTRY, *PMP_REG_ENTRY;
typedef struct _OCTET_STRING{
u8 *Octet;
u16 Length;
} OCTET_STRING, *POCTET_STRING;
#endif

View file

@ -1,28 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __GSPI_HAL_H__
#define __GSPI_HAL_H__
void spi_int_dpc(struct adapter *padapter);
void rtl8188es_set_hal_ops(struct adapter *padapter);
#define hal_set_hal_ops rtl8188es_set_hal_ops
#endif //__GSPI_HAL_H__

View file

@ -1,164 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __GSPI_OPS_H__
#define __GSPI_OPS_H__
/* follwing defination is based on
* GSPI spec of RTL8723, we temp
* suppose that it will be the same
* for diff chips of GSPI, if not
* we should move it to HAL folder */
#define SPI_LOCAL_DOMAIN 0x0
#define WLAN_IOREG_DOMAIN 0x8
#define FW_FIFO_DOMAIN 0x4
#define TX_HIQ_DOMAIN 0xc
#define TX_MIQ_DOMAIN 0xd
#define TX_LOQ_DOMAIN 0xe
#define RX_RXFIFO_DOMAIN 0x1f
//IO Bus domain address mapping
#define DEFUALT_OFFSET 0x0
#define SPI_LOCAL_OFFSET 0x10250000
#define WLAN_IOREG_OFFSET 0x10260000
#define FW_FIFO_OFFSET 0x10270000
#define TX_HIQ_OFFSET 0x10310000
#define TX_MIQ_OFFSET 0x1032000
#define TX_LOQ_OFFSET 0x10330000
#define RX_RXOFF_OFFSET 0x10340000
//SPI Local registers
#define SPI_REG_TX_CTRL 0x0000 // SPI Tx Control
#define SPI_REG_STATUS_RECOVERY 0x0004
#define SPI_REG_INT_TIMEOUT 0x0006
#define SPI_REG_HIMR 0x0014 // SPI Host Interrupt Mask
#define SPI_REG_HISR 0x0018 // SPI Host Interrupt Service Routine
#define SPI_REG_RX0_REQ_LEN 0x001C // RXDMA Request Length
#define SPI_REG_FREE_TXPG 0x0020 // Free Tx Buffer Page
#define SPI_REG_HCPWM1 0x0024 // HCI Current Power Mode 1
#define SPI_REG_HCPWM2 0x0026 // HCI Current Power Mode 2
#define SPI_REG_HTSFR_INFO 0x0030 // HTSF Informaion
#define SPI_REG_HRPWM1 0x0080 // HCI Request Power Mode 1
#define SPI_REG_HRPWM2 0x0082 // HCI Request Power Mode 2
#define SPI_REG_HPS_CLKR 0x0084 // HCI Power Save Clock
#define SPI_REG_HSUS_CTRL 0x0086 // SPI HCI Suspend Control
#define SPI_REG_HIMR_ON 0x0090 //SPI Host Extension Interrupt Mask Always
#define SPI_REG_HISR_ON 0x0091 //SPI Host Extension Interrupt Status Always
#define SPI_REG_CFG 0x00F0 //SPI Configuration Register
#define SPI_TX_CTRL (SPI_REG_TX_CTRL |SPI_LOCAL_OFFSET)
#define SPI_STATUS_RECOVERY (SPI_REG_STATUS_RECOVERY |SPI_LOCAL_OFFSET)
#define SPI_INT_TIMEOUT (SPI_REG_INT_TIMEOUT |SPI_LOCAL_OFFSET)
#define SPI_HIMR (SPI_REG_HIMR |SPI_LOCAL_OFFSET)
#define SPI_HISR (SPI_REG_HISR |SPI_LOCAL_OFFSET)
#define SPI_RX0_REQ_LEN_1_BYTE (SPI_REG_RX0_REQ_LEN |SPI_LOCAL_OFFSET)
#define SPI_FREE_TXPG (SPI_REG_FREE_TXPG |SPI_LOCAL_OFFSET)
#define SPI_HIMR_DISABLED 0
//SPI HIMR MASK diff with SDIO
#define SPI_HISR_RX_REQUEST BIT(0)
#define SPI_HISR_AVAL BIT(1)
#define SPI_HISR_TXERR BIT(2)
#define SPI_HISR_RXERR BIT(3)
#define SPI_HISR_TXFOVW BIT(4)
#define SPI_HISR_RXFOVW BIT(5)
#define SPI_HISR_TXBCNOK BIT(6)
#define SPI_HISR_TXBCNERR BIT(7)
#define SPI_HISR_BCNERLY_INT BIT(16)
#define SPI_HISR_ATIMEND BIT(17)
#define SPI_HISR_ATIMEND_E BIT(18)
#define SPI_HISR_CTWEND BIT(19)
#define SPI_HISR_C2HCMD BIT(20)
#define SPI_HISR_CPWM1 BIT(21)
#define SPI_HISR_CPWM2 BIT(22)
#define SPI_HISR_HSISR_IND BIT(23)
#define SPI_HISR_GTINT3_IND BIT(24)
#define SPI_HISR_GTINT4_IND BIT(25)
#define SPI_HISR_PSTIMEOUT BIT(26)
#define SPI_HISR_OCPINT BIT(27)
#define SPI_HISR_TSF_BIT32_TOGGLE BIT(29)
#define MASK_SPI_HISR_CLEAR (SPI_HISR_TXERR |\
SPI_HISR_RXERR |\
SPI_HISR_TXFOVW |\
SPI_HISR_RXFOVW |\
SPI_HISR_TXBCNOK |\
SPI_HISR_TXBCNERR |\
SPI_HISR_C2HCMD |\
SPI_HISR_CPWM1 |\
SPI_HISR_CPWM2 |\
SPI_HISR_HSISR_IND |\
SPI_HISR_GTINT3_IND |\
SPI_HISR_GTINT4_IND |\
SPI_HISR_PSTIMEOUT |\
SPI_HISR_OCPINT)
#define REG_LEN_FORMAT(pcmd, x) SET_BITS_TO_LE_4BYTE(pcmd, 0, 8, x)//(x<<(unsigned int)24)
#define REG_ADDR_FORMAT(pcmd,x) SET_BITS_TO_LE_4BYTE(pcmd, 8, 16, x)//(x<<(unsigned int)16)
#define REG_DOMAIN_ID_FORMAT(pcmd,x) SET_BITS_TO_LE_4BYTE(pcmd, 24, 5, x)//(x<<(unsigned int)0)
#define REG_FUN_FORMAT(pcmd,x) SET_BITS_TO_LE_4BYTE(pcmd, 29, 2, x)//(x<<(unsigned int)5)
#define REG_RW_FORMAT(pcmd,x) SET_BITS_TO_LE_4BYTE(pcmd, 31, 1, x)//(x<<(unsigned int)7)
#define FIFO_LEN_FORMAT(pcmd, x) SET_BITS_TO_LE_4BYTE(pcmd, 0, 16, x)//(x<<(unsigned int)24)
//#define FIFO_ADDR_FORMAT(pcmd,x) SET_BITS_TO_LE_4BYTE(pcmd, 8, 16, x)//(x<<(unsigned int)16)
#define FIFO_DOMAIN_ID_FORMAT(pcmd,x) SET_BITS_TO_LE_4BYTE(pcmd, 24, 5, x)//(x<<(unsigned int)0)
#define FIFO_FUN_FORMAT(pcmd,x) SET_BITS_TO_LE_4BYTE(pcmd, 29, 2, x)//(x<<(unsigned int)5)
#define FIFO_RW_FORMAT(pcmd,x) SET_BITS_TO_LE_4BYTE(pcmd, 31, 1, x)//(x<<(unsigned int)7)
//get status dword0
#define GET_STATUS_PUB_PAGE_NUM(status) LE_BITS_TO_4BYTE(status, 24, 8)
#define GET_STATUS_HI_PAGE_NUM(status) LE_BITS_TO_4BYTE(status, 18, 6)
#define GET_STATUS_MID_PAGE_NUM(status) LE_BITS_TO_4BYTE(status, 12, 6)
#define GET_STATUS_LOW_PAGE_NUM(status) LE_BITS_TO_4BYTE(status, 6, 6)
#define GET_STATUS_HISR_HI6BIT(status) LE_BITS_TO_4BYTE(status, 0, 6)
//get status dword1
#define GET_STATUS_HISR_MID8BIT(status) LE_BITS_TO_4BYTE(status + 4, 24, 8)
#define GET_STATUS_HISR_LOW8BIT(status) LE_BITS_TO_4BYTE(status + 4, 16, 8)
#define GET_STATUS_ERROR(status) LE_BITS_TO_4BYTE(status + 4, 17, 1)
#define GET_STATUS_INT(status) LE_BITS_TO_4BYTE(status + 4, 16, 1)
#define GET_STATUS_RX_LENGTH(status) LE_BITS_TO_4BYTE(status + 4, 0, 16)
#define RXDESC_SIZE 24
struct spi_more_data {
unsigned long more_data;
unsigned long len;
};
void rtl8188es_set_hal_ops(struct adapter *padapter);
#define set_hal_ops rtl8188es_set_hal_ops
extern void spi_set_chip_endian(struct adapter *padapter);
extern void spi_set_intf_ops(struct _io_ops *pops);
extern void spi_set_chip_endian(struct adapter *padapter);
extern void InitInterrupt8723ASdio(struct adapter *padapter);
extern void InitSysInterrupt8723ASdio(struct adapter *padapter);
extern void EnableInterrupt8723ASdio(struct adapter *padapter);
extern void DisableInterrupt8723ASdio(struct adapter *padapter);
extern void spi_int_hdl(struct adapter *padapter);
extern u8 HalQueryTxBufferStatus8723ASdio(struct adapter *padapter);
extern void InitInterrupt8188ESdio(struct adapter *padapter);
extern void EnableInterrupt8188ESdio(struct adapter *padapter);
extern void DisableInterrupt8188ESdio(struct adapter *padapter);
#endif //__GSPI_OPS_H__

View file

@ -1,23 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __SDIO_OPS_LINUX_H__
#define __SDIO_OPS_LINUX_H__
#endif

View file

@ -1,34 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __SDIO_OSINTF_H__
#define __SDIO_OSINTF_H__
#include <drv_conf.h>
#include <osdep_service.h>
#include <drv_types.h>
#ifdef PLATFORM_OS_CE
extern NDIS_STATUS ce_sd_get_dev_hdl(struct adapter *padapter);
SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, struct adapter *padapter);
extern void sd_setup_irs(struct adapter *padapter);
#endif
#endif

View file

@ -1,163 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __OSDEP_CE_SERVICE_H_
#define __OSDEP_CE_SERVICE_H_
#include <ndis.h>
#include <ntddndis.h>
#include <usbdi.h>
typedef HANDLE _sema;
typedef LIST_ENTRY _list;
typedef NDIS_STATUS _OS_STATUS;
typedef NDIS_SPIN_LOCK _lock;
typedef HANDLE _rwlock; //Mutex
typedef u32 _irqL;
typedef NDIS_HANDLE _nic_hdl;
typedef NDIS_MINIPORT_TIMER _timer;
struct __queue {
LIST_ENTRY queue;
_lock lock;
};
typedef NDIS_PACKET _pkt;
typedef NDIS_BUFFER _buffer;
typedef struct __queue _queue;
typedef HANDLE _thread_hdl_;
typedef DWORD thread_return;
typedef void* thread_context;
typedef NDIS_WORK_ITEM _workitem;
#define thread_exit() ExitThread(STATUS_SUCCESS); return 0;
#define SEMA_UPBND (0x7FFFFFFF) //8192
__inline static _list *get_prev(_list *list)
{
return list->Blink;
}
__inline static _list *get_next(_list *list)
{
return list->Flink;
}
__inline static _list *get_list_head(_queue *queue)
{
return (&(queue->queue));
}
#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member)
__inline static void _enter_critical(_lock *plock, _irqL *pirqL)
{
NdisAcquireSpinLock(plock);
}
__inline static void _exit_critical(_lock *plock, _irqL *pirqL)
{
NdisReleaseSpinLock(plock);
}
__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL)
{
NdisDprAcquireSpinLock(plock);
}
__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL)
{
NdisDprReleaseSpinLock(plock);
}
__inline static void _enter_hwio_critical(_rwlock *prwlock, _irqL *pirqL)
{
WaitForSingleObject(*prwlock, INFINITE );
}
__inline static void _exit_hwio_critical(_rwlock *prwlock, _irqL *pirqL)
{
ReleaseMutex(*prwlock);
}
__inline static void rtw_list_delete(_list *plist)
{
RemoveEntryList(plist);
InitializeListHead(plist);
}
__inline static void _init_timer(_timer *ptimer,_nic_hdl nic_hdl,void *pfunc,void * 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, void * 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

View file

@ -1,113 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __RTL8192C_CMD_H_
#define __RTL8192C_CMD_H_
enum cmd_msg_element_id
{
NONE_CMDMSG_EID,
AP_OFFLOAD_EID=0,
SET_PWRMODE_EID=1,
JOINBSS_RPT_EID=2,
RSVD_PAGE_EID=3,
RSSI_4_EID = 4,
RSSI_SETTING_EID=5,
MACID_CONFIG_EID=6,
MACID_PS_MODE_EID=7,
P2P_PS_OFFLOAD_EID=8,
SELECTIVE_SUSPEND_ROF_CMD=9,
P2P_PS_CTW_CMD_EID=32,
H2C_92C_IO_OFFLOAD=44,
H2C_92C_TSF_SYNC=67,
H2C_92C_DISABLE_BCN_FUNC=68,
H2C_92C_RESET_TSF = 75,
H2C_92C_CMD_MAX
};
struct cmd_msg_parm {
u8 eid; //element id
u8 sz; // sz
u8 buf[6];
};
typedef struct _SETPWRMODE_PARM{
u8 Mode;
u8 SmartPS;
u8 BcnPassTime; // unit: 100ms
}SETPWRMODE_PARM, *PSETPWRMODE_PARM;
struct H2C_SS_RFOFF_PARAM{
u8 ROFOn; // 1: on, 0:off
u16 gpio_period; // unit: 1024 us
}__attribute__ ((packed));
typedef struct JOINBSSRPT_PARM{
u8 OpMode; // RT_MEDIA_STATUS
}JOINBSSRPT_PARM, *PJOINBSSRPT_PARM;
typedef struct _RSVDPAGE_LOC{
u8 LocProbeRsp;
u8 LocPsPoll;
u8 LocNullData;
}RSVDPAGE_LOC, *PRSVDPAGE_LOC;
struct P2P_PS_Offload_t {
unsigned char Offload_En:1;
unsigned char role:1; // 1: Owner, 0: Client
unsigned char CTWindow_En:1;
unsigned char NoA0_En:1;
unsigned char NoA1_En:1;
unsigned char AllStaSleep:1; // Only valid in Owner
unsigned char discovery:1;
unsigned char rsvd:1;
};
struct P2P_PS_CTWPeriod_t {
unsigned char CTWPeriod; //TU
};
// host message to firmware cmd
void rtl8192c_set_FwPwrMode_cmd(struct adapter*padapter, u8 Mode);
void rtl8192c_set_FwJoinBssReport_cmd(struct adapter* padapter, u8 mstatus);
u8 rtl8192c_set_rssi_cmd(struct adapter*padapter, u8 *param);
u8 rtl8192c_set_raid_cmd(struct adapter*padapter, u32 mask, u8 arg);
void rtl8192c_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_level);
u8 rtl8192c_set_FwSelectSuspend_cmd(struct adapter*padapter,u8 bfwpoll, u16 period);
#ifdef CONFIG_P2P
void rtl8192c_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state);
#endif //CONFIG_P2P
typedef struct _IO_OFFLOAD_LOC{
u8 LocCmd;
}IO_OFFLOAD_LOC, *PIO_OFFLOAD_LOC;
int rtl8192c_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt);
#ifdef CONFIG_BEACON_DISABLE_OFFLOAD
u8 rtl8192c_dis_beacon_fun_cmd(struct adapter* padapter);
#endif // CONFIG_BEACON_DISABLE_OFFLOAD
#ifdef CONFIG_TSF_RESET_OFFLOAD
u8 rtl8192c_reset_tsf(struct adapter *padapter, u8 reset_port);
#endif // CONFIG_TSF_RESET_OFFLOAD
#endif // __RTL8192C_CMD_H_

View file

@ -1,232 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __RTL8192C_DM_H__
#define __RTL8192C_DM_H__
//============================================================
// Description:
//
// This file is for 92CE/92CU dynamic mechanism only
//
//
//============================================================
//============================================================
// function prototype
//============================================================
#define DYNAMIC_FUNC_BT BIT(0)
enum{
UP_LINK,
DOWN_LINK,
};
typedef enum _BT_Ant_NUM{
Ant_x2 = 0,
Ant_x1 = 1
} BT_Ant_NUM, *PBT_Ant_NUM;
typedef enum _BT_CoType{
BT_2Wire = 0,
BT_ISSC_3Wire = 1,
BT_Accel = 2,
BT_CSR_BC4 = 3,
BT_CSR_BC8 = 4,
BT_RTL8756 = 5,
} BT_CoType, *PBT_CoType;
typedef enum _BT_CurState{
BT_OFF = 0,
BT_ON = 1,
} BT_CurState, *PBT_CurState;
typedef enum _BT_ServiceType{
BT_SCO = 0,
BT_A2DP = 1,
BT_HID = 2,
BT_HID_Idle = 3,
BT_Scan = 4,
BT_Idle = 5,
BT_OtherAction = 6,
BT_Busy = 7,
BT_OtherBusy = 8,
BT_PAN = 9,
} BT_ServiceType, *PBT_ServiceType;
typedef enum _BT_RadioShared{
BT_Radio_Shared = 0,
BT_Radio_Individual = 1,
} BT_RadioShared, *PBT_RadioShared;
struct btcoexist_priv {
u8 BT_Coexist;
u8 BT_Ant_Num;
u8 BT_CoexistType;
u8 BT_State;
u8 BT_CUR_State; //0:on, 1:off
u8 BT_Ant_isolation; //0:good, 1:bad
u8 BT_PapeCtrl; //0:SW, 1:SW/HW dynamic
u8 BT_Service;
u8 BT_Ampdu; // 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU.
u8 BT_RadioSharedType;
u32 Ratio_Tx;
u32 Ratio_PRI;
u8 BtRfRegOrigin1E;
u8 BtRfRegOrigin1F;
u8 BtRssiState;
u32 BtEdcaUL;
u32 BtEdcaDL;
u32 BT_EDCA[2];
u8 bCOBT;
u8 bInitSet;
u8 bBTBusyTraffic;
u8 bBTTrafficModeSet;
u8 bBTNonTrafficModeSet;
//BTTraffic BT21TrafficStatistics;
u32 CurrentState;
u32 PreviousState;
u8 BtPreRssiState;
u8 bFWCoexistAllOff;
u8 bSWCoexistAllOff;
};
//============================================================
// structure and define
//============================================================
//###### duplicate code,will move to ODM #########
#define IQK_MAC_REG_NUM 4
#define IQK_ADDA_REG_NUM 16
#define IQK_BB_REG_NUM 9
#define HP_THERMAL_NUM 8
//###### duplicate code,will move to ODM #########
struct dm_priv
{
u8 DM_Type;
u8 DMFlag;
u8 InitDMFlag;
u32 InitODMFlag;
//* Upper and Lower Signal threshold for Rate Adaptive*/
int UndecoratedSmoothedPWDB;
int UndecoratedSmoothedCCK;
int EntryMinUndecoratedSmoothedPWDB;
int EntryMaxUndecoratedSmoothedPWDB;
int MinUndecoratedPWDBForDM;
int LastMinUndecoratedPWDBForDM;
//###### duplicate code,will move to ODM #########
/*
//for DIG
u8 bDMInitialGainEnable;
u8 binitialized; // for dm_initial_gain_Multi_STA use.
DIG_T DM_DigTable;
PS_T DM_PSTable;
false_ALARM_STATISTICS FalseAlmCnt;
//for rate adaptive, in fact, 88c/92c fw will handle this
u8 bUseRAMask;
RATE_ADAPTIVE RateAdaptive;
*/
//for High Power
u8 bDynamicTxPowerEnable;
u8 LastDTPLvl;
u8 DynamicTxHighPowerLvl;//Add by Jacken Tx Power Control for Near/Far Range 2008/03/06
//for tx power tracking
u8 bTXPowerTracking;
u8 TXPowercount;
u8 bTXPowerTrackingInit;
u8 TxPowerTrackControl; //for mp mode, turn off txpwrtracking as default
u8 TM_Trigger;
u8 ThermalMeter[2]; // ThermalMeter, index 0 for RFIC0, and 1 for RFIC1
u8 ThermalValue;
u8 ThermalValue_LCK;
u8 ThermalValue_IQK;
u8 ThermalValue_DPK;
u8 bRfPiEnable;
//for APK
u32 APKoutput[2][2]; //path A/B; output1_1a/output1_2a
u8 bAPKdone;
u8 bAPKThermalMeterIgnore;
u8 bDPdone;
u8 bDPPathAOK;
u8 bDPPathBOK;
//for IQK
u32 RegC04;
u32 Reg874;
u32 RegC08;
u32 RegB68;
u32 RegB6C;
u32 Reg870;
u32 Reg860;
u32 Reg864;
u32 ADDA_backup[IQK_ADDA_REG_NUM];
u32 IQK_MAC_backup[IQK_MAC_REG_NUM];
u32 IQK_BB_backup_recover[9];
u32 IQK_BB_backup[IQK_BB_REG_NUM];
u8 PowerIndex_backup[6];
u8 bCCKinCH14;
u8 CCK_index;
u8 OFDM_index[2];
u8 bDoneTxpower;
u8 CCK_index_HP;
u8 OFDM_index_HP[2];
u8 ThermalValue_HP[HP_THERMAL_NUM];
u8 ThermalValue_HP_index;
//for TxPwrTracking
s32 RegE94;
s32 RegE9C;
s32 RegEB4;
s32 RegEBC;
u32 TXPowerTrackingCallbackCnt; //cosa add for debug
u32 prv_traffic_idx; // edca turbo
s32 OFDM_Pkt_Cnt;
u8 RSSI_Select;
u8 INIDATA_RATE[32];
};
//============================================================
// function prototype
//============================================================
#ifdef CONFIG_BT_COEXIST
void rtl8192c_set_dm_bt_coexist(struct adapter *padapter, u8 bStart);
void rtl8192c_issue_delete_ba(struct adapter *padapter, u8 dir);
#endif
void rtl8192c_init_dm_priv(IN struct adapter *Adapter);
void rtl8192c_deinit_dm_priv(IN struct adapter *Adapter);
void rtl8192c_InitHalDm( IN struct adapter *Adapter);
void rtl8192c_HalDmWatchDog(IN struct adapter *Adapter);
#endif //__HAL8190PCIDM_H__

View file

@ -1,26 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef _RTL8192C_EVENT_H_
#define _RTL8192C_EVENT_H_
#endif

View file

@ -1,34 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __RTL8192C_LED_H_
#define __RTL8192C_LED_H_
#include <drv_conf.h>
#include <osdep_service.h>
#include <drv_types.h>
//================================================================================
// Interface to manipulate LED objects.
//================================================================================
void rtl8192cu_InitSwLeds(struct adapter *padapter);
void rtl8192cu_DeInitSwLeds(struct adapter *padapter);
#endif

View file

@ -1,91 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
/******************************************************************************
*
*
* Module: rtl8192c_rf.h ( Header File)
*
* Note: Collect every HAL RF type exter API or constant.
*
* Function:
*
* Export:
*
* Abbrev:
*
* History:
* Data Who Remark
*
* 09/25/2008 MHC Create initial version.
*
*
******************************************************************************/
#ifndef _RTL8192C_RF_H_
#define _RTL8192C_RF_H_
/* Check to see if the file has been included already. */
/*--------------------------Define Parameters-------------------------------*/
//
// For RF 6052 Series
//
#define RF6052_MAX_TX_PWR 0x3F
#define RF6052_MAX_REG 0x3F
#define RF6052_MAX_PATH 2
/*--------------------------Define Parameters-------------------------------*/
/*------------------------------Define structure----------------------------*/
/*------------------------------Define structure----------------------------*/
/*------------------------Export global variable----------------------------*/
/*------------------------Export global variable----------------------------*/
/*------------------------Export Marco Definition---------------------------*/
/*------------------------Export Marco Definition---------------------------*/
/*--------------------------Exported Function prototype---------------------*/
//
// RF RL6052 Series API
//
void rtl8192c_RF_ChangeTxPath( IN struct adapter *Adapter,
IN u16 DataRate);
void rtl8192c_PHY_RF6052SetBandwidth(
IN struct adapter * Adapter,
IN HT_CHANNEL_WIDTH Bandwidth);
void rtl8192c_PHY_RF6052SetCckTxPower(
IN struct adapter *Adapter,
IN u8* pPowerlevel);
void rtl8192c_PHY_RF6052SetOFDMTxPower(
IN struct adapter *Adapter,
IN u8* pPowerLevel,
IN u8 Channel);
int PHY_RF6052_Config8192C( IN struct adapter * Adapter );
/*--------------------------Exported Function prototype---------------------*/
#endif/* End of HalRf.h */

File diff suppressed because it is too large Load diff

View file

@ -1,31 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef _RTL8192C_SRESET_C_
#define _RTL8192C_SRESET_C_
#include <drv_conf.h>
#include <osdep_service.h>
#include <drv_types.h>
#include <rtw_sreset.h>
void rtl8192c_sreset_xmit_status_check(struct adapter *padapter);
void rtl8192c_sreset_linked_status_check(struct adapter *padapter);
#endif

View file

@ -1,134 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef _RTL8192C_XMIT_H_
#define _RTL8192C_XMIT_H_
//
//defined for TX DESC Operation
//
#define MAX_TID (15)
//OFFSET 0
#define OFFSET_SZ 0
#define OFFSET_SHT 16
#define BMC BIT(24)
#define LSG BIT(26)
#define FSG BIT(27)
#define OWN BIT(31)
//OFFSET 4
#define PKT_OFFSET_SZ 0
#define BK BIT(6)
#define QSEL_SHT 8
#define Rate_ID_SHT 16
#define NAVUSEHDR BIT(20)
#define PKT_OFFSET_SHT 26
#define HWPC BIT(31)
//OFFSET 8
#define AGG_EN BIT(29)
//OFFSET 12
#define SEQ_SHT 16
//OFFSET 16
#define QoS BIT(6)
#define HW_SEQ_EN BIT(7)
#define USERATE BIT(8)
#define DISDATAFB BIT(10)
#define DATA_SHORT BIT(24)
#define DATA_BW BIT(25)
//OFFSET 20
#define SGI BIT(6)
//
// Queue Select Value in TxDesc
//
#define QSLT_BK 0x2//0x01
#define QSLT_BE 0x0
#define QSLT_VI 0x5//0x4
#define QSLT_VO 0x7//0x6
#define QSLT_BEACON 0x10
#define QSLT_HIGH 0x11
#define QSLT_MGNT 0x12
#define QSLT_CMD 0x13
struct txrpt_ccx_8192c {
/* offset 0 */
u8 retry_cnt:6;
u8 rsvd_0:2;
/* offset 1 */
u8 rts_retry_cnt:6;
u8 rsvd_1:2;
/* offset 2 */
u8 ccx_qtime0;
u8 ccx_qtime1;
/* offset 4 */
u8 missed_pkt_num:5;
u8 rsvd_4:3;
/* offset 5 */
u8 mac_id:5;
u8 des1_fragssn:3;
/* offset 6 */
u8 rpt_pkt_num:5;
u8 pkt_drop:1;
u8 lifetime_over:1;
u8 retry_over:1;
/* offset 7*/
u8 edca_tx_queue:4;
u8 rsvd_7:1;
u8 bmc:1;
u8 pkt_ok:1;
u8 int_ccx:1;
};
#define txrpt_ccx_qtime_8192c(txrpt_ccx) ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
void dump_txrpt_ccx_8192c(void *buf);
void handle_txrpt_ccx_8192c(struct adapter *adapter, void *buf);
#define MAX_TX_AGG_PACKET_NUMBER 0xFF
s32 rtl8192cu_init_xmit_priv(struct adapter * padapter);
void rtl8192cu_free_xmit_priv(struct adapter * padapter);
void rtl8192cu_cal_txdesc_chksum(struct tx_desc *ptxdesc);
s32 rtl8192cu_xmitframe_complete(struct adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
s32 rtl8192cu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *pmgntframe);
s32 rtl8192cu_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe);
#ifdef CONFIG_HOSTAPD_MLME
s32 rtl8192cu_hostap_mgnt_xmit_entry(struct adapter *padapter, _pkt *pkt);
#endif
#endif

View file

@ -1,229 +0,0 @@
#ifndef __INC_WAPI_H
#define __INC_WAPI_H
#include <linux/kernel.h>
#include <linux/list.h>
#include <drv_conf.h>
#include <osdep_service.h>
#include <drv_types.h>
#include <wlan_bssdef.h>
//#include "rtl819x_Qos.h"
#define CONFIG_WAPI_SW_SMS4
#define WAPI_DEBUG
#define SMS4_MIC_LEN 16
#define WAPI_EXT_LEN 18
#define MAX_WAPI_IE_LEN 256
#define sMacHdrLng 24 // octets in data header, no WEP
#ifdef WAPI_DEBUG
/* WAPI trace debug */
extern u32 wapi_debug_component;
static inline void dump_buf(u8 *buf, u32 len)
{
u32 i;
printk("-----------------Len %d----------------\n", len);
for(i=0; i<len; i++)
printk("%2.2x-", *(buf+i));
printk("\n");
}
#define WAPI_TRACE(component, x, args...) \
do { if(wapi_debug_component & (component)) \
printk(KERN_DEBUG "WAPI" ":" x "" , \
##args);\
}while(0);
#define WAPI_DATA(component, x, buf, len) \
do { if(wapi_debug_component & (component)){ \
printk("%s:\n", x);\
dump_buf((buf), (len));}\
}while(0);
#define RT_ASSERT_RET(_Exp) \
if(!(_Exp)) \
{ \
printk("RTWLAN: "); \
printk( "Assertion failed! %s,%s,line=%d\n", \
#_Exp,__FUNCTION__,__LINE__); \
return; \
}
#define RT_ASSERT_RET_VALUE(_Exp,Ret) \
if(!(_Exp)) \
{ \
printk("RTWLAN: "); \
printk( "Assertion failed! %s,%s,line=%d\n", \
#_Exp,__FUNCTION__,__LINE__); \
return (Ret); \
}
#else
#define RT_ASSERT_RET(_Exp) do {} while(0)
#define RT_ASSERT_RET_VALUE(_Exp,Ret) do {} while(0)
#define WAPI_TRACE(component, x, args...) do {} while(0)
#define WAPI_DATA(component, x, buf, len) do {} while(0)
#endif
enum WAPI_DEBUG {
WAPI_INIT = 1,
WAPI_API = 1<<1,
WAPI_TX = 1<<2,
WAPI_RX = 1<<3,
WAPI_MLME = 1<<4,
WAPI_IOCTL = 1<<5,
WAPI_ERR = 1<<31
};
#define WAPI_MAX_BKID_NUM 4
#define WAPI_MAX_STAINFO_NUM 4
#define WAPI_CAM_ENTRY_NUM 14 // 28/2=14
typedef struct _RT_WAPI_BKID
{
struct list_head list;
u8 bkid[16];
}RT_WAPI_BKID,*PRT_WAPI_BKID;
typedef struct _RT_WAPI_KEY
{
u8 dataKey[16];
u8 micKey[16];
u8 keyId;
bool bSet;
bool bTxEnable;
}RT_WAPI_KEY,*PRT_WAPI_KEY;
typedef enum _RT_WAPI_PACKET_TYPE
{
WAPI_NONE = 0,
WAPI_PREAUTHENTICATE=1,
WAPI_STAKEY_REQUEST=2,
WAPI_AUTHENTICATE_ACTIVE=3,
WAPI_ACCESS_AUTHENTICATE_REQUEST=4,
WAPI_ACCESS_AUTHENTICATE_RESPONSE=5,
WAPI_CERTIFICATE_AUTHENTICATE_REQUEST=6,
WAPI_CERTIFICATE_AUTHENTICATE_RESPONSE=7,
WAPI_USK_REQUEST=8,
WAPI_USK_RESPONSE=9,
WAPI_USK_CONFIRM=10,
WAPI_MSK_NOTIFICATION=11,
WAPI_MSK_RESPONSE=12
}RT_WAPI_PACKET_TYPE;
typedef struct _RT_WAPI_STA_INFO
{
struct list_head list;
u8 PeerMacAddr[6];
RT_WAPI_KEY wapiUsk;
RT_WAPI_KEY wapiUskUpdate;
RT_WAPI_KEY wapiMsk;
RT_WAPI_KEY wapiMskUpdate;
u8 lastRxUnicastPN[16];
u8 lastTxUnicastPN[16];
u8 lastRxMulticastPN[16];
u8 lastRxUnicastPNBEQueue[16];
u8 lastRxUnicastPNBKQueue[16];
u8 lastRxUnicastPNVIQueue[16];
u8 lastRxUnicastPNVOQueue[16];
bool bSetkeyOk;
bool bAuthenticateInProgress;
bool bAuthenticatorInUpdata;
}RT_WAPI_STA_INFO,*PRT_WAPI_STA_INFO;
//Added for HW wapi en/decryption
typedef struct _RT_WAPI_CAM_ENTRY{
//RT_LIST_ENTRY list;
u8 IsUsed;
u8 entry_idx;//for cam entry
u8 keyidx; // 0 or 1,new or old key
u8 PeerMacAddr[6];
u8 type; //should be 110,wapi
}RT_WAPI_CAM_ENTRY,*PRT_WAPI_CAM_ENTRY;
typedef struct _RT_WAPI_T
{
//BKID
RT_WAPI_BKID wapiBKID[WAPI_MAX_BKID_NUM];
struct list_head wapiBKIDIdleList;
struct list_head wapiBKIDStoreList;
//Key for Tx Multicast/Broadcast
RT_WAPI_KEY wapiTxMsk;
//sec related
u8 lastTxMulticastPN[16];
//STA list
RT_WAPI_STA_INFO wapiSta[WAPI_MAX_STAINFO_NUM];
struct list_head wapiSTAIdleList;
struct list_head wapiSTAUsedList;
//
bool bWapiEnable;
//store WAPI IE
u8 wapiIE[256];
u8 wapiIELength;
bool bWapiPSK;
//last sequece number for wai packet
u16 wapiSeqnumAndFragNum;
int extra_prefix_len;
int extra_postfix_len;
RT_WAPI_CAM_ENTRY wapiCamEntry[WAPI_CAM_ENTRY_NUM];
}RT_WAPI_T,*PRT_WAPI_T;
typedef struct _WLAN_HEADER_WAPI_EXTENSION
{
u8 KeyIdx;
u8 Reserved;
u8 PN[16];
} WLAN_HEADER_WAPI_EXTENSION, *PWLAN_HEADER_WAPI_EXTENSION;
u32 WapiComparePN(u8 *PN1, u8 *PN2);
void rtw_wapi_init(struct adapter *padapter);
void rtw_wapi_free(struct adapter *padapter);
void rtw_wapi_disable_tx(struct adapter *padapter);
u8 rtw_wapi_is_wai_packet(struct adapter* padapter,u8 *pkt_data);
void rtw_wapi_update_info(struct adapter *padapter, union recv_frame *precv_frame);
u8 rtw_wapi_check_for_drop(struct adapter *padapter, union recv_frame *precv_frame);
void rtw_build_probe_resp_wapi_ie(struct adapter *padapter, unsigned char *pframe, struct pkt_attrib *pattrib);
void rtw_build_beacon_wapi_ie(struct adapter *padapter, unsigned char *pframe, struct pkt_attrib *pattrib);
void rtw_build_assoc_req_wapi_ie(struct adapter *padapter, unsigned char *pframe, struct pkt_attrib *pattrib);
void rtw_wapi_on_assoc_ok(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
void rtw_wapi_return_one_sta_info(struct adapter *padapter, u8 *MacAddr);
void rtw_wapi_return_all_sta_info(struct adapter *padapter);
void rtw_wapi_clear_cam_entry(struct adapter *padapter, u8 *pMacAddr);
void rtw_wapi_clear_all_cam_entry(struct adapter *padapter);
void rtw_wapi_set_key(struct adapter *padapter, RT_WAPI_KEY *pWapiKey, RT_WAPI_STA_INFO *pWapiSta, u8 bGroupKey, u8 bUseDefaultKey);
int rtw_wapi_create_event_send(struct adapter *padapter, u8 EventId, u8 *MacAddr, u8 *Buff, u16 BufLen);
u32 rtw_sms4_encrypt(struct adapter *padapter, u8 *pxmitframe);
u32 rtw_sms4_decrypt(struct adapter *padapter, u8 *precvframe);
void rtw_wapi_get_iv(struct adapter *padapter, u8*pRA, u8*IV);
u8 WapiIncreasePN(u8 *PN, u8 AddCount);
bool rtw_wapi_drop_for_key_absent(struct adapter *padapter,u8 *pRA);
#endif

View file

@ -1,33 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __SDIO_HAL_H__
#define __SDIO_HAL_H__
extern u8 sd_hal_bus_init(struct adapter *padapter);
extern u8 sd_hal_bus_deinit(struct adapter *padapter);
u8 sd_int_isr(struct adapter *padapter);
void sd_int_dpc(struct adapter *padapter);
void rtl8188es_set_hal_ops(struct adapter *padapter);
#define hal_set_hal_ops rtl8188es_set_hal_ops
#endif //__SDIO_HAL_H__

View file

@ -1,54 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __SDIO_OPS_H__
#define __SDIO_OPS_H__
#include <drv_conf.h>
#include <osdep_service.h>
#include <drv_types.h>
#include <osdep_intf.h>
#include <sdio_ops_linux.h>
extern void sdio_set_intf_ops(struct _io_ops *pops);
//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);
extern u8 SdioLocalCmd52Read1Byte(struct adapter *padapter, u32 addr);
extern void SdioLocalCmd52Write1Byte(struct adapter *padapter, u32 addr, u8 v);
extern s32 _sdio_local_read(struct adapter *padapter, u32 addr, u32 cnt, u8 *pbuf);
extern s32 sdio_local_read(struct adapter *padapter, u32 addr, u32 cnt, u8 *pbuf);
extern s32 _sdio_local_write(struct adapter *padapter, u32 addr, u32 cnt, u8 *pbuf);
extern s32 sdio_local_write(struct adapter *padapter, u32 addr, u32 cnt, u8 *pbuf);
u32 _sdio_read32(struct adapter *padapter, u32 addr);
s32 _sdio_write32(struct adapter *padapter, u32 addr, u32 val);
extern void InitInterrupt8723ASdio(struct adapter *padapter);
extern void InitSysInterrupt8723ASdio(struct adapter *padapter);
extern void EnableInterrupt8723ASdio(struct adapter *padapter);
extern void DisableInterrupt8723ASdio(struct adapter *padapter);
extern void sd_int_hdl(struct adapter *padapter);
extern u8 HalQueryTxBufferStatus8189ESdio(struct adapter *padapter);
extern void InitInterrupt8188ESdio(struct adapter *padapter);
extern void EnableInterrupt8188ESdio(struct adapter *padapter);
extern void DisableInterrupt8188ESdio(struct adapter *padapter);
extern void UpdateInterruptMask8188ESdio(struct adapter *padapter, u32 AddMSR, u32 RemoveMSR);
#endif

View file

@ -1,51 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __SDIO_OPS_LINUX_H__
#define __SDIO_OPS_LINUX_H__
#define SDIO_ERR_VAL8 0xEA
#define SDIO_ERR_VAL16 0xEAEA
#define SDIO_ERR_VAL32 0xEAEAEAEA
u8 sd_f0_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
void sd_f0_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err);
s32 _sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
s32 _sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
s32 sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
s32 sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
u8 _sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
u8 sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
u16 sd_read16(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
u32 _sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
s32 _sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
s32 sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
void sd_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err);
void sd_write16(struct intf_hdl *pintfhdl, u32 addr, u16 v, s32 *err);
void _sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err);
void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err);
s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
s32 sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
void rtw_sdio_set_irq_thd(struct dvobj_priv *dvobj, _thread_hdl_ thd_hdl);
#endif

View file

@ -1,39 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __SDIO_OSINTF_H__
#define __SDIO_OSINTF_H__
#include <drv_conf.h>
#include <osdep_service.h>
#include <drv_types.h>
u8 sd_hal_bus_init(struct adapter *padapter);
u8 sd_hal_bus_deinit(struct adapter *padapter);
void sd_c2h_hdl(struct adapter *padapter);
#ifdef PLATFORM_OS_CE
extern NDIS_STATUS ce_sd_get_dev_hdl(struct adapter *padapter);
SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, struct adapter *padapter);
extern void sd_setup_irs(struct adapter *padapter);
#endif
#endif