summaryrefslogtreecommitdiff
path: root/drivers/staging/most
diff options
context:
space:
mode:
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>2017-05-12 12:59:51 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-15 11:59:09 +0200
commit29c1035fee5a28cb1b86883df02489b258cdca0e (patch)
tree59fc9972c399799962402e39038d224db44f0221 /drivers/staging/most
parentcf5b36b5d957abd718301dfd3ab03a63221bc145 (diff)
staging: most: net: add carrier information
This adds the carrier information for the network devices based on the INIC controllers. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r--drivers/staging/most/aim-network/networking.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/most/aim-network/networking.c b/drivers/staging/most/aim-network/networking.c
index ce2942729ecf..5822902ecb4a 100644
--- a/drivers/staging/most/aim-network/networking.c
+++ b/drivers/staging/most/aim-network/networking.c
@@ -197,6 +197,7 @@ static int most_nd_open(struct net_device *dev)
return -EBUSY;
}
+ netif_carrier_off(dev);
if (is_valid_ether_addr(dev->dev_addr))
netif_dormant_off(dev);
else
@@ -545,6 +546,11 @@ void most_deliver_netinfo(struct most_interface *iface,
if (!dev)
return;
+ if (link_stat)
+ netif_carrier_on(dev);
+ else
+ netif_carrier_off(dev);
+
if (m && is_valid_ether_addr(m)) {
if (!is_valid_ether_addr(dev->dev_addr)) {
netdev_info(dev, "set mac %02x-%02x-%02x-%02x-%02x-%02x\n",