summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
diff options
context:
space:
mode:
authorIgor Russkikh <igor.russkikh@aquantia.com>2018-01-15 16:41:15 +0300
committerDavid S. Miller <davem@davemloft.net>2018-01-16 14:40:00 -0500
commit1a713f87a0914ccaa9532e61ee73ac691c1f9e3d (patch)
tree720bf585fc6c73370dd08a4f0debed290a4b8776 /drivers/net/ethernet/aquantia/atlantic/aq_nic.c
parent78f5193dbcd3ed799c9fe187ddbfa67503e97ab8 (diff)
downloadlinux-next-1a713f87a0914ccaa9532e61ee73ac691c1f9e3d.tar.gz
net: aquantia: Cleanup hardware access modules
Use direct aq_hw_s *self reference where possible Eliminate useless abstraction PHAL, duplicated structures definitions, Simplify nic config structure creation and management. 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_nic.c')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_nic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index 35ca37f9cffb..f934b095bb19 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -242,8 +242,9 @@ struct aq_nic_s *aq_nic_alloc_cold(const struct net_device_ops *ndev_ops,
self->aq_hw_ops = *aq_hw_ops;
self->port = (u8)port;
- self->aq_hw = self->aq_hw_ops.create(aq_pci_func, self->port,
- &self->aq_hw_ops);
+ self->aq_hw = self->aq_hw_ops.create(aq_pci_func, self->port);
+ self->aq_hw->aq_nic_cfg = &self->aq_nic_cfg;
+
err = self->aq_hw_ops.get_hw_caps(self->aq_hw, &self->aq_hw_caps,
pdev->device, pdev->subsystem_device);
if (err < 0)
@@ -268,7 +269,6 @@ int aq_nic_ndev_register(struct aq_nic_s *self)
goto err_exit;
}
err = self->aq_hw_ops.hw_get_mac_permanent(self->aq_hw,
- self->aq_nic_cfg.aq_hw_caps,
self->ndev->dev_addr);
if (err < 0)
goto err_exit;
@@ -387,7 +387,7 @@ int aq_nic_init(struct aq_nic_s *self)
if (err < 0)
goto err_exit;
- err = self->aq_hw_ops.hw_init(self->aq_hw, &self->aq_nic_cfg,
+ err = self->aq_hw_ops.hw_init(self->aq_hw,
aq_nic_get_ndev(self)->dev_addr);
if (err < 0)
goto err_exit;