diff mbox series

[2/2] Bluetooth: LL privacy allow RPA

Message ID 20210405143041.16168-1-sathish.narasimman@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] Bluetooth: FIX: Own address type change with HCI_ENABLE_LL_PRIVACY | expand

Commit Message

Sathish Narasimman April 5, 2021, 2:30 p.m. UTC
allow RPA to add bd address to whitelist

Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
---
 net/bluetooth/hci_request.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Marcel Holtmann April 6, 2021, 8:50 a.m. UTC | #1
Hi Sathish,

> allow RPA to add bd address to whitelist
> 
> Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
> ---
> net/bluetooth/hci_request.c | 4 ++++
> 1 file changed, 4 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel
Szymon Janc April 6, 2021, 2:17 p.m. UTC | #2
Hi,

On Monday, 5 April 2021 16:30:41 CEST Sathish Narasimman wrote:
> allow RPA to add bd address to whitelist
> 
> Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
> ---
>  net/bluetooth/hci_request.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
> index 0d78122342d5..560b74d421a8 100644
> --- a/net/bluetooth/hci_request.c
> +++ b/net/bluetooth/hci_request.c
> @@ -847,6 +847,10 @@ static u8 update_white_list(struct hci_request *req)
>  	 */
>  	bool allow_rpa = hdev->suspended;
> 
> +	if (use_ll_privacy(hdev) &&
> +	    hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY))
> +		allow_rpa = true;
> +
>  	/* Go through the current white list programmed into the
>  	 * controller one by one and check if that address is still
>  	 * in the list of pending connections or list of devices to

I'm bit confused by this patch. Why add RPA to whitelist if LL privacy is in 
use?
Marcel Holtmann April 6, 2021, 3:05 p.m. UTC | #3
Hi Szymon,

>> allow RPA to add bd address to whitelist
>> 
>> Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
>> ---
>> net/bluetooth/hci_request.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>> 
>> diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
>> index 0d78122342d5..560b74d421a8 100644
>> --- a/net/bluetooth/hci_request.c
>> +++ b/net/bluetooth/hci_request.c
>> @@ -847,6 +847,10 @@ static u8 update_white_list(struct hci_request *req)
>> 	 */
>> 	bool allow_rpa = hdev->suspended;
>> 
>> +	if (use_ll_privacy(hdev) &&
>> +	    hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY))
>> +		allow_rpa = true;
>> +
>> 	/* Go through the current white list programmed into the
>> 	 * controller one by one and check if that address is still
>> 	 * in the list of pending connections or list of devices to
> 
> I'm bit confused by this patch. Why add RPA to whitelist if LL privacy is in 
> use?

if link layer privacy is enabled and the IRK programmed into the resolving list, we are now allowed to add the device to the white list.

Regards

Marcel
diff mbox series

Patch

diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index 0d78122342d5..560b74d421a8 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -847,6 +847,10 @@  static u8 update_white_list(struct hci_request *req)
 	 */
 	bool allow_rpa = hdev->suspended;
 
+	if (use_ll_privacy(hdev) &&
+	    hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY))
+		allow_rpa = true;
+
 	/* Go through the current white list programmed into the
 	 * controller one by one and check if that address is still
 	 * in the list of pending connections or list of devices to