Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268382
b: refs/heads/master
c: b13cc34
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Sep 16, 2011
1 parent fc2e371 commit 35dbfc7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 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: 86c921af41f0d40ff9105a73fb20378440f0299f
refs/heads/master: b13cc345b6f7aae293050c33e86f585ea30b2e38
24 changes: 12 additions & 12 deletions trunk/drivers/staging/hv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,11 @@ int rndis_filter_device_add(struct hv_device *dev,
{
int ret;
struct netvsc_device *net_device;
struct rndis_device *rndisDevice;
struct rndis_device *rndis_device;
struct netvsc_device_info *deviceInfo = additional_info;

rndisDevice = get_rndis_device();
if (!rndisDevice)
rndis_device = get_rndis_device();
if (!rndis_device)
return -ENODEV;

/*
Expand All @@ -704,19 +704,19 @@ int rndis_filter_device_add(struct hv_device *dev,
*/
ret = netvsc_device_add(dev, additional_info);
if (ret != 0) {
kfree(rndisDevice);
kfree(rndis_device);
return ret;
}


/* Initialize the rndis device */
net_device = hv_get_drvdata(dev);

net_device->extension = rndisDevice;
rndisDevice->net_dev = net_device;
net_device->extension = rndis_device;
rndis_device->net_dev = net_device;

/* Send the rndis initialization message */
ret = rndis_filter_init_device(rndisDevice);
ret = rndis_filter_init_device(rndis_device);
if (ret != 0) {
/*
* TODO: If rndis init failed, we will need to shut down the
Expand All @@ -725,21 +725,21 @@ int rndis_filter_device_add(struct hv_device *dev,
}

/* Get the mac address */
ret = rndis_filter_query_device_mac(rndisDevice);
ret = rndis_filter_query_device_mac(rndis_device);
if (ret != 0) {
/*
* TODO: shutdown rndis device and the channel
*/
}

memcpy(deviceInfo->mac_adr, rndisDevice->hw_mac_adr, ETH_ALEN);
memcpy(deviceInfo->mac_adr, rndis_device->hw_mac_adr, ETH_ALEN);

rndis_filter_query_device_link_status(rndisDevice);
rndis_filter_query_device_link_status(rndis_device);

deviceInfo->link_state = rndisDevice->link_stat;
deviceInfo->link_state = rndis_device->link_stat;

dev_info(&dev->device, "Device MAC %pM link state %s",
rndisDevice->hw_mac_adr,
rndis_device->hw_mac_adr,
((deviceInfo->link_state) ? ("down\n") : ("up\n")));

return ret;
Expand Down

0 comments on commit 35dbfc7

Please sign in to comment.