Subject: Re: Bluetooth update
To: None <tech-net@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-net
Date: 12/18/2005 21:02:38
In article <20051218205328.GC10182@quark.mobile.fnop.net>,
Rui Paulo  <rpaulo@fnop.net> wrote:
>-=-=-=-=-=-
>
>On 2005.12.17 20:54:33 +0000, Iain Hibbert wrote:
>| 1. for kernel config files I used
>| 
>| device bt3c: bluetooth
>| device ubt: bluetooth
>| 
>| which means that you dont actually need to specify
>| 
>| option BLUETOOTH
>| 
>| as it gets pulled in automatically. I dont think any extra complexity is
>| called for just yet and it would be difficult to make a device compile
>| without the protocol code in any case as L2CAP/HCI is central.
>
>How about trying to use bluetooth like a loopback device ?
>If this is possible, I think we should define BLUETOOTH as a kernel
>config parameter like we do for INET, INET6, NETISO, etc.
>
>| 4. Initially I used 134/135/136 for protocol numbers for bluetooth
>| protocol family because they were the next available ones in
>| /etc/protocols and also were the numbers that FreeBSD used. I think this
>| was misapplied now though after importing libbt and snooping about, seems
>| that /etc/protocols is merely for IP protocols and there is no real
>| intersection, so I've reverted to 1/2/3 - I dont think we have a generic
>| file anywhere containing a list of protocol family/numbers ?
>
>No, I don't think so. /etc/protocols seems wrong. Also, this file is
>out of date. I'm going to update it.
> 
>| 6. libbt lint warnings:
>| 
>| /home/plunky/src/sys/netbt/hci.h(1562): warning: bitwise operation on
>signed value possibly nonportable [117]
>| /home/plunky/src/sys/netbt/hci.h(1568): warning: bitwise operation on
>signed value possibly nonportable [117]
>| /home/plunky/src/sys/netbt/hci.h(1574): warning: bitwise operation on
>signed value possibly nonportable [117]
>| 
>| all three of those deal with lines like these:
>| 
>| static __inline void
>| hci_filter_set(uint8_t bit, struct hci_filter *filter)
>| {
>| 	filter->mask[(bit - 1) >> 5] |= (1 << ((bit - 1) & 0x1f));
>| }
>| 
>| and I cant get rid of it, any clue? (maybe lint is not complex enough?)
>
>What does lint say if you change filter->mask to unsigned ?

make bit uint32_t

christos