X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=kernel-atmdd.patch;h=c0b9a3611047ce52e10508878a46e7343332e1b4;hb=b6e56b454b7fddfda6255279ee8d72ae124b0e23;hp=71fbbc8da08da822a646ec179507e45c0123d27c;hpb=a1f6652963eda420694c54c4bef354af5f1b9b90;p=packages%2Fkernel.git diff --git a/kernel-atmdd.patch b/kernel-atmdd.patch index 71fbbc8d..c0b9a361 100644 --- a/kernel-atmdd.patch +++ b/kernel-atmdd.patch @@ -1,36 +1,7 @@ -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 @@ - endif - - 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 -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 @@ - default y - - if ATM_DRIVERS && NETDEVICES && ATM -+ -+config ATM_DD -+ tristate "ATM loopback" -+ depends on INET && ATM -+ help -+ 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" -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,921 @@ +diff -urN linux-5.9/drivers.org/atm/atmdd.c linux-5.9/drivers/atm/atmdd.c +--- linux-5.9/drivers.org/atm/atmdd.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.9/drivers/atm/atmdd.c 2020-11-03 13:31:48.120071319 +0100 +@@ -0,0 +1,920 @@ +/* +####################################################################### +# @@ -170,8 +141,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_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); @@ -189,8 +160,8 @@ diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd. + open: myatmdd_open, + close: myatmdd_close, + ioctl: myatmdd_ioctl, -+ getsockopt: myatmdd_getsockopt, -+ setsockopt: myatmdd_setsockopt, ++ ++ + send: myatmdd_send, + change_qos: myatmdd_change_qos, + proc_read: myatmdd_proc_read, @@ -243,7 +214,6 @@ 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,8 +245,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(&stamp); -+ skb->tstamp = timeval_to_ktime(stamp); ++ ktime_t kt = ktime_get_real(); ++ skb->tstamp = kt; + + /* Point socket buffer at the right VCC before giving to socket layer */ + ATM_SKB(skb)->vcc = vcc; @@ -690,8 +660,8 @@ diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd. +# myatmdd_open(), +# myatmdd_close(), +# myatmdd_ioctl(), -+# myatmdd_getsockopt(), -+# myatmdd_setsockopt(), ++ ++ +# myatmdd_send(), +# myatmdd_sg_send(), +# myatmdd_change_qos(), @@ -789,15 +759,15 @@ 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) -+{ -+ return -EINVAL; -+} + -+static int myatmdd_setsockopt(struct atm_vcc *vcc,int level,int optname, void *optval,int optlen) -+{ -+ return -EINVAL; -+} ++ ++ ++ ++ ++ ++ ++ ++ + +/* Note may be called in either process or interrupt context! */ +static int myatmdd_send(struct atm_vcc *vcc,struct sk_buff *skb) @@ -952,3 +922,32 @@ diff -urN linux-2.4.25/drivers/atm/atmdd.c linux-2.4.25-atmdd/drivers/atm/atmdd. +module_exit(myatmdd_exit); + +#endif /* MODULE */ +diff -urN linux-5.9/drivers.org/atm/Kconfig linux-5.9/drivers/atm/Kconfig +--- linux-5.9/drivers.org/atm/Kconfig 2020-10-11 23:15:50.000000000 +0200 ++++ linux-5.9/drivers/atm/Kconfig 2020-11-03 13:31:48.120071319 +0100 +@@ -15,6 +15,14 @@ + + if ATM_DRIVERS && NETDEVICES && ATM + ++config ATM_DD ++ tristate "ATM loopback" ++ depends on INET && ATM ++ help ++ 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 -urN linux-5.9/drivers.org/atm/Makefile linux-5.9/drivers/atm/Makefile +--- linux-5.9/drivers.org/atm/Makefile 2020-10-11 23:15:50.000000000 +0200 ++++ linux-5.9/drivers/atm/Makefile 2020-11-03 13:31:48.120071319 +0100 +@@ -26,6 +26,7 @@ + endif + + 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