tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: btuart and SOCKET Bluetooth CF



On Wed, 20 Jan 2010, KIYOHARA Takashi wrote:

> > +   case BTUART_RECV_DTL_ACL_DATA:  /* ACL Packet Complete */
> > +           if (dtlh->len & 0x0001)
> > +                   m_adj(m, -1);
> >
> > this seems to be incorrect logic..  in the first case, it will chop a
> > valid byte and in the second it will not chop the pad byte.
>
> The com(4) port is sequentially transferred by one byte though NOKIA DTL
> treats 2byte/word.
>
>                           COM port
>    com@pcmcia <-------------------------------- NOKIA DTL
>                0x82 rsvd lenL lenH ... dd ee 00

Ah, I see you adjusted the sc_want at BTUART_RECV_DTL_HDR to account for
this:

        dtlh->len = le16toh(dtlh->len);
        sc->sc_want = (dtlh->len + 1) & ~0x0001;

and so the pad byte will be collected automatically in the case that it
needs to be removed..

iain




Home | Main Index | Thread Index | Old Index