mirror of
https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git
synced 2025-10-19 17:11:09 +02:00
merge new version v4.3.14 from https://github.com/ptpt52/rtl8812au (#160)
This commit is contained in:
committed by
Harshavardhana
parent
c962f7a88d
commit
00aedbde5c
135
include/rtw_io.h
135
include/rtw_io.h
@@ -21,25 +21,6 @@
|
||||
#ifndef _RTW_IO_H_
|
||||
#define _RTW_IO_H_
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
#define rtw_usb_buffer_alloc(dev, size, dma) usb_alloc_coherent((dev), (size), (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL), (dma))
|
||||
#define rtw_usb_buffer_free(dev, size, addr, dma) usb_free_coherent((dev), (size), (addr), (dma))
|
||||
#else
|
||||
#define rtw_usb_buffer_alloc(dev, size, dma) usb_buffer_alloc((dev), (size), (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL), (dma))
|
||||
#define rtw_usb_buffer_free(dev, size, addr, dma) usb_buffer_free((dev), (size), (addr), (dma))
|
||||
#endif
|
||||
|
||||
|
||||
#endif //CONFIG_USB_HCI
|
||||
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
|
||||
#define NUM_IOREQ 8
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
@@ -113,35 +94,38 @@ struct intf_priv;
|
||||
struct intf_hdl;
|
||||
struct io_queue;
|
||||
|
||||
struct _io_ops
|
||||
{
|
||||
u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
struct _io_ops {
|
||||
u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
|
||||
int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
|
||||
int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
|
||||
|
||||
int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||
int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||
int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
|
||||
void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
|
||||
void (*_sync_irp_protocol_rw)(struct io_queue *pio_q);
|
||||
void (*_sync_irp_protocol_rw)(struct io_queue *pio_q);
|
||||
|
||||
u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
|
||||
u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
|
||||
u32 (*_write_scsi)(struct intf_hdl *pintfhdl,u32 cnt, u8 *pmem);
|
||||
u32 (*_write_scsi)(struct intf_hdl *pintfhdl,u32 cnt, u8 *pmem);
|
||||
|
||||
void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
|
||||
void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
|
||||
void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
|
||||
void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
u8 (*_sd_f0_read8)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -179,23 +163,23 @@ struct io_req {
|
||||
|
||||
struct intf_hdl {
|
||||
|
||||
/*
|
||||
u32 intf_option;
|
||||
u32 bus_status;
|
||||
u32 do_flush;
|
||||
u8 *adapter;
|
||||
u8 *intf_dev;
|
||||
struct intf_priv *pintfpriv;
|
||||
u8 cnt;
|
||||
void (*intf_hdl_init)(u8 *priv);
|
||||
void (*intf_hdl_unload)(u8 *priv);
|
||||
void (*intf_hdl_open)(u8 *priv);
|
||||
void (*intf_hdl_close)(u8 *priv);
|
||||
struct _io_ops io_ops;
|
||||
//u8 intf_status;//moved to struct intf_priv
|
||||
u16 len;
|
||||
u16 done_len;
|
||||
*/
|
||||
/*
|
||||
u32 intf_option;
|
||||
u32 bus_status;
|
||||
u32 do_flush;
|
||||
u8 *adapter;
|
||||
u8 *intf_dev;
|
||||
struct intf_priv *pintfpriv;
|
||||
u8 cnt;
|
||||
void (*intf_hdl_init)(u8 *priv);
|
||||
void (*intf_hdl_unload)(u8 *priv);
|
||||
void (*intf_hdl_open)(u8 *priv);
|
||||
void (*intf_hdl_close)(u8 *priv);
|
||||
struct _io_ops io_ops;
|
||||
//u8 intf_status;//moved to struct intf_priv
|
||||
u16 len;
|
||||
u16 done_len;
|
||||
*/
|
||||
_adapter *padapter;
|
||||
struct dvobj_priv *pintf_dev;// pointer to &(padapter->dvobjpriv);
|
||||
|
||||
@@ -314,8 +298,27 @@ struct reg_protocol_wt {
|
||||
#endif
|
||||
|
||||
};
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#define MAX_CONTINUAL_IO_ERR 4
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#define MAX_CONTINUAL_IO_ERR 4
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#define SD_IO_TRY_CNT (8)
|
||||
#define MAX_CONTINUAL_IO_ERR SD_IO_TRY_CNT
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
#define SD_IO_TRY_CNT (8)
|
||||
#define MAX_CONTINUAL_IO_ERR SD_IO_TRY_CNT
|
||||
#endif
|
||||
|
||||
|
||||
int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj);
|
||||
void rtw_reset_continual_io_error(struct dvobj_priv *dvobj);
|
||||
|
||||
/*
|
||||
Below is the data structure used by _io_handler
|
||||
@@ -332,7 +335,7 @@ struct io_queue {
|
||||
struct intf_hdl intf;
|
||||
};
|
||||
|
||||
struct io_priv{
|
||||
struct io_priv {
|
||||
|
||||
_adapter *padapter;
|
||||
|
||||
@@ -367,6 +370,8 @@ extern int _rtw_write16(_adapter *adapter, u32 addr, u16 val);
|
||||
extern int _rtw_write32(_adapter *adapter, u32 addr, u32 val);
|
||||
extern int _rtw_writeN(_adapter *adapter, u32 addr, u32 length, u8 *pdata);
|
||||
|
||||
extern u8 _rtw_sd_f0_read8(_adapter *adapter, u32 addr);
|
||||
|
||||
extern int _rtw_write8_async(_adapter *adapter, u32 addr, u8 val);
|
||||
extern int _rtw_write16_async(_adapter *adapter, u32 addr, u16 val);
|
||||
extern int _rtw_write32_async(_adapter *adapter, u32 addr, u32 val);
|
||||
@@ -432,6 +437,8 @@ extern int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, co
|
||||
#define rtw_write_port_cancel(adapter) _rtw_write_port_cancel((adapter))
|
||||
#endif //DBG_IO
|
||||
|
||||
#define rtw_sd_f0_read8(adapter, addr) _rtw_sd_f0_read8((adapter), (addr))
|
||||
|
||||
extern void rtw_write_scsi(_adapter *adapter, u32 cnt, u8 *pmem);
|
||||
|
||||
//ioreq
|
||||
@@ -444,21 +451,21 @@ extern void ioreq_write32(_adapter *adapter, u32 addr, u32 val);
|
||||
|
||||
|
||||
extern uint async_read8(_adapter *adapter, u32 addr, u8 *pbuff,
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
extern uint async_read16(_adapter *adapter, u32 addr, u8 *pbuff,
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
extern uint async_read32(_adapter *adapter, u32 addr, u8 *pbuff,
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
|
||||
extern void async_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
extern void async_read_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
|
||||
extern void async_write8(_adapter *adapter, u32 addr, u8 val,
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
extern void async_write16(_adapter *adapter, u32 addr, u16 val,
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
extern void async_write32(_adapter *adapter, u32 addr, u32 val,
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
|
||||
extern void async_write_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
extern void async_write_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
|
Reference in New Issue
Block a user