Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Dec 2018 13:17:15 +0000 (UTC)
From:      Slava Shwartsman <slavash@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341519 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201812051317.wB5DHFhm063958@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: slavash
Date: Wed Dec  5 13:17:15 2018
New Revision: 341519
URL: https://svnweb.freebsd.org/changeset/base/341519

Log:
  linuxkpi: properly implement netif_carrier_ok().
  
  Submitted by:   kib@
  Approved by:    hselasky (mentor)
  MFC after:      1 week
  Sponsored by:   Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/netdevice.h

Modified: head/sys/compat/linuxkpi/common/include/linux/netdevice.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/netdevice.h	Wed Dec  5 13:16:39 2018	(r341518)
+++ head/sys/compat/linuxkpi/common/include/linux/netdevice.h	Wed Dec  5 13:17:15 2018	(r341519)
@@ -77,7 +77,7 @@ dev_get_by_index(struct vnet *vnet, int if_index)
 
 #define	netif_running(dev)	!!((dev)->if_drv_flags & IFF_DRV_RUNNING)
 #define	netif_oper_up(dev)	!!((dev)->if_flags & IFF_UP)
-#define	netif_carrier_ok(dev)	netif_running(dev)
+#define	netif_carrier_ok(dev)	((dev)->if_link_state == LINK_STATE_UP)
 
 static inline void *
 netdev_priv(const struct net_device *dev)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812051317.wB5DHFhm063958>