summaryrefslogtreecommitdiffstats
path: root/include/net/irda
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-18 22:06:10 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-18 22:06:10 +0000
commitaba4e552a2f2c1492441acbccedd8e0a4c53f916 (patch)
tree23921efb2b4af590160f034a89ff3da2ecca6e47 /include/net/irda
parent9e17e1aa1cf1cb497d2f67147a51831888affcf3 (diff)
Merge with Linux 2.3.43.
Diffstat (limited to 'include/net/irda')
-rw-r--r--include/net/irda/ircomm_tty.h4
-rw-r--r--include/net/irda/irda.h4
-rw-r--r--include/net/irda/irda_device.h28
-rw-r--r--include/net/irda/irmod.h4
-rw-r--r--include/net/irda/irport.h8
-rw-r--r--include/net/irda/irtty.h11
-rw-r--r--include/net/irda/nsc-ircc.h (renamed from include/net/irda/nsc_fir.h)79
-rw-r--r--include/net/irda/smc-ircc.h237
-rw-r--r--include/net/irda/toshoboe.h28
-rw-r--r--include/net/irda/w83977af_ir.h12
-rw-r--r--include/net/irda/wrapper.h6
11 files changed, 219 insertions, 202 deletions
diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
index 121e4e796..3946ebb98 100644
--- a/include/net/irda/ircomm_tty.h
+++ b/include/net/irda/ircomm_tty.h
@@ -6,10 +6,10 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Jun 6 23:24:22 1999
- * Modified at: Sun Dec 12 15:57:38 1999
+ * Modified at: Fri Jan 28 13:16:57 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1999 Dag Brattli, All Rights Reserved.
+ * Copyright (c) 1999-2000 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
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index 4222d5fa1..3bb5e4e77 100644
--- a/include/net/irda/irda.h
+++ b/include/net/irda/irda.h
@@ -6,10 +6,10 @@
* Status: Stable
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Dec 9 21:13:12 1997
- * Modified at: Sat Dec 25 18:58:49 1999
+ * Modified at: Fri Jan 28 13:16:32 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
+ * Copyright (c) 1998-2000 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
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
index 04502f0e4..5d71dc6ef 100644
--- a/include/net/irda/irda_device.h
+++ b/include/net/irda/irda_device.h
@@ -6,10 +6,10 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Apr 14 12:41:42 1998
- * Modified at: Mon Dec 13 12:05:31 1999
+ * Modified at: Fri Jan 14 10:46:56 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1999 Dag Brattli, All Rights Reserved.
+ * Copyright (c) 1999-2000 Dag Brattli, All Rights Reserved.
* Copyright (c) 1998 Thomas Davis, <ratbert@radiks.net>,
*
* This program is free software; you can redistribute it and/or
@@ -121,23 +121,27 @@ struct dongle_reg {
};
/* Chip specific info */
-struct chipio_t {
- int iobase, iobase2; /* IO base */
- int io_ext, io_ext2; /* Length of iobase */
- int membase; /* Shared memory base */
+typedef struct {
+ int cfg_base; /* Config register IO base */
+ int sir_base; /* SIR IO base */
+ int fir_base; /* FIR IO base */
+ int mem_base; /* Shared memory base */
+ int sir_ext; /* Length of SIR iobase */
+ int fir_ext; /* Length of FIR iobase */
int irq, irq2; /* Interrupts used */
+ int dma, dma2; /* DMA channel(s) used */
int fifo_size; /* FIFO size */
-
- int dma, dma2; /* DMA channel used */
int irqflags; /* interrupt flags (ie, SA_SHIRQ|SA_INTERRUPT) */
int direction; /* Link direction, used by some FIR drivers */
-
+ int enabled; /* Powered on? */
+ int suspended; /* Suspended by APM */
__u32 speed; /* Currently used speed */
+ __u32 new_speed; /* Speed we must change to when Tx is finished */
int dongle_id; /* Dongle or transceiver currently used */
-};
+} chipio_t;
/* IO buffer specific info (inspired by struct sk_buff) */
-struct iobuff_t {
+typedef struct {
int state; /* Receiving state (transmit state not used) */
int in_frame; /* True if receiving frame */
@@ -148,7 +152,7 @@ struct iobuff_t {
int len; /* length of data */
int truesize; /* total size of buffer */
__u16 fcs;
-};
+} iobuff_t;
/* Function prototypes */
int irda_device_init(void);
diff --git a/include/net/irda/irmod.h b/include/net/irda/irmod.h
index 64a0a2272..ae61c8682 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: Sun Oct 31 20:01:17 1999
+ * Modified at: Fri Jan 28 13:15:24 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
+ * Copyright (c) 1998-2000 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
diff --git a/include/net/irda/irport.h b/include/net/irda/irport.h
index e79b45339..23b1a244f 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: Mon Jan 3 10:23:34 2000
+ * Modified at: Fri Jan 14 10:21:10 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1997, 1998-2000 Dag Brattli <dagb@cs.uit.no>
@@ -56,9 +56,9 @@ struct irport_cb {
struct irlap_cb *irlap; /* The link layer we are attached to */
- struct chipio_t io; /* IrDA controller information */
- struct iobuff_t tx_buff; /* Transmit buffer */
- struct iobuff_t rx_buff; /* Receive buffer */
+ chipio_t io; /* IrDA controller information */
+ iobuff_t tx_buff; /* Transmit buffer */
+ iobuff_t rx_buff; /* Receive buffer */
struct qos_info qos; /* QoS capabilities for this device */
dongle_t *dongle; /* Dongle driver */
diff --git a/include/net/irda/irtty.h b/include/net/irda/irtty.h
index 5a37ae5a7..f96976bc3 100644
--- a/include/net/irda/irtty.h
+++ b/include/net/irda/irtty.h
@@ -6,10 +6,10 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Dec 9 21:13:12 1997
- * Modified at: Sun Nov 21 21:19:35 1999
+ * Modified at: Tue Jan 25 09:10:18 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1997, 1999 Dag Brattli, All Rights Reserved.
+ * Copyright (c) 1997, 1999-2000 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
@@ -55,15 +55,14 @@ struct irtty_cb {
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 */
+ chipio_t io; /* IrDA controller information */
+ iobuff_t tx_buff; /* Transmit buffer */
+ iobuff_t rx_buff; /* Receive buffer */
struct qos_info qos; /* QoS capabilities for this device */
dongle_t *dongle; /* Dongle driver */
__u32 new_speed;
-
__u32 flags; /* Interface flags */
INFRARED_MODE mode;
diff --git a/include/net/irda/nsc_fir.h b/include/net/irda/nsc-ircc.h
index bbfb4d724..75e5c2bc7 100644
--- a/include/net/irda/nsc_fir.h
+++ b/include/net/irda/nsc-ircc.h
@@ -1,12 +1,12 @@
/*********************************************************************
*
- * Filename: nsc_fir.h
+ * Filename: nsc-ircc.h
* Version:
* Description:
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Fri Nov 13 14:37:40 1998
- * Modified at: Wed Jan 5 12:00:16 2000
+ * Modified at: Sun Jan 23 17:47:00 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-2000 Dag Brattli <dagb@cs.uit.no>
@@ -25,21 +25,31 @@
*
********************************************************************/
-#ifndef NSC_FIR_H
-#define NSC_FIR_H
+#ifndef NSC_IRCC_H
+#define NSC_IRCC_H
#include <linux/time.h>
#include <linux/spinlock.h>
#include <asm/io.h>
-#define PC87108 0x10
-#define PC97338 0xb0
-
/* DMA modes needed */
#define DMA_TX_MODE 0x08 /* Mem to I/O, ++, demand. */
#define DMA_RX_MODE 0x04 /* I/O to mem, ++, demand. */
+/* Config registers for the '108 */
+#define CFG_BAIC 0x00
+#define CFG_CSRT 0x01
+#define CFG_MCTL 0x02
+
+/* Config registers for the '338 */
+#define CFG_FER 0x00
+#define CFG_FAR 0x01
+#define CFG_PTR 0x02
+#define CFG_PNP0 0x1b
+#define CFG_PNP1 0x1c
+#define CFG_PNP3 0x4f
+
/* Flags for configuration register CRF0 */
#define APEDCRC 0x02
#define ENBNKSEL 0x01
@@ -174,14 +184,32 @@
#define IRM_CR_IRX_MSL 0x40
#define IRM_CR_AF_MNT 0x80 /* Automatic format */
+/* NSC chip information */
+struct nsc_chip {
+ char *name; /* Name of chipset */
+ int cfg[3]; /* Config registers */
+ u_int8_t cid_index; /* Chip identification index reg */
+ u_int8_t cid_value; /* Chip identification expected value */
+ u_int8_t cid_mask; /* Chip identification revision mask */
+
+ /* Functions for probing and initializing the specific chip */
+ int (*probe)(struct nsc_chip *chip, chipio_t *info);
+ int (*init)(struct nsc_chip *chip, chipio_t *info);
+};
+typedef struct nsc_chip nsc_chip_t;
+
/* For storing entries in the status FIFO */
struct st_fifo_entry {
int status;
int len;
};
+#define MAX_TX_WINDOW 7
+#define MAX_RX_WINDOW 7
+
struct st_fifo {
- struct st_fifo_entry entries[10];
+ struct st_fifo_entry entries[MAX_RX_WINDOW];
+ int pending_bytes;
int head;
int tail;
int len;
@@ -192,42 +220,39 @@ struct frame_cb {
int len; /* Lenght of frame in DMA mem */
};
-#define MAX_WINDOW 7
-
struct tx_fifo {
- struct frame_cb queue[MAX_WINDOW]; /* Info about frames in queue */
- int ptr; /* Currently being sent */
- int len; /* Lenght of queue */
- int free; /* Next free slot */
- void *tail; /* Next free start in DMA mem */
+ struct frame_cb queue[MAX_TX_WINDOW]; /* Info about frames in queue */
+ int ptr; /* Currently being sent */
+ int len; /* Lenght of queue */
+ int free; /* Next free slot */
+ void *tail; /* Next free start in DMA mem */
};
/* Private data for each instance */
-struct nsc_fir_cb {
+struct nsc_ircc_cb {
struct st_fifo st_fifo; /* Info about received frames */
struct tx_fifo tx_fifo; /* Info about frames to be transmitted */
- int tx_buff_offsets[10]; /* Offsets between frames in tx_buff */
- int tx_len; /* Number of frames in tx_buff */
-
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 */
+
+ chipio_t io; /* IrDA controller information */
+ iobuff_t tx_buff; /* Transmit buffer */
+ iobuff_t rx_buff; /* Receive buffer */
+
+ __u8 ier; /* Interrupt enable register */
- struct timeval stamp;
- struct timeval now;
+ struct timeval stamp;
+ struct timeval now;
spinlock_t lock; /* For serializing operations */
__u32 flags; /* Interface flags */
__u32 new_speed;
- int suspend;
+ int index; /* Instance index */
};
static inline void switch_bank(int iobase, int bank)
@@ -235,4 +260,4 @@ static inline void switch_bank(int iobase, int bank)
outb(bank, iobase+BSR);
}
-#endif /* NSC_FIR_H */
+#endif /* NSC_IRCC_H */
diff --git a/include/net/irda/smc-ircc.h b/include/net/irda/smc-ircc.h
index e5df56bc0..cac7644ca 100644
--- a/include/net/irda/smc-ircc.h
+++ b/include/net/irda/smc-ircc.h
@@ -35,135 +35,142 @@
#include <net/irda/irport.h>
/* DMA modes needed */
-#define DMA_TX_MODE 0x08 /* Mem to I/O, ++, demand. */
-#define DMA_RX_MODE 0x04 /* I/O to mem, ++, demand. */
+#define DMA_TX_MODE 0x08 /* Mem to I/O, ++, demand. */
+#define DMA_RX_MODE 0x04 /* I/O to mem, ++, demand. */
-#define IRCC_MASTER 0x07
-#define IRCC_MASTER_POWERDOWN 1<<7
-#define IRCC_MASTER_RESET 1<<6
-#define IRCC_MASTER_INT_EN 1<<5
-#define IRCC_MASTER_ERROR_RESET 1<<4
+/* Master Control Register */
+#define IRCC_MASTER 0x07
+#define IRCC_MASTER_POWERDOWN 0x80
+#define IRCC_MASTER_RESET 0x40
+#define IRCC_MASTER_INT_EN 0x20
+#define IRCC_MASTER_ERROR_RESET 0x10
/* Register block 0 */
-#define IRCC_IIR 0x01
-#define IRCC_IER 0x02
-#define IRCC_LSR 0x03
-#define IRCC_LCR_A 0x04
-#define IRCC_LCR_B 0x05
-#define IRCC_BSR 0x06
-
-#define IRCC_IIR_ACTIVE_FRAME 1<<7
-#define IRCC_IIR_EOM 1<<6
-#define IRCC_IIR_RAW_MODE 1<<5
-#define IRCC_IIR_FIFO 1<<4
-
-#define IRCC_IER_ACTIVE_FRAME 1<<7
-#define IRCC_IER_EOM 1<<6
-#define IRCC_IER_RAW_MODE 1<<5
-#define IRCC_IER_FIFO 1<<4
-
-#define IRCC_LSR_UNDERRUN 1<<7
-#define IRCC_LSR_OVERRUN 1<<6
-#define IRCC_LSR_FRAME_ERROR 1<<5
-#define IRCC_LSR_SIZE_ERROR 1<<4
-#define IRCC_LSR_CRC_ERROR 1<<3
-#define IRCC_LSR_FRAME_ABORT 1<<2
-
-#define IRCC_LCR_A_FIFO_RESET 1<<7
-#define IRCC_LCR_A_FAST 1<<6
-#define IRCC_LCR_A_GP_DATA 1<<5
-#define IRCC_LCR_A_RAW_TX 1<<4
-#define IRCC_LCR_A_RAW_RX 1<<3
-#define IRCC_LCR_A_ABORT 1<<2
-#define IRCC_LCR_A_DATA_DONE 1<<1
-
-#define IRCC_LCR_B_SCE_DISABLED 0x00<<6
-#define IRCC_LCR_B_SCE_TRANSMIT 0x01<<6
-#define IRCC_LCR_B_SCE_RECEIVE 0x02<<6
-#define IRCC_LCR_B_SCE_UNDEFINED 0x03<<6
-#define IRCC_LCR_B_SIP_ENABLE 1<<5
-#define IRCC_LCR_B_BRICK_WALL 1<<4
-
-#define IRCC_BSR_NOT_EMPTY 1<<7
-#define IRCC_BSR_FIFO_FULL 1<<6
-#define IRCC_BSR_TIMEOUT 1<<5
+
+/* Interrupt Identification */
+#define IRCC_IIR 0x01
+#define IRCC_IIR_ACTIVE_FRAME 0x80
+#define IRCC_IIR_EOM 0x40
+#define IRCC_IIR_RAW_MODE 0x20
+#define IRCC_IIR_FIFO 0x10
+
+/* Interrupt Enable */
+#define IRCC_IER 0x02
+#define IRCC_IER_ACTIVE_FRAME 0x80
+#define IRCC_IER_EOM 0x40
+#define IRCC_IER_RAW_MODE 0x20
+#define IRCC_IER_FIFO 0x10
+
+/* Line Status Register */
+#define IRCC_LSR 0x03
+#define IRCC_LSR_UNDERRUN 0x80
+#define IRCC_LSR_OVERRUN 0x40
+#define IRCC_LSR_FRAME_ERROR 0x20
+#define IRCC_LSR_SIZE_ERROR 0x10
+#define IRCC_LSR_CRC_ERROR 0x80
+#define IRCC_LSR_FRAME_ABORT 0x40
+
+/* Line Control Register A */
+#define IRCC_LCR_A 0x04
+#define IRCC_LCR_A_FIFO_RESET 0x80
+#define IRCC_LCR_A_FAST 0x40
+#define IRCC_LCR_A_GP_DATA 0x20
+#define IRCC_LCR_A_RAW_TX 0x10
+#define IRCC_LCR_A_RAW_RX 0x08
+#define IRCC_LCR_A_ABORT 0x04
+#define IRCC_LCR_A_DATA_DONE 0x02
+
+/* Line Control Register B */
+#define IRCC_LCR_B 0x05
+#define IRCC_LCR_B_SCE_DISABLED 0x00
+#define IRCC_LCR_B_SCE_TRANSMIT 0x40
+#define IRCC_LCR_B_SCE_RECEIVE 0x80
+#define IRCC_LCR_B_SCE_UNDEFINED 0xc0
+#define IRCC_LCR_B_SIP_ENABLE 0x20
+#define IRCC_LCR_B_BRICK_WALL 0x10
+
+/* Bus Status Register */
+#define IRCC_BSR 0x06
+#define IRCC_BSR_NOT_EMPTY 0x80
+#define IRCC_BSR_FIFO_FULL 0x40
+#define IRCC_BSR_TIMEOUT 0x20
/* Register block 1 */
-#define IRCC_SCE_CFGA 0x00
-#define IRCC_SCE_CFGB 0x01
-#define IRCC_FIFO_THRESHOLD 0x02
-
-#define IRCC_CFGA_AUX_IR 0x01<<7
-#define IRCC_CFGA_HALF_DUPLEX 0x01<<2
-#define IRCC_CFGA_TX_POLARITY 0x01<<1
-#define IRCC_CFGA_RX_POLARITY 0x01
-
-#define IRCC_CFGA_COM 0x00<<3
-#define IRCC_CFGA_IRDA_SIR_A 0x01<<3
-#define IRCC_CFGA_ASK_SIR 0x02<<3
-#define IRCC_CFGA_IRDA_SIR_B 0x03<<3
-#define IRCC_CFGA_IRDA_HDLC 0x04<<3
-#define IRCC_CFGA_IRDA_4PPM 0x05<<3
-#define IRCC_CFGA_CONSUMER 0x06<<3
-#define IRCC_CFGA_RAW_IR 0x07<<3
-#define IRCC_CFGA_OTHER 0x08<<3
-
-#define IRCC_IR_HDLC 0x04
-#define IRCC_IR_4PPM 0x01
-#define IRCC_IR_CONSUMER 0x02
-
-#define IRCC_CFGB_LOOPBACK 0x01<<5
-#define IRCC_CFGB_LPBCK_TX_CRC 0x01<<4
-#define IRCC_CFGB_NOWAIT 0x01<<3
-#define IRCC_CFGB_STRING_MOVE 0x01<<2
-#define IRCC_CFGB_DMA_BURST 0x01<<1
-#define IRCC_CFGB_DMA_ENABLE 0x01
-
-#define IRCC_CFGB_COM 0x00<<6
-#define IRCC_CFGB_IR 0x01<<6
-#define IRCC_CFGB_AUX 0x02<<6
-#define IRCC_CFGB_INACTIVE 0x03<<6
+
+#define IRCC_FIFO_THRESHOLD 0x02
+
+#define IRCC_SCE_CFGA 0x00
+#define IRCC_CFGA_AUX_IR 0x80
+#define IRCC_CFGA_HALF_DUPLEX 0x04
+#define IRCC_CFGA_TX_POLARITY 0x02
+#define IRCC_CFGA_RX_POLARITY 0x01
+
+#define IRCC_CFGA_COM 0x00
+#define IRCC_CFGA_IRDA_SIR_A 0x08
+#define IRCC_CFGA_ASK_SIR 0x10
+#define IRCC_CFGA_IRDA_SIR_B 0x18
+#define IRCC_CFGA_IRDA_HDLC 0x20
+#define IRCC_CFGA_IRDA_4PPM 0x28
+#define IRCC_CFGA_CONSUMER 0x30
+#define IRCC_CFGA_RAW_IR 0x38
+#define IRCC_CFGA_OTHER 0x40
+
+#define IRCC_IR_HDLC 0x04
+#define IRCC_IR_4PPM 0x01
+#define IRCC_IR_CONSUMER 0x02
+
+#define IRCC_SCE_CFGB 0x01
+#define IRCC_CFGB_LOOPBACK 0x20
+#define IRCC_CFGB_LPBCK_TX_CRC 0x10
+#define IRCC_CFGB_NOWAIT 0x08
+#define IRCC_CFGB_STRING_MOVE 0x04
+#define IRCC_CFGB_DMA_BURST 0x02
+#define IRCC_CFGB_DMA_ENABLE 0x01
+
+#define IRCC_CFGB_MUX_COM 0x00
+#define IRCC_CFGB_MUX_IR 0x40
+#define IRCC_CFGB_MUX_AUX 0x80
+#define IRCC_CFGB_MUX_INACTIVE 0xc0
/* Register block 3 - Identification Registers! */
-#define IRCC_ID_HIGH 0x00 /* 0x10 */
-#define IRCC_ID_LOW 0x01 /* 0xB8 */
-#define IRCC_CHIP_ID 0x02 /* 0xF1 */
-#define IRCC_VERSION 0x03 /* 0x01 */
-#define IRCC_INTERFACE 0x04 /* low 4 = DMA, high 4 = IRQ */
+#define IRCC_ID_HIGH 0x00 /* 0x10 */
+#define IRCC_ID_LOW 0x01 /* 0xB8 */
+#define IRCC_CHIP_ID 0x02 /* 0xF1 */
+#define IRCC_VERSION 0x03 /* 0x01 */
+#define IRCC_INTERFACE 0x04 /* low 4 = DMA, high 4 = IRQ */
/* Register block 4 - IrDA */
-#define IRCC_CONTROL 0x00
-#define IRCC_BOF_COUNT_LO 0x01
-#define IRCC_BRICKWALL_CNT_LO 0x02
-#define IRCC_BRICKWALL_TX_CNT_HI 0x03
-#define IRCC_TX_SIZE_LO 0x04
-#define IRCC_RX_SIZE_HI 0x05
-#define IRCC_RX_SIZE_LO 0x06
-
-#define IRCC_1152 0x01<<7
-#define IRCC_CRC 0x01<<6
-
-/* For storing entries in the status FIFO */
-struct st_fifo_entry {
- int status;
- int len;
-};
-
-struct st_fifo {
- struct st_fifo_entry entries[10];
- int head;
- int tail;
- int len;
+#define IRCC_CONTROL 0x00
+#define IRCC_BOF_COUNT_LO 0x01 /* Low byte */
+#define IRCC_BOF_COUNT_HI 0x00 /* High nibble (bit 0-3) */
+#define IRCC_BRICKWALL_CNT_LO 0x02 /* Low byte */
+#define IRCC_BRICKWALL_CNT_HI 0x03 /* High nibble (bit 4-7) */
+#define IRCC_TX_SIZE_LO 0x04 /* Low byte */
+#define IRCC_TX_SIZE_HI 0x03 /* High nibble (bit 0-3) */
+#define IRCC_RX_SIZE_HI 0x05 /* High nibble (bit 0-3) */
+#define IRCC_RX_SIZE_LO 0x06 /* Low byte */
+
+#define IRCC_1152 0x80
+#define IRCC_CRC 0x40
+
+struct smc_chip {
+ char *name;
+ unsigned char entr1;
+ unsigned char entr2;
+ unsigned char cid_index;
+ unsigned char cid_value;
+ int (*probe)(struct smc_chip *chip, chipio_t *info);
};
+typedef struct smc_chip smc_chip_t;
/* Private data for each instance */
struct ircc_cb {
- struct net_device *netdev; /* Yes! we are some kind of netdevice */
+ struct net_device *netdev; /* Yes! we are some kind of netdevice */
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 */
+ chipio_t io; /* IrDA controller information */
+ iobuff_t tx_buff; /* Transmit buffer */
+ iobuff_t rx_buff; /* Receive buffer */
struct irport_cb *irport;
@@ -172,8 +179,6 @@ struct ircc_cb {
__u32 new_speed;
__u32 flags; /* Interface flags */
- struct st_fifo st_fifo;
-
int tx_buff_offsets[10]; /* Offsets between frames in tx_buff */
int tx_len; /* Number of frames in tx_buff */
};
diff --git a/include/net/irda/toshoboe.h b/include/net/irda/toshoboe.h
index 96d9f2ec5..9bf4fb9c3 100644
--- a/include/net/irda/toshoboe.h
+++ b/include/net/irda/toshoboe.h
@@ -8,7 +8,7 @@
* Author: James McKenzie <james@fishsoup.dhs.org>
* Created at: Sat May 8 12:35:27 1999
*
- * Copyright (c) 1999 James McKenzie, All Rights Reserved.
+ * Copyright (c) 1999-2000 James McKenzie, 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
@@ -23,22 +23,6 @@
*
********************************************************************/
-/*
- * $Log: toshoboe.h,v $
- * Revision 1.4 1999/06/29 13:46:42 root
- * ls
- *
- * Revision 1.3 1999/06/29 12:31:03 root
- * *** empty log message ***
- *
- * Revision 1.2 1999/05/09 01:43:08 root
- * *** empty log message ***
- *
- * Revision 1.1 1999/05/09 01:25:58 root
- * Initial revision
- *
- */
-
#ifndef TOSHOBOE_H
#define TOSHOBOE_H
@@ -154,15 +138,15 @@ struct OboeTaskFile
struct toshoboe_cb
{
- struct net_device *netdev; /* Yes! we are some kind of netdevice */
+ 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 irlap_cb *irlap; /* The link layer we are binded to */
+ struct qos_info qos; /* QoS capabilities for this device */
- struct chipio_t io; /* IrDA controller information */
- struct qos_info qos; /* QoS capabilities for this device */
+ chipio_t io; /* IrDA controller information */
- __u32 flags; /* Interface flags */
+ __u32 flags; /* Interface flags */
__u32 new_speed;
struct pci_dev *pdev; /*PCI device */
diff --git a/include/net/irda/w83977af_ir.h b/include/net/irda/w83977af_ir.h
index afd04bf86..795f24fb9 100644
--- a/include/net/irda/w83977af_ir.h
+++ b/include/net/irda/w83977af_ir.h
@@ -6,10 +6,10 @@
* Status: Experimental.
* Author: Paul VanderSpek
* Created at: Thu Nov 19 13:55:34 1998
- * Modified at: Mon Nov 8 10:00:40 1999
+ * Modified at: Tue Jan 11 13:08:19 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
+ * Copyright (c) 1998-2000 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
@@ -174,11 +174,11 @@ struct w83977af_ir {
struct net_device_stats stats;
struct irlap_cb *irlap; /* The link layer we are binded to */
+ struct qos_info qos; /* QoS capabilities for this device */
- 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 */
+ chipio_t io; /* IrDA controller information */
+ iobuff_t tx_buff; /* Transmit buffer */
+ iobuff_t rx_buff; /* Receive buffer */
__u32 flags; /* Interface flags */
__u32 new_speed;
diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h
index 3d931b353..5dc0b0d16 100644
--- a/include/net/irda/wrapper.h
+++ b/include/net/irda/wrapper.h
@@ -6,10 +6,10 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Mon Aug 4 20:40:53 1997
- * Modified at: Thu Nov 4 14:25:54 1999
+ * Modified at: Tue Jan 11 12:37:29 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
+ * Copyright (c) 1998-2000 Dag Brattli <dagb@cs.uit.no>,
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
@@ -55,6 +55,6 @@ int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize);
void async_bump(struct net_device *dev, struct net_device_stats *stats,
__u8 *buf, int len);
void async_unwrap_char(struct net_device *dev, struct net_device_stats *stats,
- struct iobuff_t *buf, __u8 byte);
+ iobuff_t *buf, __u8 byte);
#endif