patch-2.3.24 linux/include/net/irda/irda.h

Next file: linux/include/net/irda/irda_device.h
Previous file: linux/include/net/irda/ircomm_tty.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.23/linux/include/net/irda/irda.h linux/include/net/irda/irda.h
@@ -2,11 +2,11 @@
  *                
  * Filename:      irda.h
  * Version:       
- * Description:   
+ * Description:   IrDA common include file for kernel internal use
  * Status:        Experimental.
  * Author:        Dag Brattli <dagb@cs.uit.no>
  * Created at:    Tue Dec  9 21:13:12 1997
- * Modified at:   Mon Sep 27 11:13:18 1999
+ * Modified at:   Tue Oct 19 21:12:54 1999
  * Modified by:   Dag Brattli <dagb@cs.uit.no>
  * 
  *     Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
@@ -28,6 +28,10 @@
 #include <linux/config.h>
 #include <linux/skbuff.h>
 #include <linux/kernel.h>
+#include <linux/if.h>
+#include <linux/irda.h>
+
+typedef __u32 magic_t;
 
 #include <net/irda/qos.h>
 #include <net/irda/irqueue.h>
@@ -40,12 +44,16 @@
 #define FALSE 0
 #endif
 
-#ifndef MIN
-#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#ifndef IRDA_MIN /* Lets not mix this MIN with other header files */
+#define IRDA_MIN(a, b) (((a) < (b)) ? (a) : (b))
 #endif
 
-#define ALIGN __attribute__((aligned))
-#define PACK __attribute__((packed))
+#ifndef ALIGN
+#  define ALIGN __attribute__((aligned))
+#endif
+#ifndef PACK
+#  define PACK __attribute__((packed))
+#endif
 
 
 #ifdef CONFIG_IRDA_DEBUG
@@ -55,14 +63,14 @@
 /* use 0 for production, 1 for verification, >2 for debug */
 #define IRDA_DEBUG_LEVEL 0
 
-#define DEBUG(n, args...) (irda_debug >= (n)) ? (printk(KERN_DEBUG args)) : 0
+#define IRDA_DEBUG(n, args...) (irda_debug >= (n)) ? (printk(KERN_DEBUG args)) : 0
 #define ASSERT(expr, func) \
 if(!(expr)) { \
         printk( "Assertion failed! %s,%s,%s,line=%d\n",\
         #expr,__FILE__,__FUNCTION__,__LINE__); \
         ##func}
 #else
-#define DEBUG(n, args...)
+#define IRDA_DEBUG(n, args...)
 #define ASSERT(expr, func)
 #endif /* CONFIG_IRDA_DEBUG */
 
@@ -76,7 +84,6 @@
  *  Magic numbers used by Linux-IrDA. Random numbers which must be unique to 
  *  give the best protection
  */
-typedef __u32 magic_t;
 
 #define IRTTY_MAGIC        0x2357
 #define LAP_MAGIC          0x1357
@@ -92,6 +99,7 @@
 #define IRLAN_MAGIC        0x754
 #define IAS_OBJECT_MAGIC   0x34234
 #define IAS_ATTRIB_MAGIC   0x45232
+#define IRDA_TASK_MAGIC    0x38423
 
 #define IAS_DEVICE_ID 0x5342 
 #define IAS_PNP_ID    0xd342
@@ -147,49 +155,17 @@
 	__u8  byte[2];
 } __u16_host_order;
 
-/* Per-packet information we need to hide inside sk_buff */
+/* 
+ * Per-packet information we need to hide inside sk_buff 
+ * (must not exceed 48 bytes, check with struct sk_buff) 
+ */
 struct irda_skb_cb {
 	magic_t magic;     /* Be sure that we can trust the information */
-	int     mtt;       /* minimum turn around time */
-	int     xbofs;     /* number of xbofs required, used by SIR mode */
-	int     line;      /* Used by IrCOMM in IrLPT mode */
-	void    *instance; /* Used by IrTTP */
+	__u32   speed;     /* The Speed this frame should be sent with */
+	__u16     mtt;     /* Minimum turn around time */
+	int     xbofs;     /* Number of xbofs required, used by SIR mode */
+	__u8     line;     /* Used by IrCOMM in IrLPT mode */
 	void (*destructor)(struct sk_buff *skb); /* Used for flow control */
-};
-
-/*
- *  Information monitored by some layers
- */
-struct irda_statistics
-{
-        int     rx_packets;             /* total packets received       */
-        int     tx_packets;             /* total packets transmitted    */
-        int     rx_errors;              /* bad packets received         */
-        int     tx_errors;              /* packet transmit problems     */
-        int     rx_dropped;             /* no space in linux buffers    */
-        int     tx_dropped;             /* no space available in linux  */
-	int     rx_compressed;
-	int     tx_compressed;
-	int     rx_bytes;               /* total bytes received         */
-	int     tx_bytes;               /* total bytes transmitted      */
-
-        int     multicast;              /* multicast packets received   */
-        int     collisions;
-	
-        /* detailed rx_errors: */
-        int     rx_length_errors;
-        int     rx_over_errors;         /* receiver ring buff overflow  */
-        int     rx_crc_errors;          /* recved pkt with crc error    */
-        int     rx_frame_errors;        /* recv'd frame alignment error */
-        int     rx_fifo_errors;         /* recv'r fifo overrun          */
-        int     rx_missed_errors;       /* receiver missed packet       */
-
-        /* detailed tx_errors */
-        int     tx_aborted_errors;
-        int     tx_carrier_errors;
-        int     tx_fifo_errors;
-        int     tx_heartbeat_errors;
-        int     tx_window_errors;
 };
 
 /* Misc status information */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)