Skip to content

Commit efdca63

Browse files
Thalleykartben
authored andcommitted
Bluetooth: Host: Add missing includes for all BT host files
Added missing includes and fixed typos in the files. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
1 parent 1efd817 commit efdca63

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+553
-281
lines changed

subsys/bluetooth/host/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ config BT_LONG_WQ_STACK_SIZE
2121
default 1024
2222

2323
config BT_LONG_WQ_PRIO
24-
int "Long workqueue priority. Should be pre-emptible."
24+
int "Long workqueue priority. Should be preemptible."
2525
default 10
2626
range 0 NUM_PREEMPT_PRIORITIES
2727

@@ -979,7 +979,7 @@ config BT_DF_VS_CL_IQ_REPORT_16_BITS_IQ_SAMPLES
979979
bool "Use 16 bits signed integer IQ samples in connectionless IQ reports"
980980
depends on BT_DF_CONNECTIONLESS_CTE_RX && BT_HCI_VS
981981
help
982-
Direction Finging connectionless IQ reports provide a set of IQ samples collected during
982+
Direction Finding connectionless IQ reports provide a set of IQ samples collected during
983983
sampling of CTE. Bluetooth 5.3 Core Specification defines IQ samples to be 8 bits signed
984984
integer, see Vol 4, Part E section 7.7.65.21. This option enables a vendor specific Host
985985
extension to handle connectionless IQ reports with samples that are in 16 bit signed
@@ -989,7 +989,7 @@ config BT_DF_VS_CONN_IQ_REPORT_16_BITS_IQ_SAMPLES
989989
bool "Use 16 bits signed integer IQ samples in connection IQ reports"
990990
depends on BT_DF_CONNECTION_CTE_RX && BT_HCI_VS
991991
help
992-
Direction Finging connection IQ reports provide a set of IQ samples collected during
992+
Direction Finding connection IQ reports provide a set of IQ samples collected during
993993
sampling of CTE. Bluetooth 5.3 Core Specification defines IQ samples to be 8 bits signed
994994
integer, see Vol 4, Part E sections 7.7.65.22. This option enables a vendor specific Host
995995
extension to handle connection IQ report with samples that are in 16 bit signed integer

subsys/bluetooth/host/addr.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77

8+
#include <errno.h>
89
#include <stdbool.h>
910
#include <string.h>
10-
#include <errno.h>
11-
12-
#include <zephyr/sys/util.h>
1311

1412
#include <zephyr/bluetooth/addr.h>
1513
#include <zephyr/bluetooth/crypto.h>
14+
#include <zephyr/sys/util.h>
1615

1716
#define ADDR_RESOLVED_BITMASK (0x02)
1817

subsys/bluetooth/host/adv.c

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,38 @@
44
*
55
* SPDX-License-Identifier: Apache-2.0
66
*/
7-
#include <sys/types.h>
8-
9-
#include <zephyr/sys/byteorder.h>
7+
#include <errno.h>
8+
#include <stddef.h>
9+
#include <stdint.h>
10+
#include <string.h>
1011

12+
#include <zephyr/autoconf.h>
13+
#include <zephyr/bluetooth/addr.h>
1114
#include <zephyr/bluetooth/bluetooth.h>
12-
#include <zephyr/bluetooth/hci.h>
1315
#include <zephyr/bluetooth/buf.h>
16+
#include <zephyr/bluetooth/conn.h>
17+
#include <zephyr/bluetooth/gap.h>
18+
#include <zephyr/bluetooth/hci.h>
19+
#include <zephyr/bluetooth/hci_types.h>
20+
#include <zephyr/kernel.h>
21+
#include <zephyr/logging/log.h>
22+
#include <zephyr/net_buf.h>
23+
#include <zephyr/sys/__assert.h>
24+
#include <zephyr/sys/atomic.h>
25+
#include <zephyr/sys/byteorder.h>
1426
#include <zephyr/sys/check.h>
27+
#include <zephyr/sys/util.h>
28+
#include <zephyr/sys/util_macro.h>
29+
#include <sys/types.h>
1530

1631
#include "addr_internal.h"
17-
#include "hci_core.h"
32+
#include "common/bt_str.h"
1833
#include "conn_internal.h"
34+
#include "hci_core.h"
1935
#include "id.h"
2036
#include "scan.h"
2137

22-
#include "common/bt_str.h"
23-
2438
#define LOG_LEVEL CONFIG_BT_HCI_CORE_LOG_LEVEL
25-
#include <zephyr/logging/log.h>
2639
LOG_MODULE_REGISTER(bt_adv);
2740

2841
enum adv_name_type {

subsys/bluetooth/host/adv.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77

8+
#include <stdbool.h>
9+
10+
#include <zephyr/bluetooth/bluetooth.h>
11+
812
void bt_le_adv_resume(void);
913

1014
struct bt_le_ext_adv *bt_le_adv_lookup_legacy(void);

subsys/bluetooth/host/aes_ccm.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77

8+
#include <errno.h>
9+
#include <stdint.h>
810
#include <string.h>
911

12+
#include <zephyr/autoconf.h>
13+
#include <zephyr/bluetooth/crypto.h>
1014
#include <zephyr/kernel.h>
15+
#include <zephyr/logging/log.h>
1116
#include <zephyr/sys/byteorder.h>
12-
#include <zephyr/bluetooth/crypto.h>
1317

1418
#include "common/bt_str.h"
1519

1620
#define LOG_LEVEL CONFIG_BT_HCI_CORE_LOG_LEVEL
17-
#include <zephyr/logging/log.h>
1821
LOG_MODULE_REGISTER(bt_aes_ccm);
1922

2023
static inline void xor16(uint8_t *dst, const uint8_t *a, const uint8_t *b)

subsys/bluetooth/host/att.c

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,44 @@
55
*
66
* SPDX-License-Identifier: Apache-2.0
77
*/
8+
#include <errno.h>
9+
#include <stdbool.h>
10+
#include <stdint.h>
11+
#include <string.h>
812

13+
#include <zephyr/autoconf.h>
914
#include <zephyr/bluetooth/addr.h>
15+
#include <zephyr/bluetooth/att.h>
16+
#include <zephyr/bluetooth/bluetooth.h>
1017
#include <zephyr/bluetooth/conn.h>
18+
#include <zephyr/bluetooth/gatt.h>
19+
#include <zephyr/bluetooth/hci.h>
20+
#include <zephyr/bluetooth/hci_types.h>
21+
#include <zephyr/bluetooth/l2cap.h>
22+
#include <zephyr/bluetooth/uuid.h>
1123
#include <zephyr/kernel.h>
12-
#include <string.h>
13-
#include <errno.h>
14-
#include <stdbool.h>
24+
#include <zephyr/kernel/thread.h>
25+
#include <zephyr/logging/log.h>
26+
#include <zephyr/net_buf.h>
27+
#include <zephyr/sys/__assert.h>
1528
#include <zephyr/sys/atomic.h>
1629
#include <zephyr/sys/byteorder.h>
30+
#include <zephyr/sys/slist.h>
1731
#include <zephyr/sys/util.h>
32+
#include <zephyr/sys/util_macro.h>
33+
#include <zephyr/sys_clock.h>
34+
#include <zephyr/toolchain.h>
35+
#include <sys/types.h>
1836

19-
#include <zephyr/bluetooth/hci.h>
20-
#include <zephyr/bluetooth/bluetooth.h>
21-
#include <zephyr/bluetooth/uuid.h>
22-
#include <zephyr/bluetooth/att.h>
23-
#include <zephyr/bluetooth/gatt.h>
24-
37+
#include "att_internal.h"
2538
#include "common/bt_str.h"
26-
27-
#include "hci_core.h"
2839
#include "conn_internal.h"
40+
#include "gatt_internal.h"
41+
#include "hci_core.h"
2942
#include "l2cap_internal.h"
3043
#include "smp.h"
31-
#include "att_internal.h"
32-
#include "gatt_internal.h"
3344

3445
#define LOG_LEVEL CONFIG_BT_ATT_LOG_LEVEL
35-
#include <zephyr/logging/log.h>
3646
LOG_MODULE_REGISTER(bt_att);
3747

3848
#define ATT_CHAN(_ch) CONTAINER_OF(_ch, struct bt_att_chan, chan.chan)

subsys/bluetooth/host/att_internal.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
/* att_internal.h - Attribute protocol handling */
22

3+
#include <stdint.h>
4+
#include <stddef.h>
5+
6+
#include <zephyr/bluetooth/att.h>
7+
#include <zephyr/bluetooth/conn.h>
38
#include <zephyr/bluetooth/l2cap.h>
9+
#include <zephyr/kernel.h>
10+
#include <zephyr/net_buf.h>
11+
#include <zephyr/sys/slist.h>
12+
#include <zephyr/sys/util.h>
13+
#include <zephyr/sys_clock.h>
414

515
/*
616
* Copyright (c) 2015-2016 Intel Corporation

subsys/bluetooth/host/buf.c

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,28 @@
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77

8+
#include <stddef.h>
9+
#include <stdint.h>
10+
#include <string.h>
11+
12+
#include <zephyr/autoconf.h>
813
#include <zephyr/bluetooth/hci.h>
914
#include <zephyr/bluetooth/buf.h>
15+
#include <zephyr/bluetooth/hci_types.h>
1016
#include <zephyr/bluetooth/l2cap.h>
11-
12-
#include "common/hci_common_internal.h"
17+
#include <zephyr/kernel.h>
18+
#include <zephyr/logging/log.h>
19+
#include <zephyr/net_buf.h>
20+
#include <zephyr/sys/__assert.h>
21+
#include <zephyr/sys/util_macro.h>
22+
#include <zephyr/sys_clock.h>
1323

1424
#include "buf_view.h"
15-
#include "hci_core.h"
25+
#include "common/hci_common_internal.h"
1626
#include "conn_internal.h"
27+
#include "hci_core.h"
1728
#include "iso_internal.h"
1829

19-
#include <zephyr/logging/log.h>
2030
LOG_MODULE_REGISTER(bt_buf, CONFIG_BT_LOG_LEVEL);
2131

2232
/* Events have a length field of 1 byte. This size fits all events.

subsys/bluetooth/host/buf_view.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#ifndef ZEPHYR_SUBSYS_BLUETOOTH_HOST_BUF_VIEW_H_
1212
#define ZEPHYR_SUBSYS_BLUETOOTH_HOST_BUF_VIEW_H_
1313

14+
#include <stddef.h>
15+
1416
#include <zephyr/net_buf.h>
1517

1618

subsys/bluetooth/host/conn.c

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,29 @@
66
*
77
* SPDX-License-Identifier: Apache-2.0
88
*/
9+
#include <errno.h>
10+
#include <stdbool.h>
11+
#include <stddef.h>
12+
#include <stdint.h>
13+
#include <string.h>
914

15+
#include <zephyr/autoconf.h>
16+
#include <zephyr/bluetooth/addr.h>
17+
#include <zephyr/bluetooth/att.h>
18+
#include <zephyr/bluetooth/bluetooth.h>
19+
#include <zephyr/bluetooth/buf.h>
20+
#include <zephyr/bluetooth/conn.h>
21+
#include <zephyr/bluetooth/direction.h>
22+
#include <zephyr/bluetooth/gap.h>
23+
#include <zephyr/bluetooth/hci.h>
24+
#include <zephyr/bluetooth/hci_types.h>
25+
#include <zephyr/bluetooth/hci_vs.h>
1026
#include <zephyr/bluetooth/iso.h>
27+
#include <zephyr/bluetooth/l2cap.h>
28+
#include <zephyr/irq.h>
1129
#include <zephyr/kernel.h>
12-
#include <string.h>
13-
#include <errno.h>
14-
#include <stdbool.h>
30+
#include <zephyr/logging/log.h>
31+
#include <zephyr/net_buf.h>
1532
#include <zephyr/sys/atomic.h>
1633
#include <zephyr/sys/byteorder.h>
1734
#include <zephyr/sys/check.h>
@@ -21,36 +38,29 @@
2138
#include <zephyr/sys/slist.h>
2239
#include <zephyr/debug/stack.h>
2340
#include <zephyr/sys/__assert.h>
41+
#include <zephyr/sys_clock.h>
42+
#include <zephyr/toolchain.h>
2443

25-
#include <zephyr/bluetooth/hci.h>
26-
#include <zephyr/bluetooth/bluetooth.h>
27-
#include <zephyr/bluetooth/direction.h>
28-
#include <zephyr/bluetooth/conn.h>
29-
#include <zephyr/bluetooth/hci_vs.h>
30-
#include <zephyr/bluetooth/att.h>
31-
44+
#include "addr_internal.h"
45+
#include "adv.h"
46+
#include "att_internal.h"
47+
#include "buf_view.h"
48+
#include "classic/conn_br_internal.h"
49+
#include "classic/sco_internal.h"
50+
#include "classic/ssp.h"
3251
#include "common/assert.h"
3352
#include "common/bt_str.h"
34-
35-
#include "buf_view.h"
36-
#include "addr_internal.h"
53+
#include "conn_internal.h"
54+
#include "direction_internal.h"
3755
#include "hci_core.h"
3856
#include "id.h"
39-
#include "adv.h"
40-
#include "scan.h"
41-
#include "conn_internal.h"
42-
#include "l2cap_internal.h"
57+
#include "iso_internal.h"
4358
#include "keys.h"
59+
#include "l2cap_internal.h"
60+
#include "scan.h"
4461
#include "smp.h"
45-
#include "classic/ssp.h"
46-
#include "att_internal.h"
47-
#include "iso_internal.h"
48-
#include "direction_internal.h"
49-
#include "classic/sco_internal.h"
50-
#include "classic/conn_br_internal.h"
5162

5263
#define LOG_LEVEL CONFIG_BT_CONN_LOG_LEVEL
53-
#include <zephyr/logging/log.h>
5464
LOG_MODULE_REGISTER(bt_conn);
5565

5666
K_FIFO_DEFINE(free_tx);

0 commit comments

Comments
 (0)