Loading drivers/bluetooth/btusb.c +6 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,8 @@ static bool disable_scofix; static bool force_scofix; static bool reset = 1; static int sco_conn; static int reset = 1; static struct usb_driver btusb_driver; Loading Loading @@ -1121,8 +1122,9 @@ static void btusb_notify(struct hci_dev *hdev, unsigned int evt) BT_DBG("%s evt %d", hdev->name, evt); if (hci_conn_num(hdev, SCO_LINK) != data->sco_num) { data->sco_num = hci_conn_num(hdev, SCO_LINK); if ((evt == HCI_NOTIFY_SCO_COMPLETE) || (evt == HCI_NOTIFY_CONN_DEL)) { BT_DBG("SCO conn state changed: evt %d", evt); sco_conn = (evt == HCI_NOTIFY_SCO_COMPLETE) ? 1 : 0; schedule_work(&data->work); } } Loading Loading @@ -1177,7 +1179,7 @@ static void btusb_work(struct work_struct *work) int new_alts; int err; if (data->sco_num > 0) { if (sco_conn) { if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) { err = usb_autopm_get_interface(data->isoc ? data->isoc : data->intf); if (err < 0) { Loading include/net/bluetooth/hci.h +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #define HCI_NOTIFY_CONN_ADD 1 #define HCI_NOTIFY_CONN_DEL 2 #define HCI_NOTIFY_VOICE_SETTING 3 #define HCI_NOTIFY_SCO_COMPLETE 4 /* HCI bus types */ #define HCI_VIRTUAL 0 Loading net/bluetooth/hci_event.c +3 −0 Original line number Diff line number Diff line Loading @@ -3486,6 +3486,9 @@ static void hci_sync_conn_complete_evt(struct hci_dev *hdev, conn->state = BT_CONNECTED; hci_conn_add_sysfs(conn); BT_DBG("SCO conn complete"); if (hdev->notify) hdev->notify(hdev, HCI_NOTIFY_SCO_COMPLETE); break; case 0x10: /* Connection Accept Timeout */ Loading Loading
drivers/bluetooth/btusb.c +6 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,8 @@ static bool disable_scofix; static bool force_scofix; static bool reset = 1; static int sco_conn; static int reset = 1; static struct usb_driver btusb_driver; Loading Loading @@ -1121,8 +1122,9 @@ static void btusb_notify(struct hci_dev *hdev, unsigned int evt) BT_DBG("%s evt %d", hdev->name, evt); if (hci_conn_num(hdev, SCO_LINK) != data->sco_num) { data->sco_num = hci_conn_num(hdev, SCO_LINK); if ((evt == HCI_NOTIFY_SCO_COMPLETE) || (evt == HCI_NOTIFY_CONN_DEL)) { BT_DBG("SCO conn state changed: evt %d", evt); sco_conn = (evt == HCI_NOTIFY_SCO_COMPLETE) ? 1 : 0; schedule_work(&data->work); } } Loading Loading @@ -1177,7 +1179,7 @@ static void btusb_work(struct work_struct *work) int new_alts; int err; if (data->sco_num > 0) { if (sco_conn) { if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) { err = usb_autopm_get_interface(data->isoc ? data->isoc : data->intf); if (err < 0) { Loading
include/net/bluetooth/hci.h +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #define HCI_NOTIFY_CONN_ADD 1 #define HCI_NOTIFY_CONN_DEL 2 #define HCI_NOTIFY_VOICE_SETTING 3 #define HCI_NOTIFY_SCO_COMPLETE 4 /* HCI bus types */ #define HCI_VIRTUAL 0 Loading
net/bluetooth/hci_event.c +3 −0 Original line number Diff line number Diff line Loading @@ -3486,6 +3486,9 @@ static void hci_sync_conn_complete_evt(struct hci_dev *hdev, conn->state = BT_CONNECTED; hci_conn_add_sysfs(conn); BT_DBG("SCO conn complete"); if (hdev->notify) hdev->notify(hdev, HCI_NOTIFY_SCO_COMPLETE); break; case 0x10: /* Connection Accept Timeout */ Loading