Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: at76: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Alexander Beregalov and committed by
Greg Kroah-Hartman
3a323682 9f76208c

+13 -7
+13 -7
drivers/staging/at76_usb/at76_usb.c
··· 5259 5259 return 0; 5260 5260 } 5261 5261 5262 + static const struct net_device_ops at76_netdev_ops = { 5263 + .ndo_open = at76_open, 5264 + .ndo_stop = at76_stop, 5265 + .ndo_get_stats = at76_get_stats, 5266 + .ndo_start_xmit = at76_tx, 5267 + .ndo_tx_timeout = at76_tx_timeout, 5268 + .ndo_set_multicast_list = at76_set_multicast, 5269 + .ndo_set_mac_address = at76_set_mac_address, 5270 + .ndo_validate_addr = eth_validate_addr, 5271 + .ndo_change_mtu = eth_change_mtu, 5272 + }; 5273 + 5262 5274 /* Register network device and initialize the hardware */ 5263 5275 static int at76_init_new_device(struct at76_priv *priv, 5264 5276 struct usb_interface *interface) ··· 5315 5303 priv->scan_mode = SCAN_TYPE_ACTIVE; 5316 5304 5317 5305 netdev->flags &= ~IFF_MULTICAST; /* not yet or never */ 5318 - netdev->open = at76_open; 5319 - netdev->stop = at76_stop; 5320 - netdev->get_stats = at76_get_stats; 5306 + netdev->netdev_ops = &at76_netdev_ops; 5321 5307 netdev->ethtool_ops = &at76_ethtool_ops; 5322 5308 5323 5309 /* Add pointers to enable iwspy support. */ 5324 5310 priv->wireless_data.spy_data = &priv->spy_data; 5325 5311 netdev->wireless_data = &priv->wireless_data; 5326 5312 5327 - netdev->hard_start_xmit = at76_tx; 5328 - netdev->tx_timeout = at76_tx_timeout; 5329 5313 netdev->watchdog_timeo = 2 * HZ; 5330 5314 netdev->wireless_handlers = &at76_handler_def; 5331 - netdev->set_multicast_list = at76_set_multicast; 5332 - netdev->set_mac_address = at76_set_mac_address; 5333 5315 dev_alloc_name(netdev, "wlan%d"); 5334 5316 5335 5317 ret = register_netdev(priv->netdev);