]> git.karo-electronics.de Git - linux-beck.git/commit
be2net: Avoid redundant addition of mac address in HW
authorSuresh Reddy <Suresh.Reddy@broadcom.com>
Wed, 7 Sep 2016 14:27:52 +0000 (19:57 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Sep 2016 05:44:56 +0000 (22:44 -0700)
commit988d44b1636d7f608bd7926493e0f61a034b61db
tree25e065e869aa311b8d5f65b2d6a4a1b17c09c022
parent62259ac4b36e348077635e673f253cc139dd6032
be2net: Avoid redundant addition of mac address in HW

If a mac address is added to the uc_list and later the same mac address
is added via ndo_set_mac_address() or vice versa, the driver does not
detect this condition and tries to add it again. This results in a mac
address collision error when the FW rejects it.

Fix this by checking if the given mac address is present in uc_list while
setting the device mac address and vice versa. Similarly skip deletion if
the address is still in use in the other form.

Signed-off-by: Suresh Reddy <Suresh.Reddy@broadcom.com>
Signed-off-by: Sathya Perla <sathya.perla@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c