From f969d69ba9f952e5bdd38278e25e26a3e4a61a70 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 29 Jan 2000 01:41:54 +0000 Subject: Merge with 2.3.27. --- include/net/irda/ircomm_tty.h | 4 +- include/net/irda/irda.h | 6 +- include/net/irda/iriap.h | 18 ++++-- include/net/irda/iriap_event.h | 31 +++++----- include/net/irda/irlan_common.h | 4 +- include/net/irda/irmod.h | 10 ++-- include/net/irda/irport.h | 7 +-- include/net/irda/smc-ircc.h | 22 ++++++- include/net/irda/uircc.h | 125 ---------------------------------------- include/net/irda/wrapper.h | 8 ++- 10 files changed, 69 insertions(+), 166 deletions(-) delete mode 100644 include/net/irda/uircc.h (limited to 'include/net/irda') diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h index 96cc04056..44b53bcd6 100644 --- a/include/net/irda/ircomm_tty.h +++ b/include/net/irda/ircomm_tty.h @@ -6,7 +6,7 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Sun Jun 6 23:24:22 1999 - * Modified at: Tue Oct 5 12:01:07 1999 + * Modified at: Sun Oct 31 19:50:35 1999 * Modified by: Dag Brattli * * Copyright (c) 1999 Dag Brattli, All Rights Reserved. @@ -76,6 +76,8 @@ struct ircomm_tty_cb { __u32 max_data_size; __u32 max_header_size; + struct iriap_cb *iriap; + struct ias_object* obj; int skey; int ckey; diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 402cc0791..e3af20884 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h @@ -6,7 +6,7 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Tue Dec 9 21:13:12 1997 - * Modified at: Tue Oct 19 21:12:54 1999 + * Modified at: Sun Oct 31 14:45:20 1999 * Modified by: Dag Brattli * * Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved. @@ -116,7 +116,6 @@ struct irda_sock { __u32 saddr; /* my local address */ __u32 daddr; /* peer address */ - struct ias_object *ias_obj; struct tsap_cb *tsap; /* TSAP used by this connection */ __u8 dtsap_sel; /* remote TSAP address */ __u8 stsap_sel; /* local TSAP address */ @@ -133,6 +132,9 @@ struct irda_sock { __u32 ckey; /* IrLMP client handle */ __u32 skey; /* IrLMP service handle */ + struct ias_object *ias_obj; + struct iriap_cb *iriap; + int nslots; /* Number of slots to use for discovery */ int errno; diff --git a/include/net/irda/iriap.h b/include/net/irda/iriap.h index 9b3629fcf..dedd444bf 100644 --- a/include/net/irda/iriap.h +++ b/include/net/irda/iriap.h @@ -6,10 +6,11 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Thu Aug 21 00:02:07 1997 - * Modified at: Tue Oct 5 10:05:33 1999 + * Modified at: Sun Oct 31 15:51:32 1999 * Modified by: Dag Brattli * - * Copyright (c) 1997, 1999 Dag Brattli , All Rights Reserved. + * Copyright (c) 1997-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 @@ -79,7 +80,7 @@ struct iriap_cb { IRIAP_STATE r_connect_state; CONFIRM_CALLBACK confirm; - void *priv; + void *priv; /* Used to identify client */ __u8 max_header_size; @@ -88,9 +89,14 @@ struct iriap_cb { int iriap_init(void); void iriap_cleanup(void); -void iriap_getvaluebyclass_request(char *name, char *attr, - __u32 saddr, __u32 daddr, - CONFIRM_CALLBACK callback, void *priv); + +struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv, + CONFIRM_CALLBACK callback); +void iriap_close(struct iriap_cb *self); + +int iriap_getvaluebyclass_request(struct iriap_cb *self, + __u32 saddr, __u32 daddr, + char *name, char *attr); void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb); void iriap_send_ack( struct iriap_cb *self); diff --git a/include/net/irda/iriap_event.h b/include/net/irda/iriap_event.h index e99f319a3..4ca3d2071 100644 --- a/include/net/irda/iriap_event.h +++ b/include/net/irda/iriap_event.h @@ -6,10 +6,10 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Mon Aug 4 20:40:53 1997 - * Modified at: Fri Sep 4 13:19:28 1998 + * Modified at: Sun Oct 31 22:02:54 1999 * Modified by: Dag Brattli * - * 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 @@ -65,20 +65,21 @@ typedef enum { IAP_LM_CONNECT_CONFIRM, } IRIAP_EVENT; -void iriap_next_client_state ( struct iriap_cb *self, IRIAP_STATE state); -void iriap_next_call_state ( struct iriap_cb *self, IRIAP_STATE state); -void iriap_next_server_state ( struct iriap_cb *self, IRIAP_STATE state); -void iriap_next_r_connect_state( struct iriap_cb *self, IRIAP_STATE state); +void iriap_next_client_state (struct iriap_cb *self, IRIAP_STATE state); +void iriap_next_call_state (struct iriap_cb *self, IRIAP_STATE state); +void iriap_next_server_state (struct iriap_cb *self, IRIAP_STATE state); +void iriap_next_r_connect_state(struct iriap_cb *self, IRIAP_STATE state); -void iriap_do_client_event( struct iriap_cb *self, IRIAP_EVENT event, - struct sk_buff *skb); -void iriap_do_call_event ( struct iriap_cb *self, IRIAP_EVENT event, - struct sk_buff *skb); +void iriap_do_client_event(struct iriap_cb *self, IRIAP_EVENT event, + struct sk_buff *skb); +void iriap_do_call_event (struct iriap_cb *self, IRIAP_EVENT event, + struct sk_buff *skb); -void iriap_do_server_event ( struct iriap_cb *self, IRIAP_EVENT event, - struct sk_buff *skb); -void iriap_do_r_connect_event( struct iriap_cb *self, IRIAP_EVENT event, - struct sk_buff *skb); +void iriap_do_server_event (struct iriap_cb *self, IRIAP_EVENT event, + struct sk_buff *skb); +void iriap_do_r_connect_event(struct iriap_cb *self, IRIAP_EVENT event, + struct sk_buff *skb); + +#endif /* IRIAP_FSM_H */ -#endif diff --git a/include/net/irda/irlan_common.h b/include/net/irda/irlan_common.h index 01c364ea2..67cc761c8 100644 --- a/include/net/irda/irlan_common.h +++ b/include/net/irda/irlan_common.h @@ -6,7 +6,7 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Sun Aug 31 20:14:37 1997 - * Modified at: Tue Oct 5 11:35:42 1999 + * Modified at: Sun Oct 31 19:41:24 1999 * Modified by: Dag Brattli * * Copyright (c) 1998-1999 Dag Brattli , @@ -127,6 +127,8 @@ struct irlan_client_cb { int tx_busy; struct sk_buff_head txq; /* Transmit control queue */ + struct iriap_cb *iriap; + struct timer_list kick_timer; }; diff --git a/include/net/irda/irmod.h b/include/net/irda/irmod.h index ca5338edc..64a0a2272 100644 --- a/include/net/irda/irmod.h +++ b/include/net/irda/irmod.h @@ -6,7 +6,7 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Mon Dec 15 13:58:52 1997 - * Modified at: Tue Oct 5 10:26:46 1999 + * Modified at: Sun Oct 31 20:01:17 1999 * Modified by: Dag Brattli * * Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved. @@ -42,10 +42,10 @@ typedef enum { EVENT_REQUEST_MODULE, EVENT_IRLAN_START, EVENT_IRLAN_STOP, - EVENT_IRLPT_START, - EVENT_IRLPT_STOP, - EVENT_IROBEX_START, - EVENT_IROBEX_STOP, + EVENT_IRLPT_START, /* Obsolete */ + EVENT_IRLPT_STOP, /* Obsolete */ + EVENT_IROBEX_START, /* Obsolete */ + EVENT_IROBEX_STOP, /* Obsolete */ EVENT_IRDA_STOP, EVENT_NEED_PROCESS_CONTEXT, } IRMGR_EVENT; diff --git a/include/net/irda/irport.h b/include/net/irda/irport.h index 789c4fce6..d02bc92b0 100644 --- a/include/net/irda/irport.h +++ b/include/net/irda/irport.h @@ -6,7 +6,7 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Sun Aug 3 13:49:59 1997 - * Modified at: Mon Oct 18 12:55:07 1999 + * Modified at: Sat Oct 30 19:54:07 1999 * Modified by: Dag Brattli * * Copyright (c) 1997, 1998-1999 Dag Brattli @@ -51,13 +51,9 @@ #define FRAME_MAX_SIZE 2048 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 */ @@ -78,6 +74,7 @@ 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 irport_cb *self, __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); diff --git a/include/net/irda/smc-ircc.h b/include/net/irda/smc-ircc.h index 2c5cbf4fd..0bb336b93 100644 --- a/include/net/irda/smc-ircc.h +++ b/include/net/irda/smc-ircc.h @@ -1,6 +1,6 @@ /********************************************************************* * - * Filename: smc.h + * Filename: smc-ircc.h * Version: * Description: * Status: Experimental. @@ -21,6 +21,8 @@ * ********************************************************************/ +#include + #ifndef SMC_IRCC_H #define SMC_IRCC_H @@ -149,12 +151,26 @@ struct st_fifo { /* Private data for each instance */ struct ircc_cb { + 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 */ + + struct irport_cb irport; + + __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 */ + int tx_len; /* Number of frames in tx_buff */ + - struct irda_device idev; }; #endif diff --git a/include/net/irda/uircc.h b/include/net/irda/uircc.h deleted file mode 100644 index 1a2bd6c00..000000000 --- a/include/net/irda/uircc.h +++ /dev/null @@ -1,125 +0,0 @@ -/********************************************************************* - * - * Filename: uircc.h - * Version: 0.1 - * Description: Driver for the Sharp Universal Infrared - * Communications Controller (UIRCC) - * Status: Experimental. - * Author: Dag Brattli - * Created at: Sat Dec 26 11:00:49 1998 - * Modified at: Thu Mar 11 01:37:20 1999 - * Modified by: Dag Brattli - * - * Copyright (c) 1998 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 UIRCC_H -#define UIRCC_H - -/* Control registers (write only) */ -#define UIRCC_CR0 0x00 /* Control register 0 */ -#define UIRCC_CR0_XMIT_RST 0x20 /* Transmit reset */ -#define UIRCC_CR0_RECV_RST 0x10 /* Receive reset */ -#define UIRCC_CR0_TMR_RST 0x08 /* Timer reset */ -#define UIRCC_CR0_SYS_RST 0x04 /* System reset */ -#define UIRCC_CR0_CARR_RST 0x02 /* Carrier latch reset */ -#define UIRCC_CR0_CNT_SWT 0x01 /* Transmit/receive length counter reset */ - -#define UIRCC_CR1 0x01 /* Transmit/receive mode setting register */ -#define UIRCC_CR1_RX_DMA 0x80 /* Rx DMA mode */ -#define UIRCC_CR1_TX_DMA 0x20 /* Tx DMA mode */ -#define UIRCC_CR1_DMA_BRST 0x10 /* DMA burst mode */ -#define UIRCC_CR1_MUST_SET 0x0c /* Must be set */ - -#define UIRCC_CR2 0x02 /* Interrupt mask register */ -#define UIRCC_CR2_RECV_OVR 0x40 /* Receive overrun error */ -#define UIRCC_CR2_RECV_FRM 0x20 /* Receive frame error */ -#define UIRCC_CR2_RECV_END 0x10 /* Receive end */ -#define UIRCC_CR2_TMR_OUT 0x08 /* Timer time-out */ -#define UIRCC_CR2_XMIT_UNR 0x04 /* Transmit under-run error */ -#define UIRCC_CR2_XMIT_END 0x01 /* Transmit end */ -#define UIRCC_CR2_RECV_MASK 0x70 -#define UIRCC_CR2_XMIT_MASK 0x05 - -#define UIRCC_CR3 0x03 /* Transmit/receive control */ -#define UIRCC_CR3_XMIT_EN 0x80 /* Transmit enable */ -#define UIRCC_CR3_TX_CRC_EN 0x40 /* Transmit UIRCC_CRC enable */ -#define UIRCC_CR3_RECV_EN 0x20 /* Receive enable */ -#define UIRCC_CR3_RX_CRC_EN 0x10 /* Receive CRC enable */ -#define UIRCC_CR3_ADDR_CMP 0x08 /* Address comparison enable */ -#define UIRCC_CR3_MCAST_EN 0x04 /* Multicast enable */ - -#define UIRCC_CR4 0x04 /* Transmit data length low byte */ -#define UIRCC_CR5 0x05 /* Transmit data length high byte */ -#define UIRCC_CR6 0x06 /* Transmit data writing low byte */ -#define UIRCC_CR7 0x07 /* Transmit data writing high byte */ - -#define UIRCC_CR8 0x08 /* Self pole address */ - -#define UIRCC_CR9 0x09 /* System control 1 */ - -#define UIRCC_CR10 0x0a /* Modem selection */ -#define UIRCC_CR10_SIR 0x22 /* Set SIR mode */ -#define UIRCC_CR10_FIR 0x88 /* Set FIR mode */ - -#define UIRCC_CR11 0x0b /* System control 2 (same as SR11) */ -#define UIRCC_CR11_TMR_EN 0x08 - -#define UIRCC_CR12 0x0c /* Timer counter initial value (low byte) */ -#define UIRCC_CR13 0x0d /* Timer counter initial value (high byte) */ -#define UIRCC_CR15 0x0f - -/* Status registers (read only) */ -#define UIRCC_SR0 0x00 /* Transmit/receive status register */ -#define UIRCC_SR0_RX_RDY 0x80 /* Received data ready */ -#define UIRCC_SR0_RX_OVR 0x40 /* Receive overrun error */ -#define UIRCC_SR0_RX_CRCFRM 0x20 /* Receive CRC or framing error */ - -#define UIRCC_SR2 0x02 /* Interrupt mask status */ - -#define UIRCC_SR3 0x03 /* Interrupt factor register */ -#define UIRCC_SR3_RX_OVR_ER 0x40 /* Receive overrun error */ -#define UIRCC_SR3_RX_FRM_ER 0x20 /* Receive frameing error */ -#define UIRCC_SR3_RX_EOF 0x10 /* Receive end of frame */ -#define UIRCC_SR3_TMR_OUT 0x08 /* Timer timeout */ -#define UIRCC_SR3_TXUR 0x04 /* Transmit underrun */ -#define UIRCC_SR3_TX_DONE 0x01 /* Transmit all sent */ - -#define UIRCC_SR4 0x04 /* TX/RX data length counter low byte */ -#define UIRCC_SR5 0x05 /* TX/RX data length counter high byte */ - -#define UIRCC_SR8 0x08 /* Chip version */ - -#define UIRCC_SR9 0x09 /* System status 1 */ - -#define UIRCC_SR10 0x0a /* Modem select status */ -#define UIRCC_SR11 0x0b -#define UIRCC_SR12 0x0c /* Timer counter status (low byte) */ -#define UIRCC_SR13 0x0d /* Timer counter status (high byte) */ -#define UIRCC_SR15 0x0f - -#include - -/* Private data for each instance */ -struct uircc_cb { - struct net_device idev; - - __u8 cr3; /* Copy of register sr3 */ -}; - -#define CR3_SET - -#endif - - - diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h index 2b29d4c42..d4cfbbc52 100644 --- a/include/net/irda/wrapper.h +++ b/include/net/irda/wrapper.h @@ -6,7 +6,7 @@ * Status: Experimental. * Author: Dag Brattli * Created at: Mon Aug 4 20:40:53 1997 - * Modified at: Thu Oct 7 11:40:25 1999 + * Modified at: Sat Oct 30 16:29:01 1999 * Modified by: Dag Brattli * * Copyright (c) 1998-1999 Dag Brattli , @@ -52,7 +52,9 @@ enum { /* Proto definitions */ int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize); -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); +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); #endif -- cgit v1.2.3