Subject: Re: Does bluetooth work with amd64?
To: Juan RP <juan@xtrarom.org>
From: Iain Hibbert <plunky@rya-online.net>
List: port-amd64
Date: 05/16/2007 10:42:37
On Tue, 15 May 2007, Juan RP wrote:
> > ACL data: handle 0x0003 flags 0x02 dlen 12
> L2CAP(s): Connect req: psm 1 scid 0x0040
> < ACL data: handle 0x0003 flags 0x02 dlen 24
> < ACL data: handle 0x0003 flags 0x02 dlen 20
Ah, hcidump won't disassemble any of the outgoing L2CAP packets, and I see
spurious data - I think I see the problem, can you try the patch below?
(it accidentally worked on 32-bit because both lengths are 4 octets)
iain
--- /usr/src/sys/netbt/l2cap_signal.c 2007-04-21 07:17:29.000000000 +0100
+++ l2cap_signal.c 2007-05-16 10:24:17.000000000 +0100
@@ -918,18 +918,18 @@
/* Command Data */
if (length > 0)
- m_copyback(m, sizeof(hdr) + sizeof(cmd), length, data);
+ m_copyback(m, sizeof(*hdr) + sizeof(*cmd), length, data);
/* Command Header */
cmd->code = code;
cmd->ident = ident;
cmd->length = htole16(length);
- length += sizeof(cmd);
+ length += sizeof(*cmd);
/* C-Frame Header */
hdr->length = htole16(length);
hdr->dcid = htole16(L2CAP_SIGNAL_CID);
- length += sizeof(hdr);
+ length += sizeof(*hdr);
if (m->m_pkthdr.len != MAX(MHLEN, length)) {
m_freem(m);