Commit b928e7d1 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge tag 'for-net-2024-08-07' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth

Luiz Augusto von Dentz says:

====================
bluetooth pull request for net:

 - hci_sync: avoid dup filtering when passive scanning with adv monitor
 - hci_qca: don't call pwrseq_power_off() twice for QCA6390
 - hci_qca: fix QCA6390 support on non-DT platforms
 - hci_qca: fix a NULL-pointer derefence at shutdown
 - l2cap: always unlock channel in l2cap_conless_channel()

* tag 'for-net-2024-08-07' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth:
  Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor
  Bluetooth: l2cap: always unlock channel in l2cap_conless_channel()
  Bluetooth: hci_qca: fix a NULL-pointer derefence at shutdown
  Bluetooth: hci_qca: fix QCA6390 support on non-DT platforms
  Bluetooth: hci_qca: don't call pwrseq_power_off() twice for QCA6390
====================

Link: https://patch.msgid.link/20240807210103.142483-1-luiz.dentz@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents bc59b558 b5431dc2
...@@ -2160,7 +2160,7 @@ static void qca_power_shutdown(struct hci_uart *hu) ...@@ -2160,7 +2160,7 @@ static void qca_power_shutdown(struct hci_uart *hu)
qcadev = serdev_device_get_drvdata(hu->serdev); qcadev = serdev_device_get_drvdata(hu->serdev);
power = qcadev->bt_power; power = qcadev->bt_power;
if (power->pwrseq) { if (power && power->pwrseq) {
pwrseq_power_off(power->pwrseq); pwrseq_power_off(power->pwrseq);
set_bit(QCA_BT_OFF, &qca->flags); set_bit(QCA_BT_OFF, &qca->flags);
return; return;
...@@ -2187,10 +2187,6 @@ static void qca_power_shutdown(struct hci_uart *hu) ...@@ -2187,10 +2187,6 @@ static void qca_power_shutdown(struct hci_uart *hu)
} }
break; break;
case QCA_QCA6390:
pwrseq_power_off(qcadev->bt_power->pwrseq);
break;
default: default:
gpiod_set_value_cansleep(qcadev->bt_en, 0); gpiod_set_value_cansleep(qcadev->bt_en, 0);
} }
...@@ -2416,11 +2412,14 @@ static int qca_serdev_probe(struct serdev_device *serdev) ...@@ -2416,11 +2412,14 @@ static int qca_serdev_probe(struct serdev_device *serdev)
break; break;
case QCA_QCA6390: case QCA_QCA6390:
if (dev_of_node(&serdev->dev)) {
qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev, qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
"bluetooth"); "bluetooth");
if (IS_ERR(qcadev->bt_power->pwrseq)) if (IS_ERR(qcadev->bt_power->pwrseq))
return PTR_ERR(qcadev->bt_power->pwrseq); return PTR_ERR(qcadev->bt_power->pwrseq);
break; break;
}
fallthrough;
default: default:
qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable", qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",
......
...@@ -3019,6 +3019,20 @@ static int hci_passive_scan_sync(struct hci_dev *hdev) ...@@ -3019,6 +3019,20 @@ static int hci_passive_scan_sync(struct hci_dev *hdev)
} else if (hci_is_adv_monitoring(hdev)) { } else if (hci_is_adv_monitoring(hdev)) {
window = hdev->le_scan_window_adv_monitor; window = hdev->le_scan_window_adv_monitor;
interval = hdev->le_scan_int_adv_monitor; interval = hdev->le_scan_int_adv_monitor;
/* Disable duplicates filter when scanning for advertisement
* monitor for the following reasons.
*
* For HW pattern filtering (ex. MSFT), Realtek and Qualcomm
* controllers ignore RSSI_Sampling_Period when the duplicates
* filter is enabled.
*
* For SW pattern filtering, when we're not doing interleaved
* scanning, it is necessary to disable duplicates filter,
* otherwise hosts can only receive one advertisement and it's
* impossible to know if a peer is still in range.
*/
filter_dups = LE_SCAN_FILTER_DUP_DISABLE;
} else { } else {
window = hdev->le_scan_window; window = hdev->le_scan_window;
interval = hdev->le_scan_interval; interval = hdev->le_scan_interval;
......
...@@ -6774,6 +6774,7 @@ static void l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, ...@@ -6774,6 +6774,7 @@ static void l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm,
bt_cb(skb)->l2cap.psm = psm; bt_cb(skb)->l2cap.psm = psm;
if (!chan->ops->recv(chan, skb)) { if (!chan->ops->recv(chan, skb)) {
l2cap_chan_unlock(chan);
l2cap_chan_put(chan); l2cap_chan_put(chan);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment