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 1506488bc4415472c1ac3d2d02595126282d50eb Author: Andrzej Kaczmarek <[email protected]> AuthorDate: Thu Oct 31 09:17:09 2019 +0100 nimble/ll: Cleaup symbols Not sure why valid phy mask is a variable, it can be simple #define. --- nimble/controller/src/ble_ll_scan.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c index e6b8af9..2ac1f84 100644 --- a/nimble/controller/src/ble_ll_scan.c +++ b/nimble/controller/src/ble_ll_scan.c @@ -58,12 +58,10 @@ #error "Cannot have more than 255 scan response entries!" #endif -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) -static const uint8_t ble_ll_valid_scan_phy_mask = (BLE_HCI_LE_PHY_1M_PREF_MASK #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY) - | BLE_HCI_LE_PHY_CODED_PREF_MASK -#endif - ); +#define SCAN_VALID_PHY_MASK (BLE_HCI_LE_PHY_1M_PREF_MASK | BLE_HCI_LE_PHY_CODED_PREF_MASK) +#else +#define SCAN_VALID_PHY_MASK (BLE_HCI_LE_PHY_1M_PREF_MASK) #endif /* The scanning parameters set by host */ @@ -3412,8 +3410,8 @@ ble_ll_set_ext_scan_params(const uint8_t *cmdbuf, uint8_t len) /* Check if no reserved bits in PHYS are set and that at least one valid PHY * is set. */ - if (!(cmd->phys & ble_ll_valid_scan_phy_mask) || - (cmd->phys & ~ble_ll_valid_scan_phy_mask)) { + if (!(cmd->phys & SCAN_VALID_PHY_MASK) || + (cmd->phys & ~SCAN_VALID_PHY_MASK)) { return BLE_ERR_INV_HCI_CMD_PARMS; }
