diff --git a/subsys/bluetooth/controller/ll_sw/lll_adv.h b/subsys/bluetooth/controller/ll_sw/lll_adv.h index 480883c4e03..b5b891c6103 100644 --- a/subsys/bluetooth/controller/ll_sw/lll_adv.h +++ b/subsys/bluetooth/controller/ll_sw/lll_adv.h @@ -22,7 +22,7 @@ struct lll_adv_sync { uint16_t data_chan_id; struct { - uint8_t data_chan_map[5]; + uint8_t data_chan_map[PDU_CHANNEL_MAP_SIZE]; uint8_t data_chan_count:6; } chm[DOUBLE_BUFFER_SIZE]; uint8_t chm_first; diff --git a/subsys/bluetooth/controller/ll_sw/lll_conn.h b/subsys/bluetooth/controller/ll_sw/lll_conn.h index 01f8e9382f1..c1340b6a935 100644 --- a/subsys/bluetooth/controller/ll_sw/lll_conn.h +++ b/subsys/bluetooth/controller/ll_sw/lll_conn.h @@ -42,7 +42,7 @@ struct lll_conn { uint16_t latency_event; uint16_t event_counter; - uint8_t data_chan_map[5]; + uint8_t data_chan_map[PDU_CHANNEL_MAP_SIZE]; uint8_t data_chan_count:6; uint8_t data_chan_sel:1; uint8_t role:1; diff --git a/subsys/bluetooth/controller/ll_sw/lll_sync.h b/subsys/bluetooth/controller/ll_sw/lll_sync.h index 47cc16f4c7c..1a0c8b0fc01 100644 --- a/subsys/bluetooth/controller/ll_sw/lll_sync.h +++ b/subsys/bluetooth/controller/ll_sw/lll_sync.h @@ -16,7 +16,7 @@ struct lll_sync { uint16_t data_chan_id; struct { - uint8_t data_chan_map[5]; + uint8_t data_chan_map[PDU_CHANNEL_MAP_SIZE]; uint8_t data_chan_count:6; } chm[DOUBLE_BUFFER_SIZE]; uint8_t chm_first; diff --git a/subsys/bluetooth/controller/ll_sw/pdu.h b/subsys/bluetooth/controller/ll_sw/pdu.h index 825d75102f0..d0ec2854b55 100644 --- a/subsys/bluetooth/controller/ll_sw/pdu.h +++ b/subsys/bluetooth/controller/ll_sw/pdu.h @@ -117,6 +117,9 @@ #define WIN_DELAY_UNCODED 2500 #define WIN_DELAY_CODED 3750 +/* Channel Map Size */ +#define PDU_CHANNEL_MAP_SIZE 5 + /* * Macros to return correct Data Channel PDU time * Note: formula is valid for 1M, 2M and Coded S8 @@ -225,7 +228,7 @@ struct pdu_adv_connect_ind { uint16_t interval; uint16_t latency; uint16_t timeout; - uint8_t chan_map[5]; + uint8_t chan_map[PDU_CHANNEL_MAP_SIZE]; #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ uint8_t hop:5; uint8_t sca:3; @@ -363,7 +366,7 @@ struct pdu_adv_sync_info { #error "Unsupported endianness" #endif uint16_t interval; - uint8_t sca_chm[5]; + uint8_t sca_chm[PDU_CHANNEL_MAP_SIZE]; uint32_t aa; uint8_t crc_init[3]; uint16_t evt_cntr; @@ -375,7 +378,7 @@ struct pdu_adv_sync_info { (0x07 << (PDU_SYNC_INFO_SCA_CHM_SCA_BIT_POS)) struct pdu_adv_sync_chm_upd_ind { - uint8_t chm[5]; + uint8_t chm[PDU_CHANNEL_MAP_SIZE]; uint16_t instant; } __packed; @@ -481,7 +484,7 @@ struct pdu_data_llctrl_conn_update_ind { } __packed; struct pdu_data_llctrl_chan_map_ind { - uint8_t chm[5]; + uint8_t chm[PDU_CHANNEL_MAP_SIZE]; uint16_t instant; } __packed; @@ -807,7 +810,7 @@ enum pdu_big_ctrl_type { }; struct pdu_big_ctrl_chan_map_ind { - uint8_t chm[5]; + uint8_t chm[PDU_CHANNEL_MAP_SIZE]; uint16_t instant; } __packed; @@ -907,7 +910,7 @@ struct pdu_big_info { uint16_t base_crc_init; - uint8_t chm_phy[5]; /* 37 bit chm; 3 bit phy */ + uint8_t chm_phy[PDU_CHANNEL_MAP_SIZE]; /* 37 bit chm; 3 bit phy */ uint8_t payload_count_framing[5]; /* 39 bit count; 1 bit framing */ uint8_t giv; /* encryption required */