Skip to content

Commit fcf0895

Browse files
Thalleyjhedberg
authored andcommitted
Bluetooth: ISO: Guard sec_level for iso_chan with unicast
The required_sec_level is only valid for unicast iso channels. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
1 parent c40856e commit fcf0895

File tree

1 file changed

+2
-2
lines changed
  • include/zephyr/bluetooth

1 file changed

+2
-2
lines changed

include/zephyr/bluetooth/iso.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ struct bt_iso_chan {
156156
struct bt_iso_chan_qos *qos;
157157
/** Channel state */
158158
enum bt_iso_state state;
159-
#if defined(CONFIG_BT_SMP) || defined(__DOXYGEN__)
159+
#if (defined(CONFIG_BT_SMP) && defined(CONFIG_BT_ISO_UNICAST)) || defined(__DOXYGEN__)
160160
/** @brief The required security level of the channel
161161
*
162162
* This value can be set as the central before connecting a CIS
@@ -167,7 +167,7 @@ struct bt_iso_chan {
167167
* Only available when @kconfig{CONFIG_BT_SMP} is enabled.
168168
*/
169169
bt_security_t required_sec_level;
170-
#endif /* CONFIG_BT_SMP */
170+
#endif /* CONFIG_BT_SMP && CONFIG_BT_ISO_UNICAST */
171171
/** Node used internally by the stack */
172172
sys_snode_t node;
173173
};

0 commit comments

Comments
 (0)