Skip to content

Commit dfe05dd

Browse files
PavelVPVkartben
authored andcommitted
bluetooth: host: prefix API functions with bt_
Prefix API functions of a module with bt_ to avoid confusion when reading code. Signed-off-by: Pavel Vasilyev <[email protected]>
1 parent c21e613 commit dfe05dd

File tree

7 files changed

+96
-100
lines changed

7 files changed

+96
-100
lines changed

subsys/bluetooth/host/conn.c

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,7 +1932,7 @@ static void notify_disconnected(struct bt_conn *conn)
19321932
}
19331933

19341934
#if defined(CONFIG_BT_REMOTE_INFO)
1935-
void notify_remote_info(struct bt_conn *conn)
1935+
void bt_conn_notify_remote_info(struct bt_conn *conn)
19361936
{
19371937
struct bt_conn_remote_info remote_info;
19381938
int err;
@@ -1957,7 +1957,7 @@ void notify_remote_info(struct bt_conn *conn)
19571957
}
19581958
#endif /* defined(CONFIG_BT_REMOTE_INFO) */
19591959

1960-
void notify_le_param_updated(struct bt_conn *conn)
1960+
void bt_conn_notify_le_param_updated(struct bt_conn *conn)
19611961
{
19621962
/* If new connection parameters meet requirement of pending
19631963
* parameters don't send peripheral conn param request anymore on timeout
@@ -1988,7 +1988,7 @@ void notify_le_param_updated(struct bt_conn *conn)
19881988
}
19891989

19901990
#if defined(CONFIG_BT_USER_DATA_LEN_UPDATE)
1991-
void notify_le_data_len_updated(struct bt_conn *conn)
1991+
void bt_conn_notify_le_data_len_updated(struct bt_conn *conn)
19921992
{
19931993
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
19941994
if (callback->le_data_len_updated) {
@@ -2005,7 +2005,7 @@ void notify_le_data_len_updated(struct bt_conn *conn)
20052005
#endif
20062006

20072007
#if defined(CONFIG_BT_USER_PHY_UPDATE)
2008-
void notify_le_phy_updated(struct bt_conn *conn)
2008+
void bt_conn_notify_le_phy_updated(struct bt_conn *conn)
20092009
{
20102010
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
20112011
if (callback->le_phy_updated) {
@@ -2021,7 +2021,7 @@ void notify_le_phy_updated(struct bt_conn *conn)
20212021
}
20222022
#endif
20232023

2024-
bool le_param_req(struct bt_conn *conn, struct bt_le_conn_param *param)
2024+
bool bt_conn_le_param_req(struct bt_conn *conn, struct bt_le_conn_param *param)
20252025
{
20262026
if (!bt_le_conn_params_valid(param)) {
20272027
return false;
@@ -2979,8 +2979,7 @@ static int bt_conn_get_tx_power_level(struct bt_conn *conn, uint8_t type,
29792979
}
29802980

29812981
#if defined(CONFIG_BT_TRANSMIT_POWER_CONTROL)
2982-
void notify_tx_power_report(struct bt_conn *conn,
2983-
struct bt_conn_le_tx_power_report report)
2982+
void bt_conn_notify_tx_power_report(struct bt_conn *conn, struct bt_conn_le_tx_power_report report)
29842983
{
29852984
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
29862985
if (callback->tx_power_report) {
@@ -3122,8 +3121,8 @@ int bt_conn_le_get_tx_power_level(struct bt_conn *conn,
31223121
}
31233122

31243123
#if defined(CONFIG_BT_PATH_LOSS_MONITORING)
3125-
void notify_path_loss_threshold_report(struct bt_conn *conn,
3126-
struct bt_conn_le_path_loss_threshold_report report)
3124+
void bt_conn_notify_path_loss_threshold_report(struct bt_conn *conn,
3125+
struct bt_conn_le_path_loss_threshold_report report)
31273126
{
31283127
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
31293128
if (callback->path_loss_threshold_report) {
@@ -3191,8 +3190,8 @@ int bt_conn_le_set_path_loss_mon_enable(struct bt_conn *conn, bool reporting_ena
31913190
#endif /* CONFIG_BT_PATH_LOSS_MONITORING */
31923191

31933192
#if defined(CONFIG_BT_SUBRATING)
3194-
void notify_subrate_change(struct bt_conn *conn,
3195-
const struct bt_conn_le_subrate_changed params)
3193+
void bt_conn_notify_subrate_change(struct bt_conn *conn,
3194+
const struct bt_conn_le_subrate_changed params)
31963195
{
31973196
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
31983197
if (callback->subrate_changed) {
@@ -3297,8 +3296,8 @@ int bt_conn_le_subrate_request(struct bt_conn *conn,
32973296
#endif /* CONFIG_BT_SUBRATING */
32983297

32993298
#if defined(CONFIG_BT_LE_EXTENDED_FEAT_SET)
3300-
void notify_read_all_remote_feat_complete(struct bt_conn *conn,
3301-
struct bt_conn_le_read_all_remote_feat_complete *params)
3299+
void bt_conn_notify_read_all_remote_feat_complete(struct bt_conn *conn,
3300+
struct bt_conn_le_read_all_remote_feat_complete *params)
33023301
{
33033302
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
33043303
if (callback->read_all_remote_feat_complete != NULL) {
@@ -3342,8 +3341,8 @@ int bt_conn_le_read_all_remote_features(struct bt_conn *conn, uint8_t pages_requ
33423341
#endif /* CONFIG_BT_LE_EXTENDED_FEAT_SET */
33433342

33443343
#if defined(CONFIG_BT_FRAME_SPACE_UPDATE)
3345-
void notify_frame_space_update_complete(struct bt_conn *conn,
3346-
struct bt_conn_le_frame_space_updated *params)
3344+
void bt_conn_notify_frame_space_update_complete(struct bt_conn *conn,
3345+
struct bt_conn_le_frame_space_updated *params)
33473346
{
33483347
if (IS_ENABLED(CONFIG_BT_CONN_DYNAMIC_CALLBACKS)) {
33493348
struct bt_conn_cb *callback;
@@ -3414,8 +3413,8 @@ int bt_conn_le_frame_space_update(struct bt_conn *conn,
34143413
#endif /* CONFIG_BT_FRAME_SPACE_UPDATE */
34153414

34163415
#if defined(CONFIG_BT_CHANNEL_SOUNDING)
3417-
void notify_remote_cs_capabilities(struct bt_conn *conn, uint8_t status,
3418-
struct bt_conn_le_cs_capabilities *params)
3416+
void bt_conn_notify_remote_cs_capabilities(struct bt_conn *conn, uint8_t status,
3417+
struct bt_conn_le_cs_capabilities *params)
34193418
{
34203419
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
34213420
if (callback->le_cs_read_remote_capabilities_complete) {
@@ -3431,8 +3430,8 @@ void notify_remote_cs_capabilities(struct bt_conn *conn, uint8_t status,
34313430
}
34323431
}
34333432

3434-
void notify_remote_cs_fae_table(struct bt_conn *conn, uint8_t status,
3435-
struct bt_conn_le_cs_fae_table *params)
3433+
void bt_conn_notify_remote_cs_fae_table(struct bt_conn *conn, uint8_t status,
3434+
struct bt_conn_le_cs_fae_table *params)
34363435
{
34373436
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
34383437
if (callback->le_cs_read_remote_fae_table_complete) {
@@ -3448,8 +3447,8 @@ void notify_remote_cs_fae_table(struct bt_conn *conn, uint8_t status,
34483447
}
34493448
}
34503449

3451-
void notify_cs_config_created(struct bt_conn *conn, uint8_t status,
3452-
struct bt_conn_le_cs_config *params)
3450+
void bt_conn_notify_cs_config_created(struct bt_conn *conn, uint8_t status,
3451+
struct bt_conn_le_cs_config *params)
34533452
{
34543453
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
34553454
if (callback->le_cs_config_complete) {
@@ -3464,7 +3463,7 @@ void notify_cs_config_created(struct bt_conn *conn, uint8_t status,
34643463
}
34653464
}
34663465

3467-
void notify_cs_config_removed(struct bt_conn *conn, uint8_t config_id)
3466+
void bt_conn_notify_cs_config_removed(struct bt_conn *conn, uint8_t config_id)
34683467
{
34693468
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
34703469
if (callback->le_cs_config_removed) {
@@ -3479,7 +3478,7 @@ void notify_cs_config_removed(struct bt_conn *conn, uint8_t config_id)
34793478
}
34803479
}
34813480

3482-
void notify_cs_security_enable_available(struct bt_conn *conn, uint8_t status)
3481+
void bt_conn_notify_cs_security_enable_available(struct bt_conn *conn, uint8_t status)
34833482
{
34843483
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
34853484
if (callback->le_cs_security_enable_complete) {
@@ -3494,8 +3493,8 @@ void notify_cs_security_enable_available(struct bt_conn *conn, uint8_t status)
34943493
}
34953494
}
34963495

3497-
void notify_cs_procedure_enable_available(struct bt_conn *conn, uint8_t status,
3498-
struct bt_conn_le_cs_procedure_enable_complete *params)
3496+
void bt_conn_notify_cs_procedure_enable_available(struct bt_conn *conn, uint8_t status,
3497+
struct bt_conn_le_cs_procedure_enable_complete *params)
34993498
{
35003499
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
35013500
if (callback->le_cs_procedure_enable_complete) {
@@ -3510,7 +3509,8 @@ void notify_cs_procedure_enable_available(struct bt_conn *conn, uint8_t status,
35103509
}
35113510
}
35123511

3513-
void notify_cs_subevent_result(struct bt_conn *conn, struct bt_conn_le_cs_subevent_result *result)
3512+
void bt_conn_notify_cs_subevent_result(struct bt_conn *conn,
3513+
struct bt_conn_le_cs_subevent_result *result)
35143514
{
35153515
BT_CONN_CB_DYNAMIC_FOREACH(callback) {
35163516
if (callback->le_cs_subevent_data_available) {

subsys/bluetooth/host/conn_internal.h

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -477,52 +477,47 @@ void bt_conn_role_changed(struct bt_conn *conn, uint8_t status);
477477
int bt_conn_le_conn_update(struct bt_conn *conn,
478478
const struct bt_le_conn_param *param);
479479

480-
void notify_remote_info(struct bt_conn *conn);
480+
void bt_conn_notify_remote_info(struct bt_conn *conn);
481481

482-
void notify_le_param_updated(struct bt_conn *conn);
482+
void bt_conn_notify_le_param_updated(struct bt_conn *conn);
483483

484-
void notify_le_data_len_updated(struct bt_conn *conn);
484+
void bt_conn_notify_le_data_len_updated(struct bt_conn *conn);
485485

486-
void notify_le_phy_updated(struct bt_conn *conn);
486+
void bt_conn_notify_le_phy_updated(struct bt_conn *conn);
487487

488-
bool le_param_req(struct bt_conn *conn, struct bt_le_conn_param *param);
488+
bool bt_conn_le_param_req(struct bt_conn *conn, struct bt_le_conn_param *param);
489489

490-
void notify_tx_power_report(struct bt_conn *conn,
491-
struct bt_conn_le_tx_power_report report);
490+
void bt_conn_notify_tx_power_report(struct bt_conn *conn, struct bt_conn_le_tx_power_report report);
492491

493-
void notify_path_loss_threshold_report(struct bt_conn *conn,
494-
struct bt_conn_le_path_loss_threshold_report report);
492+
void bt_conn_notify_path_loss_threshold_report(struct bt_conn *conn,
493+
struct bt_conn_le_path_loss_threshold_report report);
495494

496-
void notify_subrate_change(struct bt_conn *conn,
497-
struct bt_conn_le_subrate_changed params);
495+
void bt_conn_notify_subrate_change(struct bt_conn *conn, struct bt_conn_le_subrate_changed params);
498496

499-
void notify_read_all_remote_feat_complete(struct bt_conn *conn,
500-
struct bt_conn_le_read_all_remote_feat_complete *params);
497+
void bt_conn_notify_read_all_remote_feat_complete(struct bt_conn *conn,
498+
struct bt_conn_le_read_all_remote_feat_complete *params);
501499

502-
void notify_frame_space_update_complete(struct bt_conn *conn,
503-
struct bt_conn_le_frame_space_updated *params);
500+
void bt_conn_notify_frame_space_update_complete(struct bt_conn *conn,
501+
struct bt_conn_le_frame_space_updated *params);
504502

505-
void notify_remote_cs_capabilities(struct bt_conn *conn,
506-
uint8_t status,
507-
struct bt_conn_le_cs_capabilities *params);
503+
void bt_conn_notify_remote_cs_capabilities(struct bt_conn *conn, uint8_t status,
504+
struct bt_conn_le_cs_capabilities *params);
508505

509-
void notify_remote_cs_fae_table(struct bt_conn *conn,
510-
uint8_t status,
511-
struct bt_conn_le_cs_fae_table *params);
506+
void bt_conn_notify_remote_cs_fae_table(struct bt_conn *conn, uint8_t status,
507+
struct bt_conn_le_cs_fae_table *params);
512508

513-
void notify_cs_config_created(struct bt_conn *conn,
514-
uint8_t status,
515-
struct bt_conn_le_cs_config *params);
509+
void bt_conn_notify_cs_config_created(struct bt_conn *conn, uint8_t status,
510+
struct bt_conn_le_cs_config *params);
516511

517-
void notify_cs_config_removed(struct bt_conn *conn, uint8_t config_id);
512+
void bt_conn_notify_cs_config_removed(struct bt_conn *conn, uint8_t config_id);
518513

519-
void notify_cs_subevent_result(struct bt_conn *conn, struct bt_conn_le_cs_subevent_result *result);
514+
void bt_conn_notify_cs_subevent_result(struct bt_conn *conn,
515+
struct bt_conn_le_cs_subevent_result *result);
520516

521-
void notify_cs_security_enable_available(struct bt_conn *conn, uint8_t status);
517+
void bt_conn_notify_cs_security_enable_available(struct bt_conn *conn, uint8_t status);
522518

523-
void notify_cs_procedure_enable_available(struct bt_conn *conn,
524-
uint8_t status,
525-
struct bt_conn_le_cs_procedure_enable_complete *params);
519+
void bt_conn_notify_cs_procedure_enable_available(struct bt_conn *conn, uint8_t status,
520+
struct bt_conn_le_cs_procedure_enable_complete *params);
526521

527522
/* If role specific LTK is present */
528523
bool bt_conn_ltk_present(const struct bt_conn *conn);

subsys/bluetooth/host/cs.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static void invoke_subevent_result_callback(struct bt_conn *conn,
244244
} else
245245
#endif /* CONFIG_BT_CHANNEL_SOUNDING_TEST */
246246
{
247-
notify_cs_subevent_result(conn, p_result);
247+
bt_conn_notify_cs_subevent_result(conn, p_result);
248248
}
249249
}
250250

@@ -425,9 +425,10 @@ void bt_hci_le_cs_read_remote_supported_capabilities_complete(struct net_buf *bu
425425
remote_cs_capabilities.t_sw_time = evt->t_sw_time_supported;
426426
remote_cs_capabilities.tx_snr_capability = evt->tx_snr_capability;
427427

428-
notify_remote_cs_capabilities(conn, BT_HCI_ERR_SUCCESS, &remote_cs_capabilities);
428+
bt_conn_notify_remote_cs_capabilities(conn, BT_HCI_ERR_SUCCESS,
429+
&remote_cs_capabilities);
429430
} else {
430-
notify_remote_cs_capabilities(conn, evt->status, NULL);
431+
bt_conn_notify_remote_cs_capabilities(conn, evt->status, NULL);
431432
}
432433

433434
bt_conn_unref(conn);
@@ -502,9 +503,9 @@ void bt_hci_le_cs_read_remote_fae_table_complete(struct net_buf *buf)
502503
if (evt->status == BT_HCI_ERR_SUCCESS) {
503504
fae_table.remote_fae_table = evt->remote_fae_table;
504505

505-
notify_remote_cs_fae_table(conn, BT_HCI_ERR_SUCCESS, &fae_table);
506+
bt_conn_notify_remote_cs_fae_table(conn, BT_HCI_ERR_SUCCESS, &fae_table);
506507
} else {
507-
notify_remote_cs_fae_table(conn, evt->status, NULL);
508+
bt_conn_notify_remote_cs_fae_table(conn, evt->status, NULL);
508509
}
509510

510511
bt_conn_unref(conn);
@@ -853,7 +854,7 @@ void bt_hci_le_cs_config_complete_event(struct net_buf *buf)
853854

854855
if (evt->status == BT_HCI_ERR_SUCCESS) {
855856
if (evt->action == BT_HCI_LE_CS_CONFIG_ACTION_REMOVED) {
856-
notify_cs_config_removed(conn, evt->config_id);
857+
bt_conn_notify_cs_config_removed(conn, evt->config_id);
857858
bt_conn_unref(conn);
858859
return;
859860
}
@@ -882,9 +883,9 @@ void bt_hci_le_cs_config_complete_event(struct net_buf *buf)
882883
config.t_pm_time_us = evt->t_pm_time;
883884
memcpy(config.channel_map, evt->channel_map, ARRAY_SIZE(config.channel_map));
884885

885-
notify_cs_config_created(conn, BT_HCI_ERR_SUCCESS, &config);
886+
bt_conn_notify_cs_config_created(conn, BT_HCI_ERR_SUCCESS, &config);
886887
} else {
887-
notify_cs_config_created(conn, evt->status, NULL);
888+
bt_conn_notify_cs_config_created(conn, evt->status, NULL);
888889
}
889890

890891
bt_conn_unref(conn);
@@ -1263,7 +1264,7 @@ void bt_hci_le_cs_security_enable_complete(struct net_buf *buf)
12631264
return;
12641265
}
12651266

1266-
notify_cs_security_enable_available(conn, evt->status);
1267+
bt_conn_notify_cs_security_enable_available(conn, evt->status);
12671268

12681269
bt_conn_unref(conn);
12691270
}
@@ -1313,9 +1314,9 @@ void bt_hci_le_cs_procedure_enable_complete(struct net_buf *buf)
13131314
params.procedure_count = sys_le16_to_cpu(evt->procedure_count);
13141315
params.max_procedure_len = sys_le16_to_cpu(evt->max_procedure_len);
13151316

1316-
notify_cs_procedure_enable_available(conn, BT_HCI_ERR_SUCCESS, &params);
1317+
bt_conn_notify_cs_procedure_enable_available(conn, BT_HCI_ERR_SUCCESS, &params);
13171318
} else {
1318-
notify_cs_procedure_enable_available(conn, evt->status, NULL);
1319+
bt_conn_notify_cs_procedure_enable_available(conn, evt->status, NULL);
13191320
}
13201321

13211322
bt_conn_unref(conn);

0 commit comments

Comments
 (0)