linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Thu, 17 Mar 2005 13:00:31 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/03/17 13:00:25

Modified files:
        net/ax25       : af_ax25.c 
        net/netrom     : af_netrom.c 
        net/rose       : af_rose.c rose_dev.c 

Log message:
        Pull all AX.25, NET/ROM and ROSE changes.  While technically correct
        they're don't have any business in the MIPS tree.

diff -urN linux/net/ax25/af_ax25.c linux/net/ax25/af_ax25.c
--- linux/net/ax25/af_ax25.c    2005/01/25 04:29:01     1.62
+++ linux/net/ax25/af_ax25.c    2005/03/17 13:00:25     1.63
@@ -1689,12 +1689,16 @@
                /* These two are safe on a single CPU system as only user tasks 
fiddle here */
                if ((skb = skb_peek(&sk->sk_receive_queue)) != NULL)
                        amount = skb->len;
-               res = put_user(amount, (int __user *) argp);
+               res = put_user(amount, (int __user *)argp);
                break;
        }
 
        case SIOCGSTAMP:
-               res = sock_get_timestamp(sk, arg);
+               if (sk != NULL) {
+                       res = sock_get_timestamp(sk, argp);
+                       break;
+               }
+               res = -EINVAL;
                break;
 
        case SIOCAX25ADDUID:    /* Add a uid to the uid/call map table */
diff -urN linux/net/netrom/af_netrom.c linux/net/netrom/af_netrom.c
--- linux/net/netrom/af_netrom.c        2005/01/25 04:29:07     1.52
+++ linux/net/netrom/af_netrom.c        2005/03/17 13:00:25     1.53
@@ -1176,7 +1176,7 @@
 {
        struct sock *sk = sock->sk;
        void __user *argp = (void __user *)arg;
-       int ret = 0;
+       int ret;
 
        lock_sock(sk);
        switch (cmd) {
@@ -1200,7 +1200,9 @@
        }
 
        case SIOCGSTAMP:
-               ret = sock_get_timestamp(sk, argp);
+               ret = -EINVAL;
+               if (sk != NULL)
+                       ret = sock_get_timestamp(sk, argp);
                release_sock(sk);
                return ret;
 
diff -urN linux/net/rose/af_rose.c linux/net/rose/af_rose.c
--- linux/net/rose/af_rose.c    2005/01/25 04:29:07     1.59
+++ linux/net/rose/af_rose.c    2005/03/17 13:00:25     1.60
@@ -1249,7 +1249,6 @@
        struct sock *sk = sock->sk;
        rose_cb *rose = rose_sk(sk);
        void __user *argp = (void __user *)arg;
-       int err = 0;
 
        switch (cmd) {
        case TIOCOUTQ: {
@@ -1257,7 +1256,7 @@
                amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
                if (amount < 0)
                        amount = 0;
-               return put_user(amount, (int __user *)argp);
+               return put_user(amount, (unsigned int __user *)argp);
        }
 
        case TIOCINQ: {
@@ -1266,11 +1265,13 @@
                /* These two are safe on a single CPU system as only user tasks 
fiddle here */
                if ((skb = skb_peek(&sk->sk_receive_queue)) != NULL)
                        amount = skb->len;
-               return put_user(amount, (int __user *)argp);
+               return put_user(amount, (unsigned int __user *)argp);
        }
 
        case SIOCGSTAMP:
-               return sock_get_timestamp(sk, (struct timeval __user *)argp);
+               if (sk != NULL) 
+                       return sock_get_timestamp(sk, (struct timeval __user 
*)argp);
+               return -EINVAL;
 
        case SIOCGIFADDR:
        case SIOCSIFADDR:
@@ -1337,7 +1338,7 @@
                return dev_ioctl(cmd, argp);
        }
 
-       return err;
+       return 0;
 }
 
 #ifdef CONFIG_PROC_FS
diff -urN linux/net/rose/rose_dev.c linux/net/rose/rose_dev.c
--- linux/net/rose/rose_dev.c   2004/03/04 22:05:29     1.18
+++ linux/net/rose/rose_dev.c   2005/03/17 13:00:25     1.19
@@ -37,38 +37,6 @@
 #include <net/ax25.h>
 #include <net/rose.h>
 
-/*
- *     Only allow IP over ROSE frames through if the netrom device is up.
- */
-
-int rose_rx_ip(struct sk_buff *skb, struct net_device *dev)
-{
-       struct net_device_stats *stats = netdev_priv(dev);
-
-#ifdef CONFIG_INET
-       if (!netif_running(dev)) {
-               stats->rx_errors++;
-               return 0;
-       }
-
-       stats->rx_packets++;
-       stats->rx_bytes += skb->len;
-
-       skb->protocol = htons(ETH_P_IP);
-
-       /* Spoof incoming device */
-       skb->dev      = dev;
-       skb->h.raw    = skb->data;
-       skb->nh.raw   = skb->data;
-       skb->pkt_type = PACKET_HOST;
-
-       ip_rcv(skb, skb->dev, NULL);
-#else
-       kfree_skb(skb);
-#endif
-       return 1;
-}
-
 static int rose_header(struct sk_buff *skb, struct net_device *dev, unsigned 
short type,
        void *daddr, void *saddr, unsigned len)
 {

<Prev in Thread] Current Thread [Next in Thread>