Bluetooth: btusb: Use matching names for Broadcom firmware files
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 15 Feb 2015 07:08:47 +0000 (23:08 -0800)
committerJohan Hedberg <johan.hedberg@intel.com>
Sun, 15 Feb 2015 08:16:39 +0000 (10:16 +0200)
commit18835dfa3ac526b25f74af3a61829f02fe92a317
tree4ce63201ca71ea5d41b47ad35b68e26618a40072
parent87e2a020cac29fba4a35e681392ba0d1f7e21ba9
Bluetooth: btusb: Use matching names for Broadcom firmware files

The Broadcom firmware files are named with firmware version information
encoded into lmp_subver field. So BCM20702B0_002.001.014.0527.0607.hex
would be represented by 0x410e. To allow for an easier decoding of the
actual firmware names, provide an internal table that does the mapping
and request the firmware file by name.

Bluetooth: hci0: BCM20702B0 (002.001.014) build 0607

Now the complicated encoding of lmp_subver will be decoded and turned
into the name and firmware version information from the firmware files.

The previous attempt of using udev->product failed badly since it never
contains any matching entry to the actual hardware or firmware files
distributed by Broadcom in their Windows drivers. It is even worse since
it can change depending on if the internal bootstrapping happened before
the USB bus enumeration or after. This caused many race conditions.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
drivers/bluetooth/btusb.c