Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / linux / hdlc.h
index 4b92547..df695e9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Generic HDLC support routines for Linux
  *
- * Copyright (C) 1999-2003 Krzysztof Halasa <khc@pm.waw.pl>
+ * Copyright (C) 1999-2005 Krzysztof Halasa <khc@pm.waw.pl>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License
@@ -41,6 +41,7 @@
 #define LMI_NONE               1 /* No LMI, all PVCs are static */
 #define LMI_ANSI               2 /* ANSI Annex D */
 #define LMI_CCITT              3 /* ITU-T Annex A */
+#define LMI_CISCO              4 /* The "original" LMI, aka Gang of Four */
 
 #define HDLC_MAX_MTU 1500      /* Ethernet 1500 bytes */
 #define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */
@@ -89,6 +90,7 @@ typedef struct pvc_device_struct {
                unsigned int deleted: 1;
                unsigned int fecn: 1;
                unsigned int becn: 1;
+               unsigned int bandwidth; /* Cisco LMI reporting only */
        }state;
 }pvc_device;
 
@@ -134,7 +136,7 @@ typedef struct hdlc_device_struct {
                        int dce_pvc_count;
 
                        struct timer_list timer;
-                       int last_poll;
+                       unsigned long last_poll;
                        int reliable;
                        int dce_changed;
                        int request;
@@ -149,8 +151,9 @@ typedef struct hdlc_device_struct {
                        cisco_proto settings;
 
                        struct timer_list timer;
-                       int last_poll;
+                       unsigned long last_poll;
                        int up;
+                       int request_sent;
                        u32 txseq; /* TX sequence number */
                        u32 rxseq; /* RX sequence number */
                }cisco;
@@ -239,14 +242,18 @@ static __inline__ struct net_device_stats *hdlc_stats(struct net_device *dev)
 }
 
 
-static __inline__ unsigned short hdlc_type_trans(struct sk_buff *skb,
-                                                struct net_device *dev)
+static __inline__ __be16 hdlc_type_trans(struct sk_buff *skb,
+                                        struct net_device *dev)
 {
-       hdlc_device *hdlc = dev_to_hdlc(skb->dev);
+       hdlc_device *hdlc = dev_to_hdlc(dev);
+
+       skb->mac.raw  = skb->data;
+       skb->dev      = dev;
+
        if (hdlc->proto.type_trans)
                return hdlc->proto.type_trans(skb, dev);
        else
-               return __constant_htons(ETH_P_HDLC);
+               return htons(ETH_P_HDLC);
 }
 
 #endif /* __KERNEL */