Bluetooth: controller: Conditionally compile slave role HCI cmds

Conditionally compile slave role related HCI commands.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Chettimada 2017-04-28 12:36:59 +02:00 committed by Johan Hedberg
commit c30ba00fbc

View file

@ -734,6 +734,7 @@ static void le_start_encryption(struct net_buf *buf, struct net_buf **evt)
} }
#endif /* CONFIG_BLUETOOTH_CENTRAL */ #endif /* CONFIG_BLUETOOTH_CENTRAL */
#if defined(CONFIG_BLUETOOTH_PERIPHERAL)
static void le_ltk_req_reply(struct net_buf *buf, struct net_buf **evt) static void le_ltk_req_reply(struct net_buf *buf, struct net_buf **evt)
{ {
struct bt_hci_cp_le_ltk_req_reply *cmd = (void *)buf->data; struct bt_hci_cp_le_ltk_req_reply *cmd = (void *)buf->data;
@ -764,6 +765,7 @@ static void le_ltk_req_neg_reply(struct net_buf *buf, struct net_buf **evt)
rp->status = (!status) ? 0x00 : BT_HCI_ERR_CMD_DISALLOWED; rp->status = (!status) ? 0x00 : BT_HCI_ERR_CMD_DISALLOWED;
rp->handle = sys_le16_to_cpu(handle); rp->handle = sys_le16_to_cpu(handle);
} }
#endif /* CONFIG_BLUETOOTH_PERIPHERAL */
static void le_read_remote_features(struct net_buf *buf, struct net_buf **evt) static void le_read_remote_features(struct net_buf *buf, struct net_buf **evt)
{ {
@ -991,6 +993,7 @@ static int controller_cmd_handle(u8_t ocf, struct net_buf *cmd,
break; break;
#endif /* CONFIG_BLUETOOTH_CENTRAL */ #endif /* CONFIG_BLUETOOTH_CENTRAL */
#if defined(CONFIG_BLUETOOTH_PERIPHERAL)
case BT_OCF(BT_HCI_OP_LE_LTK_REQ_REPLY): case BT_OCF(BT_HCI_OP_LE_LTK_REQ_REPLY):
le_ltk_req_reply(cmd, evt); le_ltk_req_reply(cmd, evt);
break; break;
@ -998,6 +1001,7 @@ static int controller_cmd_handle(u8_t ocf, struct net_buf *cmd,
case BT_OCF(BT_HCI_OP_LE_LTK_REQ_NEG_REPLY): case BT_OCF(BT_HCI_OP_LE_LTK_REQ_NEG_REPLY):
le_ltk_req_neg_reply(cmd, evt); le_ltk_req_neg_reply(cmd, evt);
break; break;
#endif /* CONFIG_BLUETOOTH_PERIPHERAL */
case BT_OCF(BT_HCI_OP_LE_READ_REMOTE_FEATURES): case BT_OCF(BT_HCI_OP_LE_READ_REMOTE_FEATURES):
le_read_remote_features(cmd, evt); le_read_remote_features(cmd, evt);