mt76x02u: use usb_bulk_msg to upload firmware

We don't need to send firmware data asynchronously, much simpler is just
use synchronous usb_bulk_msg().

Tested-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
このコミットが含まれているのは:
Stanislaw Gruszka
2019-02-11 09:16:14 +01:00
committed by Felix Fietkau
コミット 5de4db8fcb
3個のファイルの変更29行の追加37行の削除

ファイルの表示

@@ -736,6 +736,19 @@ static inline bool mt76u_check_sg(struct mt76_dev *dev)
udev->speed == USB_SPEED_WIRELESS));
}
static inline int
mt76u_bulk_msg(struct mt76_dev *dev, void *data, int len, int timeout)
{
struct usb_interface *intf = to_usb_interface(dev->dev);
struct usb_device *udev = interface_to_usbdev(intf);
struct mt76_usb *usb = &dev->usb;
unsigned int pipe;
int sent;
pipe = usb_sndbulkpipe(udev, usb->out_ep[MT_EP_OUT_INBAND_CMD]);
return usb_bulk_msg(udev, pipe, data, len, &sent, timeout);
}
int mt76u_vendor_request(struct mt76_dev *dev, u8 req,
u8 req_type, u16 val, u16 offset,
void *buf, size_t len);