@@ -734,6 +734,7 @@ static void le_start_encryption(struct net_buf *buf, struct net_buf **evt)
734734}
735735#endif /* CONFIG_BLUETOOTH_CENTRAL */
736736
737+ #if defined(CONFIG_BLUETOOTH_PERIPHERAL )
737738static void le_ltk_req_reply (struct net_buf * buf , struct net_buf * * evt )
738739{
739740 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)
764765 rp -> status = (!status ) ? 0x00 : BT_HCI_ERR_CMD_DISALLOWED ;
765766 rp -> handle = sys_le16_to_cpu (handle );
766767}
768+ #endif /* CONFIG_BLUETOOTH_PERIPHERAL */
767769
768770static void le_read_remote_features (struct net_buf * buf , struct net_buf * * evt )
769771{
@@ -991,13 +993,15 @@ static int controller_cmd_handle(u8_t ocf, struct net_buf *cmd,
991993 break ;
992994#endif /* CONFIG_BLUETOOTH_CENTRAL */
993995
996+ #if defined(CONFIG_BLUETOOTH_PERIPHERAL )
994997 case BT_OCF (BT_HCI_OP_LE_LTK_REQ_REPLY ):
995998 le_ltk_req_reply (cmd , evt );
996999 break ;
9971000
9981001 case BT_OCF (BT_HCI_OP_LE_LTK_REQ_NEG_REPLY ):
9991002 le_ltk_req_neg_reply (cmd , evt );
10001003 break ;
1004+ #endif /* CONFIG_BLUETOOTH_PERIPHERAL */
10011005
10021006 case BT_OCF (BT_HCI_OP_LE_READ_REMOTE_FEATURES ):
10031007 le_read_remote_features (cmd , evt );
0 commit comments