diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-10-09 04:40:57 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:52:52 -0400 |
commit | 3b04ddde02cf1b6f14f2697da5c20eca5715017f (patch) | |
tree | 9da1341a5a399a507b5ea6bf5a3047506b8d8f8f /drivers/net/appletalk | |
parent | b95cce3576813ac3f86bafa6b5daaaaf7574b0fe (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.c | 20 | ||||
-rw-r--r-- | drivers/net/appletalk/ltpc.c | 10 |
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); | |||
194 | static void cops_rx (struct net_device *dev); | 194 | static void cops_rx (struct net_device *dev); |
195 | static int cops_send_packet (struct sk_buff *skb, struct net_device *dev); | 195 | static int cops_send_packet (struct sk_buff *skb, struct net_device *dev); |
196 | static void set_multicast_list (struct net_device *dev); | 196 | static void set_multicast_list (struct net_device *dev); |
197 | static int cops_hard_header (struct sk_buff *skb, struct net_device *dev, | ||
198 | unsigned short type, void *daddr, void *saddr, | ||
199 | unsigned len); | ||
200 | |||
201 | static int cops_ioctl (struct net_device *dev, struct ifreq *rq, int cmd); | 197 | static int cops_ioctl (struct net_device *dev, struct ifreq *rq, int cmd); |
202 | static int cops_close (struct net_device *dev); | 198 | static int cops_close (struct net_device *dev); |
203 | static struct net_device_stats *cops_get_stats (struct net_device *dev); | 199 | static 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 | |||
951 | static 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 | ||
873 | static 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 | |||
882 | static int ltpc_poll_counter; | 873 | static int ltpc_poll_counter; |
883 | 874 | ||
884 | static void ltpc_poll(unsigned long l) | 875 | static 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 */ |