-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Bluetooth: Controller: Initial Frame Space Update support #99473
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,6 +53,13 @@ struct data_pdu_length { | |
| }; | ||
| #endif /* CONFIG_BT_CTLR_DATA_LENGTH */ | ||
|
|
||
| struct data_pdu_fsu { | ||
| uint16_t fsu_min; | ||
| uint16_t fsu_max; | ||
| uint8_t phys; | ||
| uint16_t spacing_type; | ||
| }; | ||
|
|
||
| struct lll_conn { | ||
| struct lll_hdr hdr; | ||
|
|
||
|
|
@@ -133,6 +140,12 @@ struct lll_conn { | |
| uint8_t update; | ||
| } dle; | ||
| #endif /* CONFIG_BT_CTLR_DATA_LENGTH */ | ||
| struct { | ||
| struct data_pdu_fsu local; | ||
| struct data_pdu_fsu perphy[4]; /* store frame-space for each PHY */ | ||
|
||
| struct data_pdu_fsu eff; | ||
| uint8_t update; | ||
| } fsu; | ||
|
|
||
| #if defined(CONFIG_BT_CTLR_PHY) | ||
| uint8_t phy_tx:3; | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2380,6 +2380,13 @@ void ull_conn_update_parameters(struct ll_conn *conn, uint8_t is_cu_proc, uint8_ | |||||
| lll->tifs_tx_us = EVENT_IFS_DEFAULT_US; | ||||||
| lll->tifs_rx_us = EVENT_IFS_DEFAULT_US; | ||||||
| lll->tifs_hcto_us = EVENT_IFS_DEFAULT_US; | ||||||
| for (size_t i = 0; i < 3; i++) { | ||||||
| conn->lll.fsu.perphy[i].fsu_min = EVENT_IFS_DEFAULT_US; | ||||||
| conn->lll.fsu.perphy[i].fsu_max = EVENT_IFS_DEFAULT_US; | ||||||
| conn->lll.fsu.perphy[i].phys = PHY_1M | PHY_2M | PHY_CODED; | ||||||
| conn->lll.fsu.perphy[i].spacing_type = | ||||||
| T_IFS_ACL_PC | T_IFS_ACL_CP | T_IFS_CIS; | ||||||
| } | ||||||
|
|
||||||
| #if defined(CONFIG_BT_CTLR_DATA_LENGTH) && \ | ||||||
| defined(CONFIG_BT_CTLR_SLOT_RESERVATION_UPDATE) | ||||||
|
|
@@ -2417,6 +2424,14 @@ void ull_conn_update_parameters(struct ll_conn *conn, uint8_t is_cu_proc, uint8_ | |||||
| lll->tifs_tx_us = CONFIG_BT_CTLR_EVENT_IFS_LOW_LAT_US; | ||||||
| lll->tifs_rx_us = CONFIG_BT_CTLR_EVENT_IFS_LOW_LAT_US; | ||||||
| lll->tifs_hcto_us = CONFIG_BT_CTLR_EVENT_IFS_LOW_LAT_US; | ||||||
| for (size_t i = 0; i < 3; i++) { | ||||||
| conn->lll.fsu.perphy[i].fsu_min = | ||||||
| CONFIG_BT_CTLR_EVENT_IFS_LOW_LAT_US; | ||||||
| conn->lll.fsu.perphy[i].fsu_max = EVENT_IFS_US; | ||||||
| conn->lll.fsu.perphy[i].phys = PHY_1M | PHY_2M | PHY_CODED; | ||||||
| conn->lll.fsu.perphy[i].spacing_type = | ||||||
| T_IFS_ACL_PC | T_IFS_ACL_CP | T_IFS_CIS; | ||||||
| } | ||||||
| /* Reserve only the processing overhead, on overlap the | ||||||
| * is_abort_cb mechanism will ensure to continue the event so | ||||||
| * as to not loose anchor point sync. | ||||||
|
|
@@ -2832,6 +2847,132 @@ void ull_conn_default_tx_time_set(uint16_t tx_time) | |||||
| } | ||||||
| #endif /* CONFIG_BT_CTLR_DATA_LENGTH */ | ||||||
|
|
||||||
| uint8_t ull_fsu_update_eff(struct ll_conn *conn) | ||||||
| { | ||||||
| uint8_t fsu_changed = 0U; | ||||||
| uint8_t phy_tx; | ||||||
| uint8_t phy_rx; | ||||||
|
|
||||||
| #if defined(CONFIG_BT_PHY_UPDATE) | ||||||
| phy_tx = conn->lll.phy_tx; | ||||||
| phy_rx = conn->lll.phy_rx; | ||||||
| #else | ||||||
| phy_tx = PHY_1M; | ||||||
| phy_rx = PHY_1M; | ||||||
| #endif /* CONFIG_BT_PHY_UPDATE */ | ||||||
|
|
||||||
| fsu_changed = ull_fsu_update_eff_from_local(conn); | ||||||
|
|
||||||
| if (fsu_changed) { | ||||||
| /* TODO: confirm that we do not need to do something here? */ | ||||||
|
||||||
| /* TODO: confirm that we do not need to do something here? */ | |
| /* TODO: Verify if additional actions (e.g., timing parameter recalculation or event notification) are needed when FSU changes. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LL_FEAT_BIT_FRAME_SPACE is defined as 0U which conflicts with existing feature bit 0. This should be assigned a unique, unused bit position in the feature mask. The comment on line 256 acknowledges this needs fixing for feature bits > 64 bits.