Bluetooth: Controller: Limit maximum ACL Tx buffer size to 251 octets
Limit the maximum ACL Tx buffer size to 251 octets due to implementation restricted use of uint8_t for PDU len field, also used as the Tx buffer size data type. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
d268c99266
commit
f216915638
3 changed files with 13 additions and 7 deletions
|
@ -1286,7 +1286,7 @@ static void le_read_buffer_size(struct net_buf *buf, struct net_buf **evt)
|
|||
|
||||
rp->status = 0x00;
|
||||
|
||||
rp->le_max_len = sys_cpu_to_le16(CONFIG_BT_BUF_ACL_TX_SIZE);
|
||||
rp->le_max_len = sys_cpu_to_le16(LL_LENGTH_OCTETS_TX_MAX);
|
||||
rp->le_max_num = CONFIG_BT_BUF_ACL_TX_COUNT;
|
||||
}
|
||||
|
||||
|
@ -1299,7 +1299,7 @@ static void le_read_buffer_size_v2(struct net_buf *buf, struct net_buf **evt)
|
|||
|
||||
rp->status = 0x00;
|
||||
|
||||
rp->acl_max_len = sys_cpu_to_le16(CONFIG_BT_BUF_ACL_TX_SIZE);
|
||||
rp->acl_max_len = sys_cpu_to_le16(LL_LENGTH_OCTETS_TX_MAX);
|
||||
rp->acl_max_num = CONFIG_BT_BUF_ACL_TX_COUNT;
|
||||
rp->iso_max_len = sys_cpu_to_le16(CONFIG_BT_CTLR_ISO_TX_BUFFER_SIZE);
|
||||
rp->iso_max_num = CONFIG_BT_CTLR_ISO_TX_BUFFERS;
|
||||
|
@ -4774,7 +4774,7 @@ int hci_acl_handle(struct net_buf *buf, struct net_buf **evt)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (len > CONFIG_BT_BUF_ACL_TX_SIZE) {
|
||||
if (len > LL_LENGTH_OCTETS_TX_MAX) {
|
||||
BT_ERR("Invalid HCI ACL Data length");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue