qlcnic: Fix initialization of vlan list.
authorRajesh Borundia <rajesh.borundia@qlogic.com>
Tue, 28 Jan 2014 16:55:28 +0000 (11:55 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jan 2014 19:59:30 +0000 (11:59 -0800)
o Do not re-initialize vlan list in case of adapter reset.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c

index 17a1ca2050f4eaa9f47f9394d43849ba6f97cfba..0638c1810d54547df9eafb961439085dff4364a2 100644 (file)
@@ -448,8 +448,7 @@ static int qlcnic_sriov_set_guest_vlan_mode(struct qlcnic_adapter *adapter,
        return 0;
 }
 
-static int qlcnic_sriov_get_vf_acl(struct qlcnic_adapter *adapter,
-                                  struct qlcnic_info *info)
+static int qlcnic_sriov_get_vf_acl(struct qlcnic_adapter *adapter)
 {
        struct qlcnic_sriov *sriov = adapter->ahw->sriov;
        struct qlcnic_cmd_args cmd;
@@ -495,10 +494,6 @@ static int qlcnic_sriov_vf_init_driver(struct qlcnic_adapter *adapter)
        if (err)
                return -EIO;
 
-       err = qlcnic_sriov_get_vf_acl(adapter, &nic_info);
-       if (err)
-               return err;
-
        if (qlcnic_83xx_get_port_info(adapter))
                return -EIO;
 
@@ -555,6 +550,10 @@ static int qlcnic_sriov_setup_vf(struct qlcnic_adapter *adapter,
        if (err)
                goto err_out_send_channel_term;
 
+       err = qlcnic_sriov_get_vf_acl(adapter);
+       if (err)
+               goto err_out_send_channel_term;
+
        err = qlcnic_setup_netdev(adapter, adapter->netdev, pci_using_dac);
        if (err)
                goto err_out_send_channel_term;