From: Sudha Bheemanna Date: Thu, 8 Sep 2016 10:51:01 +0000 (+0530) Subject: Bluetooth: Fix issue in the Set LE privacy function. X-Git-Tag: accepted/tizen/unified/20240422.153132~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad385367f37148cfe844c95a312cc6c763d2e77c;p=platform%2Fkernel%2Flinux-rpi.git Bluetooth: Fix issue in the Set LE privacy function. This patch fixes not to check the hdev power before setting LE Privacy. Change-Id: I465edcfb14945d358dc940e15b10fff1497aca1e Signed-off-by: Sudha Bheemanna Signed-off-by: Seung-Woo Kim Signed-off-by: Amit Purwar Signed-off-by: Wootak Jung Signed-off-by: Jaehoon Chung --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 4f1c159..49ec403 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -7031,9 +7031,14 @@ static int set_privacy(struct sock *sk, struct hci_dev *hdev, void *cp_data, return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_PRIVACY, MGMT_STATUS_INVALID_PARAMS); +#ifndef TIZEN_BT + /* commenting out since set privacy command is always rejected + * if this condition is enabled. + */ if (hdev_is_powered(hdev)) return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_PRIVACY, MGMT_STATUS_REJECTED); +#endif hci_dev_lock(hdev);