Floss: Refactor flow when controller needs to reset
Currently cases that controller needs to reset are - HCI command timeout. - Receives HCI Hardware error event. - Fails to write to or read from the socket. The current possible issues are - On HCI command timeout or Hardware error The HciLayer might still send and receive packets. It becomes more complicated for stack to shutdown the stack and handle the packets at the same time. - When socket fails to write or read Since HCI Layer is unaware of it, the on_hci_timeout could still be fired and invokes additional cleanup procedure. - In either case We send SIGTERM to the process. The Floss stack will initiate a shutdown procedure which involves a series of HCI commands, but the commands might just fail or timeout because the controller is already in a bad state. The CL does following upon any of the above issue happens 1. Block all incoming packet callbacks and skip to send outgoing packets 2. Use SIGUSR1 signal to represent the signal that the controller needs to be reset NO_IFTTT= Floss only change. Bug: 393662321 Tag: #floss Test: mmm packages/modules/Bluetooth Flag: EXEMPT, Floss-only changes Change-Id: I3ea011f56943f6632da00bf2dabd9be2110578bb
Loading
Please register or sign in to comment