Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194667
b: refs/heads/master
c: 62e4716
h: refs/heads/master
i:
  194665: 58004db
  194663: 13e8a2a
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Apr 26, 2010
1 parent 8cde2dd commit 9ee7c77
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f66890724fb3131894b8eee5fc552a5dc42dc1df
refs/heads/master: 62e4716aff31a8ab687016680443012034734c92
22 changes: 21 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/hif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,26 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
return ret;
}

static void ath9k_hif_usb_reboot(struct usb_device *udev)
{
u32 reboot_cmd = 0xffffffff;
void *buf;
int ret;

buf = kmalloc(4, GFP_KERNEL);
if (!buf)
return;

memcpy(buf, &reboot_cmd, 4);

ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, USB_REG_OUT_PIPE),
buf, 4, NULL, HZ);
if (ret)
dev_err(&udev->dev, "ath9k_htc: USB reboot failed\n");

kfree(buf);
}

static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
{
struct usb_device *udev = interface_to_usbdev(interface);
Expand All @@ -903,7 +923,7 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
}

if (hif_dev->flags & HIF_USB_START)
usb_reset_device(udev);
ath9k_hif_usb_reboot(udev);

kfree(hif_dev);
dev_info(&udev->dev, "ath9k_htc: USB layer deinitialized\n");
Expand Down

0 comments on commit 9ee7c77

Please sign in to comment.