Skip to contentSkip to conversation

net/hyperv: Fix long lines in netvsc.c

PATCH In review Haiyang Zhang 3 participants 5 messages Nov 30, 2011

Subsystems (3)
lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH 2/2 net/hyperv: Add support for promiscuous mode setting

In reply to Haiyang Zhang

Add code to accept promiscuous mode setting, and pass it to RNDIS filter.

---
 drivers/net/hyperv/hyperv_net.h   |   24 +++++++++++++++++++
 drivers/net/hyperv/netvsc_drv.c   |   46 ++++++++++++++++++++++++++++++++++--
 drivers/net/hyperv/rndis_filter.c |   23 +-----------------
 3 files changed, 68 insertions(+), 25 deletions(-)
drivers/net/hyperv/hyperv_net.h +24 -0
index ac1ec84..49b131f 100644
@@ -87,6 +87,27 @@ struct netvsc_device_info {
 	int  ring_size;
 };
 
+enum rndis_device_state {
+	RNDIS_DEV_UNINITIALIZED = 0,
+	RNDIS_DEV_INITIALIZING,
+	RNDIS_DEV_INITIALIZED,
+	RNDIS_DEV_DATAINITIALIZED,
+};
+
+struct rndis_device {
+	struct netvsc_device *net_dev;
+
+	enum rndis_device_state state;
+	bool link_state;
+	atomic_t new_req_id;
+
+	spinlock_t request_lock;
+	struct list_head req_list;
+
+	unsigned char hw_mac_adr[ETH_ALEN];
+};
+
+
 /* Interface */
 int netvsc_device_add(struct hv_device *device, void *additional_info);
 int netvsc_device_remove(struct hv_device *device);
@@ -109,6 +130,9 @@ int rndis_filter_receive(struct hv_device *dev,
 int rndis_filter_send(struct hv_device *dev,
 			struct hv_netvsc_packet *pkt);
 
+int rndis_filter_set_packet_filter(struct rndis_device *dev, u32 new_filter);
+
+
 #define NVSP_INVALID_PROTOCOL_VERSION	((u32)0xFFFFFFFF)
 
 #define NVSP_PROTOCOL_VERSION_1		2
drivers/net/hyperv/netvsc_drv.c +43 -3

54 lines not on this page · raw message

drivers/net/hyperv/rndis_filter.c +1 -22
index bafccb3..418e7aa 100644
@@ -30,26 +30,6 @@
 #include "hyperv_net.h"
 
 
-enum rndis_device_state {
-	RNDIS_DEV_UNINITIALIZED = 0,
-	RNDIS_DEV_INITIALIZING,
-	RNDIS_DEV_INITIALIZED,
-	RNDIS_DEV_DATAINITIALIZED,
-};
-
-struct rndis_device {
-	struct netvsc_device *net_dev;
-
-	enum rndis_device_state state;
-	bool link_state;
-	atomic_t new_req_id;
-
-	spinlock_t request_lock;
-	struct list_head req_list;
-
-	unsigned char hw_mac_adr[ETH_ALEN];
-};
-
 struct rndis_request {
 	struct list_head list_ent;
 	struct completion  wait_event;
@@ -522,8 +502,7 @@ static int rndis_filter_query_device_link_status(struct rndis_device *dev)
 	return ret;
 }
 
-static int rndis_filter_set_packet_filter(struct rndis_device *dev,
-				      u32 new_filter)
+int rndis_filter_set_packet_filter(struct rndis_device *dev, u32 new_filter)
 {
 	struct rndis_request *request;
 	struct rndis_set_request *set;
Signature · 1 line
1.7.4.1

Haiyang Zhang

author maintainer
#0 lore raw

PATCH 1/2 net/hyperv: Fix long lines in netvsc.c

---
 drivers/net/hyperv/netvsc.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
drivers/net/hyperv/netvsc.c +5 -3
index 28e69a6..4a807e4 100644
@@ -230,9 +230,11 @@ static int netvsc_init_recv_buf(struct hv_device *device)
 	net_device->recv_section_cnt = init_packet->msg.
 		v1_msg.send_recv_buf_complete.num_sections;
 
-	net_device->recv_section = kmemdup(init_packet->msg.v1_msg.send_recv_buf_complete.sections,
-					   net_device->recv_section_cnt * sizeof(struct nvsp_1_receive_buffer_section),
-					   GFP_KERNEL);
+	net_device->recv_section = kmemdup(
+		init_packet->msg.v1_msg.send_recv_buf_complete.sections,
+		net_device->recv_section_cnt *
+		sizeof(struct nvsp_1_receive_buffer_section),
+		GFP_KERNEL);
 	if (net_device->recv_section == NULL) {
 		ret = -EINVAL;
 		goto cleanup;
Signature · 1 line
1.7.4.1
maintainer
#2 lore raw

Well, since Greg's tree is where the staging move happened, he'll have to take any patches to this driver that happen now, rather than me.

author maintainer
#3 lore raw
Quoted 11 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Wednesday, November 30, 2011 12:36 PM
To: Haiyang Zhang
Cc: KY Srinivasan; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/2] net/hyperv: Fix long lines in netvsc.c

Well, since Greg's tree is where the staging move happened, he'll have to take any patches to this driver that happen now, rather than me.

Sounds good. And, these patches were sent to [email protected] too.

Greg, could you consider these patches for your tree?

Thanks,
- Haiyang

#4 lore raw
Quoted 9 lines · Haiyang Zhang
Quoted 9 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Wednesday, November 30, 2011 12:36 PM
To: Haiyang Zhang
Cc: KY Srinivasan; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/2] net/hyperv: Fix long lines in netvsc.c

Quoted 7 lines
Quoted 2 lines

Well, since Greg's tree is where the staging move happened, he'll have to take any patches to this driver that happen now, rather than me.

Sounds good. And, these patches were sent to [email protected] too.

Greg, could you consider these patches for your tree?

Yes, I'll queue them up, thanks.

greg k-h