]> git.neil.brown.name Git - history.git/commitdiff
[irda][CORRECT] Properly initialise IrCOMM status line (DCE settings)
authorJean Tourrilhes <jt@hpl.hp.com>
Wed, 12 Feb 2003 22:11:29 +0000 (17:11 -0500)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Wed, 12 Feb 2003 22:11:29 +0000 (17:11 -0500)
                <Patch from Jan Kiszka>

net/irda/ircomm/ircomm_param.c
net/irda/ircomm/ircomm_tty.c

index 1e8fabd551429d4eb6477c2b6d2472b23d909d28..e1efbe1b5c94496edfde0d0500da2e3ca75cd8f4 100644 (file)
@@ -442,7 +442,9 @@ static int ircomm_param_dte(void *instance, irda_param_t *param, int get)
                param->pv.i = self->settings.dte;
        else {
                dte = (__u8) param->pv.i;
-               
+
+               self->settings.dce = 0;
+                               
                if (dte & IRCOMM_DELTA_DTR)
                        self->settings.dce |= (IRCOMM_DELTA_DSR|
                                              IRCOMM_DELTA_RI |
index 9439b5a4b43ac3f32982dabcef4dfb3e2042aeff..20e0669591aec95473f996fb6c5aa6c12a301baf 100644 (file)
@@ -490,7 +490,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
        if (line < 0x10) {
                self->service_type = IRCOMM_3_WIRE | IRCOMM_9_WIRE;
                self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */
-               self->settings.dce = IRCOMM_CTS | IRCOMM_CD; /* Default line settings */
+               /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */
+               self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */
                IRDA_DEBUG(2, "%s(), IrCOMM device\n", __FUNCTION__ );
        } else {
                IRDA_DEBUG(2, "%s(), IrLPT device\n", __FUNCTION__ );