@@ -30,7 +30,6 @@ LOG_MODULE_REGISTER(bt_bap_base, CONFIG_BT_BAP_BASE_LOG_LEVEL);
3030/* The BASE and the following defines are defined by BAP v1.0.1, section 3.7.2.2 Basic Audio
3131 * Announcements
3232 */
33- #define BASE_MAX_SIZE (UINT8_MAX - 1 /* type */ - BT_UUID_SIZE_16 )
3433#define BASE_CODEC_ID_SIZE (1 /* id */ + 2 /* cid */ + 2 /* vid */ )
3534#define BASE_PD_SIZE 3
3635#define BASE_SUBGROUP_COUNT_SIZE 1
@@ -39,14 +38,14 @@ LOG_MODULE_REGISTER(bt_bap_base, CONFIG_BT_BAP_BASE_LOG_LEVEL);
3938#define BASE_META_LEN_SIZE 1
4039#define BASE_BIS_INDEX_SIZE 1
4140#define BASE_BIS_CC_LEN_SIZE 1
42- #define BASE_SUBGROUP_MAX_SIZE (BASE_MAX_SIZE - BASE_PD_SIZE - BASE_SUBGROUP_COUNT_SIZE)
41+ #define BASE_SUBGROUP_MAX_SIZE (BT_BASE_MAX_SIZE - BASE_PD_SIZE - BASE_SUBGROUP_COUNT_SIZE)
4342#define BASE_SUBGROUP_MIN_SIZE \
4443 (BASE_NUM_BIS_SIZE + BASE_CODEC_ID_SIZE + BASE_CC_LEN_SIZE + BASE_META_LEN_SIZE + \
4544 BASE_BIS_INDEX_SIZE + BASE_BIS_CC_LEN_SIZE)
4645#define BASE_MIN_SIZE \
4746 (BT_UUID_SIZE_16 + BASE_PD_SIZE + BASE_SUBGROUP_COUNT_SIZE + BASE_SUBGROUP_MIN_SIZE)
4847#define BASE_SUBGROUP_MAX_COUNT \
49- ((BASE_MAX_SIZE - BASE_PD_SIZE - BASE_SUBGROUP_COUNT_SIZE) / BASE_SUBGROUP_MIN_SIZE)
48+ ((BT_BASE_MAX_SIZE - BASE_PD_SIZE - BASE_SUBGROUP_COUNT_SIZE) / BASE_SUBGROUP_MIN_SIZE)
5049
5150static uint32_t base_pull_pd (struct net_buf_simple * net_buf )
5251{
@@ -233,7 +232,7 @@ int bt_bap_base_get_size(const struct bt_bap_base *base)
233232 return - EINVAL ;
234233 }
235234
236- net_buf_simple_init_with_data (& net_buf , (void * )base , BASE_MAX_SIZE );
235+ net_buf_simple_init_with_data (& net_buf , (void * )base , BT_BASE_MAX_SIZE );
237236 base_pull_pd (& net_buf );
238237 size += BASE_PD_SIZE ;
239238 subgroup_count = net_buf_simple_pull_u8 (& net_buf );
@@ -301,7 +300,7 @@ int bt_bap_base_get_subgroup_count(const struct bt_bap_base *base)
301300 return - EINVAL ;
302301 }
303302
304- net_buf_simple_init_with_data (& net_buf , (void * )base , BASE_MAX_SIZE );
303+ net_buf_simple_init_with_data (& net_buf , (void * )base , BT_BASE_MAX_SIZE );
305304 base_pull_pd (& net_buf );
306305 subgroup_count = net_buf_simple_pull_u8 (& net_buf );
307306
@@ -329,7 +328,7 @@ int bt_bap_base_foreach_subgroup(const struct bt_bap_base *base,
329328 return - EINVAL ;
330329 }
331330
332- net_buf_simple_init_with_data (& net_buf , (void * )base , BASE_MAX_SIZE );
331+ net_buf_simple_init_with_data (& net_buf , (void * )base , BT_BASE_MAX_SIZE );
333332 base_pull_pd (& net_buf );
334333 subgroup_count = net_buf_simple_pull_u8 (& net_buf );
335334
0 commit comments