Skip to content

Commit f1808b9

Browse files
nimble/ll: Remove confusing symbol
BLE_PHY_TRANSITION is already used for transitions between TX/RX so this name is confusing. And we actually do not need a special symbol here since we can just use 0 - PHYs are numbered starting from 1.
1 parent 60fc1cd commit f1808b9

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

nimble/controller/include/controller/ble_ll_conn.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ struct ble_ll_conn_phy_data
173173
#define CONN_CUR_TX_PHY_MASK(csm) (1 << ((csm)->phy_data.cur_tx_phy - 1))
174174
#define CONN_CUR_RX_PHY_MASK(csm) (1 << ((csm)->phy_data.cur_rx_phy - 1))
175175

176-
#define BLE_PHY_TRANSITION_INVALID (0xFF)
177-
178176
struct hci_conn_update
179177
{
180178
uint16_t handle;

nimble/controller/src/ble_ll_conn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ ble_ll_conn_adjust_pyld_len(struct ble_ll_conn_sm *connsm, uint16_t pyld_len)
754754
#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
755755
uint8_t phy_mode;
756756

757-
if (connsm->phy_tx_transition != BLE_PHY_TRANSITION_INVALID) {
757+
if (connsm->phy_tx_transition) {
758758
phy_mode = ble_ll_phy_to_phy_mode(connsm->phy_tx_transition,
759759
connsm->phy_data.phy_options);
760760
} else {
@@ -1677,7 +1677,7 @@ ble_ll_conn_sm_new(struct ble_ll_conn_sm *connsm)
16771677
connsm->phy_data.host_pref_tx_phys_mask = g_ble_ll_data.ll_pref_tx_phys;
16781678
connsm->phy_data.host_pref_rx_phys_mask = g_ble_ll_data.ll_pref_rx_phys;
16791679
connsm->phy_data.phy_options = 0;
1680-
connsm->phy_tx_transition = BLE_PHY_TRANSITION_INVALID;
1680+
connsm->phy_tx_transition = 0;
16811681
#endif
16821682

16831683
/* Reset current control procedure */

nimble/controller/src/ble_ll_ctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ ble_ll_ctrl_phy_update_proc_complete(struct ble_ll_conn_sm *connsm)
557557
chk_proc_stop = 1;
558558
chk_host_phy = 1;
559559

560-
connsm->phy_tx_transition = BLE_PHY_TRANSITION_INVALID;
560+
connsm->phy_tx_transition = 0;
561561

562562
if (CONN_F_PEER_PHY_UPDATE(connsm)) {
563563
CONN_F_PEER_PHY_UPDATE(connsm) = 0;

0 commit comments

Comments
 (0)