staging: rtl8723au: Call usb_{read,write}_port() functions directly
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 16 May 2014 08:05:06 +0000 (10:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 May 2014 18:34:35 +0000 (11:34 -0700)
Get rid of more HAL layer obfuscations

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_io.c
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/hal/usb_ops_linux.c
drivers/staging/rtl8723au/include/rtw_io.h
drivers/staging/rtl8723au/include/usb_ops_linux.h
drivers/staging/rtl8723au/os_dep/usb_intf.c
drivers/staging/rtl8723au/os_dep/usb_ops_linux.c

index 532ad758372f8072f22021891af146bcad07a26b..45866d78f7ec17d4897e7c5f5bd61b6d3a25b509 100644 (file)
@@ -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);
-}
index 11b33e6fd70955c1eca2079740e6ea1cfbe28a79..fc1d407f2648ac613bcf2dff5fa4df152315d40f 100644 (file)
@@ -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]);
index cb83758393b3a4f861eaff0e902a47229962738b..3b8a1996b3f1b6d40814d2acc0c8bf85c315bb47 100644 (file)
@@ -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;
 }
 
index 192e16764d9ae35f278bcc91af34350c5d7606f8..50a1783859a80282f972f462af47bf45c7cd1d9d 100644 (file)
@@ -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)               \
index ed4d8a82db14551f070f3e62d0113c20991d00cc..f851becf863fc4163d670f06e2d7e8d73b0b1716 100644 (file)
 
 #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
index 38f2af3badbfcbce611f6ad7d22dc38db8c5cd43..34522d290048f3ee0651cd941ccd3790eb7bca7f 100644 (file)
@@ -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"));
index 2eb76bdba0290ba54e5af94793be129f8b0fbf74..a41d824ab32508292633ec732fa0c524b3d61229 100644 (file)
@@ -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;