@@ -49,9 +49,8 @@ static int usb_read(struct adapter *adapt, u16 value, void *data, u8 size)
return status;
}
-static int usb_write(struct intf_hdl *intf, u16 value, void *data, u8 size)
+static int usb_write(struct adapter *adapt, u16 value, void *data, u8 size)
{
- struct adapter *adapt = intf->padapter;
struct dvobj_priv *dvobjpriv = adapter_to_dvobj(adapt);
struct usb_device *udev = dvobjpriv->pusbdev;
int status;
@@ -131,48 +130,44 @@ int __must_check rtw_read32(struct adapter *adapter, u32 addr, u32 *data)
int rtw_write8(struct adapter *adapter, u32 addr, u8 val)
{
- struct intf_hdl *intf = &adapter->intf;
u16 value = addr & 0xffff;
int ret;
- ret = usb_write(intf, value, &val, 1);
+ ret = usb_write(adapter, value, &val, 1);
return RTW_STATUS_CODE(ret);
}
int rtw_write16(struct adapter *adapter, u32 addr, u16 val)
{
- struct intf_hdl *intf = &adapter->intf;
u16 value = addr & 0xffff;
__le16 data = cpu_to_le16(val);
int ret;
- ret = usb_write(intf, value, &data, 2);
+ ret = usb_write(adapter, value, &data, 2);
return RTW_STATUS_CODE(ret);
}
int rtw_write32(struct adapter *adapter, u32 addr, u32 val)
{
- struct intf_hdl *intf = &adapter->intf;
u16 value = addr & 0xffff;
__le32 data = cpu_to_le32(val);
int ret;
- ret = usb_write(intf, value, &data, 4);
+ ret = usb_write(adapter, value, &data, 4);
return RTW_STATUS_CODE(ret);
}
int rtw_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *data)
{
- struct intf_hdl *intf = &adapter->intf;
u16 value = addr & 0xffff;
if (length > VENDOR_CMD_MAX_DATA_LEN)
return -EINVAL;
- return usb_write(intf, value, data, length);
+ return usb_write(adapter, value, data, length);
}
static void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf)