1. 15 5月, 2020 12 次提交
  2. 14 5月, 2020 26 次提交
  3. 13 5月, 2020 2 次提交
    • A
      Bluetooth: L2CAP: add support for waiting disconnection resp · 5b440676
      Archie Pusaka 提交于
      Whenever we disconnect a L2CAP connection, we would immediately
      report a disconnection event (EPOLLHUP) to the upper layer, without
      waiting for the response of the other device.
      
      This patch offers an option to wait until we receive a disconnection
      response before reporting disconnection event, by using the "how"
      parameter in l2cap_sock_shutdown(). Therefore, upper layer can opt
      to wait for disconnection response by shutdown(sock, SHUT_WR).
      
      This can be used to enforce proper disconnection order in HID,
      where the disconnection of the interrupt channel must be complete
      before attempting to disconnect the control channel.
      Signed-off-by: NArchie Pusaka <apusaka@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      5b440676
    • S
      Bluetooth: Handle Inquiry Cancel error after Inquiry Complete · adf1d692
      Sonny Sasaka 提交于
      After sending Inquiry Cancel command to the controller, it is possible
      that Inquiry Complete event comes before Inquiry Cancel command complete
      event. In this case the Inquiry Cancel command will have status of
      Command Disallowed since there is no Inquiry session to be cancelled.
      This case should not be treated as error, otherwise we can reach an
      inconsistent state.
      
      Example of a btmon trace when this happened:
      
      < HCI Command: Inquiry Cancel (0x01|0x0002) plen 0
      > HCI Event: Inquiry Complete (0x01) plen 1
              Status: Success (0x00)
      > HCI Event: Command Complete (0x0e) plen 4
            Inquiry Cancel (0x01|0x0002) ncmd 1
              Status: Command Disallowed (0x0c)
      Signed-off-by: NSonny Sasaka <sonnysasaka@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      adf1d692