mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
Merge "ODROID: Make sure to use CRS B/T module than RealTek combo." into odroidg12-4.9.y-android
This commit is contained in:
@@ -2732,6 +2732,8 @@ static int btusb_bcm_set_diag(struct hci_dev *hdev, bool enable)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int exist_csr_module = 0;
|
||||
|
||||
static int btusb_probe(struct usb_interface *intf,
|
||||
const struct usb_device_id *id)
|
||||
{
|
||||
@@ -2936,7 +2938,8 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_HCIBTUSB_RTL
|
||||
if (id->driver_info & BTUSB_REALTEK) {
|
||||
if (id->driver_info & BTUSB_REALTEK && !exist_csr_module) {
|
||||
BT_DBG("RealTek module detected\n");
|
||||
hdev->setup = btrtl_setup_realtek;
|
||||
hdev->shutdown = btrtl_shutdown_realtek;
|
||||
|
||||
@@ -2975,6 +2978,10 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
if (id->driver_info & BTUSB_CSR) {
|
||||
struct usb_device *udev = data->udev;
|
||||
u16 bcdDevice = le16_to_cpu(udev->descriptor.bcdDevice);
|
||||
#ifdef CONFIG_BT_HCIBTUSB_RTL
|
||||
BT_DBG("CSR module detected\n");
|
||||
exist_csr_module = 1;
|
||||
#endif
|
||||
|
||||
/* Old firmware would otherwise execute USB reset */
|
||||
if (bcdDevice < 0x117)
|
||||
@@ -3041,6 +3048,9 @@ static void btusb_disconnect(struct usb_interface *intf)
|
||||
{
|
||||
struct btusb_data *data = usb_get_intfdata(intf);
|
||||
struct hci_dev *hdev;
|
||||
#ifdef CONFIG_BT_HCIBTUSB_RTL
|
||||
exist_csr_module = 0;
|
||||
#endif
|
||||
|
||||
BT_DBG("intf %p", intf);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user