Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nimble/ll: solve issue with duplicated ISO flags #1641

Merged
merged 3 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/test_build_apps_syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ syscfg.vals:
BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS: 1
BLE_ISO: 1
BLE_ISO_TEST: 1
BLE_ISO_BROADCASTER: 1
BLE_HCI_VS: 1
BLE_POWER_CONTROL: 1
BLE_CONN_SUBRATING: 1
Expand Down
6 changes: 0 additions & 6 deletions nimble/controller/src/ble_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -1925,12 +1925,6 @@ ble_ll_init(void)
features |= BLE_LL_FEAT_SCA_UPDATE;
#endif

#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
features |= BLE_LL_FEAT_CIS_CENTRAL;
features |= BLE_LL_FEAT_CIS_PERIPH;
features |= BLE_LL_FEAT_CIS_HOST;
#endif

#if MYNEWT_VAL(BLE_LL_ISO_BROADCASTER)
features |= BLE_LL_FEAT_ISO_BROADCASTER;
#endif
Expand Down
47 changes: 0 additions & 47 deletions nimble/controller/src/ble_ll_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1296,27 +1296,6 @@ ble_ll_ctrl_rx_subrate_ind(struct ble_ll_conn_sm *connsm, uint8_t *req,
}
#endif

#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
static uint8_t
ble_ll_ctrl_rx_cis_req(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
uint8_t *rspdata)
{
return BLE_LL_CTRL_UNKNOWN_RSP;
}

static uint8_t
ble_ll_ctrl_rx_cis_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
uint8_t *rspdata)
{
return BLE_LL_CTRL_UNKNOWN_RSP;
}

static uint8_t
ble_ll_ctrl_rx_cis_ind(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
{
return BLE_LL_CTRL_UNKNOWN_RSP;
}
#endif
/**
* Create a link layer length request or length response PDU.
*
Expand Down Expand Up @@ -1522,15 +1501,6 @@ ble_ll_ctrl_start_enc_send(struct ble_ll_conn_sm *connsm)
return rc;
}

#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
static void
ble_ll_ctrl_cis_create(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
{
/* TODO Implement */
return;
}
#endif

/**
* Create a link layer control "encrypt request" PDU.
*
Expand Down Expand Up @@ -2544,12 +2514,6 @@ ble_ll_ctrl_proc_init(struct ble_ll_conn_sm *connsm, int ctrl_proc, void *data)
ble_ll_ctrl_sca_req_rsp_make(connsm, ctrdata);
break;
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
case BLE_LL_CTRL_PROC_CIS_CREATE:
opcode = BLE_LL_CTRL_CIS_REQ;
ble_ll_ctrl_cis_create(connsm, ctrdata);
break;
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ENHANCED_CONN_UPDATE)
#if MYNEWT_VAL(BLE_LL_ROLE_PERIPHERAL)
case BLE_LL_CTRL_PROC_SUBRATE_REQ:
Expand Down Expand Up @@ -3013,17 +2977,6 @@ ble_ll_ctrl_rx_pdu(struct ble_ll_conn_sm *connsm, struct os_mbuf *om)
break;
#endif

#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
case BLE_LL_CTRL_CIS_REQ:
rsp_opcode = ble_ll_ctrl_rx_cis_req(connsm, dptr, rspdata);
break;
case BLE_LL_CTRL_CIS_RSP:
rsp_opcode = ble_ll_ctrl_rx_cis_rsp(connsm, dptr, rspdata);
break;
case BLE_LL_CTRL_CIS_IND:
rsp_opcode = ble_ll_ctrl_rx_cis_ind(connsm, dptr);
break;
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER)
case BLE_LL_CTRL_PERIODIC_SYNC_IND:
rsp_opcode = ble_ll_ctrl_rx_periodic_sync_ind(connsm, dptr);
Expand Down
52 changes: 0 additions & 52 deletions nimble/controller/src/ble_ll_hci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,32 +1275,6 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf,
rc = ble_ll_iso_big_hci_terminate(cmdbuf, len);
break;
#endif /* BLE_LL_ISO_BROADCASTER */
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
case BLE_HCI_OCF_LE_READ_ISO_TX_SYNC:
rc = ble_ll_iso_read_tx_sync(cmdbuf, len);
break;
case BLE_HCI_OCF_LE_SET_CIG_PARAMS:
rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
break;
case BLE_HCI_OCF_LE_CREATE_CIS:
rc = ble_ll_iso_create_cis(cmdbuf, len);
break;
case BLE_HCI_OCF_LE_REMOVE_CIG:
rc = ble_ll_iso_remove_cig(cmdbuf, len, rspbuf, rsplen);
break;
case BLE_HCI_OCF_LE_ACCEPT_CIS_REQ:
rc = ble_ll_iso_accept_cis_req(cmdbuf, len);
break;
case BLE_HCI_OCF_LE_REJECT_CIS_REQ:
rc = ble_ll_iso_reject_cis_req(cmdbuf, len);
break;
case BLE_HCI_OCF_LE_BIG_CREATE_SYNC:
rc = ble_ll_iso_big_create_sync(cmdbuf, len);
break;
case BLE_HCI_OCF_LE_BIG_TERMINATE_SYNC:
rc = ble_ll_iso_big_terminate_sync(cmdbuf,len);
break;
#endif
#if MYNEWT_VAL(BLE_LL_ISO)
case BLE_HCI_OCF_LE_SETUP_ISO_DATA_PATH:
rc = ble_ll_isoal_hci_setup_iso_data_path(cmdbuf, len, rspbuf, rsplen);
Expand All @@ -1317,26 +1291,6 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf,
}
break;
#endif /* BLE_LL_ISO */
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO_TEST)
case BLE_HCI_OCF_LE_SET_CIG_PARAMS_TEST:
rc = ble_ll_iso_set_cig_param_test(cmdbuf, len, rspbuf, rsplen);
break;
case BLE_HCI_OCF_LE_CREATE_BIG_TEST:
rc = ble_ll_iso_create_big_test(cmdbuf, len);
break;
case BLE_HCI_OCF_LE_ISO_TRANSMIT_TEST:
rc = ble_ll_iso_transmit_test(cmdbuf, len);
break;
case BLE_HCI_OCF_LE_ISO_RECEIVE_TEST:
rc = ble_ll_iso_receive_test(cmdbuf, len);
break;
case BLE_HCI_OCF_LE_ISO_READ_TEST_COUNTERS:
rc = ble_ll_iso_read_counters_test(cmdbuf, len);
break;
case BLE_HCI_OCF_LE_ISO_TEST_END:
rc = ble_ll_iso_end_test(cmdbuf, len);
break;
#endif
#if MYNEWT_VAL(BLE_VERSION) >= 52
case BLE_HCI_OCF_LE_SET_HOST_FEATURE:
rc = ble_ll_set_host_feat(cmdbuf, len);
Expand Down Expand Up @@ -1385,12 +1339,6 @@ ble_ll_hci_disconnect(const uint8_t *cmdbuf, uint8_t len)
return BLE_ERR_INV_HCI_CMD_PARMS;
}

#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
if (le16toh(cmd->conn_handle) >= BLE_LL_CONN_HANDLE_ISO_OFFSET) {
return ble_ll_iso_disconnect_cmd(cmd);
}
#endif

return ble_ll_conn_hci_disconnect_cmd(cmd);
}
#endif
Expand Down
146 changes: 0 additions & 146 deletions nimble/controller/src/ble_ll_iso.c

This file was deleted.

2 changes: 1 addition & 1 deletion nimble/controller/src/ble_ll_iso_big.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ ble_ll_iso_big_event_done(struct ble_ll_iso_big *big)
{
struct ble_ll_iso_bis *bis;
struct ble_hci_ev *hci_ev;
struct ble_hci_ev_num_comp_pkts *hci_ev_ncp;
struct ble_hci_ev_num_comp_pkts *hci_ev_ncp = NULL;
int num_completed_pkt;
int rc;

Expand Down
19 changes: 2 additions & 17 deletions nimble/controller/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,21 +348,6 @@ syscfg.defs:
restrictions:
- '(BLE_VERSION >= 53) if 1'

BLE_LL_CFG_FEAT_LL_ISO:
description: >
This option is used to enable/disable support for LE Isochronous Channels
as per Bluetooth v5.2 channels
value: MYNEWT_VAL(BLE_ISO)
restrictions:
- '(BLE_VERSION >= 52) if 1'

BLE_LL_CFG_FEAT_LL_ISO_TEST:
description: >
This option is used to enable/disbale test commands for ISO support
value: MYNEWT_VAL(BLE_ISO_TEST)
restrictions:
- 'BLE_LL_CFG_FEAT_LL_ISO if 1'

BLE_LL_PERIODIC_ADV_SYNC_BIGINFO_REPORTS:
description: >
This option is used to enable/disable support for
Expand Down Expand Up @@ -479,14 +464,14 @@ syscfg.defs:
data, particular ISO features have to be enabled separately.
restrictions:
- (BLE_VERSION >= 52) if 1
value: 0
value: MYNEWT_VAL(BLE_ISO)
state: experimental
BLE_LL_ISO_BROADCASTER:
description: >
Enable support for Isochronous Broadcasting state.
restrictions:
- BLE_LL_ISO if 1
value: 0
value: MYNEWT_VAL(BLE_ISO_BROADCASTER)
state: experimental

BLE_LL_SYSINIT_STAGE:
Expand Down
7 changes: 6 additions & 1 deletion nimble/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ syscfg.defs:
value: 0
restrictions:
- '(BLE_VERSION >= 52) if 1'

BLE_ISO_BROADCASTER:
description: >
This enables LE Audio Broadcaster feature
value: 0
restrictions:
- '(BLE_VERSION >= 52) if 1'
BLE_ISO_TEST:
description: >
Enables BLE ISO Testing commands
Expand Down
Loading