aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/bluetooth/hci_core.h3
-rw-r--r--net/bluetooth/hci_core.c10
-rw-r--r--net/bluetooth/mgmt.c5
3 files changed, 6 insertions, 12 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 5a83621672bf..61d4d265f42d 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -855,8 +855,7 @@ struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
855struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev, 855struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev,
856 bdaddr_t *addr, u8 addr_type); 856 bdaddr_t *addr, u8 addr_type);
857int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type, 857int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
858 u8 auto_connect, u16 conn_min_interval, 858 u8 auto_connect);
859 u16 conn_max_interval);
860void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type); 859void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type);
861void hci_conn_params_clear(struct hci_dev *hdev); 860void hci_conn_params_clear(struct hci_dev *hdev);
862 861
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 9ae945d8ad7e..237963d5473c 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3508,8 +3508,7 @@ struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev,
3508 3508
3509/* This function requires the caller holds hdev->lock */ 3509/* This function requires the caller holds hdev->lock */
3510int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type, 3510int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
3511 u8 auto_connect, u16 conn_min_interval, 3511 u8 auto_connect)
3512 u16 conn_max_interval)
3513{ 3512{
3514 struct hci_conn_params *params; 3513 struct hci_conn_params *params;
3515 3514
@@ -3517,8 +3516,6 @@ int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
3517 if (!params) 3516 if (!params)
3518 return -EIO; 3517 return -EIO;
3519 3518
3520 params->conn_min_interval = conn_min_interval;
3521 params->conn_max_interval = conn_max_interval;
3522 params->auto_connect = auto_connect; 3519 params->auto_connect = auto_connect;
3523 3520
3524 switch (auto_connect) { 3521 switch (auto_connect) {
@@ -3532,9 +3529,8 @@ int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
3532 break; 3529 break;
3533 } 3530 }
3534 3531
3535 BT_DBG("addr %pMR (type %u) auto_connect %u conn_min_interval 0x%.4x " 3532 BT_DBG("addr %pMR (type %u) auto_connect %u", addr, addr_type,
3536 "conn_max_interval 0x%.4x", addr, addr_type, auto_connect, 3533 auto_connect);
3537 conn_min_interval, conn_max_interval);
3538 3534
3539 return 0; 3535 return 0;
3540} 3536}
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 6baba309f9e2..c6e9b551242b 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5028,9 +5028,8 @@ static int add_device(struct sock *sk, struct hci_dev *hdev,
5028 /* If the connection parameters don't exist for this device, 5028 /* If the connection parameters don't exist for this device,
5029 * they will be created and configured with defaults. 5029 * they will be created and configured with defaults.
5030 */ 5030 */
5031 if (hci_conn_params_set(hdev, &cp->addr.bdaddr, addr_type, auto_conn, 5031 if (hci_conn_params_set(hdev, &cp->addr.bdaddr, addr_type,
5032 hdev->le_conn_min_interval, 5032 auto_conn) < 0) {
5033 hdev->le_conn_max_interval) < 0) {
5034 err = cmd_complete(sk, hdev->id, MGMT_OP_ADD_DEVICE, 5033 err = cmd_complete(sk, hdev->id, MGMT_OP_ADD_DEVICE,
5035 MGMT_STATUS_FAILED, 5034 MGMT_STATUS_FAILED,
5036 &cp->addr, sizeof(cp->addr)); 5035 &cp->addr, sizeof(cp->addr));