You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2019/10/21 17:55:39 UTC
[mynewt-nimble] 02/03: nimble/ll: Remove confusing symbol
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit f1808b9da7d5f88737e5823f907e6d50d2667a43
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Mon Oct 21 14:58:28 2019 +0200
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.
---
nimble/controller/include/controller/ble_ll_conn.h | 2 --
nimble/controller/src/ble_ll_conn.c | 4 ++--
nimble/controller/src/ble_ll_ctrl.c | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/nimble/controller/include/controller/ble_ll_conn.h b/nimble/controller/include/controller/ble_ll_conn.h
index a6a0e53..aa967cd 100644
--- a/nimble/controller/include/controller/ble_ll_conn.h
+++ b/nimble/controller/include/controller/ble_ll_conn.h
@@ -173,8 +173,6 @@ struct ble_ll_conn_phy_data
#define CONN_CUR_TX_PHY_MASK(csm) (1 << ((csm)->phy_data.cur_tx_phy - 1))
#define CONN_CUR_RX_PHY_MASK(csm) (1 << ((csm)->phy_data.cur_rx_phy - 1))
-#define BLE_PHY_TRANSITION_INVALID (0xFF)
-
struct hci_conn_update
{
uint16_t handle;
diff --git a/nimble/controller/src/ble_ll_conn.c b/nimble/controller/src/ble_ll_conn.c
index 1411a24..25d7abd 100644
--- a/nimble/controller/src/ble_ll_conn.c
+++ b/nimble/controller/src/ble_ll_conn.c
@@ -754,7 +754,7 @@ ble_ll_conn_adjust_pyld_len(struct ble_ll_conn_sm *connsm, uint16_t pyld_len)
#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
uint8_t phy_mode;
- if (connsm->phy_tx_transition != BLE_PHY_TRANSITION_INVALID) {
+ if (connsm->phy_tx_transition) {
phy_mode = ble_ll_phy_to_phy_mode(connsm->phy_tx_transition,
connsm->phy_data.phy_options);
} else {
@@ -1677,7 +1677,7 @@ ble_ll_conn_sm_new(struct ble_ll_conn_sm *connsm)
connsm->phy_data.host_pref_tx_phys_mask = g_ble_ll_data.ll_pref_tx_phys;
connsm->phy_data.host_pref_rx_phys_mask = g_ble_ll_data.ll_pref_rx_phys;
connsm->phy_data.phy_options = 0;
- connsm->phy_tx_transition = BLE_PHY_TRANSITION_INVALID;
+ connsm->phy_tx_transition = 0;
#endif
/* Reset current control procedure */
diff --git a/nimble/controller/src/ble_ll_ctrl.c b/nimble/controller/src/ble_ll_ctrl.c
index d00a035..d17490e 100644
--- a/nimble/controller/src/ble_ll_ctrl.c
+++ b/nimble/controller/src/ble_ll_ctrl.c
@@ -557,7 +557,7 @@ ble_ll_ctrl_phy_update_proc_complete(struct ble_ll_conn_sm *connsm)
chk_proc_stop = 1;
chk_host_phy = 1;
- connsm->phy_tx_transition = BLE_PHY_TRANSITION_INVALID;
+ connsm->phy_tx_transition = 0;
if (CONN_F_PEER_PHY_UPDATE(connsm)) {
CONN_F_PEER_PHY_UPDATE(connsm) = 0;