Bluetooth: controller: split: Fix PHY update tx pause

Data transmission was paused when PHY update request control
PDU was enqueued in ULL. If there was pending data PDU in
ULL that was not enqueued towards LLL, this caused
transmission to stall.

Move the tx pause due to PHY update request/response being
enqueued to pre_tx_ack callback, this way all pending PDUs
in ULL is enqueued to LLL.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2020-02-06 21:39:05 +05:30 committed by Alberto Escolar
commit 8a3a4bb589

View file

@ -3371,9 +3371,6 @@ static inline void event_phy_req_prep(struct ll_conn *conn)
conn->phy_pref_rx = conn->llcp_phy.rx;
conn->phy_pref_flags = conn->llcp_phy.flags;
/* pause data packet tx */
conn->llcp_phy.pause_tx = 1U;
/* place the phy req packet as next in tx queue */
pdu_ctrl_tx = (void *)tx->pdu;
pdu_ctrl_tx->ll_id = PDU_DATA_LLID_CTRL;
@ -4724,9 +4721,6 @@ static int phy_rsp_send(struct ll_conn *conn, struct node_rx_pdu *rx,
conn->llcp_phy.tx &= p->rx_phys;
conn->llcp_phy.rx &= p->tx_phys;
/* pause data packet tx */
conn->llcp_phy.pause_tx = 1U;
pdu_ctrl_tx = (void *)tx->pdu;
pdu_ctrl_tx->ll_id = PDU_DATA_LLID_CTRL;
pdu_ctrl_tx->len = offsetof(struct pdu_data_llctrl, phy_rsp) +
@ -4856,7 +4850,7 @@ static inline void ctrl_tx_pre_ack(struct ll_conn *conn,
if (!conn->lll.role) {
break;
}
/* Pass Through */
/* fallthrough */
case PDU_DATA_LLCTRL_TYPE_ENC_REQ:
case PDU_DATA_LLCTRL_TYPE_ENC_RSP:
@ -4864,9 +4858,16 @@ static inline void ctrl_tx_pre_ack(struct ll_conn *conn,
/* pause data packet tx */
conn->llcp_enc.pause_tx = 1U;
break;
#endif /* CONFIG_BT_CTLR_LE_ENC */
#if defined(CONFIG_BT_CTLR_PHY)
case PDU_DATA_LLCTRL_TYPE_PHY_REQ:
case PDU_DATA_LLCTRL_TYPE_PHY_RSP:
/* pause data packet tx */
conn->llcp_phy.pause_tx = 1U;
break;
#endif /* CONFIG_BT_CTLR_PHY */
default:
/* Do nothing for other ctrl packet ack */
break;