Skip to content

Commit d1a866d

Browse files
committed
Merge tag 'for-net-2025-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - hci_qca: move the SoC type check to the right place - MGMT: reject malformed HCI_CMD_SYNC commands - btnxpuart: Fix missing devm_request_irq() return value check - L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION * tag 'for-net-2025-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION Bluetooth: hci_qca: move the SoC type check to the right place Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check Bluetooth: MGMT: reject malformed HCI_CMD_SYNC commands ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents d3faab9 + 03dba9c commit d1a866d

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

drivers/bluetooth/btnxpuart.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,8 @@ static int ps_setup(struct hci_dev *hdev)
533533
ps_host_wakeup_irq_handler,
534534
IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
535535
dev_name(&serdev->dev), nxpdev);
536+
if (ret)
537+
bt_dev_info(hdev, "error setting wakeup IRQ handler, ignoring\n");
536538
disable_irq(psdata->irq_handler);
537539
device_init_wakeup(&serdev->dev, true);
538540
}

drivers/bluetooth/hci_qca.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,14 +2415,14 @@ static int qca_serdev_probe(struct serdev_device *serdev)
24152415

24162416
qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",
24172417
GPIOD_OUT_LOW);
2418-
if (IS_ERR(qcadev->bt_en) &&
2419-
(data->soc_type == QCA_WCN6750 ||
2420-
data->soc_type == QCA_WCN6855)) {
2421-
dev_err(&serdev->dev, "failed to acquire BT_EN gpio\n");
2422-
return PTR_ERR(qcadev->bt_en);
2423-
}
2418+
if (IS_ERR(qcadev->bt_en))
2419+
return dev_err_probe(&serdev->dev,
2420+
PTR_ERR(qcadev->bt_en),
2421+
"failed to acquire BT_EN gpio\n");
24242422

2425-
if (!qcadev->bt_en)
2423+
if (!qcadev->bt_en &&
2424+
(data->soc_type == QCA_WCN6750 ||
2425+
data->soc_type == QCA_WCN6855))
24262426
power_ctrl_enabled = false;
24272427

24282428
qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",

net/bluetooth/l2cap_core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4870,7 +4870,8 @@ static int l2cap_le_connect_req(struct l2cap_conn *conn,
48704870

48714871
if (!smp_sufficient_security(conn->hcon, pchan->sec_level,
48724872
SMP_ALLOW_STK)) {
4873-
result = L2CAP_CR_LE_AUTHENTICATION;
4873+
result = pchan->sec_level == BT_SECURITY_MEDIUM ?
4874+
L2CAP_CR_LE_ENCRYPTION : L2CAP_CR_LE_AUTHENTICATION;
48744875
chan = NULL;
48754876
goto response_unlock;
48764877
}

net/bluetooth/mgmt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2566,7 +2566,8 @@ static int mgmt_hci_cmd_sync(struct sock *sk, struct hci_dev *hdev,
25662566
struct mgmt_pending_cmd *cmd;
25672567
int err;
25682568

2569-
if (len < sizeof(*cp))
2569+
if (len != (offsetof(struct mgmt_cp_hci_cmd_sync, params) +
2570+
le16_to_cpu(cp->params_len)))
25702571
return mgmt_cmd_status(sk, hdev->id, MGMT_OP_HCI_CMD_SYNC,
25712572
MGMT_STATUS_INVALID_PARAMS);
25722573

0 commit comments

Comments
 (0)