Skip to contentSkip to conversation

Bluetooth: Return error if controller not support ll privacy

PATCH New Zhengping Jiang 1 participant 2 messages Jul 22, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Bluetooth: Return error if controller not support ll privacy

Return proper error message if the controller does not support ll privacy.

Changes in v1:
- Return proper mgmt error if controller does not support ll privacy

Zhengping Jiang (1):
Bluetooth: Return error if controller not support ll privacy

 net/bluetooth/mgmt.c | 6 ++++++
 1 file changed, 6 insertions(+)
Signature · 1 line
2.37.1.359.gd136c6c3e2-goog
#1 lore raw

PATCH 1/1 Bluetooth: Return error if controller not support ll privacy

Return proper error message if the controller does not support ll privacy.

---

Changes in v1:
- Return proper mgmt error if controller does not support ll privacy

 net/bluetooth/mgmt.c | 6 ++++++
 1 file changed, 6 insertions(+)
net/bluetooth/mgmt.c +6 -0
index ef8371975c4eb..e5eb422d14464 100644
@@ -4143,6 +4143,12 @@ static int set_rpa_resolution_func(struct sock *sk, struct hci_dev *hdev,
 				       MGMT_OP_SET_EXP_FEATURE,
 				       MGMT_STATUS_INVALID_INDEX);
 
+	/* Controller does not support LL privacy */
+	if (!ll_privacy_capable(hdev))
+		return mgmt_cmd_status(sk, hdev->id,
+				       MGMT_OP_SET_EXP_FEATURE,
+				       MGMT_STATUS_NOT_SUPPORTED);
+
 	/* Changes can only be made when controller is powered down */
 	if (hdev_is_powered(hdev))
 		return mgmt_cmd_status(sk, hdev->id,
Signature · 1 line
2.37.1.359.gd136c6c3e2-goog