Skip to content

Commit 5ee00fd

Browse files
committed
Bluetooth: controller: Conditionally compile slave role HCI cmds
Conditionally compile slave role related HCI commands. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 1f0df0d commit 5ee00fd

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
@@ -731,6 +731,7 @@ static void le_start_encryption(struct net_buf *buf, struct net_buf **evt)
731731
}
732732
#endif /* CONFIG_BLUETOOTH_CENTRAL */
733733

734+
#if defined(CONFIG_BLUETOOTH_PERIPHERAL)
734735
static void le_ltk_req_reply(struct net_buf *buf, struct net_buf **evt)
735736
{
736737
struct bt_hci_cp_le_ltk_req_reply *cmd = (void *)buf->data;
@@ -761,6 +762,7 @@ static void le_ltk_req_neg_reply(struct net_buf *buf, struct net_buf **evt)
761762
rp->status = (!status) ? 0x00 : BT_HCI_ERR_CMD_DISALLOWED;
762763
rp->handle = sys_le16_to_cpu(handle);
763764
}
765+
#endif /* CONFIG_BLUETOOTH_PERIPHERAL */
764766

765767
static void le_read_remote_features(struct net_buf *buf, struct net_buf **evt)
766768
{
@@ -988,13 +990,15 @@ static int controller_cmd_handle(u8_t ocf, struct net_buf *cmd,
988990
break;
989991
#endif /* CONFIG_BLUETOOTH_CENTRAL */
990992

993+
#if defined(CONFIG_BLUETOOTH_PERIPHERAL)
991994
case BT_OCF(BT_HCI_OP_LE_LTK_REQ_REPLY):
992995
le_ltk_req_reply(cmd, evt);
993996
break;
994997

995998
case BT_OCF(BT_HCI_OP_LE_LTK_REQ_NEG_REPLY):
996999
le_ltk_req_neg_reply(cmd, evt);
9971000
break;
1001+
#endif /* CONFIG_BLUETOOTH_PERIPHERAL */
9981002

9991003
case BT_OCF(BT_HCI_OP_LE_READ_REMOTE_FEATURES):
10001004
le_read_remote_features(cmd, evt);

0 commit comments

Comments
 (0)