From 748d718685f1cb18e83b96f8113e0835266b3a18 Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Fri, 17 Mar 2000 10:43:56 +0000 Subject: [PATCH] 2.3.99 contains MPPP constants which cause a warning because we redefine them in include/linux/isdn_ppp.h So from now on we use the generic PPP constants, change is backwards compatible, though --- drivers/isdn/isdn_ppp.c | 13 ++++++++----- include/linux/isdn_compat.h | 4 ++++ include/linux/isdn_ppp.h | 6 ++++-- v2.2.13.ctrl | 2 ++ v2.2.ctrl | 2 ++ v2.3.ctrl | 2 ++ 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/isdn/isdn_ppp.c b/drivers/isdn/isdn_ppp.c index 35ed2f1b..42616eb7 100644 --- a/drivers/isdn/isdn_ppp.c +++ b/drivers/isdn/isdn_ppp.c @@ -19,6 +19,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log$ + * Revision 1.63 2000/03/16 15:46:37 kai + * a little bugfix and cosmetic changes + * * Revision 1.62 2000/02/12 19:26:55 kai * adopted to latest 2.3 softnet changes. * @@ -1191,7 +1194,7 @@ void isdn_ppp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buf int sqno_end; if(is->compflags & SC_LINK_DECOMP_ON) { - if(proto == PPP_LINK_COMP) { + if(proto == PPP_COMPFRAG) { if(is->debug & 0x10) printk(KERN_DEBUG "received single link compressed frame\n"); skb = isdn_ppp_decompress(skb,is,NULL,proto); @@ -1454,7 +1457,7 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff #endif break; case PPP_CCP: - case PPP_LINK_CCP: + case PPP_CCPFRAG: isdn_ppp_receive_ccp(net_dev,lp,skb,proto); /* Dont pop up ResetReq/Ack stuff to the daemon any longer - the job is done already */ @@ -2608,7 +2611,7 @@ static struct sk_buff *isdn_ppp_decompress(struct sk_buff *skb,struct ippp_struc int proto) { #ifndef CONFIG_ISDN_CCP - if(proto == PPP_COMP || proto == PPP_LINK_COMP) { + if(proto == PPP_COMP || proto == PPP_COMPFRAG) { printk(KERN_ERR "isdn_ppp: Ouch! Compression not included!\n"); dev_kfree_skb(skb); return NULL; @@ -2664,7 +2667,7 @@ static struct sk_buff *isdn_ppp_decompress(struct sk_buff *skb,struct ippp_struc printk(KERN_DEBUG "ippp: Decompress valid!\n"); */ - if((master && proto == PPP_COMP) || (!master && proto == PPP_LINK_COMP) ) { + if((master && proto == PPP_COMP) || (!master && proto == PPP_COMPFRAG) ) { /* Set up reset params for the decompressor */ memset(&rsparm, 0, sizeof(rsparm)); rsparm.data = rsdata; @@ -2936,7 +2939,7 @@ static void isdn_ppp_send_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, struct } proto = ((int)data[0]<<8)+data[1]; - if(proto != PPP_CCP && proto != PPP_LINK_CCP) + if(proto != PPP_CCP && proto != PPP_CCPFRAG) return; printk(KERN_DEBUG "Received CCP frame from daemon:\n"); diff --git a/include/linux/isdn_compat.h b/include/linux/isdn_compat.h index 4eae693b..09e82824 100644 --- a/include/linux/isdn_compat.h +++ b/include/linux/isdn_compat.h @@ -159,5 +159,9 @@ static inline unsigned long copy_to_user(void *to, const void *from, unsigned lo #define devfs_unregister_chrdev(m,n) unregister_chrdev(m,n) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,99) +#define COMPAT_NEED_MPPP_DEFS +#endif + #endif /* __KERNEL__ */ #endif /* _LINUX_ISDN_COMPAT_H */ diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h index 9ca7dc7c..3a288643 100644 --- a/include/linux/isdn_ppp.h +++ b/include/linux/isdn_ppp.h @@ -30,9 +30,11 @@ struct pppcallinfo #define PPPIOCSCOMPRESSOR _IOW('t',135,int) #define PPPIOCGIFNAME _IOR('t',136, char [IFNAMSIZ] ) +#ifdef COMPAT_NEED_MPPP_DEFS #define PPP_MP 0x003d -#define PPP_LINK_COMP 0x00fb -#define PPP_LINK_CCP 0x80fb +#define PPP_COMPFRAG 0x00fb +#define PPP_CCPFRAG 0x80fb +#endif #define SC_MP_PROT 0x00000200 #define SC_REJ_MP_PROT 0x00000400 diff --git a/v2.2.13.ctrl b/v2.2.13.ctrl index 4f991d1c..4281e007 100644 --- a/v2.2.13.ctrl +++ b/v2.2.13.ctrl @@ -51,3 +51,5 @@ #undef HAVE_DEVFS_FS #define devfs_register_chrdev(m,n,f) register_chrdev(m,n,f) #define devfs_unregister_chrdev(m,n) unregister_chrdev(m,n) + +#define COMPAT_NEED_MPPP_DEFS diff --git a/v2.2.ctrl b/v2.2.ctrl index 9354185d..3235d3ae 100644 --- a/v2.2.ctrl +++ b/v2.2.ctrl @@ -51,3 +51,5 @@ #undef HAVE_DEVFS_FS #define devfs_register_chrdev(m,n,f) register_chrdev(m,n,f) #define devfs_unregister_chrdev(m,n) unregister_chrdev(m,n) + +#define COMPAT_NEED_MPPP_DEFS diff --git a/v2.3.ctrl b/v2.3.ctrl index 58b9de2c..6a60a34f 100644 --- a/v2.3.ctrl +++ b/v2.3.ctrl @@ -46,3 +46,5 @@ #define BIG_PHONE_NUMBERS #undef COMPAT_NO_SOFTNET #define HAVE_DEVFS_FS + +#undef COMPAT_NEED_MPPP_DEFS