Skip to content

Commit b031d76

Browse files
cvinayakjhedberg
authored andcommitted
Bluetooth: controller: Cond. compile connection state HCI cmds
Conditionally compile connection state related HCI commands. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
1 parent c30ba00 commit b031d76

File tree

1 file changed

+4
-0
lines changed
  • subsys/bluetooth/controller/hci

1 file changed

+4
-0
lines changed

subsys/bluetooth/controller/hci/hci.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ static void le_set_scan_enable(struct net_buf *buf, struct net_buf **evt)
668668
}
669669
#endif /* CONFIG_BLUETOOTH_CONTROLLER_STATE_SCAN */
670670

671+
#if defined(CONFIG_BLUETOOTH_CONN)
671672
#if defined(CONFIG_BLUETOOTH_CENTRAL)
672673
static void le_create_connection(struct net_buf *buf, struct net_buf **evt)
673674
{
@@ -894,6 +895,7 @@ static void le_read_max_data_len(struct net_buf *buf, struct net_buf **evt)
894895
rp->status = 0x00;
895896
}
896897
#endif /* CONFIG_BLUETOOTH_CONTROLLER_DATA_LENGTH */
898+
#endif /* CONFIG_BLUETOOTH_CONN */
897899

898900
static int controller_cmd_handle(u8_t ocf, struct net_buf *cmd,
899901
struct net_buf **evt)
@@ -975,6 +977,7 @@ static int controller_cmd_handle(u8_t ocf, struct net_buf *cmd,
975977
break;
976978
#endif /* CONFIG_BLUETOOTH_CONTROLLER_STATE_SCAN */
977979

980+
#if defined(CONFIG_BLUETOOTH_CONN)
978981
#if defined(CONFIG_BLUETOOTH_CENTRAL)
979982
case BT_OCF(BT_HCI_OP_LE_CREATE_CONN):
980983
le_create_connection(cmd, evt);
@@ -1036,6 +1039,7 @@ static int controller_cmd_handle(u8_t ocf, struct net_buf *cmd,
10361039
le_read_max_data_len(cmd, evt);
10371040
break;
10381041
#endif /* CONFIG_BLUETOOTH_CONTROLLER_DATA_LENGTH */
1042+
#endif /* CONFIG_BLUETOOTH_CONN */
10391043

10401044
default:
10411045
return -EINVAL;

0 commit comments

Comments
 (0)