net/dpaa: prefer defines for link speed values
authorFerruh Yigit <ferruh.yigit@intel.com>
Fri, 9 Mar 2018 17:59:03 +0000 (17:59 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:44 +0000 (14:08 +0200)
Use existing defines instead of hardcoded vales.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
drivers/net/dpaa/dpaa_ethdev.c

index 9b69ef4..db49364 100644 (file)
@@ -275,9 +275,9 @@ static int dpaa_eth_link_update(struct rte_eth_dev *dev,
        PMD_INIT_FUNC_TRACE();
 
        if (dpaa_intf->fif->mac_type == fman_mac_1g)
-               link->link_speed = 1000;
+               link->link_speed = ETH_SPEED_NUM_1G;
        else if (dpaa_intf->fif->mac_type == fman_mac_10g)
-               link->link_speed = 10000;
+               link->link_speed = ETH_SPEED_NUM_10G;
        else
                DPAA_PMD_ERR("invalid link_speed: %s, %d",
                             dpaa_intf->name, dpaa_intf->fif->mac_type);