Bluetooth: HCI H5 peer reset detection
authorLoic Poulain <loic.poulain@intel.com>
Wed, 8 Oct 2014 14:54:28 +0000 (16:54 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 31 Oct 2014 17:54:34 +0000 (19:54 +0200)
commitb509c02d0f31639dda90f9b7269668b86c9b25ef
tree1fac041d8fb607dfea6bf30d21f47ea12bd844d6
parenta4d5504d5c39cc84f1f828e19967595597a8136e
Bluetooth: HCI H5 peer reset detection

H5 Specification says:
If a SYNC message is received while in the Active State, it is
assumed that the peer device has reset. The local device should
therefore perform a full reset of the upper stack, and start Link
Establishment again at the Uninitialized State. Upon entering the
Active State, the first packet sent shall have its SEQ and ACK
numbers set to zero.

This patch resets the HCI H5 driver data/state to unitialized and
reports an HCI hardware error event to notify the upper stack that
HCI synchronization has been lost. H5 will be re-synchronized and
upper stack should generate an HCI Reset command.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
drivers/bluetooth/hci_h5.c