]> git.baikalelectronics.ru Git - kernel.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)
commit957d03edea7a5f23e57dffaa0aebf2b33b0bba4c
tree25e065e869aa311b8d5f65b2d6a4a1b17c09c022
parentc5ad21c16e41614b471cc9f988d9ba144c9c2bcb
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