* [kernel PATCH v1 0/1] Bluetooth: Return error if controller not support ll privacy
@ 2022-07-22 18:44 Zhengping Jiang
2022-07-22 18:44 ` [kernel PATCH v1 1/1] " Zhengping Jiang
0 siblings, 1 reply; 2+ messages in thread
From: Zhengping Jiang @ 2022-07-22 18:44 UTC (permalink / raw)
To: linux-bluetooth, chromeos-bluetooth-upstreaming
Cc: Zhengping Jiang, David S. Miller, Eric Dumazet, Jakub Kicinski,
Johan Hedberg, Luiz Augusto von Dentz, Marcel Holtmann,
Paolo Abeni, linux-kernel, netdev
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(+)
--
2.37.1.359.gd136c6c3e2-goog
^ permalink raw reply [flat|nested] 2+ messages in thread
* [kernel PATCH v1 1/1] Bluetooth: Return error if controller not support ll privacy
2022-07-22 18:44 [kernel PATCH v1 0/1] Bluetooth: Return error if controller not support ll privacy Zhengping Jiang
@ 2022-07-22 18:44 ` Zhengping Jiang
0 siblings, 0 replies; 2+ messages in thread
From: Zhengping Jiang @ 2022-07-22 18:44 UTC (permalink / raw)
To: linux-bluetooth, chromeos-bluetooth-upstreaming
Cc: Zhengping Jiang, David S. Miller, Eric Dumazet, Jakub Kicinski,
Johan Hedberg, Luiz Augusto von Dentz, Marcel Holtmann,
Paolo Abeni, linux-kernel, netdev
Return proper error message if the controller does not support ll privacy.
Signed-off-by: Zhengping Jiang <jiangzp@google.com>
---
Changes in v1:
- Return proper mgmt error if controller does not support ll privacy
net/bluetooth/mgmt.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index ef8371975c4eb..e5eb422d14464 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -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,
--
2.37.1.359.gd136c6c3e2-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-22 18:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-22 18:44 [kernel PATCH v1 0/1] Bluetooth: Return error if controller not support ll privacy Zhengping Jiang
2022-07-22 18:44 ` [kernel PATCH v1 1/1] " Zhengping Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox