Subject: Re: Belkin Bluetooth vs aue vs ubt
To: Jason Thorpe <thorpej@shagadelic.org>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: tech-kern
Date: 03/07/2007 21:40:34
On Wed, 7 Mar 2007, Jason Thorpe wrote:
>>> Uh, no, that's not how autoconfig works.
>>>
>>> Autoconfig, in the direct configuration case (like what USB does) gives
>>> everyone a chance and then takes the highest-priority match (and if all
>>> return the same priority, takes the first one, I think).
>>
>> aue uses:
>> #define UMATCH_VENDOR_PRODUCT 13
>>
>> ubt uses:
>> #define UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO 5
>>
>> So aue will always win.
>
> So either:
>
> - aue should also match against class+subclass+proto first. It should do
> affirmative matching rather than negative matching. I.e. "it is an Ethernet"
> as opposed to "it is not a Bluetooth (or a storage device or a bar code
> reader or a mouse or a ...)"
I've had a quick look at that and we don't define any other subclass or
proto for UDCLASS_WIRELESS (though I guess they must be defined
somewhere). As its 'other' match is Wireless Ethernet, the class is the
same. This could do with testing on real hardware.
> - Matches against against class+subclass+proto should probably match higher
> than vendor+product. Matches against class+subclass+proto+vendor+product
> should probably match higher than class+subclass+proto.
Terry Moore suggests the former is against the specs. The latter is good idea;
UMATCH_VENDOR_PRODUCT_IFACECLASS_IFACESUBCLASS_IFACEPROTO isn't defined
yet, but it could be (priority 15 with UMATCH_HIGHEST moved to 16).
--
Stephen