Commit 68c3b8a8 authored by Marcel Holtmann's avatar Marcel Holtmann

[Bluetooth] Stop TX task before notifying the driver

When notifying the driver of a changed voice setting the TX task must
be stopped first. Otherwise the driver don't have a chance to switch
the settings if needed.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 82346c76
......@@ -229,8 +229,11 @@ static void hci_cc_host_ctl(struct hci_dev *hdev, __u16 ocf, struct sk_buff *skb
BT_DBG("%s: voice setting 0x%04x", hdev->name, setting);
if (hdev->notify)
if (hdev->notify) {
tasklet_disable(&hdev->tx_task);
hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING);
tasklet_enable(&hdev->tx_task);
}
}
break;
......@@ -247,8 +250,11 @@ static void hci_cc_host_ctl(struct hci_dev *hdev, __u16 ocf, struct sk_buff *skb
BT_DBG("%s: voice setting 0x%04x", hdev->name, setting);
if (hdev->notify)
if (hdev->notify) {
tasklet_disable(&hdev->tx_task);
hdev->notify(hdev, HCI_NOTIFY_VOICE_SETTING);
tasklet_enable(&hdev->tx_task);
}
}
hci_req_complete(hdev, status);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment