Commit 2d17f403 authored by Sathya Perla's avatar Sathya Perla Committed by David S. Miller

be2net: delete primary MAC address while unloading

Currently the UC-list is being deleted from the HW MAC table, but the primary
MAC is not.
Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3175d8c2
......@@ -2796,7 +2796,7 @@ static void be_vf_clear(struct be_adapter *adapter)
static int be_clear(struct be_adapter *adapter)
{
int i = 1;
int i;
if (adapter->flags & BE_FLAGS_WORKER_SCHEDULED) {
cancel_delayed_work_sync(&adapter->work);
......@@ -2806,9 +2806,11 @@ static int be_clear(struct be_adapter *adapter)
if (sriov_enabled(adapter))
be_vf_clear(adapter);
for (; adapter->uc_macs > 0; adapter->uc_macs--, i++)
/* delete the primary mac along with the uc-mac list */
for (i = 0; i < (adapter->uc_macs + 1); i++)
be_cmd_pmac_del(adapter, adapter->if_handle,
adapter->pmac_id[i], 0);
adapter->pmac_id[i], 0);
adapter->uc_macs = 0;
be_cmd_if_destroy(adapter, adapter->if_handle, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment