net/bnxt: fix setting primary MAC address
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 18 Jul 2019 03:35:59 +0000 (09:05 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 23 Jul 2019 12:31:35 +0000 (14:31 +0200)
commit68f589f2c728e7d893b2eacd86aca09b5546d690
treeffb99ad8ca3ead58bbd54254debc737dc932a23a
parent0a44537589454a9aba3e9ad392218ad433fbf529
net/bnxt: fix setting primary MAC address

1. Default filter is tied to VNIC 0 at index 0. After finding the filter
   with mac_index 0 and set the new MAC address, looping through
   remaining filters is unnecessary.
2. Added a check for NULL MAC address.
3. bnxt_hwrm_set_l2_filter() clears the existing filter configuration
   first before applying new filter settings. Hence there is no need to
   invoke bnxt_hwrm_clear_l2_filter() explicitly in
   bnxt_set_default_mac_addr_op().

Fixes: d69851df12b2 ("net/bnxt: support multicast filter and set MAC addr")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c