summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/aquantia/atlantic/aq_main.c
diff options
context:
space:
mode:
authorIgor Russkikh <igor.russkikh@aquantia.com>2018-01-19 17:03:21 +0300
committerDavid S. Miller <davem@davemloft.net>2018-01-21 18:19:03 -0500
commit23ee07ad3c2fd5adf6e9ef21afb9aec489dc3b4e (patch)
tree9eb2eaa26a5cf47931e7580e3e01b0d9976fd7fd /drivers/net/ethernet/aquantia/atlantic/aq_main.c
parent8fcb98f462e6504e6d1ab2dab87c6db803c206b6 (diff)
downloadlinux-23ee07ad3c2fd5adf6e9ef21afb9aec489dc3b4e.tar.gz
linux-23ee07ad3c2fd5adf6e9ef21afb9aec489dc3b4e.tar.bz2
linux-23ee07ad3c2fd5adf6e9ef21afb9aec489dc3b4e.zip
net: aquantia: Cleanup pci functions module
Driver contained a dead code of maintaining multiple pci port instances. That will never be used since for each pci function a separate NIC instance is created. Simplify this, making pci module only responsible for pci resource management. NIC initialization is also simplified accordingly. Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic/aq_main.c')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_main.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
index 887bc846375a..ba5fe8c4125d 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
@@ -43,14 +43,9 @@ struct net_device *aq_ndev_alloc(void)
static int aq_ndev_open(struct net_device *ndev)
{
- struct aq_nic_s *aq_nic = NULL;
int err = 0;
+ struct aq_nic_s *aq_nic = netdev_priv(ndev);
- aq_nic = aq_nic_alloc_hot(ndev);
- if (!aq_nic) {
- err = -ENOMEM;
- goto err_exit;
- }
err = aq_nic_init(aq_nic);
if (err < 0)
goto err_exit;
@@ -73,7 +68,6 @@ static int aq_ndev_close(struct net_device *ndev)
if (err < 0)
goto err_exit;
aq_nic_deinit(aq_nic);
- aq_nic_free_hot_resources(aq_nic);
err_exit:
return err;
@@ -145,15 +139,13 @@ static void aq_ndev_set_multicast_settings(struct net_device *ndev)
err = aq_nic_set_packet_filter(aq_nic, ndev->flags);
if (err < 0)
- goto err_exit;
+ return;
if (netdev_mc_count(ndev)) {
err = aq_nic_set_multicast_list(aq_nic, ndev);
if (err < 0)
- goto err_exit;
+ return;
}
-
-err_exit:;
}
static const struct net_device_ops aq_ndev_ops = {