Skip to content

Commit 3666fb8

Browse files
cvinayakAnas Nashif
authored and
Anas Nashif
committed
Bluetooth: hci: Consistently use bt_hci_evt_*
Rename occurences of bt_hci_ev_* to more widely used bt_hci_evt_* namespace. Change-id: I742fb86f8f835a0f6072638e1e997ad08891d43d Signed-off-by: Vinayak Chettimada <[email protected]>
1 parent 9fcd082 commit 3666fb8

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

include/bluetooth/hci.h

+12-12
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ struct bt_hci_evt_link_key_req {
13661366
#define BT_LK_AUTH_COMBINATION_P256 0x08
13671367

13681368
#define BT_HCI_EVT_LINK_KEY_NOTIFY 0x18
1369-
struct bt_hci_ev_link_key_notify {
1369+
struct bt_hci_evt_link_key_notify {
13701370
bt_addr_t bdaddr;
13711371
u8_t link_key[16];
13721372
u8_t key_type;
@@ -1484,15 +1484,15 @@ struct bt_hci_evt_le_conn_complete {
14841484
} __packed;
14851485

14861486
#define BT_HCI_EVT_LE_ADVERTISING_REPORT 0x02
1487-
struct bt_hci_ev_le_advertising_info {
1487+
struct bt_hci_evt_le_advertising_info {
14881488
u8_t evt_type;
14891489
bt_addr_le_t addr;
14901490
u8_t length;
14911491
u8_t data[0];
14921492
} __packed;
1493-
struct bt_hci_ev_le_advertising_report {
1493+
struct bt_hci_evt_le_advertising_report {
14941494
u8_t num_reports;
1495-
struct bt_hci_ev_le_advertising_info adv_info[0];
1495+
struct bt_hci_evt_le_advertising_info adv_info[0];
14961496
} __packed;
14971497

14981498
#define BT_HCI_EVT_LE_CONN_UPDATE_COMPLETE 0x03
@@ -1505,7 +1505,7 @@ struct bt_hci_evt_le_conn_update_complete {
15051505
} __packed;
15061506

15071507
#define BT_HCI_EV_LE_REMOTE_FEAT_COMPLETE 0x04
1508-
struct bt_hci_ev_le_remote_feat_complete {
1508+
struct bt_hci_evt_le_remote_feat_complete {
15091509
u8_t status;
15101510
u16_t handle;
15111511
u8_t features[8];
@@ -1563,15 +1563,15 @@ struct bt_hci_evt_le_enh_conn_complete {
15631563
} __packed;
15641564

15651565
#define BT_HCI_EVT_LE_DIRECT_ADV_REPORT 0x0b
1566-
struct bt_hci_ev_le_direct_adv_info {
1566+
struct bt_hci_evt_le_direct_adv_info {
15671567
u8_t evt_type;
15681568
bt_addr_le_t dir_addr;
15691569
bt_addr_le_t addr;
15701570
s8_t rssi;
15711571
} __packed;
1572-
struct bt_hci_ev_le_direct_adv_report {
1572+
struct bt_hci_evt_le_direct_adv_report {
15731573
u8_t num_reports;
1574-
struct bt_hci_ev_le_direct_adv_info direct_adv_info[0];
1574+
struct bt_hci_evt_le_direct_adv_info direct_adv_info[0];
15751575
} __packed;
15761576

15771577
#define BT_HCI_EVT_LE_PHY_UPDATE_COMPLETE 0x0c
@@ -1583,7 +1583,7 @@ struct bt_hci_evt_le_phy_update_complete {
15831583
} __packed;
15841584

15851585
#define BT_HCI_EVT_LE_EXT_ADVERTISING_REPORT 0x0d
1586-
struct bt_hci_ev_le_ext_advertising_info {
1586+
struct bt_hci_evt_le_ext_advertising_info {
15871587
u8_t evt_type;
15881588
bt_addr_le_t addr;
15891589
u8_t prim_phy;
@@ -1596,9 +1596,9 @@ struct bt_hci_ev_le_ext_advertising_info {
15961596
u8_t length;
15971597
u8_t data[0];
15981598
} __packed;
1599-
struct bt_hci_ev_le_ext_advertising_report {
1599+
struct bt_hci_evt_le_ext_advertising_report {
16001600
u8_t num_reports;
1601-
struct bt_hci_ev_le_ext_advertising_info adv_info[0];
1601+
struct bt_hci_evt_le_ext_advertising_info adv_info[0];
16021602
} __packed;
16031603

16041604
#define BT_HCI_EVT_LE_PER_ADV_SYNC_ESTABLISHED 0x0e
@@ -1613,7 +1613,7 @@ struct bt_hci_evt_le_per_adv_sync_established {
16131613
} __packed;
16141614

16151615
#define BT_HCI_EVT_LE_PER_ADVERTISING_REPORT 0x0f
1616-
struct bt_hci_ev_le_per_advertising_report {
1616+
struct bt_hci_evt_le_per_advertising_report {
16171617
u16_t handle;
16181618
s8_t tx_power;
16191619
s8_t rssi;

subsys/bluetooth/controller/hci/hci.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -1001,9 +1001,9 @@ static void le_advertising_report(struct pdu_data *pdu_data, u8_t *b,
10011001
{
10021002
const u8_t c_adv_type[] = { 0x00, 0x01, 0x03, 0xff, 0x04,
10031003
0xff, 0x02 };
1004-
struct bt_hci_ev_le_advertising_report *sep;
1004+
struct bt_hci_evt_le_advertising_report *sep;
10051005
struct pdu_adv *adv = (struct pdu_adv *)pdu_data;
1006-
struct bt_hci_ev_le_advertising_info *adv_info;
1006+
struct bt_hci_evt_le_advertising_info *adv_info;
10071007
u8_t data_len;
10081008
u8_t *rssi;
10091009
u8_t info_len;
@@ -1060,7 +1060,7 @@ static void le_advertising_report(struct pdu_data *pdu_data, u8_t *b,
10601060
data_len = 0;
10611061
}
10621062

1063-
info_len = sizeof(struct bt_hci_ev_le_advertising_info) + data_len +
1063+
info_len = sizeof(struct bt_hci_evt_le_advertising_info) + data_len +
10641064
sizeof(*rssi);
10651065
sep = meta_evt(buf, BT_HCI_EVT_LE_ADVERTISING_REPORT,
10661066
sizeof(*sep) + info_len);
@@ -1310,7 +1310,7 @@ static void encrypt_change(u8_t err, u16_t handle,
13101310
static void le_remote_feat_complete(u8_t status, struct pdu_data *pdu_data,
13111311
u16_t handle, struct net_buf *buf)
13121312
{
1313-
struct bt_hci_ev_le_remote_feat_complete *sep;
1313+
struct bt_hci_evt_le_remote_feat_complete *sep;
13141314

13151315
if (!(event_mask & BT_EVT_MASK_LE_META_EVENT) ||
13161316
!(le_event_mask & BT_EVT_MASK_LE_REMOTE_FEAT_COMPLETE)) {

subsys/bluetooth/host/hci_core.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ static void le_conn_complete(struct net_buf *buf)
774774

775775
static void le_remote_feat_complete(struct net_buf *buf)
776776
{
777-
struct bt_hci_ev_le_remote_feat_complete *evt = (void *)buf->data;
777+
struct bt_hci_evt_le_remote_feat_complete *evt = (void *)buf->data;
778778
u16_t handle = sys_le16_to_cpu(evt->handle);
779779
struct bt_conn *conn;
780780

@@ -1223,7 +1223,7 @@ static void pin_code_req(struct net_buf *buf)
12231223

12241224
static void link_key_notify(struct net_buf *buf)
12251225
{
1226-
struct bt_hci_ev_link_key_notify *evt = (void *)buf->data;
1226+
struct bt_hci_evt_link_key_notify *evt = (void *)buf->data;
12271227
struct bt_conn *conn;
12281228

12291229
conn = bt_conn_lookup_addr_br(&evt->bdaddr);
@@ -2502,7 +2502,7 @@ int bt_le_scan_update(bool fast_scan)
25022502
static void le_adv_report(struct net_buf *buf)
25032503
{
25042504
u8_t num_reports = net_buf_pull_u8(buf);
2505-
struct bt_hci_ev_le_advertising_info *info;
2505+
struct bt_hci_evt_le_advertising_info *info;
25062506

25072507
BT_DBG("Adv number of reports %u", num_reports);
25082508

0 commit comments

Comments
 (0)