Skip to content

Commit

Permalink
Bluetooth: controller: split: Fix compiler warnings
Browse files Browse the repository at this point in the history
Fix compiler warnings when PHY update feature is not selected.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak authored and aescolar committed Dec 16, 2019
1 parent 9bd8518 commit f95a7fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions subsys/bluetooth/controller/ll_sw/ull_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3321,6 +3321,7 @@ static inline void event_len_prep(struct ll_conn *conn)
}
}

#if defined(CONFIG_BT_CTLR_PHY)
static u16_t calc_eff_time(u8_t max_octets, u8_t phy, u16_t default_time)
{
u16_t time = PKT_US(max_octets, phy);
Expand All @@ -3337,6 +3338,7 @@ static u16_t calc_eff_time(u8_t max_octets, u8_t phy, u16_t default_time)

return eff_time;
}
#endif /* CONFIG_BT_CTLR_PHY */
#endif /* CONFIG_BT_CTLR_DATA_LENGTH */

#if defined(CONFIG_BT_CTLR_PHY)
Expand Down Expand Up @@ -4466,8 +4468,6 @@ static inline int length_req_rsp_recv(struct ll_conn *conn, memq_link_t *link,
struct pdu_data_llctrl_length_req *lr;
u16_t max_rx_octets;
u16_t max_tx_octets;
u16_t max_rx_time;
u16_t max_tx_time;

lr = &pdu_rx->llctrl.length_req;

Expand All @@ -4490,6 +4490,9 @@ static inline int length_req_rsp_recv(struct ll_conn *conn, memq_link_t *link,
}

#if defined(CONFIG_BT_CTLR_PHY)
u16_t max_rx_time;
u16_t max_tx_time;

/* use the minimal of our default_tx_time and
* peer max_rx_time
*/
Expand Down

0 comments on commit f95a7fa

Please sign in to comment.