net/bnxt: fix default MAC check
authorVenkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Thu, 24 Oct 2019 07:44:22 +0000 (13:14 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 25 Oct 2019 17:23:22 +0000 (19:23 +0200)
commit037cc747d1323548a2ff86fac603175435692b6a
tree667acde6e14942bf44931ee6f638791380cbabac
parent04102f2ffc8c2047d22c7f1c47b38cf6d2e331c5
net/bnxt: fix default MAC check

bnxt_set_hwrm_vnic_filters programs default mac addr and the
same default mac is added by mac_add_addr_op routine as well.
This redundant mac add is avoided by checking if the default
mac is already added.

However, that check is wrong. The check should consider the
mac index as well to determine the default mac. This patch
fixes it by using mac index to determine the default mac.

Fixes: 68f589f2c728 ("net/bnxt: fix setting primary MAC address")
Cc: stable@dpdk.org
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c