mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
Bluetooth: Pause service discovery for suspend
Just like MGMT_OP_START_DISCOVERY, we should reject MGMT_OP_START_SERVICE_DISCOVERY with MGMT_STATUS_BUSY when we are paused for suspend. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
committed by
Marcel Holtmann
parent
3b0d5250be
commit
36211f7fc1
@@ -4798,6 +4798,14 @@ static int start_service_discovery(struct sock *sk, struct hci_dev *hdev,
|
|||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hdev->discovery_paused) {
|
||||||
|
err = mgmt_cmd_complete(sk, hdev->id,
|
||||||
|
MGMT_OP_START_SERVICE_DISCOVERY,
|
||||||
|
MGMT_STATUS_BUSY, &cp->type,
|
||||||
|
sizeof(cp->type));
|
||||||
|
goto failed;
|
||||||
|
}
|
||||||
|
|
||||||
uuid_count = __le16_to_cpu(cp->uuid_count);
|
uuid_count = __le16_to_cpu(cp->uuid_count);
|
||||||
if (uuid_count > max_uuid_count) {
|
if (uuid_count > max_uuid_count) {
|
||||||
bt_dev_err(hdev, "service_discovery: too big uuid_count value %u",
|
bt_dev_err(hdev, "service_discovery: too big uuid_count value %u",
|
||||||
|
Reference in New Issue
Block a user