diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2013-07-23 11:55:04 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-25 00:41:53 +0200 |
commit | 2d17f4031475f2e836dd06d5b03593ee59f12fbd (patch) | |
tree | 37f5377e13a1f414e6e50cca58007409219e4e51 /drivers | |
parent | be2net: use SET/GET_MAC_LIST for SH-R (diff) | |
download | linux-2d17f4031475f2e836dd06d5b03593ee59f12fbd.tar.xz linux-2d17f4031475f2e836dd06d5b03593ee59f12fbd.zip |
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: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index eec751d42d90..67deb210d37d 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -2796,7 +2796,7 @@ done: 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); |