Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecf15fa2 authored by Chris Manton's avatar Chris Manton
Browse files

Group similar values L2CA_SetFlushTimeout

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I658fb9b6270783615dfd1fea264f9aeb4bd96485
parent 27200953
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -1226,17 +1226,14 @@ bool L2CA_SetFlushTimeout(const RawAddress& bd_addr,
  if (flush_timeout_in_ms == 0x0000) {
    flush_timeout_in_slots = flush_timeout_in_ms;
    flush_timeout_in_ms = L2CAP_NO_AUTOMATIC_FLUSH;
  }
  } else if (flush_timeout_in_ms == L2CAP_NO_AUTOMATIC_FLUSH) {
    flush_timeout_in_slots = 0x0000;
  } else if (flush_timeout_in_ms == L2CAP_NO_RETRANSMISSION) {
    /* no retransmission */
  else if (flush_timeout_in_ms == L2CAP_NO_RETRANSMISSION) {
    /* not mandatory range for controller */
    /* Packet is flushed before getting any ACK/NACK */
    /* To do this, flush timeout should be 1 baseband slot */
    flush_timeout_in_slots = flush_timeout_in_ms;
  }
  /* no automatic flush (infinite timeout) */
  else if (flush_timeout_in_ms == L2CAP_NO_AUTOMATIC_FLUSH) {
    flush_timeout_in_slots = 0x0000;
  } else {
    flush_timeout_in_slots =
        ConvertMillisecondsToBasebandSlots(flush_timeout_in_ms);