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

Commit 2d3fefa6 authored by Chris Manton's avatar Chris Manton
Browse files

Unnecessary def BTA_GATTC_CONN_MAX => GATT_MAX_PHY_CHANNEL

Bug: 163134718
Test: gd/cert/run
Tag: #refactor

Change-Id: I034765099d25b207e8085fcdae59de866d400278
parent 6aa6c0df
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -75,8 +75,6 @@ typedef uint16_t tBTA_GATTC_INT_EVT;
#define BTA_GATTC_KNOWN_SR_MAX 255
#endif

#define BTA_GATTC_CONN_MAX GATT_MAX_PHY_CHANNEL

#ifndef BTA_GATTC_CLCB_MAX
#define BTA_GATTC_CLCB_MAX GATT_CL_MAX_LCB
#endif
@@ -305,7 +303,7 @@ enum {
typedef struct {
  uint8_t state;

  tBTA_GATTC_CONN conn_track[BTA_GATTC_CONN_MAX];
  tBTA_GATTC_CONN conn_track[GATT_MAX_PHY_CHANNEL];
  tBTA_GATTC_BG_TCK bg_track[BTA_GATTC_KNOWN_SR_MAX];
  tBTA_GATTC_RCB cl_rcb[BTA_GATTC_CL_MAX];

+2 −2
Original line number Diff line number Diff line
@@ -526,7 +526,7 @@ tBTA_GATTC_CONN* bta_gattc_conn_alloc(const RawAddress& remote_bda) {
  uint8_t i_conn = 0;
  tBTA_GATTC_CONN* p_conn = &bta_gattc_cb.conn_track[0];

  for (i_conn = 0; i_conn < BTA_GATTC_CONN_MAX; i_conn++, p_conn++) {
  for (i_conn = 0; i_conn < GATT_MAX_PHY_CHANNEL; i_conn++, p_conn++) {
    if (!p_conn->in_use) {
#if (BTA_GATT_DEBUG == TRUE)
      VLOG(1) << __func__ << ": found conn_track:" << +i_conn << " available";
@@ -552,7 +552,7 @@ tBTA_GATTC_CONN* bta_gattc_conn_find(const RawAddress& remote_bda) {
  uint8_t i_conn = 0;
  tBTA_GATTC_CONN* p_conn = &bta_gattc_cb.conn_track[0];

  for (i_conn = 0; i_conn < BTA_GATTC_CONN_MAX; i_conn++, p_conn++) {
  for (i_conn = 0; i_conn < GATT_MAX_PHY_CHANNEL; i_conn++, p_conn++) {
    if (p_conn->in_use && remote_bda == p_conn->remote_bda) {
#if (BTA_GATT_DEBUG == TRUE)
      VLOG(1) << __func__ << ": found conn_track:" << +i_conn << " matched";