Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/subsys/bluetooth/host/l2cap.c b/subsys/bluetooth/host/l2cap.c
- index a9793d9b35..7545cb8890 100644
- --- a/subsys/bluetooth/host/l2cap.c
- +++ b/subsys/bluetooth/host/l2cap.c
- @@ -534,7 +534,6 @@ static void le_conn_param_rsp(struct bt_l2cap *l2cap, struct net_buf *buf)
- BT_DBG("LE conn param rsp result %u", sys_le16_to_cpu(rsp->result));
- }
- -#if defined(CONFIG_BT_CENTRAL)
- static void le_conn_param_update_req(struct bt_l2cap *l2cap, u8_t ident,
- struct net_buf *buf)
- {
- @@ -549,7 +548,7 @@ static void le_conn_param_update_req(struct bt_l2cap *l2cap, u8_t ident,
- return;
- }
- - if (conn->role != BT_HCI_ROLE_MASTER) {
- + if (IS_ENABLED(CONFIG_BT_CENTRAL) && conn->role != BT_HCI_ROLE_MASTER) {
- l2cap_send_reject(conn, ident, BT_L2CAP_REJ_NOT_UNDERSTOOD,
- NULL, 0);
- return;
- @@ -585,7 +584,6 @@ static void le_conn_param_update_req(struct bt_l2cap *l2cap, u8_t ident,
- bt_conn_le_conn_update(conn, ¶m);
- }
- }
- -#endif /* CONFIG_BT_CENTRAL */
- struct bt_l2cap_chan *bt_l2cap_le_lookup_tx_cid(struct bt_conn *conn,
- u16_t cid)
- @@ -1395,11 +1393,9 @@ static int l2cap_recv(struct bt_l2cap_chan *chan, struct net_buf *buf)
- case BT_L2CAP_CONN_PARAM_RSP:
- le_conn_param_rsp(l2cap, buf);
- break;
- -#if defined(CONFIG_BT_CENTRAL)
- case BT_L2CAP_CONN_PARAM_REQ:
- le_conn_param_update_req(l2cap, hdr->ident, buf);
- break;
- -#endif /* CONFIG_BT_CENTRAL */
- #if defined(CONFIG_BT_L2CAP_DYNAMIC_CHANNEL)
- case BT_L2CAP_LE_CONN_REQ:
- le_conn_req(l2cap, hdr->ident, buf);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement