Files
Lyle Zhu cc18a23ec9 bluetooth: classic: GOEP: fix L2CAP MTU calculation
Correct the minimum MTU calculation for GOEP over L2CAP to account
for the L2CAP I-frame overhead.

- Update BT_BUF_ACL_RX_SIZE default from 264 to 265 bytes for GOEP
- Update BT_GOEP_L2CAP_MTU minimum range from 259 to 265 bytes
- Add detailed comment explaining L2CAP I-frame field length (6 bytes):
  * 4 bytes for extended control field
  * 2 bytes for FCS field

The previous calculation only accounted for the L2CAP header (4 bytes)
but missed the 6-byte L2CAP I-frame overhead (extended control field
and FCS), resulting in an incorrect minimum of 264 bytes instead
of the correct 265 bytes. And it causes the minimum MTU of L2CAP
to be incorrectly set to 254. The MTU cannot meet the minimum
requirement of GOEP MOPL.

The correct calculation for GOEP over L2CAP is:
255 bytes (GOEP minimum MTU) + 4 bytes (L2CAP header) + 6 bytes
(L2CAP I-frame) = 265 bytes total.

Set the default value of CONFIG_BT_BUF_ACL_RX_SIZE to 265 if GOEP is
enabled.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-23 10:41:38 +01:00
..
2025-12-04 05:26:00 -05:00