Skip to content

Commit 6d9b318

Browse files
cvinayakgalak
authored andcommitted
Bluetooth: Controller: Minor change to use IS_ENABLED
Minor changes to use IS_ENABLED and updates to comments in code. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent d4d362d commit 6d9b318

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

subsys/bluetooth/controller/ll_sw/ull_conn.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4017,12 +4017,12 @@ static inline void event_phy_upd_ind_prep(struct ll_conn *conn,
40174017
rx->hdr.link->mem = conn->llcp_rx;
40184018
conn->llcp_rx = rx;
40194019

4020-
#if defined(CONFIG_BT_CTLR_DATA_LENGTH)
40214020
/* reserve rx node for DLE event generation */
4022-
rx = ll_pdu_rx_alloc();
4023-
rx->hdr.link->mem = conn->llcp_rx;
4024-
conn->llcp_rx = rx;
4025-
#endif /* CONFIG_BT_CTLR_DATA_LENGTH */
4021+
if (IS_ENABLED(CONFIG_BT_CTLR_DATA_LENGTH)) {
4022+
rx = ll_pdu_rx_alloc();
4023+
rx->hdr.link->mem = conn->llcp_rx;
4024+
conn->llcp_rx = rx;
4025+
}
40264026
}
40274027

40284028
/* place the phy update ind packet as next in
@@ -4107,8 +4107,11 @@ static inline void event_phy_upd_ind_prep(struct ll_conn *conn,
41074107
/* enqueue rx node towards Thread */
41084108
ll_rx_put(rx->hdr.link, rx);
41094109

4110+
/* Release rx node that was reserved for Data Length
4111+
* notification.
4112+
*/
41104113
if (IS_ENABLED(CONFIG_BT_CTLR_DATA_LENGTH)) {
4111-
/* get the DLE rx node reserved for ULL->LL */
4114+
/* Get the DLE rx node reserved for ULL->LL */
41124115
rx = conn->llcp_rx;
41134116
LL_ASSERT(rx && rx->hdr.link);
41144117
conn->llcp_rx = rx->hdr.link->mem;

0 commit comments

Comments
 (0)