diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
commit | beb116954b9b7f3bb56412b2494b562f02b864b1 (patch) | |
tree | 120e997879884e1b9d93b265221b939d2ef1ade1 /net/802/tr.c | |
parent | 908d4681a1dc3792ecafbe64265783a86c4cccb6 (diff) |
Import of Linux/MIPS 2.1.14
Diffstat (limited to 'net/802/tr.c')
-rw-r--r-- | net/802/tr.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/net/802/tr.c b/net/802/tr.c index 643cf64c5..c12a66d83 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -1,4 +1,4 @@ -#include <asm/segment.h> +#include <asm/uaccess.h> #include <asm/system.h> #include <linux/types.h> #include <linux/kernel.h> @@ -38,12 +38,13 @@ rif_cache rif_table[RIF_TABLE_SIZE]={ NULL, }; #define RIF_CHECK_INTERVAL 60*HZ static struct timer_list rif_timer={ NULL,NULL,RIF_CHECK_INTERVAL,0L,rif_check_expire }; -int tr_header(unsigned char *buff, struct device *dev, unsigned short type, - void *daddr, void *saddr, unsigned len, struct sk_buff *skb) { +int tr_header(struct sk_buff *skb, struct device *dev, unsigned short type, + void *daddr, void *saddr, unsigned len) +{ + + struct trh_hdr *trh=(struct trh_hdr *)skb_push(skb,dev->hard_header_len); + struct trllc *trllc=(struct trllc *)(trh+1); - struct trh_hdr *trh=(struct trh_hdr *)buff; - struct trllc *trllc=(struct trllc *)(buff+sizeof(struct trh_hdr)); - trh->ac=AC; trh->fc=LLC_FRAME; @@ -92,6 +93,10 @@ unsigned short tr_type_trans(struct sk_buff *skb, struct device *dev) { struct trh_hdr *trh=(struct trh_hdr *)skb->data; struct trllc *trllc=(struct trllc *)(skb->data+sizeof(struct trh_hdr)); + skb->mac.raw = skb->data; + + skb_pull(skb,dev->hard_header_len); + if(trh->saddr[0] & TR_RII) tr_add_rif_info(trh); @@ -231,7 +236,7 @@ static void rif_check_expire(unsigned long dummy) { restore_flags(flags); del_timer(&rif_timer); - rif_timer.expires=RIF_CHECK_INTERVAL; + rif_timer.expires=jiffies+RIF_CHECK_INTERVAL; add_timer(&rif_timer); } |