net/ixgbe: fix uninitialized variable

In func ixgbe_dev_link_update(), "link.link_autoneg" is used in func
call rte_ixgbe_dev_atomic_write_link_status(), but is uninitialized.

Fixes: 82113036e4 ("ethdev: redesign link speed config")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This commit is contained in:
Yong Wang 2017-09-18 23:17:24 -04:00 committed by Ferruh Yigit
parent 72e3efb149
commit 457ea93fda

View File

@ -3956,6 +3956,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
link.link_status = ETH_LINK_DOWN;
link.link_speed = 0;
link.link_duplex = ETH_LINK_HALF_DUPLEX;
link.link_autoneg = ETH_LINK_AUTONEG;
memset(&old, 0, sizeof(old));
rte_ixgbe_dev_atomic_read_link_status(dev, &old);