From ba862e60ce599d4e6694c5b14f0f23026ae5283d Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Tue, 4 May 2010 18:40:32 -0700 Subject: [PATCH] atl1: use netdev_attach_ops() Signed-off-by: Luis R. Rodriguez --- patches/01-netdev.patch | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/patches/01-netdev.patch b/patches/01-netdev.patch index 2b46e2857b73..9e5bae04ca6e 100644 --- a/patches/01-netdev.patch +++ b/patches/01-netdev.patch @@ -342,42 +342,12 @@ without creating a headache on maintenance of the pathes. --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c -@@ -2878,6 +2878,7 @@ static void atl1_poll_controller(struct - } - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - static const struct net_device_ops atl1_netdev_ops = { - .ndo_open = atl1_open, - .ndo_stop = atl1_close, -@@ -2893,6 +2894,7 @@ static const struct net_device_ops atl1_ - .ndo_poll_controller = atl1_poll_controller, - #endif - }; -+#endif - - /* - * atl1_probe - Device Initialization Routine -@@ -2981,7 +2983,22 @@ static int __devinit atl1_probe(struct p +@@ -2981,7 +2981,7 @@ adapter->mii.phy_id_mask = 0x1f; adapter->mii.reg_num_mask = 0x1f; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - netdev->netdev_ops = &atl1_netdev_ops; -+#else -+ netdev->change_mtu = atl1_change_mtu; -+ netdev->hard_start_xmit = atl1_xmit_frame; -+ netdev->open = atl1_open; -+ netdev->stop = atl1_close; -+ netdev->tx_timeout = atlx_tx_timeout; -+ netdev->set_mac_address = atl1_set_mac; -+ netdev->do_ioctl = atlx_ioctl; -+ netdev->set_multicast_list = atlx_set_multi; -+ netdev->vlan_rx_register = atlx_vlan_rx_register; -+#ifdef CONFIG_NET_POLL_CONTROLLER -+ netdev->poll_controller = atl1_poll_controller; -+#endif -+#endif +- netdev->netdev_ops = &atl1_netdev_ops; ++ netdev_attach_ops(netdev, &atl1_netdev_ops); netdev->watchdog_timeo = 5 * HZ; netdev->ethtool_ops = &atl1_ethtool_ops; -- 2.30.2