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

Commit 9b66a1d3 authored by Chris Manton's avatar Chris Manton
Browse files

Remove def stack/l2cap/l2c_link::L2C_LINK_CHECK_POWER_MODE

Unnecessary layer of indirection

Towards readable code

Bug: 163134718
Tag: #refactor
Test: acts -tc BleCocTest
Test: ble paired 2 phones
Change-Id: I0e99b5df8fb0f2f678ae94320b1daaac78d606dd
parent 6060e048
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -652,7 +652,6 @@ extern void l2c_link_sec_comp2(const RawAddress& p_bda, tBT_TRANSPORT trasnport,
extern void l2c_link_adjust_chnl_allocation(void);

extern bool l2c_link_check_power_mode(tL2C_LCB* p_lcb);
#define L2C_LINK_CHECK_POWER_MODE(x) l2c_link_check_power_mode((x))

#if (L2CAP_CONFORMANCE_TESTING == TRUE)
/* Used only for conformance testing */
+2 −2
Original line number Diff line number Diff line
@@ -912,7 +912,7 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid,

      if ((!p_lcb->in_use) || (p_lcb->partial_segment_being_sent) ||
          (p_lcb->link_state != LST_CONNECTED) ||
          (p_lcb->link_xmit_quota != 0) || (L2C_LINK_CHECK_POWER_MODE(p_lcb)))
          (p_lcb->link_xmit_quota != 0) || (l2c_link_check_power_mode(p_lcb)))
        continue;

      /* See if we can send anything from the Link Queue */
@@ -949,7 +949,7 @@ void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid,
    /* If a partial segment is being sent, can't send anything else */
    if ((p_lcb->partial_segment_being_sent) ||
        (p_lcb->link_state != LST_CONNECTED) ||
        (L2C_LINK_CHECK_POWER_MODE(p_lcb)))
        (l2c_link_check_power_mode(p_lcb)))
      return;

    /* See if we can send anything from the link queue */