|
From: Andy P. <at...@us...> - 2002-04-09 16:27:05
|
Update of /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm
In directory usw-pr-cvs1:/tmp/cvs-serv31773/irda/ircomm
Modified Files:
Makefile ircomm_core.c ircomm_event.c ircomm_lmp.c
ircomm_param.c ircomm_ttp.c ircomm_tty.c ircomm_tty_attach.c
ircomm_tty_ioctl.c
Log Message:
synch 2.4.15 commit 20
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Makefile 14 Jan 2001 17:16:14 -0000 1.1.1.1
+++ Makefile 9 Apr 2002 16:26:57 -0000 1.2
@@ -9,7 +9,7 @@
O_TARGET := ircomm_and_tty.o
-multi-objs := ircomm.o ircomm-tty.o
+list-multi := ircomm.o ircomm-tty.o
ircomm-objs := ircomm_core.o ircomm_event.o ircomm_lmp.o ircomm_ttp.o
ircomm-tty-objs := ircomm_tty.o ircomm_tty_attach.o ircomm_tty_ioctl.o ircomm_param.o
Index: ircomm_core.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm/ircomm_core.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ircomm_core.c 14 Jan 2001 17:16:16 -0000 1.1.1.1
+++ ircomm_core.c 9 Apr 2002 16:26:57 -0000 1.2
@@ -220,7 +220,7 @@
/*
* Function ircomm_connect_indication (self, qos, skb)
*
- * Notify user layer about the incomming connection
+ * Notify user layer about the incoming connection
*
*/
void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
@@ -514,6 +514,7 @@
#ifdef MODULE
MODULE_AUTHOR("Dag Brattli <da...@br...>");
MODULE_DESCRIPTION("IrCOMM protocol");
+MODULE_LICENSE("GPL");
int init_module(void)
{
Index: ircomm_event.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm/ircomm_event.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ircomm_event.c 14 Jan 2001 17:16:17 -0000 1.1.1.1
+++ ircomm_event.c 9 Apr 2002 16:26:57 -0000 1.2
@@ -151,7 +151,7 @@
/*
* Function ircomm_state_waitr (self, event, skb)
*
- * IrCOMM has received an incomming connection request and is awaiting
+ * IrCOMM has received an incoming connection request and is awaiting
* response from the user
*/
static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event,
Index: ircomm_lmp.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm/ircomm_lmp.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ircomm_lmp.c 14 Jan 2001 17:16:18 -0000 1.1.1.1
+++ ircomm_lmp.c 9 Apr 2002 16:26:57 -0000 1.2
@@ -219,7 +219,7 @@
/*
* Function ircomm_lmp_data_indication (instance, sap, skb)
*
- * Incomming data which we must deliver to the state machine, to check
+ * Incoming data which we must deliver to the state machine, to check
* we are still connected.
*/
int ircomm_lmp_data_indication(void *instance, void *sap,
Index: ircomm_param.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm/ircomm_param.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ircomm_param.c 14 Jan 2001 17:16:21 -0000 1.1.1.1
+++ ircomm_param.c 9 Apr 2002 16:26:57 -0000 1.2
@@ -182,13 +182,13 @@
int get)
{
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
- __u8 service_type = param->pv.b; /* We know it's a one byte integer */
+ __u8 service_type = (__u8) param->pv.i;
ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get) {
- param->pv.b = self->settings.service_type;
+ param->pv.i = self->settings.service_type;
return 0;
}
@@ -246,9 +246,9 @@
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get)
- param->pv.b = IRCOMM_SERIAL;
+ param->pv.i = IRCOMM_SERIAL;
else {
- self->settings.port_type = param->pv.b;
+ self->settings.port_type = (__u8) param->pv.i;
IRDA_DEBUG(0, __FUNCTION__ "(), port type=%d\n",
self->settings.port_type);
@@ -317,9 +317,9 @@
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get)
- param->pv.b = self->settings.data_format;
+ param->pv.i = self->settings.data_format;
else
- self->settings.data_format = param->pv.b;
+ self->settings.data_format = (__u8) param->pv.i;
return 0;
}
@@ -339,11 +339,11 @@
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get)
- param->pv.b = self->settings.flow_control;
+ param->pv.i = self->settings.flow_control;
else
- self->settings.flow_control = param->pv.b;
+ self->settings.flow_control = (__u8) param->pv.i;
- IRDA_DEBUG(1, __FUNCTION__ "(), flow control = 0x%02x\n", param->pv.b);
+ IRDA_DEBUG(1, __FUNCTION__ "(), flow control = 0x%02x\n", (__u8) param->pv.i);
return 0;
}
@@ -362,15 +362,15 @@
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get) {
- param->pv.s = self->settings.xonxoff[0];
- param->pv.s |= self->settings.xonxoff[1] << 8;
+ param->pv.i = self->settings.xonxoff[0];
+ param->pv.i |= self->settings.xonxoff[1] << 8;
} else {
- self->settings.xonxoff[0] = param->pv.s & 0xff;
- self->settings.xonxoff[1] = param->pv.s >> 8;
+ self->settings.xonxoff[0] = (__u16) param->pv.i & 0xff;
+ self->settings.xonxoff[1] = (__u16) param->pv.i >> 8;
}
IRDA_DEBUG(0, __FUNCTION__ "(), XON/XOFF = 0x%02x,0x%02x\n",
- param->pv.s & 0xff, param->pv.s >> 8);
+ param->pv.i & 0xff, param->pv.i >> 8);
return 0;
}
@@ -389,15 +389,15 @@
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get) {
- param->pv.s = self->settings.enqack[0];
- param->pv.s |= self->settings.enqack[1] << 8;
+ param->pv.i = self->settings.enqack[0];
+ param->pv.i |= self->settings.enqack[1] << 8;
} else {
- self->settings.enqack[0] = param->pv.s & 0xff;
- self->settings.enqack[1] = param->pv.s >> 8;
+ self->settings.enqack[0] = (__u16) param->pv.i & 0xff;
+ self->settings.enqack[1] = (__u16) param->pv.i >> 8;
}
IRDA_DEBUG(0, __FUNCTION__ "(), ENQ/ACK = 0x%02x,0x%02x\n",
- param->pv.s & 0xff, param->pv.s >> 8);
+ param->pv.i & 0xff, param->pv.i >> 8);
return 0;
}
@@ -431,9 +431,9 @@
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get)
- param->pv.b = self->settings.dte;
+ param->pv.i = self->settings.dte;
else {
- dte = param->pv.b;
+ dte = (__u8) param->pv.i;
if (dte & IRCOMM_DELTA_DTR)
self->settings.dce |= (IRCOMM_DELTA_DSR|
@@ -470,9 +470,9 @@
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
__u8 dce;
- IRDA_DEBUG(1, __FUNCTION__ "(), dce = 0x%02x\n", param->pv.b);
+ IRDA_DEBUG(1, __FUNCTION__ "(), dce = 0x%02x\n", (__u8) param->pv.i);
- dce = param->pv.b;
+ dce = (__u8) param->pv.i;
ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
Index: ircomm_ttp.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm/ircomm_ttp.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ircomm_ttp.c 14 Jan 2001 17:16:19 -0000 1.1.1.1
+++ ircomm_ttp.c 9 Apr 2002 16:26:57 -0000 1.2
@@ -156,7 +156,7 @@
/*
* Function ircomm_ttp_data_indication (instance, sap, skb)
*
- * Incomming data
+ * Incoming data
*
*/
int ircomm_ttp_data_indication(void *instance, void *sap,
Index: ircomm_tty.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm/ircomm_tty.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ircomm_tty.c 14 Jan 2001 17:16:26 -0000 1.1.1.1
+++ ircomm_tty.c 9 Apr 2002 16:26:57 -0000 1.2
@@ -468,7 +468,8 @@
/* Check if this is a "normal" ircomm device, or an irlpt device */
if (line < 0x10) {
self->service_type = IRCOMM_3_WIRE | IRCOMM_9_WIRE;
- self->settings.service_type = IRCOMM_9_WIRE; /* Default */
+ self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */
+ self->settings.dce = IRCOMM_CTS | IRCOMM_CD; /* Default line settings */
IRDA_DEBUG(2, __FUNCTION__ "(), IrCOMM device\n");
} else {
IRDA_DEBUG(2, __FUNCTION__ "(), IrLPT device\n");
@@ -1106,7 +1107,7 @@
/*
* Function ircomm_tty_data_indication (instance, sap, skb)
*
- * Handle incomming data, and deliver it to the line discipline
+ * Handle incoming data, and deliver it to the line discipline
*
*/
static int ircomm_tty_data_indication(void *instance, void *sap,
@@ -1155,7 +1156,7 @@
/*
* Function ircomm_tty_control_indication (instance, sap, skb)
*
- * Parse all incomming parameters (easy!)
+ * Parse all incoming parameters (easy!)
*
*/
static int ircomm_tty_control_indication(void *instance, void *sap,
@@ -1362,6 +1363,7 @@
#ifdef MODULE
MODULE_AUTHOR("Dag Brattli <da...@cs...>");
MODULE_DESCRIPTION("IrCOMM serial TTY driver");
+MODULE_LICENSE("GPL");
int init_module(void)
{
Index: ircomm_tty_attach.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm/ircomm_tty_attach.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ircomm_tty_attach.c 14 Jan 2001 17:16:29 -0000 1.1.1.1
+++ ircomm_tty_attach.c 9 Apr 2002 16:26:57 -0000 1.2
@@ -505,7 +505,7 @@
* will have to wait for the peer device (DCE) to raise the CTS
* line.
*/
- if (self->flags & ASYNC_CTS_FLOW) {
+ if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) {
IRDA_DEBUG(0, __FUNCTION__ "(), waiting for CTS ...\n");
return;
} else {
Index: ircomm_tty_ioctl.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/net/irda/ircomm/ircomm_tty_ioctl.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ircomm_tty_ioctl.c 14 Jan 2001 17:16:31 -0000 1.1.1.1
+++ ircomm_tty_ioctl.c 9 Apr 2002 16:26:57 -0000 1.2
@@ -221,16 +221,14 @@
{
unsigned int arg;
__u8 old_rts, old_dtr;
- int error;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
- error = get_user(arg, value);
- if (error)
- return error;
+ if (get_user(arg, value))
+ return -EFAULT;
old_rts = self->settings.dte & IRCOMM_RTS;
old_dtr = self->settings.dte & IRCOMM_DTR;
@@ -431,28 +429,18 @@
cnow = driver->icount;
restore_flags(flags);
p_cuser = (struct serial_icounter_struct *) arg;
- error = put_user(cnow.cts, &p_cuser->cts);
- if (error) return error;
- error = put_user(cnow.dsr, &p_cuser->dsr);
- if (error) return error;
- error = put_user(cnow.rng, &p_cuser->rng);
- if (error) return error;
- error = put_user(cnow.dcd, &p_cuser->dcd);
- if (error) return error;
- error = put_user(cnow.rx, &p_cuser->rx);
- if (error) return error;
- error = put_user(cnow.tx, &p_cuser->tx);
- if (error) return error;
- error = put_user(cnow.frame, &p_cuser->frame);
- if (error) return error;
- error = put_user(cnow.overrun, &p_cuser->overrun);
- if (error) return error;
- error = put_user(cnow.parity, &p_cuser->parity);
- if (error) return error;
- error = put_user(cnow.brk, &p_cuser->brk);
- if (error) return error;
- error = put_user(cnow.buf_overrun, &p_cuser->buf_overrun);
- if (error) return error;
+ if (put_user(cnow.cts, &p_cuser->cts) ||
+ put_user(cnow.dsr, &p_cuser->dsr) ||
+ put_user(cnow.rng, &p_cuser->rng) ||
+ put_user(cnow.dcd, &p_cuser->dcd) ||
+ put_user(cnow.rx, &p_cuser->rx) ||
+ put_user(cnow.tx, &p_cuser->tx) ||
+ put_user(cnow.frame, &p_cuser->frame) ||
+ put_user(cnow.overrun, &p_cuser->overrun) ||
+ put_user(cnow.parity, &p_cuser->parity) ||
+ put_user(cnow.brk, &p_cuser->brk) ||
+ put_user(cnow.buf_overrun, &p_cuser->buf_overrun))
+ return -EFAULT;
#endif
return 0;
default:
|