Commit 633475cf authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Call usb_{read,write}_port() functions directly

Get rid of more HAL layer obfuscations
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 97ccc3a6
...@@ -114,25 +114,3 @@ int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdat ...@@ -114,25 +114,3 @@ int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdat
else else
return _SUCCESS; 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);
}
...@@ -1261,7 +1261,7 @@ int rtl8723au_inirp_deinit(struct rtw_adapter *Adapter) ...@@ -1261,7 +1261,7 @@ int rtl8723au_inirp_deinit(struct rtw_adapter *Adapter)
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, RT_TRACE(_module_hci_hal_init_c_, _drv_info_,
("\n ===> usb_rx_deinit\n")); ("\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); pHalData->IntrMask[0] = rtw_read32(Adapter, REG_USB_HIMR);
MSG_8723A("%s pHalData->IntrMask = 0x%04x\n", __func__, MSG_8723A("%s pHalData->IntrMask = 0x%04x\n", __func__,
pHalData->IntrMask[0]); pHalData->IntrMask[0]);
......
...@@ -848,9 +848,6 @@ void rtl8723au_set_intf_ops(struct rtw_adapter *padapter) ...@@ -848,9 +848,6 @@ void rtl8723au_set_intf_ops(struct rtw_adapter *padapter)
pops->_write32 = &usb_write32; pops->_write32 = &usb_write32;
pops->_writeN = &usb_writeN; 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; pops->_read_interrupt = &usb_read_interrupt;
} }
......
...@@ -111,9 +111,6 @@ struct _io_ops ...@@ -111,9 +111,6 @@ struct _io_ops
u8 *pdata); u8 *pdata);
int (*_read_interrupt)(struct rtw_adapter *adapter, u32 addr); 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 { struct io_req {
...@@ -273,26 +270,20 @@ int dbg_rtw_writeN23a(struct rtw_adapter *adapter, u32 addr ,u32 length , u8 *da ...@@ -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_read8(adapter, addr) dbg_rtw_read823a((adapter), (addr), __FUNCTION__, __LINE__)
#define rtw_read16(adapter, addr) dbg_rtw_read1623a((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_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_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_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_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_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 */ #else /* DBG_IO */
#define rtw_read8(adapter, addr) _rtw_read823a((adapter), (addr)) #define rtw_read8(adapter, addr) _rtw_read823a((adapter), (addr))
#define rtw_read16(adapter, addr) _rtw_read1623a((adapter), (addr)) #define rtw_read16(adapter, addr) _rtw_read1623a((adapter), (addr))
#define rtw_read32(adapter, addr) _rtw_read3223a((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_write8(adapter, addr, val) _rtw_write823a((adapter), (addr), (val))
#define rtw_write16(adapter, addr, val) _rtw_write1623a((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_write32(adapter, addr, val) _rtw_write3223a((adapter), (addr), (val))
#define rtw_writeN(adapter, addr, length, data) _rtw_writeN23a((adapter), (addr), (length), (data)) #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 */ #endif /* DBG_IO */
#define PlatformEFIOWrite1Byte(_a,_b,_c) \ #define PlatformEFIOWrite1Byte(_a,_b,_c) \
......
...@@ -21,16 +21,11 @@ ...@@ -21,16 +21,11 @@
#define MAX_USBCTRL_VENDORREQ_TIMES 10 #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, int rtl8723a_usb_read_port(struct rtw_adapter *adapter, u32 addr, u32 cnt,
struct recv_buf *precvbuf); 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, int rtl8723a_usb_write_port(struct rtw_adapter *padapter, u32 addr, u32 cnt,
struct xmit_buf *pxmitbuf); struct xmit_buf *pxmitbuf);
void rtl8723a_usb_write_port_cancel(struct rtw_adapter *padapter);
#endif #endif
...@@ -292,7 +292,7 @@ void rtl8723a_usb_intf_stop(struct rtw_adapter *padapter) ...@@ -292,7 +292,7 @@ void rtl8723a_usb_intf_stop(struct rtw_adapter *padapter)
rtl8723au_inirp_deinit(padapter); rtl8723au_inirp_deinit(padapter);
/* cancel out irp */ /* cancel out irp */
rtw_write_port_cancel(padapter); rtl8723a_usb_write_port_cancel(padapter);
/* todo:cancel other irps */ /* todo:cancel other irps */
RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-usb_intf_stop\n")); RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-usb_intf_stop\n"));
......
...@@ -25,7 +25,7 @@ struct zero_bulkout_context { ...@@ -25,7 +25,7 @@ struct zero_bulkout_context {
void *padapter; 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; struct recv_buf *precvbuf;
int i; int i;
...@@ -237,7 +237,7 @@ int rtl8723a_usb_write_port(struct rtw_adapter *padapter, u32 addr, u32 cnt, ...@@ -237,7 +237,7 @@ int rtl8723a_usb_write_port(struct rtw_adapter *padapter, u32 addr, u32 cnt,
return ret; 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 xmit_buf *pxmitbuf;
struct list_head *plist; struct list_head *plist;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment