Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 631b7568 authored by Steve Glendinning's avatar Steve Glendinning Committed by David S. Miller
Browse files

smsc911x: convert driver to use net_device_ops

parent dd045193
Loading
Loading
Loading
Loading
+14 −10
Original line number Original line Diff line number Diff line
@@ -1733,6 +1733,19 @@ static struct ethtool_ops smsc911x_ethtool_ops = {
	.set_eeprom = smsc911x_ethtool_set_eeprom,
	.set_eeprom = smsc911x_ethtool_set_eeprom,
};
};


static const struct net_device_ops smsc911x_netdev_ops = {
	.ndo_open		= smsc911x_open,
	.ndo_stop		= smsc911x_stop,
	.ndo_start_xmit		= smsc911x_hard_start_xmit,
	.ndo_get_stats		= smsc911x_get_stats,
	.ndo_set_multicast_list	= smsc911x_set_multicast_list,
	.ndo_do_ioctl		= smsc911x_do_ioctl,
	.ndo_validate_addr	= eth_validate_addr,
#ifdef CONFIG_NET_POLL_CONTROLLER
	.ndo_poll_controller	= smsc911x_poll_controller,
#endif
};

/* Initializing private device structures, only called from probe */
/* Initializing private device structures, only called from probe */
static int __devinit smsc911x_init(struct net_device *dev)
static int __devinit smsc911x_init(struct net_device *dev)
{
{
@@ -1828,20 +1841,11 @@ static int __devinit smsc911x_init(struct net_device *dev)
	smsc911x_reg_write(pdata, INT_EN, 0);
	smsc911x_reg_write(pdata, INT_EN, 0);


	ether_setup(dev);
	ether_setup(dev);
	dev->open = smsc911x_open;
	dev->stop = smsc911x_stop;
	dev->hard_start_xmit = smsc911x_hard_start_xmit;
	dev->get_stats = smsc911x_get_stats;
	dev->set_multicast_list = smsc911x_set_multicast_list;
	dev->flags |= IFF_MULTICAST;
	dev->flags |= IFF_MULTICAST;
	dev->do_ioctl = smsc911x_do_ioctl;
	netif_napi_add(dev, &pdata->napi, smsc911x_poll, SMSC_NAPI_WEIGHT);
	netif_napi_add(dev, &pdata->napi, smsc911x_poll, SMSC_NAPI_WEIGHT);
	dev->netdev_ops = &smsc911x_netdev_ops;
	dev->ethtool_ops = &smsc911x_ethtool_ops;
	dev->ethtool_ops = &smsc911x_ethtool_ops;


#ifdef CONFIG_NET_POLL_CONTROLLER
	dev->poll_controller = smsc911x_poll_controller;
#endif				/* CONFIG_NET_POLL_CONTROLLER */

	return 0;
	return 0;
}
}