aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/appletalk
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-09 04:40:57 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:52 -0400
commit3b04ddde02cf1b6f14f2697da5c20eca5715017f (patch)
tree9da1341a5a399a507b5ea6bf5a3047506b8d8f8f /drivers/net/appletalk
parentb95cce3576813ac3f86bafa6b5daaaaf7574b0fe (diff)
[NET]: Move hardware header operations out of netdevice.
Since hardware header operations are part of the protocol class not the device instance, make them into a separate object and save memory. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/appletalk')
-rw-r--r--drivers/net/appletalk/cops.c20
-rw-r--r--drivers/net/appletalk/ltpc.c10
2 files changed, 1 insertions, 29 deletions
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c
index c4b560d42a6..92c3a4cf0bb 100644
--- a/drivers/net/appletalk/cops.c
+++ b/drivers/net/appletalk/cops.c
@@ -194,10 +194,6 @@ static void cops_timeout(struct net_device *dev);
194static void cops_rx (struct net_device *dev); 194static void cops_rx (struct net_device *dev);
195static int cops_send_packet (struct sk_buff *skb, struct net_device *dev); 195static int cops_send_packet (struct sk_buff *skb, struct net_device *dev);
196static void set_multicast_list (struct net_device *dev); 196static void set_multicast_list (struct net_device *dev);
197static int cops_hard_header (struct sk_buff *skb, struct net_device *dev,
198 unsigned short type, void *daddr, void *saddr,
199 unsigned len);
200
201static int cops_ioctl (struct net_device *dev, struct ifreq *rq, int cmd); 197static int cops_ioctl (struct net_device *dev, struct ifreq *rq, int cmd);
202static int cops_close (struct net_device *dev); 198static int cops_close (struct net_device *dev);
203static struct net_device_stats *cops_get_stats (struct net_device *dev); 199static struct net_device_stats *cops_get_stats (struct net_device *dev);
@@ -331,7 +327,6 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr)
331 dev->base_addr = ioaddr; 327 dev->base_addr = ioaddr;
332 328
333 lp = netdev_priv(dev); 329 lp = netdev_priv(dev);
334 memset(lp, 0, sizeof(struct cops_local));
335 spin_lock_init(&lp->lock); 330 spin_lock_init(&lp->lock);
336 331
337 /* Copy local board variable to lp struct. */ 332 /* Copy local board variable to lp struct. */
@@ -340,7 +335,7 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr)
340 dev->hard_start_xmit = cops_send_packet; 335 dev->hard_start_xmit = cops_send_packet;
341 dev->tx_timeout = cops_timeout; 336 dev->tx_timeout = cops_timeout;
342 dev->watchdog_timeo = HZ * 2; 337 dev->watchdog_timeo = HZ * 2;
343 dev->hard_header = cops_hard_header; 338
344 dev->get_stats = cops_get_stats; 339 dev->get_stats = cops_get_stats;
345 dev->open = cops_open; 340 dev->open = cops_open;
346 dev->stop = cops_close; 341 dev->stop = cops_close;
@@ -945,19 +940,6 @@ static void set_multicast_list(struct net_device *dev)
945} 940}
946 941
947/* 942/*
948 * Another Dummy function to keep the Appletalk layer happy.
949 */
950
951static int cops_hard_header(struct sk_buff *skb, struct net_device *dev,
952 unsigned short type, void *daddr, void *saddr,
953 unsigned len)
954{
955 if(cops_debug >= 3)
956 printk("%s: cops_hard_header executed. Wow!\n", dev->name);
957 return 0;
958}
959
960/*
961 * System ioctls for the COPS LocalTalk card. 943 * System ioctls for the COPS LocalTalk card.
962 */ 944 */
963 945
diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c
index cb4744e5690..6ab2c2d4d67 100644
--- a/drivers/net/appletalk/ltpc.c
+++ b/drivers/net/appletalk/ltpc.c
@@ -870,15 +870,6 @@ static void set_multicast_list(struct net_device *dev)
870 /* Actually netatalk needs fixing! */ 870 /* Actually netatalk needs fixing! */
871} 871}
872 872
873static int ltpc_hard_header (struct sk_buff *skb, struct net_device *dev,
874 unsigned short type, void *daddr, void *saddr, unsigned len)
875{
876 if(debug & DEBUG_VERBOSE)
877 printk("ltpc_hard_header called for device %s\n",
878 dev->name);
879 return 0;
880}
881
882static int ltpc_poll_counter; 873static int ltpc_poll_counter;
883 874
884static void ltpc_poll(unsigned long l) 875static void ltpc_poll(unsigned long l)
@@ -1141,7 +1132,6 @@ struct net_device * __init ltpc_probe(void)
1141 1132
1142 /* Fill in the fields of the device structure with ethernet-generic values. */ 1133 /* Fill in the fields of the device structure with ethernet-generic values. */
1143 dev->hard_start_xmit = ltpc_xmit; 1134 dev->hard_start_xmit = ltpc_xmit;
1144 dev->hard_header = ltpc_hard_header;
1145 dev->get_stats = ltpc_get_stats; 1135 dev->get_stats = ltpc_get_stats;
1146 1136
1147 /* add the ltpc-specific things */ 1137 /* add the ltpc-specific things */