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

Commit a534df1c authored by Hansong Zhang's avatar Hansong Zhang
Browse files

L2cap: Store MTU and ERTM info during registration

So that L2cap can auto respond to config req/rsp.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8b68bd2d0e200a5dae9936ab46a259442987f219
parent 20e559a4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ uint16_t L2CA_Register(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
  p_rcb->log_packets = enable_snoop;
  p_rcb->api = p_cb_info;
  p_rcb->real_psm = psm;
  p_rcb->ertm_info = p_ertm_info == nullptr ? tL2CAP_ERTM_INFO{} : *p_ertm_info;
  p_rcb->required_mtu = std::max<uint16_t>(required_mtu, L2CAP_DEFAULT_MTU);

  return (vpsm);
}
+2 −0
Original line number Diff line number Diff line
@@ -201,6 +201,8 @@ typedef struct {
  uint16_t real_psm; /* This may be a dummy RCB for an o/b connection but */
                     /* this is the real PSM that we need to connect to */
  tL2CAP_APPL_INFO api;
  tL2CAP_ERTM_INFO ertm_info;
  uint16_t required_mtu;
} tL2C_RCB;

#define L2CAP_CBB_DEFAULT_DATA_RATE_BUFF_QUOTA 100