USB_DEV_BCD_LTEQ() doesn't work

Hans Petter Selasky hps at bitfrost.no
Thu Jan 9 15:13:08 UTC 2014


On 01/09/14 16:02, Adrian Chadd wrote:
> Hi,
>
> I'm trying to fix the atheros bluetooth USB matching to match the
> ath3k rules and unfortunately I'm hitting a snag.
>
> eg, in the blacklist:
>
> -       { USB_VPI(0x0cf3, 0x3004, 0) },
> +       { USB_VPI(0x0cf3, 0x3004, 0), USB_DEV_BCD_LTEQ(1) },
>
> Now, the rule is "if it's in the list, it's blacklisted", and in this
> instance, these devices with a bcdDevice of <=1 are blacklisted.
>
> However, this doesn't at all work. The USB matching code that looks
> like it's doing it isn't.
>
> Ideas?
>
>

Hi,

Use both GTEQ and LTEQ to make a range:

#define USB_DEV_BCD_GTEQ(lo)    /* greater than or equal */ \
   .match_flag_dev_lo = 1, .bcdDevice_lo = (lo)

#define USB_DEV_BCD_LTEQ(hi)    /* less than or equal */ \
   .match_flag_dev_hi = 1, .bcdDevice_hi = (hi)

--HPS


More information about the freebsd-usb mailing list