summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-27 23:45:22 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-27 23:45:22 +0000
commit5b35aa5cd29bb111d847b2a2ed18110acbfb1f44 (patch)
treec7bbaa1137528330d3c74d14056ef7016a52be72 /include/net
parent511bcd7c5924ce9e98ad1cb851988f7448dfef0f (diff)
Merge with Linux 2.3.24.
Diffstat (limited to 'include/net')
-rw-r--r--include/net/irda/discovery.h4
-rw-r--r--include/net/irda/dongle.h52
-rw-r--r--include/net/irda/ircomm_core.h4
-rw-r--r--include/net/irda/ircomm_tty.h9
-rw-r--r--include/net/irda/irda.h74
-rw-r--r--include/net/irda/irda_device.h190
-rw-r--r--include/net/irda/iriap.h4
-rw-r--r--include/net/irda/irias_object.h6
-rw-r--r--include/net/irda/irlan_common.h4
-rw-r--r--include/net/irda/irlap.h38
-rw-r--r--include/net/irda/irlmp.h14
-rw-r--r--include/net/irda/irmod.h14
-rw-r--r--include/net/irda/irport.h34
-rw-r--r--include/net/irda/irqueue.h45
-rw-r--r--include/net/irda/irttp.h6
-rw-r--r--include/net/irda/irtty.h41
-rw-r--r--include/net/irda/pc87108.h20
-rw-r--r--include/net/irda/qos.h10
-rw-r--r--include/net/irda/timer.h9
-rw-r--r--include/net/irda/toshoboe.h11
-rw-r--r--include/net/irda/uircc.h4
-rw-r--r--include/net/irda/w83977af_ir.h16
-rw-r--r--include/net/irda/wrapper.h6
23 files changed, 302 insertions, 313 deletions
diff --git a/include/net/irda/discovery.h b/include/net/irda/discovery.h
index 4d0fe7157..90b8abd41 100644
--- a/include/net/irda/discovery.h
+++ b/include/net/irda/discovery.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Apr 6 16:53:53 1999
- * Modified at: Mon Aug 23 09:26:24 1999
+ * Modified at: Tue Oct 5 10:05:10 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
@@ -45,7 +45,7 @@
* The DISCOVERY structure is used for both discovery requests and responses
*/
typedef struct {
- QUEUE queue; /* Must be first! */
+ queue_t q; /* Must be first! */
__u32 saddr; /* Which link the device was discovered */
__u32 daddr; /* Remote device address */
diff --git a/include/net/irda/dongle.h b/include/net/irda/dongle.h
deleted file mode 100644
index fd7c7131f..000000000
--- a/include/net/irda/dongle.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*********************************************************************
- *
- * Filename: dongle.h
- * Version:
- * Description:
- * Status: Experimental.
- * Author: Dag Brattli <dagb@cs.uit.no>
- * Created at: Wed Oct 21 22:47:12 1998
- * Modified at: Sat Jun 26 16:58:44 1999
- * Modified by: Dag Brattli <dagb@cs.uit.no>
- *
- * Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * Neither Dag Brattli nor University of Tromsų admit liability nor
- * provide warranty for any of this software. This material is
- * provided "AS-IS" and at no charge.
- *
- ********************************************************************/
-
-#ifndef DONGLE_H
-#define DONGLE_H
-
-#include <net/irda/qos.h>
-
-/* These are the currently known dongles */
-typedef enum {
- TEKRAM_DONGLE,
- ESI_DONGLE,
- ACTISYS_DONGLE,
- ACTISYS_PLUS_DONGLE,
- GIRBIL_DONGLE,
- LITELINK_DONGLE,
- AIRPORT_DONGLE,
-} IRDA_DONGLE;
-
-struct irda_device;
-
-struct dongle {
- IRDA_DONGLE type;
- void (*open)(struct irda_device *, int type);
- void (*close)(struct irda_device *);
- void (*reset)( struct irda_device *);
- void (*change_speed)( struct irda_device *, __u32 speed);
- void (*qos_init)( struct irda_device *, struct qos_info *);
-};
-
-#endif
diff --git a/include/net/irda/ircomm_core.h b/include/net/irda/ircomm_core.h
index 0af1767fe..3e674fe14 100644
--- a/include/net/irda/ircomm_core.h
+++ b/include/net/irda/ircomm_core.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Wed Jun 9 08:58:43 1999
- * Modified at: Fri Aug 13 07:24:18 1999
+ * Modified at: Tue Oct 5 09:13:50 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
@@ -53,7 +53,7 @@ typedef struct {
} call_t;
struct ircomm_cb {
- QUEUE queue;
+ queue_t queue;
magic_t magic;
notify_t notify;
diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
index 500baba37..96cc04056 100644
--- a/include/net/irda/ircomm_tty.h
+++ b/include/net/irda/ircomm_tty.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Jun 6 23:24:22 1999
- * Modified at: Tue Aug 31 10:22:02 1999
+ * Modified at: Tue Oct 5 12:01:07 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
@@ -32,6 +32,8 @@
#define IRCOMM_TTY_H
#include <linux/serial.h>
+#include <linux/termios.h>
+#include <linux/timer.h>
#include <net/irda/irias_object.h>
#include <net/irda/ircomm_core.h>
@@ -46,7 +48,7 @@
* IrCOMM TTY driver state
*/
struct ircomm_tty_cb {
- QUEUE queue;
+ queue_t queue;
magic_t magic;
int state;
@@ -54,7 +56,6 @@ struct ircomm_tty_cb {
struct tty_struct *tty;
struct ircomm_cb *ircomm;
- struct sk_buff_head tx_queue; /* Frames to be transmitted */
struct sk_buff *tx_skb;
struct sk_buff *ctrl_skb;
@@ -64,7 +65,7 @@ struct ircomm_tty_cb {
__u8 service_type;
int line;
- int flags;
+ __u32 flags;
__u8 dlsap_sel;
__u8 slsap_sel;
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index 5e00eec7a..402cc0791 100644
--- a/include/net/irda/irda.h
+++ b/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 @@ extern __u32 irda_debug;
/* 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 @@ if(!(expr)) { \
* 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 @@ typedef __u32 magic_t;
#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,51 +155,19 @@ typedef union {
__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 */
typedef enum {
STATUS_OK,
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
index 5c5d2280e..d633d0e51 100644
--- a/include/net/irda/irda_device.h
+++ b/include/net/irda/irda_device.h
@@ -1,17 +1,16 @@
/*********************************************************************
*
* Filename: irda_device.h
- * Version:
- * Description:
+ * Version: 0.9
+ * Description: Contains various declarations used by the drivers
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Apr 14 12:41:42 1998
- * Modified at: Mon Sep 20 11:21:31 1999
+ * Modified at: Tue Oct 19 20:00:03 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
* Copyright (c) 1998 Thomas Davis, <ratbert@radiks.net>,
- * Copyright (c) 1998 Haris Zukanovic, <haris@stud.cs.uit.no>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -36,18 +35,13 @@
#include <linux/tty.h>
#include <linux/netdevice.h>
#include <linux/spinlock.h>
+#include <linux/irda.h>
#include <net/irda/irda.h>
#include <net/irda/qos.h>
-#include <net/irda/dongle.h>
#include <net/irda/irqueue.h>
#include <net/irda/irlap_frame.h>
-/* Some private IOCTL's */
-#define SIOCSDONGLE (SIOCDEVPRIVATE + 0)
-#define SIOCSBANDWIDTH (SIOCDEVPRIVATE + 1)
-#define SIOCSMEDIABUSY (SIOCDEVPRIVATE + 2)
-
/* Some non-standard interface flags (should not conflict with any in if.h) */
#define IFF_SIR 0x0001 /* Supports SIR speeds */
#define IFF_MIR 0x0002 /* Supports MIR speeds */
@@ -57,14 +51,74 @@
#define IFF_DMA 0x0020 /* Supports DMA transfer of data */
#define IFF_SHM 0x0040 /* Supports shared memory data transfers */
#define IFF_DONGLE 0x0080 /* Interface has a dongle attached */
-#define IFF_AIR 0x0100 /* Supports A(dvanced)IR standards */
+#define IFF_AIR 0x0100 /* Supports Advanced IR (AIR) standards */
#define IO_XMIT 0x01
#define IO_RECV 0x02
-struct dongle_q {
- QUEUE q;
- struct dongle *dongle;
+typedef enum {
+ IRDA_IRLAP, /* IrDA mode, and deliver to IrLAP */
+ IRDA_RAW, /* IrDA mode */
+ SHARP_ASK,
+ TV_REMOTE, /* Also known as Consumer Electronics IR */
+} INFRARED_MODE;
+
+typedef enum {
+ IRDA_TASK_INIT, /* All tasks are initialized with this state */
+ IRDA_TASK_DONE, /* Signals that the task is finished */
+ IRDA_TASK_WAIT,
+ IRDA_TASK_WAIT1,
+ IRDA_TASK_WAIT2,
+ IRDA_TASK_WAIT3,
+ IRDA_TASK_CHILD_INIT, /* Initializing child task */
+ IRDA_TASK_CHILD_WAIT, /* Waiting for child task to finish */
+ IRDA_TASK_CHILD_DONE /* Child task is finished */
+} TASK_STATE;
+
+struct irda_task;
+typedef int (*TASK_CALLBACK) (struct irda_task *task);
+
+struct irda_task {
+ queue_t q;
+ magic_t magic;
+
+ TASK_STATE state;
+ TASK_CALLBACK function;
+ TASK_CALLBACK finished;
+
+ /* struct net_device *dev; */
+ struct irda_task *parent;
+ struct timer_list timer;
+
+ void *instance; /* Instance being called */
+ void *param; /* Parameter to be used by instance */
+};
+
+/* Dongle info */
+struct dongle_reg;
+typedef struct {
+ struct dongle_reg *issue; /* Registration info */
+ struct net_device *dev; /* Device we are attached to */
+ __u32 speed; /* Current speed */
+
+ int busy;
+
+ /* Callbacks to the IrDA device driver */
+ int (*set_mode)(struct net_device *, int mode);
+ int (*read)(struct net_device *dev, __u8 *buf, int len);
+ int (*write)(struct net_device *dev, __u8 *buf, int len);
+ int (*set_dtr_rts)(struct net_device *dev, int dtr, int rts);
+} dongle_t;
+
+/* Dongle registration info */
+struct dongle_reg {
+ queue_t q; /* Must be first */
+ IRDA_DONGLE type;
+
+ void (*open)(dongle_t *dongle, struct qos_info *qos);
+ void (*close)(dongle_t *dongle);
+ int (*reset)(struct irda_task *task);
+ int (*change_speed)(struct irda_task *task);
};
/* Chip specific info */
@@ -79,7 +133,7 @@ struct chipio_t {
int irqflags; /* interrupt flags (ie, SA_SHIRQ|SA_INTERRUPT) */
int direction; /* Link direction, used by some FIR drivers */
- __u32 baudrate; /* Currently used baudrate */
+ __u32 speed; /* Currently used speed */
int dongle_id; /* Dongle or transceiver currently used */
};
@@ -95,87 +149,38 @@ struct iobuff_t {
int len; /* length of data */
int truesize; /* total size of buffer */
__u16 fcs;
-
- int flags; /* Allocation flags (GFP_KERNEL | GFP_DMA ) */
};
-/*
- * This structure contains data that _we_ would have liked to be in the device
- * structure, but we don't want to mess it up more than it is already. Better
- * to keep the data in separate structures! This structure abstracts common
- * stuff from IrDA port implementations.
- */
-struct irda_device {
- QUEUE q; /* Must be first */
- magic_t magic; /* Our magic bullet */
-
- char name[16]; /* Name of device "irda0" */
- char description[32]; /* Something like "irda0 <-> ttyS0" */
-
- struct irlap_cb *irlap; /* The link layer we are connected to */
- struct net_device netdev; /* Yes! we are some kind of netdevice */
- struct enet_statistics stats;
-
- __u32 flags; /* Interface flags (see defs above) */
-
- void *priv; /* Pointer to low level implementation */
-
- struct qos_info qos; /* QoS capabilities for this device */
-
- struct chipio_t io;
- struct iobuff_t tx_buff;
- struct iobuff_t rx_buff;
-
- struct dongle *dongle; /* Dongle driver */
-
- spinlock_t lock; /* For serializing operations */
-
- /* Media busy stuff */
- int media_busy;
- struct timer_list media_busy_timer;
-
- int raw_mode;
-
- /* Callbacks to driver specific implementations */
- void (*change_speed)(struct irda_device *idev, __u32 speed);
- int (*is_receiving)(struct irda_device *); /* receiving? */
- void (*set_dtr_rts)(struct irda_device *idev, int dtr, int rts);
- void (*set_raw_mode)(struct irda_device *dev, int mode);
- int (*raw_write)(struct irda_device *idev, __u8 *buf, int len);
- int (*raw_read)(struct irda_device *idev, __u8 *buf, int len,
- int timeout);
- void (*wait_until_sent)(struct irda_device *);
- void (*set_caddr)(struct irda_device *); /* Set connection addr */
-};
-
-extern hashbin_t *irda_device;
-
/* Function prototypes */
int irda_device_init(void);
void irda_device_cleanup(void);
-int irda_device_open(struct irda_device *, char *name, void *priv);
-void irda_device_close(struct irda_device *);
-
/* Interface to be uses by IrLAP */
void irda_device_set_media_busy(struct net_device *dev, int status);
int irda_device_is_media_busy(struct net_device *dev);
int irda_device_is_receiving(struct net_device *dev);
-struct qos_info *irda_device_get_qos(struct net_device *dev);
/* Interface for internal use */
-void irda_device_change_speed(struct irda_device *, int);
-int irda_device_txqueue_empty(struct irda_device *self);
-void irda_device_init_dongle(struct irda_device *self, int type);
-void irda_device_unregister_dongle(struct dongle *dongle);
-int irda_device_register_dongle(struct dongle *dongle);
-int irda_device_set_raw_mode(struct irda_device* self, int status);
+int irda_device_txqueue_empty(struct net_device *dev);
+int irda_device_set_raw_mode(struct net_device* self, int status);
+int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts);
int irda_device_setup(struct net_device *dev);
+/* Dongle interface */
+void irda_device_unregister_dongle(struct dongle_reg *dongle);
+int irda_device_register_dongle(struct dongle_reg *dongle);
+dongle_t *irda_device_dongle_init(struct net_device *dev, int type);
+int irda_device_dongle_cleanup(dongle_t *dongle);
+
void setup_dma(int channel, char *buffer, int count, int mode);
-int irda_device_net_open(struct net_device *dev);
-int irda_device_net_close(struct net_device *dev);
+int irda_task_kick(struct irda_task *task);
+int irda_task_execute(void *instance, TASK_CALLBACK function,
+ TASK_CALLBACK finished, struct irda_task *parent,
+ void *param);
+void irda_task_next_state(struct irda_task *task, TASK_STATE state);
+
+extern const char *infrared_mode[];
/*
* Function irda_get_mtt (skb)
@@ -197,21 +202,22 @@ extern inline __u16 irda_get_mtt(struct sk_buff *skb)
return mtt;
}
-extern inline void irda_device_set_dtr_rts(struct irda_device *self, int dtr,
- int rts)
+/*
+ * Function irda_get_speed (skb)
+ *
+ * Extact the speed this frame should be sent out with from the skb
+ *
+ */
+extern inline __u32 irda_get_speed(struct sk_buff *skb)
{
- if (self->set_dtr_rts)
- self->set_dtr_rts(self, dtr, rts);
-}
+ __u32 speed;
-extern inline int irda_device_raw_write(struct irda_device *self, __u8 *buf,
- int len)
-{
- int ret = -1;
+ if (((struct irda_skb_cb *)(skb->cb))->magic != LAP_MAGIC)
+ speed = 9600;
+ else
+ speed = ((struct irda_skb_cb *)(skb->cb))->speed;
- if (self->raw_write)
- ret = self->raw_write(self, buf, len);
- return ret;
+ return speed;
}
#endif
diff --git a/include/net/irda/iriap.h b/include/net/irda/iriap.h
index 994c49f61..9b3629fcf 100644
--- a/include/net/irda/iriap.h
+++ b/include/net/irda/iriap.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Thu Aug 21 00:02:07 1997
- * Modified at: Thu Jul 1 10:10:42 1999
+ * Modified at: Tue Oct 5 10:05:33 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1997, 1999 Dag Brattli <dagb@cs.uit.no>, All Rights Reserved.
@@ -57,7 +57,7 @@ typedef void (*CONFIRM_CALLBACK)(int result, __u16 obj_id,
struct ias_value *value, void *priv);
struct iriap_cb {
- QUEUE queue; /* Must be first */
+ queue_t q; /* Must be first */
magic_t magic; /* Magic cookie */
int mode; /* Client or server */
diff --git a/include/net/irda/irias_object.h b/include/net/irda/irias_object.h
index b057b2a4f..1b6f871e6 100644
--- a/include/net/irda/irias_object.h
+++ b/include/net/irda/irias_object.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Thu Oct 1 22:49:50 1998
- * Modified at: Thu Jul 1 11:37:15 1999
+ * Modified at: Tue Oct 5 10:45:21 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
@@ -38,7 +38,7 @@
* LM-IAS Object
*/
struct ias_object {
- QUEUE queue; /* Must be first! */
+ queue_t q; /* Must be first! */
magic_t magic;
char *name;
@@ -66,7 +66,7 @@ struct ias_value {
* Attributes used by LM-IAS objects
*/
struct ias_attrib {
- QUEUE queue; /* Must be first! */
+ queue_t q; /* Must be first! */
int magic;
char *name; /* Attribute name */
diff --git a/include/net/irda/irlan_common.h b/include/net/irda/irlan_common.h
index 236d27602..01c364ea2 100644
--- a/include/net/irda/irlan_common.h
+++ b/include/net/irda/irlan_common.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Aug 31 20:14:37 1997
- * Modified at: Mon May 31 13:54:20 1999
+ * Modified at: Tue Oct 5 11:35:42 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
@@ -159,7 +159,7 @@ struct irlan_provider_cb {
* IrLAN control block
*/
struct irlan_cb {
- QUEUE queue; /* Must be first */
+ queue_t q; /* Must be first */
int magic;
char ifname[9];
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h
index f21365188..8059956fa 100644
--- a/include/net/irda/irlap.h
+++ b/include/net/irda/irlap.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Mon Aug 4 20:40:53 1997
- * Modified at: Mon Sep 20 10:14:47 1999
+ * Modified at: Thu Oct 7 23:06:36 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
@@ -67,6 +67,7 @@
#define NS_INVALID -1
#ifdef CONFIG_IRDA_COMPRESSION
+
/*
* Just some shortcuts (may give you strange compiler errors if you change
* them :-)
@@ -78,7 +79,7 @@
#define irda_incomp (*self->decompressor.cp->incomp)
struct irda_compressor {
- QUEUE queue;
+ queue_t q;
struct compressor *cp;
void *state; /* Not used by IrDA */
@@ -87,7 +88,7 @@ struct irda_compressor {
/* Main structure of IrLAP */
struct irlap_cb {
- QUEUE q; /* Must be first */
+ queue_t q; /* Must be first */
magic_t magic;
struct net_device *netdev;
@@ -104,6 +105,10 @@ struct irlap_cb {
struct timer_list wd_timer;
struct timer_list backoff_timer;
+ /* Media busy stuff */
+ struct timer_list media_busy_timer;
+ int media_busy;
+
/* Timeouts which will be different with different turn time */
int slot_timeout;
int poll_timeout;
@@ -157,8 +162,9 @@ struct irlap_cb {
hashbin_t *discovery_log;
discovery_t *discovery_cmd;
- struct qos_info qos_tx; /* QoS requested by peer */
- struct qos_info qos_rx; /* QoS requested by self */
+ struct qos_info qos_tx; /* QoS requested by peer */
+ struct qos_info qos_rx; /* QoS requested by self */
+ struct qos_info *qos_dev; /* QoS supported by device */
notify_t notify; /* Callbacks to IrLMP */
@@ -166,8 +172,6 @@ struct irlap_cb {
int xbofs_delay; /* Nr of XBOF's used to MTT */
int bofs_count; /* Negotiated extra BOFs */
- struct irda_statistics stats;
-
#ifdef CONFIG_IRDA_COMPRESSION
struct irda_compressor compressor;
struct irda_compressor decompressor;
@@ -182,7 +186,7 @@ extern hashbin_t *irlap;
int irlap_init(void);
void irlap_cleanup(void);
-struct irlap_cb *irlap_open(struct net_device *dev);
+struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos);
void irlap_close(struct irlap_cb *self);
void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
@@ -191,10 +195,9 @@ void irlap_connect_response(struct irlap_cb *self, struct sk_buff *skb);
void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb);
void irlap_connect_confirm(struct irlap_cb *, struct sk_buff *skb);
-inline void irlap_data_indication(struct irlap_cb *, struct sk_buff *);
-inline void irlap_unit_data_indication(struct irlap_cb *, struct sk_buff *);
-inline void irlap_data_request(struct irlap_cb *, struct sk_buff *,
- int reliable);
+void irlap_data_indication(struct irlap_cb *, struct sk_buff *);
+void irlap_unit_data_indication(struct irlap_cb *, struct sk_buff *);
+void irlap_data_request(struct irlap_cb *, struct sk_buff *, int reliable);
void irlap_disconnect_request(struct irlap_cb *);
void irlap_disconnect_indication(struct irlap_cb *, LAP_REASON reason);
@@ -225,14 +228,7 @@ void irlap_apply_default_connection_parameters(struct irlap_cb *self);
void irlap_apply_connection_parameters(struct irlap_cb *, struct qos_info *);
void irlap_set_local_busy(struct irlap_cb *self, int status);
-extern inline __u8 irlap_get_header_size(struct irlap_cb *self)
-{
- return 2;
-}
-
-extern inline int irlap_get_tx_queue_len(struct irlap_cb *self)
-{
- return skb_queue_len(&self->tx_list);
-}
+#define IRLAP_GET_HEADER_SIZE(self) 2 /* Will be different when we get VFIR */
+#define IRLAP_GET_TX_QUEUE_LEN(self) skb_queue_len(&self->tx_list)
#endif
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
index 40024d38c..e1ba9ee65 100644
--- a/include/net/irda/irlmp.h
+++ b/include/net/irda/irlmp.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Aug 17 20:54:32 1997
- * Modified at: Thu Jul 8 13:44:20 1999
+ * Modified at: Tue Oct 5 15:20:56 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
@@ -78,13 +78,13 @@ typedef void (*DISCOVERY_CALLBACK1) (discovery_t *);
typedef void (*DISCOVERY_CALLBACK2) (hashbin_t *);
typedef struct {
- QUEUE queue; /* Must be first */
+ queue_t queue; /* Must be first */
__u16 hints; /* Hint bits */
} irlmp_service_t;
typedef struct {
- QUEUE queue; /* Must be first */
+ queue_t queue; /* Must be first */
__u16 hint_mask;
@@ -98,14 +98,12 @@ struct lap_cb; /* Forward decl. */
* Information about each logical LSAP connection
*/
struct lsap_cb {
- QUEUE queue; /* Must be first */
+ queue_t queue; /* Must be first */
magic_t magic;
int connected;
int persistent;
- struct irda_statistics stats;
-
__u8 slsap_sel; /* Source (this) LSAP address */
__u8 dlsap_sel; /* Destination LSAP address (if connected) */
@@ -124,7 +122,7 @@ struct lsap_cb {
* Information about each registred IrLAP layer
*/
struct lap_cb {
- QUEUE queue; /* Must be first */
+ queue_t queue; /* Must be first */
magic_t magic;
int reason; /* LAP disconnect reason */
@@ -248,7 +246,7 @@ static inline int irlmp_get_lap_tx_queue_len(struct lsap_cb *self)
ASSERT(self->lap != NULL, return 0;);
ASSERT(self->lap->irlap != NULL, return 0;);
- return irlap_get_tx_queue_len(self->lap->irlap);
+ return IRLAP_GET_TX_QUEUE_LEN(self->lap->irlap);
}
#endif
diff --git a/include/net/irda/irmod.h b/include/net/irda/irmod.h
index f80221fb8..ca5338edc 100644
--- a/include/net/irda/irmod.h
+++ b/include/net/irda/irmod.h
@@ -6,10 +6,10 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Mon Dec 15 13:58:52 1997
- * Modified at: Fri Apr 9 11:13:39 1999
+ * Modified at: Tue Oct 5 10:26:46 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1998 Dag Brattli, All Rights Reserved.
+ * Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -69,7 +69,7 @@ typedef void (*TODO_CALLBACK)( void *self, __u32 param);
* addtional information
*/
struct irda_event {
- QUEUE q; /* Must be first */
+ queue_t q; /* Must be first */
struct irmanager_event event;
};
@@ -78,7 +78,7 @@ struct irda_event {
* Funtions with needs to be called with a process context
*/
struct irda_todo {
- QUEUE q; /* Must be first */
+ queue_t q; /* Must be first */
void *self;
TODO_CALLBACK callback;
@@ -94,8 +94,8 @@ struct irda_cb {
int in_use;
- QUEUE *event_queue; /* Events queued for the irmanager */
- QUEUE *todo_queue; /* Todo list */
+ queue_t *event_queue; /* Events queued for the irmanager */
+ queue_t *todo_queue; /* Todo list */
};
int irmod_init_module(void);
@@ -110,7 +110,7 @@ void irmod_cleanup_module(void);
static inline int irda_lock(int *lock)
{
if (test_and_set_bit( 0, (void *) lock)) {
- DEBUG(3, __FUNCTION__
+ IRDA_DEBUG(3, __FUNCTION__
"(), Trying to lock, already locked variable!\n");
return FALSE;
}
diff --git a/include/net/irda/irport.h b/include/net/irda/irport.h
index 74d6133d8..789c4fce6 100644
--- a/include/net/irda/irport.h
+++ b/include/net/irda/irport.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Aug 3 13:49:59 1997
- * Modified at: Sat Jun 26 16:57:03 1999
+ * Modified at: Mon Oct 18 12:55:07 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1997, 1998-1999 Dag Brattli <dagb@cs.uit.no>
@@ -29,6 +29,7 @@
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/types.h>
+#include <linux/spinlock.h>
#include <net/irda/irda_device.h>
@@ -49,14 +50,35 @@
#define FRAME_MAX_SIZE 2048
-void irport_start(struct irda_device *idev, int iobase);
-void irport_stop(struct irda_device *idev, int iobase);
+struct irport_cb {
+ queue_t q; /* Must be first */
+ magic_t magic;
+
+ struct net_device *netdev; /* Yes! we are some kind of netdevice */
+ struct net_device_stats stats;
+
+ struct tty_struct *tty;
+ struct irlap_cb *irlap; /* The link layer we are binded to */
+
+ struct chipio_t io; /* IrDA controller information */
+ struct iobuff_t tx_buff; /* Transmit buffer */
+ struct iobuff_t rx_buff; /* Receive buffer */
+
+ struct qos_info qos; /* QoS capabilities for this device */
+ dongle_t *dongle; /* Dongle driver */
+
+ __u32 flags; /* Interface flags */
+
+ spinlock_t lock; /* For serializing operations */
+
+ int mode;
+};
+
+void irport_start(struct irport_cb *self, int iobase);
+void irport_stop(struct irport_cb *self, int iobase);
int irport_probe(int iobase);
-void irport_change_speed(struct irda_device *idev, __u32 speed);
void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-
int irport_hard_xmit(struct sk_buff *skb, struct net_device *dev);
-void irport_wait_until_sent(struct irda_device *idev);
#endif
diff --git a/include/net/irda/irqueue.h b/include/net/irda/irqueue.h
index 52ce2b9d7..3b5bfd492 100644
--- a/include/net/irda/irqueue.h
+++ b/include/net/irda/irqueue.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Jun 9 13:26:50 1998
- * Modified at: Thu Jul 1 10:18:21 1999
+ * Modified at: Thu Oct 7 13:25:16 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (C) 1998-1999, Aage Kvalnes <aage@cs.uit.no>
@@ -53,56 +53,49 @@
#define ALIGN __attribute__((aligned))
#endif
-typedef void (*FREE_FUNC)( void *arg);
+#define Q_NULL { NULL, NULL, "", 0 }
+
+typedef void (*FREE_FUNC)(void *arg);
/*
* Hashbin
*/
#define GET_HASHBIN(x) ( x & HASHBIN_MASK )
-#define QUEUE struct queue_t
-struct queue_t {
- QUEUE* q_next;
- QUEUE* q_prev;
+struct irqueue {
+ struct irqueue *q_next;
+ struct irqueue *q_prev;
- char q_name[ NAME_SIZE];
+ char q_name[NAME_SIZE];
__u32 q_hash;
};
+typedef struct irqueue queue_t;
typedef struct hashbin_t {
__u32 magic;
int hb_type;
int hb_size;
- spinlock_t hb_mutex[ HASHBIN_SIZE ] ALIGN;
- QUEUE* hb_queue[ HASHBIN_SIZE ] ALIGN;
+ spinlock_t hb_mutex[HASHBIN_SIZE] ALIGN;
+ queue_t *hb_queue[HASHBIN_SIZE] ALIGN;
- QUEUE* hb_current;
+ queue_t* hb_current;
} hashbin_t;
hashbin_t *hashbin_new(int type);
int hashbin_delete(hashbin_t* hashbin, FREE_FUNC func);
int hashbin_clear(hashbin_t* hashbin, FREE_FUNC free_func);
-void hashbin_insert(hashbin_t* hashbin, QUEUE* entry, __u32 hashv,
+void hashbin_insert(hashbin_t* hashbin, queue_t* entry, __u32 hashv,
char* name);
void* hashbin_find(hashbin_t* hashbin, __u32 hashv, char* name);
void* hashbin_remove(hashbin_t* hashbin, __u32 hashv, char* name);
void* hashbin_remove_first(hashbin_t *hashbin);
-QUEUE *hashbin_get_first(hashbin_t *hashbin);
-QUEUE *hashbin_get_next(hashbin_t *hashbin);
+queue_t *hashbin_get_first(hashbin_t *hashbin);
+queue_t *hashbin_get_next(hashbin_t *hashbin);
-void enqueue_last(QUEUE **queue, QUEUE* element);
-void enqueue_first(QUEUE **queue, QUEUE* element);
-QUEUE *dequeue_first(QUEUE **queue);
+void enqueue_last(queue_t **queue, queue_t* element);
+void enqueue_first(queue_t **queue, queue_t* element);
+queue_t *dequeue_first(queue_t **queue);
-/*
- * Function hashbin_get_size (hashbin)
- *
- * Returns the number of elements in the hashbin
- *
- */
-extern __inline__ int hashbin_get_size(hashbin_t* hashbin)
-{
- return hashbin->hb_size;
-}
+#define HASHBIN_GET_SIZE(hashbin) hashbin->hb_size
#endif
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h
index a44ab2b9f..ffe5b2ec9 100644
--- a/include/net/irda/irttp.h
+++ b/include/net/irda/irttp.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Aug 31 20:14:31 1997
- * Modified at: Mon Sep 27 11:38:01 1999
+ * Modified at: Tue Oct 5 15:17:14 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
@@ -63,7 +63,7 @@
* connection.
*/
struct tsap_cb {
- QUEUE queue; /* For linking it into the hashbin */
+ queue_t q; /* Must be first */
magic_t magic; /* Just in case */
__u8 stsap_sel; /* Source TSAP */
@@ -88,7 +88,7 @@ struct tsap_cb {
notify_t notify; /* Callbacks to client layer */
- struct irda_statistics stats;
+ struct net_device_stats stats;
struct timer_list todo_timer;
__u32 max_seg_size; /* Max data that fit into an IrLAP frame */
diff --git a/include/net/irda/irtty.h b/include/net/irda/irtty.h
index b04d093d1..5c418c355 100644
--- a/include/net/irda/irtty.h
+++ b/include/net/irda/irtty.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Dec 9 21:13:12 1997
- * Modified at: Thu Jul 1 10:13:02 1999
+ * Modified at: Mon Oct 18 23:24:31 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1997, 1999 Dag Brattli, All Rights Reserved.
@@ -28,29 +28,46 @@
#include <linux/if.h>
#include <linux/skbuff.h>
#include <linux/termios.h>
+#include <linux/netdevice.h>
#include <net/irda/irda.h>
#include <net/irda/irqueue.h>
#include <net/irda/irda_device.h>
+/* Used by ioctl */
+struct irtty_info {
+ char name[6];
+};
+
#define IRTTY_IOC_MAGIC 'e'
#define IRTTY_IOCTDONGLE _IO(IRTTY_IOC_MAGIC, 1)
-#define IRTTY_IOC_MAXNR 1
-
-#ifndef N_IRDA
-#define N_IRDA 11 /* This one should go in </asm/termio.h> */
-#endif
+#define IRTTY_IOCGET _IOR(IRTTY_IOC_MAGIC, 2, struct irtty_info)
+#define IRTTY_IOC_MAXNR 2
struct irtty_cb {
- QUEUE q; /* Must be first */
+ queue_t q; /* Must be first */
magic_t magic;
-
- struct tty_struct *tty;
- struct irda_device idev;
+
+ struct net_device *netdev; /* Yes! we are some kind of netdevice */
+ struct net_device_stats stats;
+
+ struct tty_struct *tty;
+ struct irlap_cb *irlap; /* The link layer we are binded to */
+
+ struct chipio_t io; /* IrDA controller information */
+ struct iobuff_t tx_buff; /* Transmit buffer */
+ struct iobuff_t rx_buff; /* Receive buffer */
+
+ struct qos_info qos; /* QoS capabilities for this device */
+ dongle_t *dongle; /* Dongle driver */
+
+ __u32 flags; /* Interface flags */
+
+ INFRARED_MODE mode;
};
-int irtty_register_dongle(struct dongle *dongle);
-void irtty_unregister_dongle(struct dongle *dongle);
+int irtty_register_dongle(struct dongle_reg *dongle);
+void irtty_unregister_dongle(struct dongle_reg *dongle);
#endif
diff --git a/include/net/irda/pc87108.h b/include/net/irda/pc87108.h
index 8be4feea1..7af5c0383 100644
--- a/include/net/irda/pc87108.h
+++ b/include/net/irda/pc87108.h
@@ -6,10 +6,10 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Fri Nov 13 14:37:40 1998
- * Modified at: Mon Jan 25 23:10:25 1999
+ * Modified at: Mon Oct 18 15:08:53 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1998 Dag Brattli <dagb@cs.uit.no>
+ * Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>
* Copyright (c) 1998 Lichen Wang, <lwang@actisys.com>
* Copyright (c) 1998 Actisys Corp., www.actisys.com
* All Rights Reserved
@@ -183,12 +183,22 @@ struct pc87108 {
int tx_buff_offsets[10]; /* Offsets between frames in tx_buff */
int tx_len; /* Number of frames in tx_buff */
- struct irda_device idev;
+ struct net_device *netdev; /* Yes! we are some kind of netdevice */
+ struct net_device_stats stats;
+
+ struct irlap_cb *irlap; /* The link layer we are binded to */
+
+ struct chipio_t io; /* IrDA controller information */
+ struct iobuff_t tx_buff; /* Transmit buffer */
+ struct iobuff_t rx_buff; /* Receive buffer */
+ struct qos_info qos; /* QoS capabilities for this device */
+
+ __u32 flags; /* Interface flags */
};
-static inline void switch_bank( int iobase, int bank)
+static inline void switch_bank(int iobase, int bank)
{
- outb( bank, iobase+BSR);
+ outb(bank, iobase+BSR);
}
#endif
diff --git a/include/net/irda/qos.h b/include/net/irda/qos.h
index 9f7876cf7..d99abe647 100644
--- a/include/net/irda/qos.h
+++ b/include/net/irda/qos.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Fri Sep 19 23:21:09 1997
- * Modified at: Mon Aug 16 10:00:18 1999
+ * Modified at: Tue Oct 5 11:51:37 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
@@ -69,7 +69,7 @@ typedef struct {
} qos_value_t;
struct qos_info {
- int magic;
+ magic_t magic;
qos_value_t baud_rate; /* IR_11520O | ... */
qos_value_t max_turn_time;
@@ -96,9 +96,9 @@ void irda_init_max_qos_capabilies(struct qos_info *qos);
void irda_qos_compute_intersection(struct qos_info *, struct qos_info *);
int msb_index(__u16 byte);
-__u32 byte_value(__u8 byte, int *array);
-int value_index(__u32 value, int *array);
-__u32 index_value(int index, int *array);
+__u32 byte_value(__u8 byte, __u32 *array);
+int value_index(__u32 value, __u32 *array);
+__u32 index_value(int index, __u32 *array);
void irda_qos_bits_to_value(struct qos_info *qos);
diff --git a/include/net/irda/timer.h b/include/net/irda/timer.h
index f9e598a09..af843bee3 100644
--- a/include/net/irda/timer.h
+++ b/include/net/irda/timer.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sat Aug 16 00:59:29 1997
- * Modified at: Wed Jun 23 22:56:51 1999
+ * Modified at: Thu Oct 7 12:25:24 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1997, 1998-1999 Dag Brattli <dagb@cs.uit.no>,
@@ -26,6 +26,8 @@
#ifndef TIMER_H
#define TIMER_H
+#include <linux/netdevice.h>
+
#include <asm/param.h> /* for HZ */
#include <net/irda/irda.h>
@@ -73,7 +75,7 @@ inline void irlap_start_final_timer(struct irlap_cb *self, int timeout);
inline void irlap_start_wd_timer(struct irlap_cb *self, int timeout);
inline void irlap_start_backoff_timer(struct irlap_cb *self, int timeout);
-inline void irda_device_start_mbusy_timer(struct irda_device *self);
+void irlap_start_mbusy_timer(struct irlap_cb *);
struct lsap_cb;
struct lap_cb;
@@ -81,8 +83,5 @@ inline void irlmp_start_watchdog_timer(struct lsap_cb *, int timeout);
inline void irlmp_start_discovery_timer(struct irlmp_cb *, int timeout);
inline void irlmp_start_idle_timer(struct lap_cb *, int timeout);
-struct irobex_cb;
-inline void irobex_start_watchdog_timer(struct irobex_cb *, int timeout);
-
#endif
diff --git a/include/net/irda/toshoboe.h b/include/net/irda/toshoboe.h
index dc2ea1269..40e781690 100644
--- a/include/net/irda/toshoboe.h
+++ b/include/net/irda/toshoboe.h
@@ -154,7 +154,16 @@ struct OboeTaskFile
struct toshoboe_cb
{
- struct irda_device idev; /*IRDA device */
+ struct net_device *netdev; /* Yes! we are some kind of netdevice */
+ struct net_device_stats stats;
+
+ struct irlap_cb *irlap; /* The link layer we are binded to */
+
+ struct chipio_t io; /* IrDA controller information */
+ struct qos_info qos; /* QoS capabilities for this device */
+
+ __u32 flags; /* Interface flags */
+
struct pci_dev *pdev; /*PCI device */
int base; /*IO base */
int txpending; /*how many tx's are pending */
diff --git a/include/net/irda/uircc.h b/include/net/irda/uircc.h
index adab0c74f..1a2bd6c00 100644
--- a/include/net/irda/uircc.h
+++ b/include/net/irda/uircc.h
@@ -108,9 +108,11 @@
#define UIRCC_SR13 0x0d /* Timer counter status (high byte) */
#define UIRCC_SR15 0x0f
+#include <net/irda/irda_device.h>
+
/* Private data for each instance */
struct uircc_cb {
- struct irda_device idev;
+ struct net_device idev;
__u8 cr3; /* Copy of register sr3 */
};
diff --git a/include/net/irda/w83977af_ir.h b/include/net/irda/w83977af_ir.h
index d86456ada..e94271e66 100644
--- a/include/net/irda/w83977af_ir.h
+++ b/include/net/irda/w83977af_ir.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Paul VanderSpek
* Created at: Thu Nov 19 13:55:34 1998
- * Modified at: Mon May 3 12:07:25 1999
+ * Modified at: Fri Oct 15 16:06:46 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
@@ -170,12 +170,22 @@ struct w83977af_ir {
int tx_buff_offsets[10]; /* Offsets between frames in tx_buff */
int tx_len; /* Number of frames in tx_buff */
- struct irda_device idev;
+ struct net_device *netdev; /* Yes! we are some kind of netdevice */
+ struct net_device_stats stats;
+
+ struct irlap_cb *irlap; /* The link layer we are binded to */
+
+ struct chipio_t io; /* IrDA controller information */
+ struct iobuff_t tx_buff; /* Transmit buffer */
+ struct iobuff_t rx_buff; /* Receive buffer */
+ struct qos_info qos; /* QoS capabilities for this device */
+
+ __u32 flags; /* Interface flags */
};
static inline void switch_bank( int iobase, int set)
{
- outb( set, iobase+SSR);
+ outb(set, iobase+SSR);
}
#endif
diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h
index fa7ceb25c..2b29d4c42 100644
--- a/include/net/irda/wrapper.h
+++ b/include/net/irda/wrapper.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Mon Aug 4 20:40:53 1997
- * Modified at: Mon May 3 09:02:36 1999
+ * Modified at: Thu Oct 7 11:40:25 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
@@ -28,6 +28,7 @@
#include <linux/types.h>
#include <linux/skbuff.h>
+#include <linux/netdevice.h>
#include <net/irda/irda_device.h>
@@ -51,6 +52,7 @@ enum {
/* Proto definitions */
int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize);
-inline void async_unwrap_char(struct irda_device *idev, __u8 byte);
+int async_bump(struct net_device *dev, __u8 *buf, int len);
+int async_unwrap_char(struct net_device *dev, struct iobuff_t *buf, __u8 byte);
#endif