[PATCH 2.4 IrDA] Mask C/R bit from connection

From: Jean Tourrilhes (jt@bougret.hpl.hp.com)
Date: Mon Jun 23 2003 - 18:10:45 EST


        Hi Marcelo,

        Some devices add bits where they should not. Let's not get
ourselves confused by it.
        Please apply ;-)

        Jean

ir241_caddr_mask.diff :
---------------------
                <Patch from Jan Kiszka>
        o [CORRECT] ignore the C/R bit in the LAP connection address.

--- linux/net/irda/irlap_frame.d0.c Fri Apr 11 18:38:03 2003
+++ linux/net/irda/irlap_frame.c Fri Apr 11 18:38:15 2003
@@ -162,8 +162,8 @@ static void irlap_recv_snrm_cmd(struct i
         frame = (struct snrm_frame *) skb->data;
         
         if (skb->len >= sizeof(struct snrm_frame)) {
- /* Copy the new connection address */
- info->caddr = frame->ncaddr;
+ /* Copy the new connection address ignoring the C/R bit */
+ info->caddr = frame->ncaddr & 0xFE;
 
                 /* Check if the new connection address is valid */
                 if ((info->caddr == 0x00) || (info->caddr == 0xfe)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:42 EST