Bluetooth: Controller: Rename PKT_DC_US to PDU_MAX_US

Rename PKT_DC_US to PDU_MAX_US.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2021-08-07 15:10:05 +05:30 committed by Anas Nashif
commit 869d3c24d7
2 changed files with 21 additions and 21 deletions

View file

@ -142,33 +142,33 @@
(CODED_PHY_CRC_SIZE) + \
(CODED_PHY_TERM2_SIZE))<<3)
#define PKT_DC_US(octets, mic, phy) (((phy) & PHY_CODED) ? \
((CODED_PHY_PREAMBLE_TIME_US) + \
(FEC_BLOCK1_TIME_US) + \
FEC_BLOCK2_TIME_US((octets), (mic))) : \
(((PDU_PREAMBLE_SIZE(phy) + \
#define PDU_MAX_US(octets, mic, phy) (((phy) & PHY_CODED) ? \
((CODED_PHY_PREAMBLE_TIME_US) + \
(FEC_BLOCK1_TIME_US) + \
FEC_BLOCK2_TIME_US((octets), (mic))) : \
(((PDU_PREAMBLE_SIZE(phy) + \
(PDU_ACCESS_ADDR_SIZE) + \
(PDU_HEADER_SIZE) + \
(octets) + \
(mic) + \
(PDU_CRC_SIZE))<<3) / \
BIT(((phy) & 0x03) >> 1)))
#else /* !CONFIG_BT_CTLR_PHY_CODED */
#define PDU_MAX_US(octets, mic, phy) (((PDU_PREAMBLE_SIZE(phy) + \
(PDU_ACCESS_ADDR_SIZE) + \
(PDU_HEADER_SIZE) + \
(octets) + \
(mic) + \
(PDU_CRC_SIZE))<<3) / \
BIT(((phy) & 0x03) >> 1)))
#else /* !CONFIG_BT_CTLR_PHY_CODED */
#define PKT_DC_US(octets, mic, phy) (((PDU_PREAMBLE_SIZE(phy) + \
(PDU_ACCESS_ADDR_SIZE) + \
(PDU_HEADER_SIZE) + \
(octets) + \
(mic) + \
(PDU_CRC_SIZE))<<3) / \
BIT(((phy) & 0x03) >> 1))
BIT(((phy) & 0x03) >> 1))
#endif /* !CONFIG_BT_CTLR_PHY_CODED */
#define PKT_US(octets, phy) PKT_DC_US((octets), (PDU_MIC_SIZE), (phy))
#define PKT_US(octets, phy) PDU_MAX_US((octets), (PDU_MIC_SIZE), (phy))
#define PKT_AC_US(octets, phy) PKT_DC_US((octets), 0, (phy))
#define PKT_AC_US(octets, phy) PDU_MAX_US((octets), 0, (phy))
#define PKT_BIS_US(octets, mic, phy) PKT_DC_US((octets), (mic), (phy))
#define PKT_BIS_US(octets, mic, phy) PDU_MAX_US((octets), (mic), (phy))
/* Extra bytes for enqueued node_rx metadata: rssi (always), resolving
* index, directed adv report, and mesh channel and instant.

View file

@ -7035,8 +7035,8 @@ static uint8_t force_md_cnt_calc(struct lll_conn *lll_conn, uint32_t tx_rate)
time_incoming = (LL_LENGTH_OCTETS_RX_MAX << 3) *
1000000UL / tx_rate;
time_outgoing = PKT_DC_US(LL_LENGTH_OCTETS_RX_MAX, mic_size, phy) +
PKT_DC_US(0U, 0U, phy) +
time_outgoing = PDU_MAX_US(LL_LENGTH_OCTETS_RX_MAX, mic_size, phy) +
PDU_MAX_US(0U, 0U, phy) +
(EVENT_IFS_US << 1);
force_md_cnt = 0U;
@ -7045,7 +7045,7 @@ static uint8_t force_md_cnt_calc(struct lll_conn *lll_conn, uint32_t tx_rate)
uint32_t time_keep_alive;
delta = (time_incoming << 1) - time_outgoing;
time_keep_alive = (PKT_DC_US(0U, 0U, phy) + EVENT_IFS_US) << 1;
time_keep_alive = (PDU_MAX_US(0U, 0U, phy) + EVENT_IFS_US) << 1;
force_md_cnt = (delta + (time_keep_alive - 1)) /
time_keep_alive;
BT_DBG("Time: incoming= %u, expected outgoing= %u, delta= %u, "