From c1a4b86e396b6870b420d23e4d49c7b685aef0a4 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 19 Mar 2007 15:27:07 -0700 Subject: [TR]: Use tr_hdr() were appropriate Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- net/802/tr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net/802/tr.c') diff --git a/net/802/tr.c b/net/802/tr.c index 96bd14452c5..a6a6d46e708 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -189,11 +189,12 @@ static int tr_rebuild_header(struct sk_buff *skb) __be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev) { - struct trh_hdr *trh=(struct trh_hdr *)skb->data; + struct trh_hdr *trh; struct trllc *trllc; unsigned riflen=0; skb->mac.raw = skb->data; + trh = tr_hdr(skb); if(trh->saddr[0] & TR_RII) riflen = (ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8; -- cgit v1.2.3-18-g5258 From c8fb7948dc1aeff0515b2912b564d4236f6c0ebd Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 19 Mar 2007 15:29:16 -0700 Subject: [TR]: Make tr_type_trans set skb->dev Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- net/802/tr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/802/tr.c') diff --git a/net/802/tr.c b/net/802/tr.c index a6a6d46e708..987d91559bc 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -193,6 +193,7 @@ __be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev) struct trllc *trllc; unsigned riflen=0; + skb->dev = dev; skb->mac.raw = skb->data; trh = tr_hdr(skb); -- cgit v1.2.3-18-g5258 From 459a98ed881802dee55897441bc7f77af614368e Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 19 Mar 2007 15:30:44 -0700 Subject: [SK_BUFF]: Introduce skb_reset_mac_header(skb) For the common, open coded 'skb->mac.raw = skb->data' operation, so that we can later turn skb->mac.raw into a offset, reducing the size of struct sk_buff in 64bit land while possibly keeping it as a pointer on 32bit. This one touches just the most simple case, next will handle the slightly more "complex" cases. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- net/802/tr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/802/tr.c') diff --git a/net/802/tr.c b/net/802/tr.c index 987d91559bc..eb2de0d1620 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -194,7 +194,7 @@ __be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev) unsigned riflen=0; skb->dev = dev; - skb->mac.raw = skb->data; + skb_reset_mac_header(skb); trh = tr_hdr(skb); if(trh->saddr[0] & TR_RII) -- cgit v1.2.3-18-g5258 From 3ff50b7997fe06cd5d276b229967bb52d6b3b6c1 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 20 Apr 2007 17:09:22 -0700 Subject: [NET]: cleanup extra semicolons Spring cleaning time... There seems to be a lot of places in the network code that have extra bogus semicolons after conditionals. Most commonly is a bogus semicolon after: switch() { } Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- net/802/tr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net/802/tr.c') diff --git a/net/802/tr.c b/net/802/tr.c index eb2de0d1620..0ba1946211c 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -554,7 +554,8 @@ static int rif_seq_show(struct seq_file *seq, void *v) if(j==1) { segment=ntohs(entry->rseg[j-1])>>4; seq_printf(seq," %03X",segment); - }; + } + segment=ntohs(entry->rseg[j])>>4; brdgnmb=ntohs(entry->rseg[j-1])&0x00f; seq_printf(seq,"-%01X-%03X",brdgnmb,segment); -- cgit v1.2.3-18-g5258