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

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

LegacyL2CAP: Remove some unused streaming mode code am: cdc1ad20

Change-Id: I6ed2e4020e5b275d15928a15785282e21d98b7b8
parents 14347f45 cdc1ad20
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -83,7 +83,6 @@
/* GAP_ConnOpen() - optional channels to negotiate */
/* GAP_ConnOpen() - optional channels to negotiate */
#define GAP_FCR_CHAN_OPT_BASIC L2CAP_FCR_CHAN_OPT_BASIC
#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_ERTM L2CAP_FCR_CHAN_OPT_ERTM
#define GAP_FCR_CHAN_OPT_STREAM L2CAP_FCR_CHAN_OPT_STREAM
/*** used in connection variables and functions ***/
/*** used in connection variables and functions ***/
#define GAP_INVALID_HANDLE 0xFFFF
#define GAP_INVALID_HANDLE 0xFFFF


+2 −4
Original line number Original line 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_BASIC (1 << L2CAP_FCR_BASIC_MODE)
#define L2CAP_FCR_CHAN_OPT_ERTM (1 << L2CAP_FCR_ERTM_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 \
#define L2CAP_FCR_CHAN_OPT_ALL_MASK \
  (L2CAP_FCR_CHAN_OPT_BASIC | L2CAP_FCR_CHAN_OPT_ERTM | \
  (L2CAP_FCR_CHAN_OPT_BASIC | L2CAP_FCR_CHAN_OPT_ERTM)
   L2CAP_FCR_CHAN_OPT_STREAM)


/* Validity check for PSM.  PSM values must be odd.  Also, all PSM values must
/* 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
 * be assigned such that the least significant bit of the most sigificant
+3 −8
Original line number Original line 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))
  if (!(p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_ENH_RETRANS))
    p_ccb->ertm_info.allowed_modes &= ~L2CAP_FCR_CHAN_OPT_ERTM;
    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 */
  /* At least one type needs to be set (Basic, ERTM, STM) to continue */
  if (!p_ccb->ertm_info.allowed_modes) {
  if (!p_ccb->ertm_info.allowed_modes) {
    L2CAP_TRACE_WARNING(
    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
     * Override mode from available mode options based on preference, if needed
     */
     */
    else {
    else {
      /* If peer does not support STREAMING, try ERTM */
      /* There is no STREAMING use case, try ERTM */
      if (p_fcr->mode == L2CAP_FCR_STREAM_MODE &&
      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 use case; Try ERTM");
        L2CAP_TRACE_DEBUG(
            "L2C CFG: mode is STREAM, but peer does not support; Try ERTM");
        p_fcr->mode = L2CAP_FCR_ERTM_MODE;
        p_fcr->mode = L2CAP_FCR_ERTM_MODE;
      }
      }


+0 −3
Original line number Original line 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
      /*                 timer value in config response shall be greater than
       * received processing time */
       * received processing time */
      p_cfg->fcr.mon_tout = p_cfg->fcr.rtrans_tout = 0;
      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) */
    /* Set the threshold to send acks (may be updated in the cfg response) */