Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159367
b: refs/heads/master
c: 7eaab70
h: refs/heads/master
i:
  159365: 1b779ae
  159363: c0f1856
  159359: a80d9ac
v: v3
  • Loading branch information
Jussi Kivilinna authored and John W. Linville committed Aug 4, 2009
1 parent f0156fe commit 8a5c428
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 005ba2f17e68b4da6a2c2c01c826294beac50415
refs/heads/master: 7eaab7086c3a313d76c217f98bc610c523d9bc2c
30 changes: 30 additions & 0 deletions trunk/drivers/net/wireless/rndis_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,28 @@ static int rndis_set_oid(struct usbnet *dev, __le32 oid, void *data, int len)
}


static int rndis_reset(struct usbnet *usbdev)
{
struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
struct rndis_reset *reset;
int ret;

mutex_lock(&priv->command_lock);

reset = (void *)priv->command_buffer;
memset(reset, 0, sizeof(*reset));
reset->msg_type = RNDIS_MSG_RESET;
reset->msg_len = cpu_to_le32(sizeof(*reset));
ret = rndis_command(usbdev, (void *)reset, CONTROL_BUFFER_SIZE);

mutex_unlock(&priv->command_lock);

if (ret < 0)
return ret;
return 0;
}


/*
* Specs say that we can only set config parameters only soon after device
* initialization.
Expand Down Expand Up @@ -2500,9 +2522,17 @@ static void rndis_wlan_unbind(struct usbnet *usbdev, struct usb_interface *intf)
static int rndis_wlan_reset(struct usbnet *usbdev)
{
struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
int retval;

devdbg(usbdev, "rndis_wlan_reset");

retval = rndis_reset(usbdev);
if (retval)
devwarn(usbdev, "rndis_reset() failed: %d", retval);

/* rndis_reset cleared multicast list, so restore here. */
set_multicast_list(usbdev);

queue_delayed_work(priv->workqueue, &priv->stats_work,
round_jiffies_relative(STATS_UPDATE_JIFFIES));

Expand Down

0 comments on commit 8a5c428

Please sign in to comment.