qlcnic: fix set mac addr
authorAmit Kumar Salecha <amit.salecha@qlogic.com>
Wed, 7 Apr 2010 23:51:49 +0000 (16:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Apr 2010 23:51:49 +0000 (16:51 -0700)
If interface is down, mac address request are not sent to fw
but it is getting add in driver mac list.
Driver mac list should be in sync with fw i.e addresses communicated
to fw.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlcnic/qlcnic_hw.c

index da00e162b6d348c62558a0aa9194b193e4a844c2..b1753138ac987ce0ce4174cffee4ded14933945e 100644 (file)
@@ -430,6 +430,9 @@ void qlcnic_set_multi(struct net_device *netdev)
        u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
        u32 mode = VPORT_MISS_MODE_DROP;
 
+       if (adapter->is_up != QLCNIC_ADAPTER_UP_MAGIC)
+               return;
+
        qlcnic_nic_add_mac(adapter, adapter->mac_addr);
        qlcnic_nic_add_mac(adapter, bcast_addr);