Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Stop urtwn devices from usb suspend, allow remot...
details: https://anonhg.NetBSD.org/src/rev/547108264e04
branches: trunk
changeset: 348249:547108264e04
user: nat <nat%NetBSD.org@localhost>
date: Wed Oct 12 02:50:44 2016 +0000
description:
Stop urtwn devices from usb suspend, allow remote wifi activity wakeup.
Addresses PR/51111.
OK christos@
diffstat:
sys/dev/usb/if_urtwn.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (41 lines):
diff -r dde4f465afe4 -r 547108264e04 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Tue Oct 11 18:31:11 2016 +0000
+++ b/sys/dev/usb/if_urtwn.c Wed Oct 12 02:50:44 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urtwn.c,v 1.46 2016/10/04 21:36:38 christos Exp $ */
+/* $NetBSD: if_urtwn.c,v 1.47 2016/10/12 02:50:44 nat Exp $ */
/* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.46 2016/10/04 21:36:38 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.47 2016/10/12 02:50:44 nat Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -318,6 +318,7 @@
struct usb_attach_arg *uaa = aux;
char *devinfop;
const struct urtwn_dev *dev;
+ usb_device_request_t req;
size_t i;
int error;
@@ -338,6 +339,14 @@
aprint_normal_dev(self, "%s\n", devinfop);
usbd_devinfo_free(devinfop);
+ req.bmRequestType = UT_WRITE_DEVICE;
+ req.bRequest = UR_SET_FEATURE;
+ USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP);
+ USETW(req.wIndex, UHF_PORT_SUSPEND);
+ USETW(req.wLength, 0);
+
+ (void) usbd_do_request(sc->sc_udev, &req, 0);
+
mutex_init(&sc->sc_task_mtx, MUTEX_DEFAULT, IPL_NET);
mutex_init(&sc->sc_tx_mtx, MUTEX_DEFAULT, IPL_NONE);
mutex_init(&sc->sc_fwcmd_mtx, MUTEX_DEFAULT, IPL_NONE);
Home |
Main Index |
Thread Index |
Old Index