summaryrefslogtreecommitdiffstats
path: root/net/appletalk
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
commitdb7d4daea91e105e3859cf461d7e53b9b77454b2 (patch)
tree9bb65b95440af09e8aca63abe56970dd3360cc57 /net/appletalk
parent9c1c01ead627bdda9211c9abd5b758d6c687d8ac (diff)
Merge with Linux 2.2.8.
Diffstat (limited to 'net/appletalk')
-rw-r--r--net/appletalk/aarp.c26
-rw-r--r--net/appletalk/ddp.c8
2 files changed, 18 insertions, 16 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 6d59b2338..79c6c7e45 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -128,6 +128,8 @@ static void aarp_send_query(struct aarp_entry *a)
skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length);
eah = (struct elapaarp *)skb_put(skb,sizeof(struct elapaarp));
+ skb->protocol = htons(ETH_P_ATALK);
+ skb->nh.raw = skb->h.raw = (void *) eah;
skb->dev = dev;
/*
@@ -186,6 +188,8 @@ static void aarp_send_reply(struct device *dev, struct at_addr *us, struct at_ad
skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length);
eah = (struct elapaarp *)skb_put(skb,sizeof(struct elapaarp));
+ skb->protocol = htons(ETH_P_ATALK);
+ skb->nh.raw = skb->h.raw = (void *) eah;
skb->dev = dev;
/*
@@ -246,7 +250,8 @@ void aarp_send_probe(struct device *dev, struct at_addr *us)
skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length);
eah = (struct elapaarp *)skb_put(skb,sizeof(struct elapaarp));
-
+ skb->protocol = htons(ETH_P_ATALK);
+ skb->nh.raw = skb->h.raw = (void *) eah;
skb->dev = dev;
/*
@@ -365,12 +370,10 @@ static void aarp_expire_timeout(unsigned long unused)
aarp_expire_timer(&unresolved[ct]);
aarp_expire_timer(&proxies[ct]);
}
- del_timer(&aarp_timer);
- if(unresolved_count==0)
- aarp_timer.expires=jiffies+sysctl_aarp_expiry_time;
- else
- aarp_timer.expires=jiffies+sysctl_aarp_tick_time;
- add_timer(&aarp_timer);
+
+ mod_timer(&aarp_timer, jiffies +
+ (unresolved_count ? sysctl_aarp_tick_time:
+ sysctl_aarp_expiry_time));
}
/*
@@ -750,9 +753,7 @@ int aarp_send_ddp(struct device *dev,struct sk_buff *skb, struct at_addr *sa, vo
if(unresolved_count==1)
{
- del_timer(&aarp_timer);
- aarp_timer.expires=jiffies+sysctl_aarp_tick_time;
- add_timer(&aarp_timer);
+ mod_timer(&aarp_timer, jiffies + sysctl_aarp_tick_time);
}
/*
@@ -939,9 +940,8 @@ static int aarp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type
aarp_resolved(&unresolved[hash],a,hash);
if(unresolved_count==0)
{
- del_timer(&aarp_timer);
- aarp_timer.expires=jiffies+sysctl_aarp_expiry_time;
- add_timer(&aarp_timer);
+ mod_timer(&aarp_timer, jiffies +
+ sysctl_aarp_expiry_time);
}
break;
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 735825842..4c8c6e390 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -356,7 +356,7 @@ static int atif_probe_device(struct atalk_iface *atif)
/*
* Scan the networks.
*/
-
+ atif->status |= ATIF_PROBE;
for(netct = 0; netct <= netrange; netct++)
{
/*
@@ -374,8 +374,10 @@ static int atif_probe_device(struct atalk_iface *atif)
*/
aarp_probe_network(atif);
- if(!(atif->status & ATIF_PROBE_FAIL))
+ if(!(atif->status & ATIF_PROBE_FAIL)) {
+ atif->status &= ~ATIF_PROBE;
return (0);
+ }
}
atif->status &= ~ATIF_PROBE_FAIL;
}
@@ -383,7 +385,7 @@ static int atif_probe_device(struct atalk_iface *atif)
if(probe_net > ntohs(atif->nets.nr_lastnet))
probe_net = ntohs(atif->nets.nr_firstnet);
}
-
+ atif->status &= ~ATIF_PROBE;
return (-EADDRINUSE); /* Network is full... */
}