提交 29c1035f 编写于 作者: A Andrey Shvetsov 提交者: Greg Kroah-Hartman

staging: most: net: add carrier information

This adds the carrier information for the network devices based on the
INIC controllers.
Signed-off-by: NAndrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: NChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 cf5b36b5
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册