be2net: don't call vid_config() when there's no vlan config
authorSathya Perla <sathya.perla@emulex.com>
Tue, 5 Jun 2012 19:37:17 +0000 (19:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jun 2012 16:06:17 +0000 (09:06 -0700)
be_vid_config() is called from be_setup() to replay config cmds after
a card reset. Skip calling it when no vlans are configured.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c

index 08efd30..f1b0926 100644 (file)
@@ -2762,7 +2762,8 @@ static int be_setup(struct be_adapter *adapter)
 
        be_cmd_get_fw_ver(adapter, adapter->fw_ver, NULL);
 
-       be_vid_config(adapter, false, 0);
+       if (adapter->vlans_added)
+               be_vid_config(adapter, false, 0);
 
        be_set_rx_mode(adapter->netdev);