aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
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/infiniband
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/infiniband')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index b1c3d6cd8eba..2bd76ef57154 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -780,7 +780,7 @@ static void ipoib_timeout(struct net_device *dev)
780static int ipoib_hard_header(struct sk_buff *skb, 780static int ipoib_hard_header(struct sk_buff *skb,
781 struct net_device *dev, 781 struct net_device *dev,
782 unsigned short type, 782 unsigned short type,
783 void *daddr, void *saddr, unsigned len) 783 const void *daddr, const void *saddr, unsigned len)
784{ 784{
785 struct ipoib_header *header; 785 struct ipoib_header *header;
786 786
@@ -940,6 +940,10 @@ void ipoib_dev_cleanup(struct net_device *dev)
940 priv->tx_ring = NULL; 940 priv->tx_ring = NULL;
941} 941}
942 942
943static const struct header_ops ipoib_header_ops = {
944 .create = ipoib_hard_header,
945};
946
943static void ipoib_setup(struct net_device *dev) 947static void ipoib_setup(struct net_device *dev)
944{ 948{
945 struct ipoib_dev_priv *priv = netdev_priv(dev); 949 struct ipoib_dev_priv *priv = netdev_priv(dev);
@@ -950,7 +954,7 @@ static void ipoib_setup(struct net_device *dev)
950 dev->hard_start_xmit = ipoib_start_xmit; 954 dev->hard_start_xmit = ipoib_start_xmit;
951 dev->get_stats = ipoib_get_stats; 955 dev->get_stats = ipoib_get_stats;
952 dev->tx_timeout = ipoib_timeout; 956 dev->tx_timeout = ipoib_timeout;
953 dev->hard_header = ipoib_hard_header; 957 dev->header_ops = &ipoib_header_ops;
954 dev->set_multicast_list = ipoib_set_mcast_list; 958 dev->set_multicast_list = ipoib_set_mcast_list;
955 dev->neigh_setup = ipoib_neigh_setup_dev; 959 dev->neigh_setup = ipoib_neigh_setup_dev;
956 960