]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-atmdd.patch
- 4.9.298
[packages/kernel.git] / kernel-atmdd.patch
index 871aba3a5de59177399ecb75adc609f705612180..7647ec6934f32edc6430076da131134efa6a8a08 100644 (file)
@@ -1,22 +1,10 @@
-diff -urN linux-2.4.25/drivers/atm/Makefile linux-2.4.25-atmdd/drivers/atm/Makefile
---- linux-2.4.25/drivers/atm/Makefile  2004-02-23 15:18:29.000000000 +0100
-+++ linux-2.4.25-atmdd/drivers/atm/Makefile    2004-02-29 22:51:26.000000000 +0100
-@@ -31,6 +31,7 @@
-   obj-$(CONFIG_ATM_IDT77252)  += suni.o
- endif
+diff -urNp -x '*.orig' linux-4.9/drivers/atm/Kconfig linux-4.9/drivers/atm/Kconfig
+--- linux-4.9/drivers/atm/Kconfig      2021-02-24 15:42:15.767446799 +0100
++++ linux-4.9/drivers/atm/Kconfig      2021-02-24 15:42:29.767884184 +0100
+@@ -14,6 +14,14 @@ menuconfig ATM_DRIVERS
  
-+obj-$(CONFIG_ATM_DD)          += atmdd.o
- obj-$(CONFIG_ATM_TCP)         += atmtcp.o
- obj-$(CONFIG_ATM_FIRESTREAM)  += firestream.o
- obj-$(CONFIG_ATM_LANAI)               += lanai.o
-diff -urN linux-2.4.25/drivers/atm/Kconfig linux-2.4.25-atmdd/drivers/atm/Kconfig
---- linux-2.4.25/drivers/atm/Kcnfig    2003-08-25 13:44:41.000000000 +0200
-+++ linux-2.4.25-atmdd/drivers/atm/Kconfig     2004-02-29 22:52:59.000000000 +0100
-@@ -4,6 +4,14 @@
+ if ATM_DRIVERS && NETDEVICES && ATM
  
- menu "ATM drivers"
-       depends on NETDEVICES && ATM
-+
 +config ATM_DD
 +      tristate "ATM loopback"
 +      depends on INET && ATM
@@ -24,13 +12,25 @@ diff -urN linux-2.4.25/drivers/atm/Kconfig linux-2.4.25-atmdd/drivers/atm/Kconfi
 +        This is an example atm driver.  It does not require any actual ATM
 +        hardware.  It supports AAL5 and AAL0.  Frames are merely looped back
 +        to the sender on the same VC they were sent.
++
+ config ATM_DUMMY
+       tristate "Dummy ATM driver"
+       help
+diff -urNp -x '*.orig' linux-4.9/drivers/atm/Makefile linux-4.9/drivers/atm/Makefile
+--- linux-4.9/drivers/atm/Makefile     2016-12-11 20:17:54.000000000 +0100
++++ linux-4.9/drivers/atm/Makefile     2021-02-24 15:42:29.767884184 +0100
+@@ -25,6 +25,7 @@ ifeq ($(CONFIG_ATM_IDT77252_USE_SUNI),y)
+ endif
  
- config ATM_TCP
-       tristate "ATM over TCP"
-diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd.c
---- linux-2.4.25/drivers/atm/atmdd.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.25-atmdd/drivers/atm/atmdd.c     2004-02-29 22:58:11.000000000 +0100
-@@ -0,0 +1,920 @@
+ obj-$(CONFIG_ATM_DUMMY)               += adummy.o
++obj-$(CONFIG_ATM_DD)          += atmdd.o
+ obj-$(CONFIG_ATM_TCP)         += atmtcp.o
+ obj-$(CONFIG_ATM_FIRESTREAM)  += firestream.o
+ obj-$(CONFIG_ATM_LANAI)               += lanai.o
+diff -urNp -x '*.orig' linux-4.9/drivers/atm/atmdd.c linux-4.9/drivers/atm/atmdd.c
+--- linux-4.9/drivers/atm/atmdd.c      1970-01-01 01:00:00.000000000 +0100
++++ linux-4.9/drivers/atm/atmdd.c      2021-02-24 15:42:29.767884184 +0100
+@@ -0,0 +1,921 @@
 +/*
 +#######################################################################
 +#
@@ -64,7 +64,6 @@ diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd.
 +/*############ Includes ###############################################*/
 +
 +#include <linux/module.h>
-+#include <linux/config.h>
 +#include <linux/kernel.h>
 +#include <linux/errno.h>
 +#include <linux/atm.h>
@@ -171,8 +170,8 @@ diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd.
 +static int myatmdd_open(struct atm_vcc *vcc);
 +static void myatmdd_close(struct atm_vcc *vcc);
 +static int myatmdd_ioctl(struct atm_dev *dev, unsigned int cmd,void *arg);
-+static int myatmdd_setsockopt(struct atm_vcc *vcc,int level,int optname, void *optval,int optlen);
-+static int myatmdd_getsockopt(struct atm_vcc *vcc,int level,int optname, void *optval,int optlen);
++static int myatmdd_setsockopt(struct atm_vcc *vcc,int level,int optname, void __user *optval,unsigned int optlen);
++static int myatmdd_getsockopt(struct atm_vcc *vcc,int level,int optname, void __user *optval,int optlen);
 +static int myatmdd_send(struct atm_vcc *vcc,struct sk_buff *skb);
 +static int myatmdd_change_qos(struct atm_vcc *vcc,struct atm_qos *qos,int flgs);
 +static int myatmdd_proc_read(struct atm_dev *dev,loff_t *pos,char *page);
@@ -244,6 +243,7 @@ diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd.
 +    while ((skb = myatmdd_rxq_dequeue(&priv->rxqueue, &pkt_len)))
 +    {
 +        struct sk_buff *newskb;
++        struct timeval stamp;
 +
 +        /* Get a new skb to replace the one just consumed */
 +        if (!(newskb = dev_alloc_skb(AAL5_BUFLEN)))
@@ -275,7 +275,8 @@ diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd.
 +            atomic_inc(&vcc->stats->rx);
 +
 +            /* add timestamp for upper layers to use */
-+          do_gettimeofday(&skb->stamp);
++          do_gettimeofday(&stamp);
++          skb->tstamp = timeval_to_ktime(stamp);
 +        
 +            /* Point socket buffer at the right VCC before giving to socket layer */
 +            ATM_SKB(skb)->vcc = vcc;
@@ -788,12 +789,12 @@ diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd.
 +    return -EINVAL;
 +}
 +
-+static int myatmdd_getsockopt(struct atm_vcc *vcc,int level,int optname, void *optval,int optlen)
++static int myatmdd_getsockopt(struct atm_vcc *vcc,int level,int optname, void __user *optval,int optlen)
 +{
 +    return -EINVAL;
 +}
 +
-+static int myatmdd_setsockopt(struct atm_vcc *vcc,int level,int optname, void *optval,int optlen)
++static int myatmdd_setsockopt(struct atm_vcc *vcc,int level,int optname, void __user *optval,unsigned int optlen)
 +{
 +    return -EINVAL;
 +}
@@ -884,7 +885,7 @@ diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd.
 +        return -ENOMEM;
 +
 +    /* Register the new device */
-+    myatmdd_dev = atm_dev_register(MYATMDD,&myatmdd_ops,-1,NULL);
++    myatmdd_dev = atm_dev_register(MYATMDD,NULL,&myatmdd_ops,-1,NULL);
 +    
 +    /* Were we able to register this device? */
 +    if (myatmdd_dev == NULL)
This page took 0.031983 seconds and 4 git commands to generate.