Bluetooth: Fix issue in the Set LE privacy function.
authorSudha Bheemanna <b.sudha@samsung.com>
Thu, 8 Sep 2016 10:51:01 +0000 (16:21 +0530)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Thu, 3 Aug 2023 08:43:17 +0000 (17:43 +0900)
This patch fixes not to check the hdev power before setting
LE Privacy.

Change-Id: I344ea13b1d90527e3e7554ec616cdc640b85159c
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>
net/bluetooth/mgmt.c

index 018f775..0dd3c0d 100644 (file)
@@ -6080,9 +6080,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);