Skip to contentSkip to conversation

switch kaweth driver to netdevops

PATCH Applied Oliver Neukum 2 participants 2 messages Jan 8, 2009 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 switch kaweth driver to netdevops

This converts the kaweth ethernet USB driver to netdevops.

Regards
Oliver

commit f439f3ec3c68586f92dd692f220e44fd898a50bb

Author: Oliver Neukum <[email protected]>
Date:   Wed Jan 7 14:31:21 2009 +0100

convert kaweth to new netdev ops

drivers/net/usb/kaweth.c +12 -10
index 2ee034f..e166b87 100644
@@ -251,7 +251,6 @@ struct kaweth_device
 	struct net_device_stats stats;
 };
 
-
 /****************************************************************
  *     kaweth_control
  ****************************************************************/
@@ -975,6 +974,17 @@ static int kaweth_resume(struct usb_interface *intf)
 /****************************************************************
  *     kaweth_probe
  ****************************************************************/
+
+
+static const struct net_device_ops kaweth_netdev_ops = {
+	.ndo_open =			kaweth_open,
+	.ndo_stop =			kaweth_close,
+	.ndo_start_xmit =		kaweth_start_xmit,
+	.ndo_tx_timeout =		kaweth_tx_timeout,
+	.ndo_set_multicast_list =	kaweth_set_rx_mode,
+	.ndo_get_stats =		kaweth_netdev_stats,
+};
+
 static int kaweth_probe(
 		struct usb_interface *intf,
 		const struct usb_device_id *id      /* from id_table */
@@ -1147,22 +1157,13 @@ err_fw:
 	memcpy(netdev->dev_addr, &kaweth->configuration.hw_addr,
                sizeof(kaweth->configuration.hw_addr));
 
-	netdev->open = kaweth_open;
-	netdev->stop = kaweth_close;
-
+	netdev->netdev_ops = &kaweth_netdev_ops;
 	netdev->watchdog_timeo = KAWETH_TX_TIMEOUT;
-	netdev->tx_timeout = kaweth_tx_timeout;
-
-	netdev->hard_start_xmit = kaweth_start_xmit;
-	netdev->set_multicast_list = kaweth_set_rx_mode;
-	netdev->get_stats = kaweth_netdev_stats;
 	netdev->mtu = le16_to_cpu(kaweth->configuration.segment_size);
 	SET_ETHTOOL_OPS(netdev, &ops);
 
 	/* kaweth is zeroed as part of alloc_netdev */
-
 	INIT_DELAYED_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl);

A message that is not in the archive (sent off-list or not yet received): 200901081422.55536.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org

Applied
#2 lore raw

From: Oliver Neukum <[email protected]>
Date: Thu, 8 Jan 2009 14:22:54 +0100

Quoted 3 lines

This converts the kaweth ethernet USB driver to netdevops.

Applied, thank you.

You might want to put a space before your email address in that signoff line :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html