Commit 7880fc54 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Greg Kroah-Hartman

Staging: hv: cleanup network driver

Minor stuff:
   * Add module description
   * Remove variable set but never used.
   * Move variable inside conditional
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Acked-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4e4b592c
...@@ -111,14 +111,13 @@ static void netvsc_xmit_completion(void *context) ...@@ -111,14 +111,13 @@ static void netvsc_xmit_completion(void *context)
struct hv_netvsc_packet *packet = (struct hv_netvsc_packet *)context; struct hv_netvsc_packet *packet = (struct hv_netvsc_packet *)context;
struct sk_buff *skb = (struct sk_buff *) struct sk_buff *skb = (struct sk_buff *)
(unsigned long)packet->Completion.Send.SendCompletionTid; (unsigned long)packet->Completion.Send.SendCompletionTid;
struct net_device *net;
DPRINT_ENTER(NETVSC_DRV); DPRINT_ENTER(NETVSC_DRV);
kfree(packet); kfree(packet);
if (skb) { if (skb) {
net = skb->dev; struct net_device *net = skb->dev;
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
if (netif_queue_stopped(net)) { if (netif_queue_stopped(net)) {
...@@ -291,7 +290,6 @@ static int netvsc_recv_callback(struct hv_device *device_obj, ...@@ -291,7 +290,6 @@ static int netvsc_recv_callback(struct hv_device *device_obj,
{ {
struct vm_device *device_ctx = to_vm_device(device_obj); struct vm_device *device_ctx = to_vm_device(device_obj);
struct net_device *net = dev_get_drvdata(&device_ctx->device); struct net_device *net = dev_get_drvdata(&device_ctx->device);
struct net_device_context *net_device_ctx;
struct sk_buff *skb; struct sk_buff *skb;
void *data; void *data;
int i; int i;
...@@ -305,8 +303,6 @@ static int netvsc_recv_callback(struct hv_device *device_obj, ...@@ -305,8 +303,6 @@ static int netvsc_recv_callback(struct hv_device *device_obj,
return 0; return 0;
} }
net_device_ctx = netdev_priv(net);
/* Allocate a skb - TODO direct I/O to pages? */ /* Allocate a skb - TODO direct I/O to pages? */
skb = netdev_alloc_skb_ip_align(net, packet->TotalDataBufferLength); skb = netdev_alloc_skb_ip_align(net, packet->TotalDataBufferLength);
if (unlikely(!skb)) { if (unlikely(!skb)) {
...@@ -585,6 +581,7 @@ static void __exit netvsc_exit(void) ...@@ -585,6 +581,7 @@ static void __exit netvsc_exit(void)
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_VERSION(HV_DRV_VERSION); MODULE_VERSION(HV_DRV_VERSION);
MODULE_DESCRIPTION("Microsoft Hyper-V network driver");
module_param(netvsc_ringbuffer_size, int, S_IRUGO); module_param(netvsc_ringbuffer_size, int, S_IRUGO);
module_init(netvsc_init); module_init(netvsc_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment