Skip to content

Commit 281ad21

Browse files
ppryga-nordiccarlescufi
authored andcommitted
Bluetooth: Controller: Make PHY check in conn mode Kconf dependent
Constant Tone Extension may not be transmittied with PHY CODED. There were check to avoid situation that controller tries to transmit or receive CTE when PHY is set to CODED. These check were not conditionally compilated, hence when PHY Update feature is disabled code did build. The commit fixes the issue. Signed-off-by: Piotr Pryga <[email protected]>
1 parent 8f59477 commit 281ad21

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

subsys/bluetooth/controller/hci/hci.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,9 +2916,14 @@ static void le_df_connection_iq_report(struct node_rx_pdu *node_rx, struct net_b
29162916

29172917
lll = iq_report->hdr.rx_ftr.param;
29182918

2919+
#if defined(CONFIG_BT_CTLR_PHY)
29192920
phy_rx = lll->phy_rx;
2921+
29202922
/* Make sure the report is generated for connection on PHY UNCODED */
29212923
LL_ASSERT(phy_rx != PHY_CODED);
2924+
#else
2925+
phy_rx = PHY_1M;
2926+
#endif /* CONFIG_BT_CTLR_PHY */
29222927

29232928
/* TX LL thread has higher priority than RX thread. It may happen that host succefully
29242929
* disables CTE sampling in the meantime. It should be verified here, to avoid reporing

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,11 @@ void lll_conn_isr_tx(void *param)
473473
enum radio_end_evt_delay_state end_evt_delay;
474474
#endif /* CONFIG_BT_CTLR_DF_PHYEND_OFFSET_COMPENSATION_ENABLE */
475475

476+
#if defined(CONFIG_BT_CTLR_PHY)
476477
if (lll->phy_rx != PHY_CODED) {
478+
#else
479+
if (1) {
480+
#endif /* CONFIG_BT_CTLR_PHY */
477481
struct lll_df_conn_rx_params *df_rx_params;
478482
struct lll_df_conn_rx_cfg *df_rx_cfg;
479483

@@ -1021,9 +1025,11 @@ static inline bool create_iq_report(struct lll_conn *lll, uint8_t rssi_ready, ui
10211025
struct lll_df_conn_rx_params *rx_params;
10221026
struct lll_df_conn_rx_cfg *rx_cfg;
10231027

1028+
#if defined(CONFIG_BT_CTLR_PHY)
10241029
if (lll->phy_rx == PHY_CODED) {
10251030
return false;
10261031
}
1032+
#endif /* CONFIG_BT_CTLR_PHY */
10271033

10281034
rx_cfg = &lll->df_rx_cfg;
10291035

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_peripheral.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ static int prepare_cb(struct lll_prepare_param *p)
218218
enum radio_end_evt_delay_state end_evt_delay;
219219
#endif /* CONFIG_BT_CTLR_DF_PHYEND_OFFSET_COMPENSATION_ENABLE */
220220

221+
#if defined(CONFIG_BT_CTLR_PHY)
221222
if (lll->phy_rx != PHY_CODED) {
223+
#else
224+
if (1) {
225+
#endif /* CONFIG_BT_CTLR_PHY */
222226
df_rx_cfg = &lll->df_rx_cfg;
223227
df_rx_params = dbuf_latest_get(&df_rx_cfg->hdr, NULL);
224228

0 commit comments

Comments
 (0)