Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. diff --git a/subsys/bluetooth/host/l2cap.c b/subsys/bluetooth/host/l2cap.c
  2. index a9793d9b35..7545cb8890 100644
  3. --- a/subsys/bluetooth/host/l2cap.c
  4. +++ b/subsys/bluetooth/host/l2cap.c
  5. @@ -534,7 +534,6 @@ static void le_conn_param_rsp(struct bt_l2cap *l2cap, struct net_buf *buf)
  6. BT_DBG("LE conn param rsp result %u", sys_le16_to_cpu(rsp->result));
  7. }
  8.  
  9. -#if defined(CONFIG_BT_CENTRAL)
  10. static void le_conn_param_update_req(struct bt_l2cap *l2cap, u8_t ident,
  11. struct net_buf *buf)
  12. {
  13. @@ -549,7 +548,7 @@ static void le_conn_param_update_req(struct bt_l2cap *l2cap, u8_t ident,
  14. return;
  15. }
  16.  
  17. - if (conn->role != BT_HCI_ROLE_MASTER) {
  18. + if (IS_ENABLED(CONFIG_BT_CENTRAL) && conn->role != BT_HCI_ROLE_MASTER) {
  19. l2cap_send_reject(conn, ident, BT_L2CAP_REJ_NOT_UNDERSTOOD,
  20. NULL, 0);
  21. return;
  22. @@ -585,7 +584,6 @@ static void le_conn_param_update_req(struct bt_l2cap *l2cap, u8_t ident,
  23. bt_conn_le_conn_update(conn, &param);
  24. }
  25. }
  26. -#endif /* CONFIG_BT_CENTRAL */
  27.  
  28. struct bt_l2cap_chan *bt_l2cap_le_lookup_tx_cid(struct bt_conn *conn,
  29. u16_t cid)
  30. @@ -1395,11 +1393,9 @@ static int l2cap_recv(struct bt_l2cap_chan *chan, struct net_buf *buf)
  31. case BT_L2CAP_CONN_PARAM_RSP:
  32. le_conn_param_rsp(l2cap, buf);
  33. break;
  34. -#if defined(CONFIG_BT_CENTRAL)
  35. case BT_L2CAP_CONN_PARAM_REQ:
  36. le_conn_param_update_req(l2cap, hdr->ident, buf);
  37. break;
  38. -#endif /* CONFIG_BT_CENTRAL */
  39. #if defined(CONFIG_BT_L2CAP_DYNAMIC_CHANNEL)
  40. case BT_L2CAP_LE_CONN_REQ:
  41. le_conn_req(l2cap, hdr->ident, buf);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement