Bluetooth: hci: Add handling of allowed CTE types for per sync create
Add missing code responsible for handling of allowed CTE types in HCI_LE_Periodic_Advertising_Create_Sync command. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This commit is contained in:
parent
0b4047c1c4
commit
ff3045db61
1 changed files with 7 additions and 5 deletions
|
@ -3331,10 +3331,12 @@ static void le_per_adv_create_sync(struct net_buf *buf, struct net_buf **evt)
|
|||
skip = sys_le16_to_cpu(cmd->skip);
|
||||
sync_timeout = sys_le16_to_cpu(cmd->sync_timeout);
|
||||
|
||||
status = ll_sync_create(cmd->options, cmd->sid, cmd->addr.type,
|
||||
cmd->addr.a.val, skip, sync_timeout,
|
||||
cmd->cte_type);
|
||||
|
||||
if ((cmd->cte_type & BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_INVALID_VALUE) != 0) {
|
||||
status = BT_HCI_ERR_CMD_DISALLOWED;
|
||||
} else {
|
||||
status = ll_sync_create(cmd->options, cmd->sid, cmd->addr.type, cmd->addr.a.val,
|
||||
skip, sync_timeout, cmd->cte_type);
|
||||
}
|
||||
*evt = cmd_status(status);
|
||||
}
|
||||
|
||||
|
@ -5623,7 +5625,7 @@ static void le_per_adv_sync_established(struct pdu_data *pdu_data,
|
|||
sep->status = se->status;
|
||||
sep->handle = sys_cpu_to_le16(node_rx->hdr.handle);
|
||||
|
||||
if (sep->status) {
|
||||
if (sep->status != BT_HCI_ERR_SUCCESS && sep->status != BT_HCI_ERR_UNSUPP_REMOTE_FEATURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue