Bluetooth: Fix issue in the Set LE privacy function. 37/317437/1
authorSudha Bheemanna <b.sudha@samsung.com>
Thu, 8 Sep 2016 10:51:01 +0000 (16:21 +0530)
committerJaehoon Chung <jh80.chung@samsung.com>
Thu, 2 Jan 2025 06:09:03 +0000 (15:09 +0900)
This patch fixes not to check the hdev power before setting
LE Privacy.

Change-Id: Ia59b9d0edd5ec7f4b74e0398ff1b0f53580fd821
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
net/bluetooth/mgmt.c

index 363a11a5af5ad4d41227507e9793e2bc1aeaac6f..aecf07dd52b624040eeec8647dfa192f4e624b1b 100644 (file)
@@ -6961,9 +6961,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);