From 7875bc285575ada3e29f47019ba6a2129f4d417f Mon Sep 17 00:00:00 2001 From: Andrzej Kaczmarek Date: Thu, 30 Sep 2021 19:33:38 +0200 Subject: [PATCH] nimble/ll: Cleanup function names Use common prefix ble_ll_scan_hci for all HCI commands handlers in ble_ll_scan. --- nimble/controller/include/controller/ble_ll_scan.h | 8 ++++---- nimble/controller/src/ble_ll_hci.c | 8 ++++---- nimble/controller/src/ble_ll_scan.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nimble/controller/include/controller/ble_ll_scan.h b/nimble/controller/include/controller/ble_ll_scan.h index 04ca48177..77f9fa426 100644 --- a/nimble/controller/include/controller/ble_ll_scan.h +++ b/nimble/controller/include/controller/ble_ll_scan.h @@ -163,14 +163,14 @@ struct ble_ll_scan_sm /*---- HCI ----*/ /* Set scanning parameters */ -int ble_ll_scan_set_scan_params(const uint8_t *cmdbuf, uint8_t len); +int ble_ll_scan_hci_set_params(const uint8_t *cmdbuf, uint8_t len); /* Turn scanning on/off */ -int ble_ll_hci_scan_set_enable(const uint8_t *cmdbuf, uint8_t len); -int ble_ll_hci_ext_scan_set_enable(const uint8_t *cmdbuf, uint8_t len); +int ble_ll_scan_hci_set_enable(const uint8_t *cmdbuf, uint8_t len); +int ble_ll_scan_hci_set_ext_enable(const uint8_t *cmdbuf, uint8_t len); #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) -int ble_ll_set_ext_scan_params(const uint8_t *cmdbuf, uint8_t len); +int ble_ll_scan_hci_set_ext_params(const uint8_t *cmdbuf, uint8_t len); #endif /*--- Controller Internal API ---*/ diff --git a/nimble/controller/src/ble_ll_hci.c b/nimble/controller/src/ble_ll_hci.c index 547b66159..c2603c989 100644 --- a/nimble/controller/src/ble_ll_hci.c +++ b/nimble/controller/src/ble_ll_hci.c @@ -904,10 +904,10 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf, rc = ble_ll_hci_adv_set_enable(cmdbuf, len); break; case BLE_HCI_OCF_LE_SET_SCAN_PARAMS: - rc = ble_ll_scan_set_scan_params(cmdbuf, len); + rc = ble_ll_scan_hci_set_params(cmdbuf, len); break; case BLE_HCI_OCF_LE_SET_SCAN_ENABLE: - rc = ble_ll_hci_scan_set_enable(cmdbuf, len); + rc = ble_ll_scan_hci_set_enable(cmdbuf, len); break; case BLE_HCI_OCF_LE_CREATE_CONN: rc = ble_ll_conn_hci_create(cmdbuf, len); @@ -1107,10 +1107,10 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf, #endif #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) case BLE_HCI_OCF_LE_SET_EXT_SCAN_PARAM: - rc = ble_ll_set_ext_scan_params(cmdbuf, len); + rc = ble_ll_scan_hci_set_ext_params(cmdbuf, len); break; case BLE_HCI_OCF_LE_SET_EXT_SCAN_ENABLE: - rc = ble_ll_hci_ext_scan_set_enable(cmdbuf, len); + rc = ble_ll_scan_hci_set_ext_enable(cmdbuf, len); break; case BLE_HCI_OCF_LE_EXT_CREATE_CONN: rc = ble_ll_conn_hci_ext_create(cmdbuf, len); diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c index 901bda7c4..8539257c2 100644 --- a/nimble/controller/src/ble_ll_scan.c +++ b/nimble/controller/src/ble_ll_scan.c @@ -1961,7 +1961,7 @@ ble_ll_scan_rx_pkt_in(uint8_t ptype, struct os_mbuf *om, struct ble_mbuf_hdr *hd } int -ble_ll_scan_set_scan_params(const uint8_t *cmdbuf, uint8_t len) +ble_ll_scan_hci_set_params(const uint8_t *cmdbuf, uint8_t len) { const struct ble_hci_le_set_scan_params_cp *cmd = (const void *)cmdbuf; uint16_t scan_itvl; @@ -2049,7 +2049,7 @@ ble_ll_scan_check_phy_params(uint8_t type, uint16_t itvl, uint16_t window) } int -ble_ll_set_ext_scan_params(const uint8_t *cmdbuf, uint8_t len) +ble_ll_scan_hci_set_ext_params(const uint8_t *cmdbuf, uint8_t len) { const struct ble_hci_le_set_ext_scan_params_cp *cmd = (const void *) cmdbuf; const struct scan_params *params = cmd->scans; @@ -2361,7 +2361,7 @@ ble_ll_scan_set_enable(uint8_t enable, uint8_t filter_dups, uint16_t period, return rc; } -int ble_ll_hci_scan_set_enable(const uint8_t *cmdbuf, uint8_t len) +int ble_ll_scan_hci_set_enable(const uint8_t *cmdbuf, uint8_t len) { const struct ble_hci_le_set_scan_enable_cp *cmd = (const void *) cmdbuf; @@ -2374,7 +2374,7 @@ int ble_ll_hci_scan_set_enable(const uint8_t *cmdbuf, uint8_t len) } #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) -int ble_ll_hci_ext_scan_set_enable(const uint8_t *cmdbuf, uint8_t len) +int ble_ll_scan_hci_set_ext_enable(const uint8_t *cmdbuf, uint8_t len) { const struct ble_hci_le_set_ext_scan_enable_cp *cmd = (const void *) cmdbuf;