Skip to content

Commit a3127af

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Advertising Extensions dynamic Tx power control
Update Controller implementation of Advertising Extensions to inherit the set dynamic Tx power values of the primary channel PDU transmissions. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 3344aee commit a3127af

File tree

6 files changed

+3
-27
lines changed

6 files changed

+3
-27
lines changed

subsys/bluetooth/controller/ll_sw/lll_adv.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,6 @@ struct lll_adv_sync {
106106
*/
107107
uint8_t cte_started:1;
108108
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
109-
110-
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
111-
int8_t tx_pwr_lvl;
112-
#endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */
113109
};
114110

115111
struct lll_adv_aux {
@@ -130,10 +126,6 @@ struct lll_adv_aux {
130126
#if defined(CONFIG_BT_CTLR_ADV_PDU_LINK)
131127
struct pdu_adv *last_pdu;
132128
#endif /* CONFIG_BT_CTLR_ADV_PDU_LINK */
133-
134-
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
135-
int8_t tx_pwr_lvl;
136-
#endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */
137129
};
138130

139131
struct lll_adv {

subsys/bluetooth/controller/ll_sw/lll_scan.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ struct lll_scan_aux {
6868

6969
uint32_t window_size_us;
7070

71-
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
72-
int8_t tx_pwr_lvl;
73-
#endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */
74-
7571
#if defined(CONFIG_BT_CENTRAL)
7672
struct node_rx_pdu *node_conn_rx;
7773
#endif /* CONFIG_BT_CENTRAL */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static int prepare_cb(struct lll_prepare_param *p)
182182
radio_reset();
183183

184184
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
185-
radio_tx_power_set(lll->tx_pwr_lvl);
185+
radio_tx_power_set(lll_adv->tx_pwr_lvl);
186186
#else
187187
radio_tx_power_set(RADIO_TXP_DEFAULT);
188188
#endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static int prepare_cb(struct lll_prepare_param *p)
163163
/* Start setting up of Radio h/w */
164164
radio_reset();
165165
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
166-
radio_tx_power_set(lll->tx_pwr_lvl);
166+
radio_tx_power_set(lll->adv->tx_pwr_lvl);
167167
#else
168168
radio_tx_power_set(RADIO_TXP_DEFAULT);
169169
#endif

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static int prepare_cb(struct lll_prepare_param *p)
459459
radio_reset();
460460

461461
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
462-
radio_tx_power_set(lll_aux->tx_pwr_lvl);
462+
radio_tx_power_set(lll->tx_pwr_lvl);
463463
#else
464464
radio_tx_power_set(RADIO_TXP_DEFAULT);
465465
#endif

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,6 @@ void lll_sync_aux_prepare_cb(struct lll_sync *lll,
145145
/* Start setting up Radio h/w */
146146
radio_reset();
147147

148-
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
149-
radio_tx_power_set(lll_aux->tx_pwr_lvl);
150-
#else
151-
radio_tx_power_set(RADIO_TXP_DEFAULT);
152-
#endif
153-
154148
radio_phy_set(lll_aux->phy, 1);
155149
radio_pkt_configure(RADIO_PKT_CONF_LENGTH_8BIT, LL_EXT_OCTETS_RX_MAX,
156150
RADIO_PKT_CONF_PHY(lll_aux->phy));
@@ -396,12 +390,6 @@ static int prepare_cb_common(struct lll_prepare_param *p, uint8_t chan_idx)
396390
/* Start setting up Radio h/w */
397391
radio_reset();
398392

399-
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
400-
radio_tx_power_set(lll->tx_pwr_lvl);
401-
#else
402-
radio_tx_power_set(RADIO_TXP_DEFAULT);
403-
#endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */
404-
405393
radio_phy_set(lll->phy, 1);
406394
radio_pkt_configure(RADIO_PKT_CONF_LENGTH_8BIT, LL_EXT_OCTETS_RX_MAX,
407395
RADIO_PKT_CONF_PHY(lll->phy));

0 commit comments

Comments
 (0)