Re: [PATCH 0/8] Bluetooth: SMP & disconnection fixes

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

 



Hi Johan,

> The previous patches for SMP disconnection (that already got applied) do
> indeed fix the hci_conn_hold/drop ballance and do ensure that we
> disconnect the link when the SMP code wants it. Unfortunately the
> patches introduce a regression to a third use case which is the one
> where we want to bring the link down when there are no more active users
> for it.
> 
> It turns out that relying on connection users to diligently call
> hci_conn_drop() isn't a reliable way to ensure that the connection goes
> away. Firstly, we can't have hci_chan own such a reference (since it's
> "always there") and secondly there might not be any users at all
> (besides SMP) in which case there will be no-one to call hci_conn_drop.
> 
> A simpler solution is to just do a direct disonnect from smp.c with the
> help of the hci_disconnect() function. This has the side effect of not
> sending any SMP Failure PDU first, but the cases needing a disconnection
> do not really need that PDU to be sent (i.e. SMP timeout or garbage
> data).
> 
> The last three patches in this set unify hci_disconnect() usage to also
> cover the Disconnect Device mgmt command and move clock offset reading
> into the function to ensure all users have this feature at their
> disposal.
> 
> Johan
> 
> ----------------------------------------------------------------
> Johan Hedberg (8):
>      Bluetooth: Remove hci_conn_hold/drop from hci_chan
>      Bluetooth: Set discon_timeout to 0 in l2cap_conn_del
>      Bluetooth: Use hci_disconnect for immediate disconnection from SMP
>      Bluetooth: Remove unused l2cap_conn_shutdown API
>      Bluetooth: Fix SMP error and response to be mutually exclusive
>      Bluetooth: Update hci_disconnect() to return an error value
>      Bluetooth: Use hci_disconnect() for mgmt_disconnect_device()
>      Bluetooth: Move clock offset reading into hci_disconnect()
> 
> include/net/bluetooth/hci_core.h |  2 +-
> include/net/bluetooth/l2cap.h    |  4 ----
> net/bluetooth/hci_conn.c         | 41 ++++++++++++++----------------------
> net/bluetooth/l2cap_core.c       | 28 +++---------------------
> net/bluetooth/mgmt.c             |  6 +-----
> net/bluetooth/smp.c              | 17 ++++++---------
> 6 files changed, 28 insertions(+), 70 deletions(-)

all 8 patches have been applied to bluetooth-next tree.

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