examples/ipsec-secgw: replace strncpy with strlcpy
[dpdk.git] / drivers / net / e1000 / em_ethdev.c
index 9d089cf..694a624 100644 (file)
@@ -93,7 +93,7 @@ static int em_get_rx_buffer_size(struct e1000_hw *hw);
 static int eth_em_rar_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
                          uint32_t index, uint32_t pool);
 static void eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index);
-static void eth_em_default_mac_addr_set(struct rte_eth_dev *dev,
+static int eth_em_default_mac_addr_set(struct rte_eth_dev *dev,
                                         struct ether_addr *addr);
 
 static int eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
@@ -1183,7 +1183,7 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
                link.link_autoneg = !(dev->data->dev_conf.link_speeds &
                                ETH_LINK_SPEED_FIXED);
        } else if (!link_check && (link.link_status == ETH_LINK_UP)) {
-               link.link_speed = 0;
+               link.link_speed = ETH_SPEED_NUM_NONE;
                link.link_duplex = ETH_LINK_HALF_DUPLEX;
                link.link_status = ETH_LINK_DOWN;
                link.link_autoneg = ETH_LINK_FIXED;
@@ -1779,13 +1779,13 @@ eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index)
        e1000_rar_set(hw, addr, index);
 }
 
-static void
+static int
 eth_em_default_mac_addr_set(struct rte_eth_dev *dev,
                            struct ether_addr *addr)
 {
        eth_em_rar_clear(dev, 0);
 
-       eth_em_rar_set(dev, (void *)addr, 0, 0);
+       return eth_em_rar_set(dev, (void *)addr, 0, 0);
 }
 
 static int