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/wan/hdlc.c | |
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/wan/hdlc.c')
-rw-r--r-- | drivers/net/wan/hdlc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/wan/hdlc.c b/drivers/net/wan/hdlc.c index ee23b91f23d9..d553e6f32851 100644 --- a/drivers/net/wan/hdlc.c +++ b/drivers/net/wan/hdlc.c | |||
@@ -232,6 +232,8 @@ int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
232 | return -EINVAL; | 232 | return -EINVAL; |
233 | } | 233 | } |
234 | 234 | ||
235 | static const struct header_ops hdlc_null_ops; | ||
236 | |||
235 | static void hdlc_setup_dev(struct net_device *dev) | 237 | static void hdlc_setup_dev(struct net_device *dev) |
236 | { | 238 | { |
237 | /* Re-init all variables changed by HDLC protocol drivers, | 239 | /* Re-init all variables changed by HDLC protocol drivers, |
@@ -243,13 +245,9 @@ static void hdlc_setup_dev(struct net_device *dev) | |||
243 | dev->type = ARPHRD_RAWHDLC; | 245 | dev->type = ARPHRD_RAWHDLC; |
244 | dev->hard_header_len = 16; | 246 | dev->hard_header_len = 16; |
245 | dev->addr_len = 0; | 247 | dev->addr_len = 0; |
246 | dev->hard_header = NULL; | 248 | dev->header_ops = &hdlc_null_ops; |
247 | dev->rebuild_header = NULL; | 249 | |
248 | dev->set_mac_address = NULL; | ||
249 | dev->hard_header_cache = NULL; | ||
250 | dev->header_cache_update = NULL; | ||
251 | dev->change_mtu = hdlc_change_mtu; | 250 | dev->change_mtu = hdlc_change_mtu; |
252 | dev->hard_header_parse = NULL; | ||
253 | } | 251 | } |
254 | 252 | ||
255 | static void hdlc_setup(struct net_device *dev) | 253 | static void hdlc_setup(struct net_device *dev) |