Bluetooth: Mesh: Rename gatt adv func

Since this module is already changed, current really
confuses when trying to understand the code.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2021-11-18 09:23:08 +08:00 committed by Johan Hedberg
commit 83bc5d0953
9 changed files with 29 additions and 29 deletions

View file

@ -57,7 +57,7 @@ struct net_buf *bt_mesh_adv_buf_get(k_timeout_t timeout);
struct net_buf *bt_mesh_adv_buf_relay_get(k_timeout_t timeout);
void bt_mesh_adv_update(void);
void bt_mesh_adv_gatt_update(void);
void bt_mesh_adv_buf_get_cancel(void);
@ -73,7 +73,7 @@ void bt_mesh_adv_buf_local_ready(void);
void bt_mesh_adv_buf_relay_ready(void);
int bt_mesh_adv_start(const struct bt_le_adv_param *param, int32_t duration,
int bt_mesh_adv_gatt_start(const struct bt_le_adv_param *param, int32_t duration,
const struct bt_data *ad, size_t ad_len,
const struct bt_data *sd, size_t sd_len);

View file

@ -303,7 +303,7 @@ static bool schedule_send(struct ext_adv *adv)
return true;
}
void bt_mesh_adv_update(void)
void bt_mesh_adv_gatt_update(void)
{
(void)schedule_send(BT_MESH_ADV_EXT_GATT_SEPARATE_INS);
}
@ -435,7 +435,7 @@ int bt_mesh_adv_enable(void)
return 0;
}
int bt_mesh_adv_start(const struct bt_le_adv_param *param, int32_t duration,
int bt_mesh_adv_gatt_start(const struct bt_le_adv_param *param, int32_t duration,
const struct bt_data *ad, size_t ad_len,
const struct bt_data *sd, size_t sd_len)
{

View file

@ -135,7 +135,7 @@ static void adv_thread(void *p1, void *p2, void *p3)
while (!buf) {
/* Adv timeout may be set by a call from proxy
* to bt_mesh_adv_start:
* to bt_mesh_adv_gatt_start:
*/
adv_timeout = SYS_FOREVER_MS;
if (bt_mesh_is_provisioned()) {
@ -182,7 +182,7 @@ void bt_mesh_adv_buf_relay_ready(void)
/* Will be handled automatically */
}
void bt_mesh_adv_update(void)
void bt_mesh_adv_gatt_update(void)
{
bt_mesh_adv_buf_get_cancel();
}
@ -202,7 +202,7 @@ int bt_mesh_adv_enable(void)
return 0;
}
int bt_mesh_adv_start(const struct bt_le_adv_param *param, int32_t duration,
int bt_mesh_adv_gatt_start(const struct bt_le_adv_param *param, int32_t duration,
const struct bt_data *ad, size_t ad_len,
const struct bt_data *sd, size_t sd_len)
{

View file

@ -359,7 +359,7 @@ int bt_mesh_start(void)
if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
(void)bt_mesh_proxy_gatt_enable();
bt_mesh_adv_update();
bt_mesh_adv_gatt_update();
}
}

View file

@ -126,7 +126,7 @@ static int link_accept(const struct prov_bearer_cb *cb, void *cb_data)
}
(void)bt_mesh_pb_gatt_enable();
bt_mesh_adv_update();
bt_mesh_adv_gatt_update();
link.cb = cb;
link.cb_data = cb_data;

View file

@ -203,7 +203,7 @@ int bt_mesh_pb_gatt_disable(void)
bt_gatt_service_unregister(&prov_svc);
service_registered = false;
bt_mesh_adv_update();
bt_mesh_adv_gatt_update();
return 0;
}
@ -297,12 +297,12 @@ int bt_mesh_pb_gatt_adv_start(void)
ADV_SLOW_INT,
};
return bt_mesh_adv_start(&slow_adv_param, SYS_FOREVER_MS, prov_ad,
return bt_mesh_adv_gatt_start(&slow_adv_param, SYS_FOREVER_MS, prov_ad,
ARRAY_SIZE(prov_ad), prov_sd, prov_sd_len);
}
/* Advertise 60 seconds using fast interval */
err = bt_mesh_adv_start(&fast_adv_param, (60 * MSEC_PER_SEC),
err = bt_mesh_adv_gatt_start(&fast_adv_param, (60 * MSEC_PER_SEC),
prov_ad, ARRAY_SIZE(prov_ad),
prov_sd, prov_sd_len);
if (!err) {

View file

@ -228,5 +228,5 @@ void bt_mesh_proxy_role_cleanup(struct bt_mesh_proxy_role *role)
bt_conn_unref(role->conn);
role->conn = NULL;
bt_mesh_adv_update();
bt_mesh_adv_gatt_update();
}

View file

@ -393,7 +393,7 @@ int bt_mesh_proxy_identity_enable(void)
}
if (bt_mesh_subnet_foreach(node_id_start)) {
bt_mesh_adv_update();
bt_mesh_adv_gatt_update();
}
return 0;
@ -455,7 +455,7 @@ static int node_id_adv(struct bt_mesh_subnet *sub, int32_t duration)
memcpy(proxy_svc_data + 3, tmp + 8, 8);
err = bt_mesh_adv_start(&fast_adv_param, duration, node_id_ad,
err = bt_mesh_adv_gatt_start(&fast_adv_param, duration, node_id_ad,
ARRAY_SIZE(node_id_ad), NULL, 0);
if (err) {
BT_WARN("Failed to advertise using Node ID (err %d)", err);
@ -482,7 +482,7 @@ static int net_id_adv(struct bt_mesh_subnet *sub, int32_t duration)
memcpy(proxy_svc_data + 3, sub->keys[SUBNET_KEY_TX_IDX(sub)].net_id, 8);
err = bt_mesh_adv_start(&slow_adv_param, duration, net_id_ad,
err = bt_mesh_adv_gatt_start(&slow_adv_param, duration, net_id_ad,
ARRAY_SIZE(net_id_ad), NULL, 0);
if (err) {
BT_WARN("Failed to advertise using Network ID (err %d)", err);
@ -877,7 +877,7 @@ static void gatt_connected(struct bt_conn *conn, uint8_t err)
/* Try to re-enable advertising in case it's possible */
if (conn_count < CONFIG_BT_MAX_CONN) {
bt_mesh_adv_update();
bt_mesh_adv_gatt_update();
}
}

View file

@ -538,7 +538,7 @@ uint8_t bt_mesh_subnet_node_id_set(uint16_t net_idx,
bt_mesh_proxy_identity_stop(sub);
}
bt_mesh_adv_update();
bt_mesh_adv_gatt_update();
return STATUS_SUCCESS;
}