Skip to content

Commit

Permalink
be2net: delete primary MAC address while unloading
Browse files Browse the repository at this point in the history
Currently the UC-list is being deleted from the HW MAC table, but the primary
MAC is not.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sathya Perla authored and David S. Miller committed Jul 24, 2013
1 parent 3175d8c commit 2d17f40
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit 2d17f40

Please sign in to comment.