Bluetooth: controller: Rework TX data pause

Change LLCP TX data pause into using mask to allow for pausing from
multiple different sources - but only once per source
(the underlying TX queue still just has an integer counter).

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
This commit is contained in:
Thomas Ebert Hansen 2022-03-24 11:21:21 +01:00 committed by Carles Cufí
commit 79092c3cf4
8 changed files with 107 additions and 26 deletions

View file

@ -359,7 +359,7 @@ static void lp_comm_complete(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t
/* Resume data, but only if there is no remote procedure pending RSP
* in which case, the RSP tx-ACK will resume data
*/
llcp_tx_resume_data(conn);
llcp_tx_resume_data(conn, LLCP_TX_QUEUE_PAUSE_DATA_DATA_LENGTH);
}
break;
#endif /* CONFIG_BT_CTLR_DATA_LENGTH */
@ -476,7 +476,7 @@ static void lp_comm_send_req(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t
* update DLE without conflicting with out-going LL Data PDUs
* See BT Core 5.2 Vol6: B-4.5.10 & B-5.1.9
*/
llcp_tx_pause_data(conn);
llcp_tx_pause_data(conn, LLCP_TX_QUEUE_PAUSE_DATA_DATA_LENGTH);
lp_comm_tx(conn, ctx);
ctx->state = LP_COMMON_STATE_WAIT_RX;
}
@ -760,7 +760,7 @@ static void rp_comm_rx_decode(struct ll_conn *conn, struct proc_ctx *ctx, struct
* conflicting with out-going LL Data PDUs
* See BT Core 5.2 Vol6: B-4.5.10 & B-5.1.9
*/
llcp_tx_pause_data(conn);
llcp_tx_pause_data(conn, LLCP_TX_QUEUE_PAUSE_DATA_DATA_LENGTH);
break;
#endif /* CONFIG_BT_CTLR_DATA_LENGTH */
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RSP)
@ -1052,7 +1052,7 @@ static void rp_comm_st_wait_tx_ack(struct ll_conn *conn, struct proc_ctx *ctx, u
/* Apply changes in data lengths/times */
uint8_t dle_changed = ull_dle_update_eff(conn);
llcp_tx_resume_data(conn);
llcp_tx_resume_data(conn, LLCP_TX_QUEUE_PAUSE_DATA_DATA_LENGTH);
if (dle_changed && !llcp_ntf_alloc_is_available()) {
ctx->state = RP_COMMON_STATE_WAIT_NTF;