Update of /cvsroot/linux-vax/kernel-2.4/net/appletalk
In directory usw-pr-cvs1:/tmp/cvs-serv30559/appletalk
Modified Files:
aarp.c ddp.c
Log Message:
synch 2.4.15 commit 18
Index: aarp.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/appletalk/aarp.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- aarp.c 25 Feb 2001 23:14:55 -0000 1.1.1.2
+++ aarp.c 9 Apr 2002 16:20:45 -0000 1.2
@@ -58,6 +58,7 @@
#include <linux/atalk.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
+#include <linux/module.h>
int sysctl_aarp_expiry_time = AARP_EXPIRY_TIME;
int sysctl_aarp_tick_time = AARP_TICK_TIME;
@@ -97,11 +98,7 @@
*/
static void __aarp_expire(struct aarp_entry *a)
{
- struct sk_buff *skb;
-
- while ((skb = skb_dequeue(&a->packet_queue)) != NULL)
- kfree_skb(skb);
-
+ skb_queue_purge(&a->packet_queue);
kfree(a);
}
@@ -844,9 +841,7 @@
}
static struct notifier_block aarp_notifier = {
- aarp_device_event,
- NULL,
- 0
+ notifier_call: aarp_device_event,
};
static char aarp_snap_id[] = { 0x00, 0x00, 0x00, 0x80, 0xF3 };
@@ -888,8 +883,8 @@
int len, ct;
len = sprintf(buffer,
- "%-10.10s ""%-10.10s""%-18.18s""%12.12s""%12.12s"" xmit_count status\n",
- "address","device","hw addr","last_sent", "expires");
+ "%-10.10s %-10.10s%-18.18s%12.12s%12.12s xmit_count status\n",
+ "address", "device", "hw addr", "last_sent", "expires");
spin_lock_bh(&aarp_lock);
@@ -988,3 +983,4 @@
}
#endif
#endif /* CONFIG_ATALK || CONFIG_ATALK_MODULE */
+MODULE_LICENSE("GPL");
Index: ddp.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/appletalk/ddp.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- ddp.c 25 Feb 2001 23:14:55 -0000 1.1.1.2
+++ ddp.c 9 Apr 2002 16:20:45 -0000 1.2
@@ -113,8 +113,6 @@
struct datalink_proto *ddp_dl, *aarp_dl;
static struct proto_ops atalk_dgram_ops;
-#define min(a,b) (((a)<(b))?(a):(b))
-
/**************************************************************************\
* *
* Handlers for the socket list. *
@@ -754,7 +752,7 @@
/* ioctl calls. Shouldn't even need touching */
/* Device configuration ioctl calls */
-int atif_ioctl(int cmd, void *arg)
+static int atif_ioctl(int cmd, void *arg)
{
static char aarp_mcast[6] = {0x09, 0x00, 0x00, 0xFF, 0xFF, 0xFF};
struct ifreq atreq;
@@ -1392,7 +1390,7 @@
/* Trim buffer in case of stray trailing data */
origlen = skb->len;
- skb_trim(skb, min(skb->len, ddphv.deh_len));
+ skb_trim(skb, min_t(unsigned int, skb->len, ddphv.deh_len));
/*
* Size check to see if ddp->deh_len was crap
@@ -1457,7 +1455,7 @@
}
/* Fix up skb->len field */
- skb_trim(skb, min(origlen, rt->dev->hard_header_len +
+ skb_trim(skb, min_t(unsigned int, origlen, rt->dev->hard_header_len +
ddp_dl->header_length + ddphv.deh_len));
/* Mend the byte order */
@@ -1672,7 +1670,7 @@
sk, size, dev->name);
size += dev->hard_header_len;
- skb = sock_alloc_send_skb(sk, size, 0, (flags & MSG_DONTWAIT), &err);
+ skb = sock_alloc_send_skb(sk, size, (flags & MSG_DONTWAIT), &err);
if (!skb)
return err;
@@ -1857,7 +1855,15 @@
case SIOCDIFADDR:
case SIOCSARP: /* proxy AARP */
case SIOCDARP: /* proxy AARP */
- return atif_ioctl(cmd, (void *)arg);
+ {
+ int ret;
+
+ rtnl_lock();
+ ret = atif_ioctl(cmd, (void *)arg);
+ rtnl_unlock();
+
+ return ret;
+ }
/* Physical layer ioctl calls */
case SIOCSIFLINK:
case SIOCGIFHWADDR:
@@ -1913,6 +1919,7 @@
sendmsg: atalk_sendmsg,
recvmsg: atalk_recvmsg,
mmap: sock_no_mmap,
+ sendpage: sock_no_sendpage,
};
#include <linux/smp_lock.h>
@@ -1988,7 +1995,7 @@
* Use counts are incremented/decremented when
* sockets are created/deleted.
*
- * AppleTalk interfaces are not incremented untill atalkd is run
+ * AppleTalk interfaces are not incremented until atalkd is run
* and are only decremented when they are downed.
*
* Ergo, before the AppleTalk module can be removed, all AppleTalk
|