Bluetooth: Host: Adding valid param check in send_conn_le_param_update()
Send connection parameter update request only if it contains the valid range of values for connection intervals, latency and timeout. Signed-off-by: Kiran Paramaswaran <kipm@oticon.com>
This commit is contained in:
parent
b9b474cc82
commit
d86d37a075
1 changed files with 5 additions and 0 deletions
|
@ -214,6 +214,11 @@ static int send_conn_le_param_update(struct bt_conn *conn,
|
|||
conn->le.features[0], param->interval_min,
|
||||
param->interval_max, param->latency, param->timeout);
|
||||
|
||||
/* Proceed only if connection parameters contains valid values*/
|
||||
if (!bt_le_conn_params_valid(param)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Use LE connection parameter request if both local and remote support
|
||||
* it; or if local role is master then use LE connection update.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue