aboutsummaryrefslogtreecommitdiffstats
path: root/net/packet
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 /net/packet
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 'net/packet')
-rw-r--r--net/packet/af_packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index c9ee343c2a6c..e11000a8e950 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -389,7 +389,7 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock,
389 skb_reset_network_header(skb); 389 skb_reset_network_header(skb);
390 390
391 /* Try to align data part correctly */ 391 /* Try to align data part correctly */
392 if (dev->hard_header) { 392 if (dev->header_ops) {
393 skb->data -= dev->hard_header_len; 393 skb->data -= dev->hard_header_len;
394 skb->tail -= dev->hard_header_len; 394 skb->tail -= dev->hard_header_len;
395 if (len < dev->hard_header_len) 395 if (len < dev->hard_header_len)
@@ -466,7 +466,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
466 466
467 skb->dev = dev; 467 skb->dev = dev;
468 468
469 if (dev->hard_header) { 469 if (dev->header_ops) {
470 /* The device has an explicit notion of ll header, 470 /* The device has an explicit notion of ll header,
471 exported to higher levels. 471 exported to higher levels.
472 472
@@ -581,7 +581,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
581 sk = pt->af_packet_priv; 581 sk = pt->af_packet_priv;
582 po = pkt_sk(sk); 582 po = pkt_sk(sk);
583 583
584 if (dev->hard_header) { 584 if (dev->header_ops) {
585 if (sk->sk_type != SOCK_DGRAM) 585 if (sk->sk_type != SOCK_DGRAM)
586 skb_push(skb, skb->data - skb_mac_header(skb)); 586 skb_push(skb, skb->data - skb_mac_header(skb));
587 else if (skb->pkt_type == PACKET_OUTGOING) { 587 else if (skb->pkt_type == PACKET_OUTGOING) {