PATCH: [SKBUFF] make hdlc_type_trans look like eth_type_trans
Subsystems (6)
Hi David,
Please consider pulling from:
bk://kernel.bkbits.net/acme/sk_buff-2.6
Now there are five outstanding changesets in this tree:
[email protected], 2004-10-03 11:01:01-03:00, [email protected]
[SKBUFF] make hdlc_type_trans look like eth_type_trans
[email protected], 2004-10-03 00:23:07-03:00, [email protected]
[SKBUFF] introduce tr_hdr(skb)
[email protected], 2004-10-02 16:44:12-03:00, [email protected] [email protected], 2004-10-02 16:27:19-03:00, [email protected]
[BRIDGE] convert __constant_htons(constant) to htons
[email protected], 2004-10-02 13:42:59-03:00, [email protected]
[SKBUFF] introduce eth_hdr(skb)
Regards,
- Arnaldo
===================================================================
[email protected], 2004-10-03 11:01:01-03:00, [email protected]
[SKBUFF] make hdlc_type_trans look like eth_type_trans
Moving skb->mac.raw and dev setting from the callers to hdlc_type_trans, also introduce farsync_type_trans, private to the farsync driver, but following the foo_type_trans model.
drivers/char/pcmcia/synclink_cs.c | 1 drivers/char/synclink.c | 4 --- drivers/char/synclinkmp.c | 4 --- drivers/net/wan/dscc4.c | 2 - drivers/net/wan/farsync.c | 42 ++++++++++++++++++-------------------- drivers/net/wan/hd6457x.c | 2 - drivers/net/wan/pc300_drv.c | 1 drivers/net/wan/wanxl.c | 2 - include/linux/hdlc.h | 8 +++++-- 9 files changed, 28 insertions(+), 38 deletions(-)
drivers/char/pcmcia/synclink_cs.c +0 -1
@@ -4571,7 +4571,6 @@memcpy (skb_put (skb, size),buf,size); skb->dev = info->netdev; - skb->mac.raw = skb->data; skb->protocol =hdlc_type_trans (skb, skb->dev); stats->rx_packets++;
drivers/char/synclink.c +1 -3
@@ -8150,9 +8150,7 @@memcpy (skb_put (skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol =hdlc_type_trans (skb, skb->dev); + skb->protocol =hdlc_type_trans (skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size;
drivers/char/synclinkmp.c +1 -3
@@ -1968,9 +1968,7 @@memcpy (skb_put (skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol =hdlc_type_trans (skb, skb->dev); + skb->protocol =hdlc_type_trans (skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size;
drivers/net/wan/dscc4.c +0 -2
@@ -517,9 +517,7 @@ skb =dev_alloc_skb (len); dpriv->rx_skbuff[dirty] = skb;if (skb) { - skb->dev = dev; skb->protocol =hdlc_type_trans (skb, dev); - skb->mac.raw = skb->data; rx_fd->data =pci_map_single (dpriv->pci_priv->pdev, skb->data, len,PCI_DMA_FROMDEVICE ); }else {
drivers/net/wan/farsync.c +20 -22
60 lines not on this page · raw message
drivers/net/wan/hd6457x.c +0 -2
@@ -315,8 +315,6 @@#endif stats->rx_packets++; stats->rx_bytes += skb->len; - skb->mac.raw = skb->data; - skb->dev = dev; skb->dev->last_rx = jiffies; skb->protocol =hdlc_type_trans (skb, dev);netif_rx (skb);
drivers/net/wan/pc300_drv.c +0 -1
@@ -1959,7 +1959,6 @@cpc_trace (dev, skb,'R' ); } stats->rx_packets++; - skb->mac.raw = skb->data; skb->protocol =hdlc_type_trans (skb, dev);netif_rx (skb); }
drivers/net/wan/wanxl.c +0 -2
@@ -224,8 +224,6 @@#endif stats->rx_packets++; stats->rx_bytes += skb->len; - skb->mac.raw = skb->data; - skb->dev = dev; dev->last_rx = jiffies; skb->protocol =hdlc_type_trans (skb, dev);netif_rx (skb);
include/linux/hdlc.h +6 -2
@@ -243,11 +243,15 @@static __inline__unsigned short hdlc_type_trans (struct sk_buff *skb,struct net_device *dev) { -hdlc_device *hdlc =dev_to_hdlc (skb->dev); +hdlc_device *hdlc =dev_to_hdlc (dev); + + skb->mac.raw = skb->data; + skb->dev = dev; +if (hdlc->proto.type_trans)return hdlc->proto.type_trans (skb, dev);else -return __constant_htons (ETH_P_HDLC ); +return htons (ETH_P_HDLC ); }#endif /* __KERNEL */