Re: [PATCH 10/17] Bluetooth: Connection parameters and auto connection

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

 



Hi Andre,

>>> This patch modifies hci_conn_params_add() and hci_conn_params_del() so
>>> they also add/delete pending LE connections according to the auto_
>>> connect option. This way, background scan is automatically triggered/
>>> untriggered when connection parameters are added/removed.
>>> 
>>> For instance, when a new connection parameters with HCI_AUTO_CONN_ALWAYS
>>> option is added and we are not connected to the device, we add a pending
>>> LE connection for that device.
>>> 
>>> Likewise, when the connection parameters are updated we add or delete
>>> a pending LE connection according to its new auto_connect option.
>>> 
>>> Finally, when the connection parameter is deleted we also delete the
>>> pending LE connection (if any).
>> 
>> what about disconnecting an existing connection for a device we have in our auto-connect list. I think that should happen as well.
> 
> This kind of logic seems to be more suitable if we implement it in the
> upper layer (mgmt.c). The function that will handle connection
> parameters removal would also terminate the connection in case there
> is a connection for that device.

not 100% convinced here. If the connection has been triggered by an actually connect() socket call, then sure it is there to stay until disconnect by the user.

However in case the connection has been established by the auto-connect handling and we either remove the value or set it back to disabled, then why not also terminate that connection. This might need further thinking. So lets go ahead without doing it right now.

Regards

Marcel

--
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