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

[bluetooth-dev] ask about the hci.c


In the hci.c, there is a function: set_acl_hdr(...).
set_acl_hdr(u8 *data, u32 len, u8 pb, u8 bc, u32 hci_hdl)
	u32 tmp_hdr = 0;

	SET_BITS(tmp_hdr, 0, 12, hci_hdl);
	SET_BITS(tmp_hdr, 12, 2, pb);
	SET_BITS(tmp_hdr, 14, 2, bc);
	SET_BITS(tmp_hdr, 16, 16, len);

	data[0] = ACL_PKT;
	put_unaligned(cpu_to_le32(tmp_hdr), (u32*)&data[1]);
I think the SET_BITS(tmp_hdr, 16, 16, len) should be SET_BITS(tmp_hdr,
16, 31, len),because the total len of HCI DATA PACKET is 32 bits. It is

Subing Zhang
Department of EEE
The University of Hong Kong
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com