mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
orinoco: convert to struct net_device_ops
No functional changes; use new kernel interface for netdev methods. Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
881d948c23
commit
89ea40905f
@ -3583,6 +3583,17 @@ static int orinoco_init(struct net_device *dev)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct net_device_ops orinoco_netdev_ops = {
|
||||||
|
.ndo_init = orinoco_init,
|
||||||
|
.ndo_open = orinoco_open,
|
||||||
|
.ndo_stop = orinoco_stop,
|
||||||
|
.ndo_start_xmit = orinoco_xmit,
|
||||||
|
.ndo_set_multicast_list = orinoco_set_multicast_list,
|
||||||
|
.ndo_change_mtu = orinoco_change_mtu,
|
||||||
|
.ndo_tx_timeout = orinoco_tx_timeout,
|
||||||
|
.ndo_get_stats = orinoco_get_stats,
|
||||||
|
};
|
||||||
|
|
||||||
struct net_device
|
struct net_device
|
||||||
*alloc_orinocodev(int sizeof_card,
|
*alloc_orinocodev(int sizeof_card,
|
||||||
struct device *device,
|
struct device *device,
|
||||||
@ -3605,27 +3616,20 @@ struct net_device
|
|||||||
priv->dev = device;
|
priv->dev = device;
|
||||||
|
|
||||||
/* Setup / override net_device fields */
|
/* Setup / override net_device fields */
|
||||||
dev->init = orinoco_init;
|
dev->netdev_ops = &orinoco_netdev_ops;
|
||||||
dev->hard_start_xmit = orinoco_xmit;
|
|
||||||
dev->tx_timeout = orinoco_tx_timeout;
|
|
||||||
dev->watchdog_timeo = HZ; /* 1 second timeout */
|
dev->watchdog_timeo = HZ; /* 1 second timeout */
|
||||||
dev->get_stats = orinoco_get_stats;
|
|
||||||
dev->ethtool_ops = &orinoco_ethtool_ops;
|
dev->ethtool_ops = &orinoco_ethtool_ops;
|
||||||
dev->wireless_handlers = (struct iw_handler_def *)&orinoco_handler_def;
|
dev->wireless_handlers = (struct iw_handler_def *)&orinoco_handler_def;
|
||||||
#ifdef WIRELESS_SPY
|
#ifdef WIRELESS_SPY
|
||||||
priv->wireless_data.spy_data = &priv->spy_data;
|
priv->wireless_data.spy_data = &priv->spy_data;
|
||||||
dev->wireless_data = &priv->wireless_data;
|
dev->wireless_data = &priv->wireless_data;
|
||||||
#endif
|
#endif
|
||||||
dev->change_mtu = orinoco_change_mtu;
|
|
||||||
dev->set_multicast_list = orinoco_set_multicast_list;
|
|
||||||
/* we use the default eth_mac_addr for setting the MAC addr */
|
/* we use the default eth_mac_addr for setting the MAC addr */
|
||||||
|
|
||||||
/* Reserve space in skb for the SNAP header */
|
/* Reserve space in skb for the SNAP header */
|
||||||
dev->hard_header_len += ENCAPS_OVERHEAD;
|
dev->hard_header_len += ENCAPS_OVERHEAD;
|
||||||
|
|
||||||
/* Set up default callbacks */
|
/* Set up default callbacks */
|
||||||
dev->open = orinoco_open;
|
|
||||||
dev->stop = orinoco_stop;
|
|
||||||
priv->hard_reset = hard_reset;
|
priv->hard_reset = hard_reset;
|
||||||
priv->stop_fw = stop_fw;
|
priv->stop_fw = stop_fw;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user