Commit 73d411e2 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Kalle Valo

mt76x0: remove mt76x0_complete_urb routine

Remove mt76x0_complete_urb routine and use mt76u_mcu_complete_urb utility
function as usb mcu completion handler
Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent ad27c4ae
...@@ -113,7 +113,7 @@ static int mt76x0_mcu_wait_resp(struct mt76x0_dev *dev, u8 seq) ...@@ -113,7 +113,7 @@ static int mt76x0_mcu_wait_resp(struct mt76x0_dev *dev, u8 seq)
ret = mt76x0_usb_submit_buf(dev, USB_DIR_IN, MT_EP_IN_CMD_RESP, ret = mt76x0_usb_submit_buf(dev, USB_DIR_IN, MT_EP_IN_CMD_RESP,
&dev->mcu.resp, GFP_KERNEL, &dev->mcu.resp, GFP_KERNEL,
mt76x0_complete_urb, mt76u_mcu_complete_urb,
&usb->mcu.cmpl); &usb->mcu.cmpl);
if (ret) if (ret)
return ret; return ret;
...@@ -412,7 +412,7 @@ static int __mt76x0_dma_fw(struct mt76x0_dev *dev, ...@@ -412,7 +412,7 @@ static int __mt76x0_dma_fw(struct mt76x0_dev *dev,
buf.len = MT_DMA_HDR_LEN + len + 4; buf.len = MT_DMA_HDR_LEN + len + 4;
ret = mt76x0_usb_submit_buf(dev, USB_DIR_OUT, MT_EP_OUT_INBAND_CMD, ret = mt76x0_usb_submit_buf(dev, USB_DIR_OUT, MT_EP_OUT_INBAND_CMD,
&buf, GFP_KERNEL, &buf, GFP_KERNEL,
mt76x0_complete_urb, &cmpl); mt76u_mcu_complete_urb, &cmpl);
if (ret) if (ret)
return ret; return ret;
...@@ -624,7 +624,7 @@ int mt76x0_mcu_cmd_init(struct mt76x0_dev *dev) ...@@ -624,7 +624,7 @@ int mt76x0_mcu_cmd_init(struct mt76x0_dev *dev)
ret = mt76x0_usb_submit_buf(dev, USB_DIR_IN, MT_EP_IN_CMD_RESP, ret = mt76x0_usb_submit_buf(dev, USB_DIR_IN, MT_EP_IN_CMD_RESP,
&dev->mcu.resp, GFP_KERNEL, &dev->mcu.resp, GFP_KERNEL,
mt76x0_complete_urb, &usb->mcu.cmpl); mt76u_mcu_complete_urb, &usb->mcu.cmpl);
if (ret) { if (ret) {
mt76x0_usb_free_buf(dev, &dev->mcu.resp); mt76x0_usb_free_buf(dev, &dev->mcu.resp);
return ret; return ret;
......
...@@ -93,13 +93,6 @@ int mt76x0_usb_submit_buf(struct mt76x0_dev *dev, int dir, int ep_idx, ...@@ -93,13 +93,6 @@ int mt76x0_usb_submit_buf(struct mt76x0_dev *dev, int dir, int ep_idx,
return ret; return ret;
} }
void mt76x0_complete_urb(struct urb *urb)
{
struct completion *cmpl = urb->context;
complete(cmpl);
}
int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req, int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req,
const u8 direction, const u16 val, const u16 offset, const u8 direction, const u16 val, const u16 offset,
void *buf, const size_t buflen) void *buf, const size_t buflen)
......
...@@ -49,7 +49,6 @@ void mt76x0_usb_free_buf(struct mt76x0_dev *dev, struct mt76x0_dma_buf *buf); ...@@ -49,7 +49,6 @@ void mt76x0_usb_free_buf(struct mt76x0_dev *dev, struct mt76x0_dma_buf *buf);
int mt76x0_usb_submit_buf(struct mt76x0_dev *dev, int dir, int ep_idx, int mt76x0_usb_submit_buf(struct mt76x0_dev *dev, int dir, int ep_idx,
struct mt76x0_dma_buf *buf, gfp_t gfp, struct mt76x0_dma_buf *buf, gfp_t gfp,
usb_complete_t complete_fn, void *context); usb_complete_t complete_fn, void *context);
void mt76x0_complete_urb(struct urb *urb);
int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req, int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req,
const u8 direction, const u16 val, const u16 offset, const u8 direction, const u16 val, const u16 offset,
......
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