Skip to content

Commit fd8f499

Browse files
Stephen Hemmingerdavem330
authored andcommitted
defxx: convert driver to net_device_ops
Convert this driver to net_device_ops. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 145186a commit fd8f499

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

drivers/net/defxx.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,15 @@ static void dfx_get_bars(struct device *bdev,
477477
}
478478
}
479479

480+
static const struct net_device_ops dfx_netdev_ops = {
481+
.ndo_open = dfx_open,
482+
.ndo_stop = dfx_close,
483+
.ndo_start_xmit = dfx_xmt_queue_pkt,
484+
.ndo_get_stats = dfx_ctl_get_stats,
485+
.ndo_set_multicast_list = dfx_ctl_set_multicast_list,
486+
.ndo_set_mac_address = dfx_ctl_set_mac_address,
487+
};
488+
480489
/*
481490
* ================
482491
* = dfx_register =
@@ -573,13 +582,7 @@ static int __devinit dfx_register(struct device *bdev)
573582
}
574583

575584
/* Initialize new device structure */
576-
577-
dev->get_stats = dfx_ctl_get_stats;
578-
dev->open = dfx_open;
579-
dev->stop = dfx_close;
580-
dev->hard_start_xmit = dfx_xmt_queue_pkt;
581-
dev->set_multicast_list = dfx_ctl_set_multicast_list;
582-
dev->set_mac_address = dfx_ctl_set_mac_address;
585+
dev->netdev_ops = &dfx_netdev_ops;
583586

584587
if (dfx_bus_pci)
585588
pci_set_master(to_pci_dev(bdev));

0 commit comments

Comments
 (0)