Re: [PATCH net] hyperv: Fix the carrier status setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 10-02-2014 5:07, Haiyang Zhang wrote:

Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
Reviewed-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
---
  drivers/net/hyperv/netvsc_drv.c |   24 +++++++++++++++---------
  1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 7756118..836211c 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
[...]
@@ -229,15 +238,17 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
  	struct net_device *net;
  	struct net_device_context *ndev_ctx;
  	struct netvsc_device *net_device;
+	struct rndis_device *rdev;

  	net_device = hv_get_drvdata(device_obj);
+	rdev = net_device->extension;
+
+	rdev->link_state = !(status == 1);

   Why not just 'status != 1'?

WBR, Sergei

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux