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

Commit 89752ca5 authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

LegacyL2CAP: Remove some unused streaming mode code am: cdc1ad20 am: e03b4b15

Change-Id: I7db440907daadb0f02e91fda5d4828597801c6e7
parents f3dc58ac e03b4b15
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -83,7 +83,6 @@
/* GAP_ConnOpen() - optional channels to negotiate */
#define GAP_FCR_CHAN_OPT_BASIC L2CAP_FCR_CHAN_OPT_BASIC
#define GAP_FCR_CHAN_OPT_ERTM L2CAP_FCR_CHAN_OPT_ERTM
#define GAP_FCR_CHAN_OPT_STREAM L2CAP_FCR_CHAN_OPT_STREAM
/*** used in connection variables and functions ***/
#define GAP_INVALID_HANDLE 0xFFFF

+2 −4
Original line number Diff line number Diff line
@@ -95,11 +95,9 @@ typedef uint8_t tL2CAP_CHNL_DATA_RATE;
 */
#define L2CAP_FCR_CHAN_OPT_BASIC (1 << L2CAP_FCR_BASIC_MODE)
#define L2CAP_FCR_CHAN_OPT_ERTM (1 << L2CAP_FCR_ERTM_MODE)
#define L2CAP_FCR_CHAN_OPT_STREAM (1 << L2CAP_FCR_STREAM_MODE)

#define L2CAP_FCR_CHAN_OPT_ALL_MASK \
  (L2CAP_FCR_CHAN_OPT_BASIC | L2CAP_FCR_CHAN_OPT_ERTM | \
   L2CAP_FCR_CHAN_OPT_STREAM)
  (L2CAP_FCR_CHAN_OPT_BASIC | L2CAP_FCR_CHAN_OPT_ERTM)

/* Validity check for PSM.  PSM values must be odd.  Also, all PSM values must
 * be assigned such that the least significant bit of the most sigificant
+3 −8
Original line number Diff line number Diff line
@@ -1908,9 +1908,6 @@ uint8_t l2c_fcr_chk_chan_modes(tL2C_CCB* p_ccb) {
  if (!(p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_ENH_RETRANS))
    p_ccb->ertm_info.allowed_modes &= ~L2CAP_FCR_CHAN_OPT_ERTM;

  if (!(p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_STREAM_MODE))
    p_ccb->ertm_info.allowed_modes &= ~L2CAP_FCR_CHAN_OPT_STREAM;

  /* At least one type needs to be set (Basic, ERTM, STM) to continue */
  if (!p_ccb->ertm_info.allowed_modes) {
    L2CAP_TRACE_WARNING(
@@ -1985,11 +1982,9 @@ bool l2c_fcr_adj_our_req_options(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
     * Override mode from available mode options based on preference, if needed
     */
    else {
      /* If peer does not support STREAMING, try ERTM */
      if (p_fcr->mode == L2CAP_FCR_STREAM_MODE &&
          !(p_ccb->ertm_info.allowed_modes & L2CAP_FCR_CHAN_OPT_STREAM)) {
        L2CAP_TRACE_DEBUG(
            "L2C CFG: mode is STREAM, but peer does not support; Try ERTM");
      /* There is no STREAMING use case, try ERTM */
      if (p_fcr->mode == L2CAP_FCR_STREAM_MODE) {
        L2CAP_TRACE_DEBUG("L2C CFG: mode is STREAM, but use case; Try ERTM");
        p_fcr->mode = L2CAP_FCR_ERTM_MODE;
      }

+0 −3
Original line number Diff line number Diff line
@@ -2016,9 +2016,6 @@ void l2cu_process_our_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
      /*                 timer value in config response shall be greater than
       * received processing time */
      p_cfg->fcr.mon_tout = p_cfg->fcr.rtrans_tout = 0;

      if (p_cfg->fcr.mode == L2CAP_FCR_STREAM_MODE)
        p_cfg->fcr.max_transmit = p_cfg->fcr.tx_win_sz = 0;
    }

    /* Set the threshold to send acks (may be updated in the cfg response) */