|
@@ -2529,6 +2529,7 @@ static inline int l2cap_conn_param_update_req(struct l2cap_conn *conn,
|
|
struct l2cap_conn_param_update_req *req;
|
|
struct l2cap_conn_param_update_req *req;
|
|
struct l2cap_conn_param_update_rsp rsp;
|
|
struct l2cap_conn_param_update_rsp rsp;
|
|
u16 min, max, latency, to_multiplier, cmd_len;
|
|
u16 min, max, latency, to_multiplier, cmd_len;
|
|
|
|
+ int err;
|
|
|
|
|
|
if (!(hcon->link_mode & HCI_LM_MASTER))
|
|
if (!(hcon->link_mode & HCI_LM_MASTER))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -2547,7 +2548,9 @@ static inline int l2cap_conn_param_update_req(struct l2cap_conn *conn,
|
|
min, max, latency, to_multiplier);
|
|
min, max, latency, to_multiplier);
|
|
|
|
|
|
memset(&rsp, 0, sizeof(rsp));
|
|
memset(&rsp, 0, sizeof(rsp));
|
|
- if (l2cap_check_conn_param(min, max, latency, to_multiplier))
|
|
|
|
|
|
+
|
|
|
|
+ err = l2cap_check_conn_param(min, max, latency, to_multiplier);
|
|
|
|
+ if (err)
|
|
rsp.result = cpu_to_le16(L2CAP_CONN_PARAM_REJECTED);
|
|
rsp.result = cpu_to_le16(L2CAP_CONN_PARAM_REJECTED);
|
|
else
|
|
else
|
|
rsp.result = cpu_to_le16(L2CAP_CONN_PARAM_ACCEPTED);
|
|
rsp.result = cpu_to_le16(L2CAP_CONN_PARAM_ACCEPTED);
|
|
@@ -2555,6 +2558,9 @@ static inline int l2cap_conn_param_update_req(struct l2cap_conn *conn,
|
|
l2cap_send_cmd(conn, cmd->ident, L2CAP_CONN_PARAM_UPDATE_RSP,
|
|
l2cap_send_cmd(conn, cmd->ident, L2CAP_CONN_PARAM_UPDATE_RSP,
|
|
sizeof(rsp), &rsp);
|
|
sizeof(rsp), &rsp);
|
|
|
|
|
|
|
|
+ if (!err)
|
|
|
|
+ hci_le_conn_update(hcon, min, max, latency, to_multiplier);
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|