Re: [PATCH v1 1/2] Bluetooth: Move address type check for hci_conn_params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan

On Tue, Jun 30, 2015 at 4:55 AM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote:
> Hi Jakub,
>
> On Wed, Jun 24, 2015, Jakub Pawlowski wrote:
>> @@ -2822,10 +2822,6 @@ struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
>>  {
>>       struct hci_conn_params *params;
>>
>> -     /* The conn params list only contains identity addresses */
>> -     if (!hci_is_identity_address(addr, addr_type))
>> -             return NULL;
>> -
>>       list_for_each_entry(params, &hdev->le_conn_params, list) {
>>               if (bacmp(&params->addr, addr) == 0 &&
>>                   params->addr_type == addr_type) {
>> @@ -2842,10 +2838,6 @@ struct hci_conn_params *hci_pend_le_action_lookup(struct list_head *list,
>>  {
>>       struct hci_conn_params *param;
>>
>> -     /* The list only contains identity addresses */
>> -     if (!hci_is_identity_address(addr, addr_type))
>> -             return NULL;
>> -
>>       list_for_each_entry(param, list, action) {
>>               if (bacmp(&param->addr, addr) == 0 &&
>>                   param->addr_type == addr_type)
>
> Both of the above could be called for HCI events related to non-paired
> devices that use private addresses. In such a case these identity
> address checks would prevent unnecessary iteration of the (potentially
> long) list. Do we really want to remove them?

Right now hci_conn_params struct can be used only for identity
addresses. In upcoming patches I want to use it as piece of connect
mechanism for all addresses, including RPA's. For that reason I have
to remove this check. I can also create new structure, or separate
list and use it for new connect mechanism, what do you think ?

Jakub

>
> Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux