@@ -42,27 +42,26 @@ LOG_MODULE_REGISTER(dfu, CONFIG_LOG_DFU_ENTRY_LEVEL);
4242static struct bt_le_adv_param adv_param ;
4343static const struct bt_data ad_peer [] = {
4444 BT_DATA_BYTES (BT_DATA_FLAGS , (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR )),
45- BT_DATA_BYTES (BT_DATA_UUID128_ALL ,
46- 0x84 , 0xaa , 0x60 , 0x74 , 0x52 , 0x8a , 0x8b , 0x86 ,
47- 0xd3 , 0x4c , 0xb7 , 0x1d , 0x1d , 0xdc , 0x53 , 0x8d ),
45+ BT_DATA_BYTES (BT_DATA_UUID128_ALL , 0x84 , 0xaa , 0x60 , 0x74 , 0x52 , 0x8a , 0x8b , 0x86 , 0xd3 ,
46+ 0x4c , 0xb7 , 0x1d , 0x1d , 0xdc , 0x53 , 0x8d ),
4847};
4948
5049/* MCUMGR related functions */
5150static void mcumgr_register (void )
5251{
53- /* Enable MCUMGR */
54- #ifdef CONFIG_MCUMGR_CMD_OS_MGMT
55- os_mgmt_register_group ();
56- #endif
57- #ifdef CONFIG_MCUMGR_CMD_IMG_MGMT
58- img_mgmt_register_group ();
59- #endif
60- #ifdef CONFIG_MCUMGR_CMD_STAT_MGMT
61- stat_mgmt_register_group ();
62- #endif
63- #ifdef CONFIG_MCUMGR_SMP_BT
64- smp_bt_register ();
65- #endif
52+ /* Enable MCUMGR */
53+ #ifdef CONFIG_MCUMGR_CMD_OS_MGMT
54+ os_mgmt_register_group ();
55+ #endif
56+ #ifdef CONFIG_MCUMGR_CMD_IMG_MGMT
57+ img_mgmt_register_group ();
58+ #endif
59+ #ifdef CONFIG_MCUMGR_CMD_STAT_MGMT
60+ stat_mgmt_register_group ();
61+ #endif
62+ #ifdef CONFIG_MCUMGR_SMP_BT
63+ smp_bt_register ();
64+ #endif
6665}
6766
6867static void smp_adv (void )
@@ -96,7 +95,7 @@ static struct bt_conn_cb dfu_conn_callbacks = {
9695
9796static void dfu_set_bt_name (void )
9897{
99- char name [CONFIG_BT_DEVICE_NAME_MAX ] = {0 };
98+ char name [CONFIG_BT_DEVICE_NAME_MAX ] = { 0 };
10099
101100 strlcpy (name , CONFIG_BT_DEVICE_NAME , CONFIG_BT_DEVICE_NAME_MAX );
102101 strlcat (name , "_" , CONFIG_BT_DEVICE_NAME_MAX );
@@ -106,11 +105,7 @@ static void dfu_set_bt_name(void)
106105 int ret ;
107106 enum audio_channel channel ;
108107
109- ret = channel_assignment_get (& channel );
110- if (ret ) {
111- /* Channel is not assigned yet: use default */
112- channel = AUDIO_CHANNEL_DEFAULT ;
113- }
108+ channel_assignment_get (& channel );
114109
115110 if (channel == AUDIO_CH_L ) {
116111 strlcat (name , CH_L_TAG , CONFIG_BT_DEVICE_NAME_MAX );
0 commit comments