From 633475cf5e6bfca434c7feb06653b0a187274c1d Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Fri, 16 May 2014 10:05:06 +0200 Subject: [PATCH] staging: rtl8723au: Call usb_{read,write}_port() functions directly Get rid of more HAL layer obfuscations Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_io.c | 22 ------------------- drivers/staging/rtl8723au/hal/usb_halinit.c | 2 +- drivers/staging/rtl8723au/hal/usb_ops_linux.c | 3 --- drivers/staging/rtl8723au/include/rtw_io.h | 9 -------- .../staging/rtl8723au/include/usb_ops_linux.h | 9 ++------ drivers/staging/rtl8723au/os_dep/usb_intf.c | 2 +- .../staging/rtl8723au/os_dep/usb_ops_linux.c | 4 ++-- 7 files changed, 6 insertions(+), 45 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_io.c b/drivers/staging/rtl8723au/core/rtw_io.c index 532ad758372f..45866d78f7ec 100644 --- a/drivers/staging/rtl8723au/core/rtw_io.c +++ b/drivers/staging/rtl8723au/core/rtw_io.c @@ -114,25 +114,3 @@ int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdat else return _SUCCESS; } - -void _rtw_read_port23a_cancel(struct rtw_adapter *adapter) -{ - void (*_read_port_cancel)(struct rtw_adapter *adapter); - struct _io_ops *io_ops = &adapter->io_ops; - - _read_port_cancel = io_ops->_read_port_cancel; - - if (_read_port_cancel) - _read_port_cancel(adapter); -} - -void _rtw_write_port23a_cancel(struct rtw_adapter *adapter) -{ - void (*_write_port_cancel)(struct rtw_adapter *adapter); - struct _io_ops *io_ops = &adapter->io_ops; - - _write_port_cancel = io_ops->_write_port_cancel; - - if (_write_port_cancel) - _write_port_cancel(adapter); -} diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index 11b33e6fd709..fc1d407f2648 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -1261,7 +1261,7 @@ int rtl8723au_inirp_deinit(struct rtw_adapter *Adapter) RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("\n ===> usb_rx_deinit\n")); - rtw_read_port_cancel(Adapter); + rtl8723a_usb_read_port_cancel(Adapter); pHalData->IntrMask[0] = rtw_read32(Adapter, REG_USB_HIMR); MSG_8723A("%s pHalData->IntrMask = 0x%04x\n", __func__, pHalData->IntrMask[0]); diff --git a/drivers/staging/rtl8723au/hal/usb_ops_linux.c b/drivers/staging/rtl8723au/hal/usb_ops_linux.c index cb83758393b3..3b8a1996b3f1 100644 --- a/drivers/staging/rtl8723au/hal/usb_ops_linux.c +++ b/drivers/staging/rtl8723au/hal/usb_ops_linux.c @@ -848,9 +848,6 @@ void rtl8723au_set_intf_ops(struct rtw_adapter *padapter) pops->_write32 = &usb_write32; pops->_writeN = &usb_writeN; - pops->_read_port_cancel = &usb_read_port_cancel23a; - pops->_write_port_cancel = &usb_write_port23a_cancel; - pops->_read_interrupt = &usb_read_interrupt; } diff --git a/drivers/staging/rtl8723au/include/rtw_io.h b/drivers/staging/rtl8723au/include/rtw_io.h index 192e16764d9a..50a1783859a8 100644 --- a/drivers/staging/rtl8723au/include/rtw_io.h +++ b/drivers/staging/rtl8723au/include/rtw_io.h @@ -111,9 +111,6 @@ struct _io_ops u8 *pdata); int (*_read_interrupt)(struct rtw_adapter *adapter, u32 addr); - - void (*_read_port_cancel)(struct rtw_adapter *adapter); - void (*_write_port_cancel)(struct rtw_adapter *adapter); }; struct io_req { @@ -273,26 +270,20 @@ int dbg_rtw_writeN23a(struct rtw_adapter *adapter, u32 addr ,u32 length , u8 *da #define rtw_read8(adapter, addr) dbg_rtw_read823a((adapter), (addr), __FUNCTION__, __LINE__) #define rtw_read16(adapter, addr) dbg_rtw_read1623a((adapter), (addr), __FUNCTION__, __LINE__) #define rtw_read32(adapter, addr) dbg_rtw_read3223a((adapter), (addr), __FUNCTION__, __LINE__) -#define rtw_read_port_cancel(adapter) _rtw_read_port23a_cancel((adapter)) #define rtw_write8(adapter, addr, val) dbg_rtw_write823a((adapter), (addr), (val), __FUNCTION__, __LINE__) #define rtw_write16(adapter, addr, val) dbg_rtw_write1623a((adapter), (addr), (val), __FUNCTION__, __LINE__) #define rtw_write32(adapter, addr, val) dbg_rtw_write3223a((adapter), (addr), (val), __FUNCTION__, __LINE__) #define rtw_writeN(adapter, addr, length, data) dbg_rtw_writeN23a((adapter), (addr), (length), (data), __FUNCTION__, __LINE__) - -#define rtw_write_port_cancel(adapter) _rtw_write_port23a_cancel(adapter) #else /* DBG_IO */ #define rtw_read8(adapter, addr) _rtw_read823a((adapter), (addr)) #define rtw_read16(adapter, addr) _rtw_read1623a((adapter), (addr)) #define rtw_read32(adapter, addr) _rtw_read3223a((adapter), (addr)) -#define rtw_read_port_cancel(adapter) _rtw_read_port23a_cancel((adapter)) #define rtw_write8(adapter, addr, val) _rtw_write823a((adapter), (addr), (val)) #define rtw_write16(adapter, addr, val) _rtw_write1623a((adapter), (addr), (val)) #define rtw_write32(adapter, addr, val) _rtw_write3223a((adapter), (addr), (val)) #define rtw_writeN(adapter, addr, length, data) _rtw_writeN23a((adapter), (addr), (length), (data)) - -#define rtw_write_port_cancel(adapter) _rtw_write_port23a_cancel((adapter)) #endif /* DBG_IO */ #define PlatformEFIOWrite1Byte(_a,_b,_c) \ diff --git a/drivers/staging/rtl8723au/include/usb_ops_linux.h b/drivers/staging/rtl8723au/include/usb_ops_linux.h index ed4d8a82db14..f851becf863f 100644 --- a/drivers/staging/rtl8723au/include/usb_ops_linux.h +++ b/drivers/staging/rtl8723au/include/usb_ops_linux.h @@ -21,16 +21,11 @@ #define MAX_USBCTRL_VENDORREQ_TIMES 10 -unsigned int ffaddr2pipehdl23a(struct dvobj_priv *pdvobj, u32 addr); - -void usb_read_port_cancel23a(struct rtw_adapter *adapter); - -int usb_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, - struct xmit_buf *wmem); -void usb_write_port23a_cancel(struct rtw_adapter *adapter); int rtl8723a_usb_read_port(struct rtw_adapter *adapter, u32 addr, u32 cnt, struct recv_buf *precvbuf); +void rtl8723a_usb_read_port_cancel(struct rtw_adapter *padapter); int rtl8723a_usb_write_port(struct rtw_adapter *padapter, u32 addr, u32 cnt, struct xmit_buf *pxmitbuf); +void rtl8723a_usb_write_port_cancel(struct rtw_adapter *padapter); #endif diff --git a/drivers/staging/rtl8723au/os_dep/usb_intf.c b/drivers/staging/rtl8723au/os_dep/usb_intf.c index 38f2af3badbf..34522d290048 100644 --- a/drivers/staging/rtl8723au/os_dep/usb_intf.c +++ b/drivers/staging/rtl8723au/os_dep/usb_intf.c @@ -292,7 +292,7 @@ void rtl8723a_usb_intf_stop(struct rtw_adapter *padapter) rtl8723au_inirp_deinit(padapter); /* cancel out irp */ - rtw_write_port_cancel(padapter); + rtl8723a_usb_write_port_cancel(padapter); /* todo:cancel other irps */ RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-usb_intf_stop\n")); diff --git a/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c b/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c index 2eb76bdba029..a41d824ab325 100644 --- a/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c @@ -25,7 +25,7 @@ struct zero_bulkout_context { void *padapter; }; -void usb_read_port_cancel23a(struct rtw_adapter *padapter) +void rtl8723a_usb_read_port_cancel(struct rtw_adapter *padapter) { struct recv_buf *precvbuf; int i; @@ -237,7 +237,7 @@ exit: return ret; } -void usb_write_port23a_cancel(struct rtw_adapter *padapter) +void rtl8723a_usb_write_port_cancel(struct rtw_adapter *padapter) { struct xmit_buf *pxmitbuf; struct list_head *plist;