Browse Source

Bluetooth: Classic: L2CAP: Set default value for BR timer timeout

When peer monitor and retransmission timeout are zero, set them to the
default values. This ensures that the monitor timeout is always a valid
value to avoid the L2CAP BR timer work queue hang.

Signed-off-by: Make Shi <make.shi@nxp.com>
pull/92793/head
Make Shi 3 weeks ago committed by Daniel DeGrasse
parent
commit
9104e941f9
  1. 8
      subsys/bluetooth/host/classic/l2cap_br.c

8
subsys/bluetooth/host/classic/l2cap_br.c

@ -4034,6 +4034,14 @@ static uint16_t l2cap_br_conf_opt_ret_fc(struct bt_l2cap_chan *chan, struct net_ @@ -4034,6 +4034,14 @@ static uint16_t l2cap_br_conf_opt_ret_fc(struct bt_l2cap_chan *chan, struct net_
opt_ret_fc->tx_windows_size = CONFIG_BT_L2CAP_MAX_WINDOW_SIZE;
}
if (monitor_timeout == 0) {
monitor_timeout = CONFIG_BT_L2CAP_BR_MONITOR_TIMEOUT;
}
if (retransmission_timeout == 0) {
retransmission_timeout = CONFIG_BT_L2CAP_BR_RET_TIMEOUT;
}
opt_ret_fc->retransmission_timeout = sys_cpu_to_le16(retransmission_timeout);
opt_ret_fc->monitor_timeout = sys_cpu_to_le16(monitor_timeout);

Loading…
Cancel
Save