@@ -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 )
734735static 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
765767static 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