Skip to content

Commit

Permalink
net: cdc_mbim: manage_power should always set needs_remote_wakeup
Browse files Browse the repository at this point in the history
Reported-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bjørn Mork authored and David S. Miller committed Nov 4, 2013
1 parent 96635fb commit 04d948a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/net/usb/cdc_mbim.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,11 @@ static int cdc_mbim_manage_power(struct usbnet *dev, int on)
if ((on && atomic_add_return(1, &info->pmcount) == 1) || (!on && atomic_dec_and_test(&info->pmcount))) {
/* need autopm_get/put here to ensure the usbcore sees the new value */
rv = usb_autopm_get_interface(dev->intf);
if (rv < 0)
goto err;
dev->intf->needs_remote_wakeup = on;
usb_autopm_put_interface(dev->intf);
if (!rv)
usb_autopm_put_interface(dev->intf);
}
err:
return rv;
return 0;
}

static int cdc_mbim_wdm_manage_power(struct usb_interface *intf, int status)
Expand Down

0 comments on commit 04d948a

Please sign in to comment.