Bluetooth: Controller: Rework internal header includes

Rework internal header files to not have includes, rather
have the required includes in the c source files.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2023-06-12 06:06:43 +05:30 committed by Anas Nashif
commit 05aabdc6d9
34 changed files with 57 additions and 60 deletions

View file

@ -20,7 +20,6 @@
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/hci_vs.h> #include <zephyr/bluetooth/hci_vs.h>
#include <zephyr/bluetooth/buf.h> #include <zephyr/bluetooth/buf.h>
#include <zephyr/bluetooth/bluetooth.h>
#include "../host/hci_ecc.h" #include "../host/hci_ecc.h"

View file

@ -20,7 +20,6 @@
#include <zephyr/debug/stack.h> #include <zephyr/debug/stack.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include <zephyr/drivers/bluetooth/hci_driver.h> #include <zephyr/drivers/bluetooth/hci_driver.h>

View file

@ -5,11 +5,6 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <stdint.h>
#include <stdbool.h>
#include <zephyr/kernel.h>
int ll_init(struct k_sem *sem_rx); int ll_init(struct k_sem *sem_rx);
int ll_deinit(void); int ll_deinit(void);
void ll_reset(void); void ll_reset(void);

View file

@ -13,8 +13,8 @@
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/conn.h>
#include "util/memq.h" #include "util/memq.h"

View file

@ -4,10 +4,6 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <stdint.h>
#include <zephyr/types.h>
#include <zephyr/toolchain.h>
#if defined(CONFIG_BT_CTLR_ISO_RX_SDU_BUFFERS) && (CONFIG_BT_CTLR_ISO_RX_SDU_BUFFERS > 0) #if defined(CONFIG_BT_CTLR_ISO_RX_SDU_BUFFERS) && (CONFIG_BT_CTLR_ISO_RX_SDU_BUFFERS > 0)
#define ISOAL_BUFFER_RX_SDUS_ENABLE #define ISOAL_BUFFER_RX_SDUS_ENABLE
#endif /* CONFIG_BT_CTLR_ISO_RX_SDU_BUFFERS > 0 */ #endif /* CONFIG_BT_CTLR_ISO_RX_SDU_BUFFERS > 0 */

View file

@ -4,12 +4,8 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <string.h>
#include <zephyr/settings/settings.h> #include <zephyr/settings/settings.h>
#include <zephyr/bluetooth/bluetooth.h>
#include "ll_settings.h" #include "ll_settings.h"
#include <zephyr/logging/log.h> #include <zephyr/logging/log.h>

View file

@ -10,7 +10,6 @@
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <soc.h>
#include "hal/cpu.h" #include "hal/cpu.h"
#include "hal/ccm.h" #include "hal/ccm.h"

View file

@ -5,10 +5,8 @@
*/ */
#include <stdint.h> #include <stdint.h>
#include <stdbool.h>
#include <zephyr/toolchain.h> #include <stddef.h>
#include <soc.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <limits.h>
#include <zephyr/toolchain.h>
#include <soc.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <soc.h>
#include "hal/cpu.h" #include "hal/cpu.h"
#include "hal/ccm.h" #include "hal/ccm.h"

View file

@ -5,8 +5,11 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <stdint.h>
#include <zephyr/toolchain.h> #include <stdbool.h>
#include <stddef.h>
#include <limits.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>

View file

@ -251,6 +251,9 @@
#define PDU_ADV_DATA_HEADER_TYPE_OFFSET 1U #define PDU_ADV_DATA_HEADER_TYPE_OFFSET 1U
#define PDU_ADV_DATA_HEADER_DATA_OFFSET 2U #define PDU_ADV_DATA_HEADER_DATA_OFFSET 2U
/* Advertising Data Types in ACAD */
#define PDU_ADV_DATA_TYPE_CHANNEL_MAP_UPDATE_IND 0x28
/* /*
* Macros to return correct Data Channel PDU time * Macros to return correct Data Channel PDU time
* Note: formula is valid for 1M, 2M and Coded S8 * Note: formula is valid for 1M, 2M and Coded S8

View file

@ -7,7 +7,6 @@
#include <soc.h> #include <soc.h>
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include "hal/cpu.h" #include "hal/cpu.h"

View file

@ -1308,7 +1308,7 @@ void ull_adv_sync_chm_complete(struct node_rx_hdr *rx)
ad_len = ad[PDU_ADV_DATA_HEADER_LEN_OFFSET]; ad_len = ad[PDU_ADV_DATA_HEADER_LEN_OFFSET];
if (ad_len && if (ad_len &&
(ad[PDU_ADV_DATA_HEADER_TYPE_OFFSET] == (ad[PDU_ADV_DATA_HEADER_TYPE_OFFSET] ==
BT_DATA_CHANNEL_MAP_UPDATE_IND)) { PDU_ADV_DATA_TYPE_CHANNEL_MAP_UPDATE_IND)) {
break; break;
} }
@ -2132,7 +2132,8 @@ static uint8_t sync_chm_update(uint8_t handle)
sizeof(acad)); sizeof(acad));
acad += acad_len_prev; acad += acad_len_prev;
acad[PDU_ADV_DATA_HEADER_LEN_OFFSET] = sizeof(*chm_upd_ind) + 1U; acad[PDU_ADV_DATA_HEADER_LEN_OFFSET] = sizeof(*chm_upd_ind) + 1U;
acad[PDU_ADV_DATA_HEADER_TYPE_OFFSET] = BT_DATA_CHANNEL_MAP_UPDATE_IND; acad[PDU_ADV_DATA_HEADER_TYPE_OFFSET] =
PDU_ADV_DATA_TYPE_CHANNEL_MAP_UPDATE_IND;
/* Populate the Channel Map Indication structure */ /* Populate the Channel Map Indication structure */
chm_upd_ind = (void *)&acad[PDU_ADV_DATA_HEADER_DATA_OFFSET]; chm_upd_ind = (void *)&acad[PDU_ADV_DATA_HEADER_DATA_OFFSET];

View file

@ -5,8 +5,9 @@
*/ */
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/buf.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/iso.h> #include <zephyr/bluetooth/iso.h>
#include "util/util.h" #include "util/util.h"

View file

@ -7,7 +7,6 @@
#include <stddef.h> #include <stddef.h>
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <soc.h> #include <soc.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>

View file

@ -6,7 +6,6 @@
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include "util/util.h" #include "util/util.h"

View file

@ -4,8 +4,6 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/sys/util.h>
/** /**
* User CPR Interval * User CPR Interval
*/ */

View file

@ -4,10 +4,11 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/kernel.h>
#include <soc.h> #include <soc.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/buf.h>
#include "hal/cpu.h" #include "hal/cpu.h"
#include "hal/ccm.h" #include "hal/ccm.h"

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h> #include <zephyr/sys/slist.h>
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/bluetooth/hci_types.h>
#include "hal/ccm.h" #include "hal/ccm.h"
#include "util/util.h" #include "util/util.h"

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h> #include <zephyr/sys/slist.h>
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/bluetooth/hci_types.h>
#include "hal/ecb.h" #include "hal/ecb.h"
#include "hal/ccm.h" #include "hal/ccm.h"

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h> #include <zephyr/sys/slist.h>
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/bluetooth/hci_types.h>
#include "hal/ccm.h" #include "hal/ccm.h"
#include "util/util.h" #include "util/util.h"

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h> #include <zephyr/sys/slist.h>
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/bluetooth/hci_types.h>
#include "hal/ccm.h" #include "hal/ccm.h"
#include "util/util.h" #include "util/util.h"

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h> #include <zephyr/sys/slist.h>
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/bluetooth/hci_types.h>
#include "hal/ccm.h" #include "hal/ccm.h"
#include "util/util.h" #include "util/util.h"

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h> #include <zephyr/sys/slist.h>
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/bluetooth/hci_types.h>
#include "hal/ccm.h" #include "hal/ccm.h"
#include "util/util.h" #include "util/util.h"

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h> #include <zephyr/sys/slist.h>
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/bluetooth/hci_types.h>
#include "hal/ccm.h" #include "hal/ccm.h"
#include "util/util.h" #include "util/util.h"

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h> #include <zephyr/sys/slist.h>
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/bluetooth/hci_types.h>
#include "hal/ccm.h" #include "hal/ccm.h"
#include "util/util.h" #include "util/util.h"

View file

@ -4,13 +4,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/types.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h> #include <zephyr/sys/slist.h>
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/bluetooth/hci_types.h>
#include "hal/ccm.h" #include "hal/ccm.h"
#include "util/util.h" #include "util/util.h"

View file

@ -5,9 +5,11 @@
*/ */
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/bluetooth/buf.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/bluetooth/conn.h>
#include "util/util.h" #include "util/util.h"
#include "util/memq.h" #include "util/memq.h"
#include "util/mayfly.h" #include "util/mayfly.h"
@ -46,8 +48,6 @@
#include "ull_conn_iso_internal.h" #include "ull_conn_iso_internal.h"
#include "ull_llcp_internal.h" #include "ull_llcp_internal.h"
#include <zephyr/bluetooth/hci_types.h>
#include "hal/debug.h" #include "hal/debug.h"
#define LOG_LEVEL CONFIG_BT_HCI_DRIVER_LOG_LEVEL #define LOG_LEVEL CONFIG_BT_HCI_DRIVER_LOG_LEVEL

View file

@ -5,6 +5,8 @@
*/ */
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/sys/slist.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include "hal/ccm.h" #include "hal/ccm.h"

View file

@ -1149,7 +1149,7 @@ void ull_sync_chm_update(uint8_t sync_handle, uint8_t *acad, uint8_t acad_len)
ad_len = acad[PDU_ADV_DATA_HEADER_LEN_OFFSET]; ad_len = acad[PDU_ADV_DATA_HEADER_LEN_OFFSET];
if (ad_len && if (ad_len &&
(acad[PDU_ADV_DATA_HEADER_TYPE_OFFSET] == (acad[PDU_ADV_DATA_HEADER_TYPE_OFFSET] ==
BT_DATA_CHANNEL_MAP_UPDATE_IND)) { PDU_ADV_DATA_TYPE_CHANNEL_MAP_UPDATE_IND)) {
break; break;
} }

View file

@ -6,7 +6,6 @@
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h> #include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci_types.h> #include <zephyr/bluetooth/hci_types.h>
#include "util/util.h" #include "util/util.h"

View file

@ -4,6 +4,8 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/sys/slist.h>
#include "ull_tx_queue.h" #include "ull_tx_queue.h"
void ull_tx_q_init(struct ull_tx_q *queue) void ull_tx_q_init(struct ull_tx_q *queue)

View file

@ -4,8 +4,6 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/sys/slist.h>
struct ull_tx_q { struct ull_tx_q {
uint8_t pause_data; /* Data pause state of the tx queue */ uint8_t pause_data; /* Data pause state of the tx queue */