diff options
| author | Heitor Alves de Siqueira <halves@igalia.com> | 2026-05-26 10:50:59 -0300 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-05-28 08:52:21 -0400 |
| commit | cdf88b35e06f1b385f7f6228060ae541d44fbb72 (patch) | |
| tree | a50b271f0435e9194ba1d2fd4e1d416e5225d55d /net | |
| parent | 525daaea459fc215f432de1b8debbd9144bf97b0 (diff) | |
| download | linux-next-history-cdf88b35e06f1b385f7f6228060ae541d44fbb72.tar.gz | |
Bluetooth: hci_sync: Reset device counters in hci_dev_close_sync()
Before resetting or closing the device, protocol counters should also be
zeroed.
Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
Signed-off-by: Heitor Alves de Siqueira <halves@igalia.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net')
| -rw-r--r-- | net/bluetooth/hci_sync.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 0f016d269c622..aeccd8084cba7 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -5393,6 +5393,10 @@ int hci_dev_close_sync(struct hci_dev *hdev) /* Reset device */ skb_queue_purge(&hdev->cmd_q); atomic_set(&hdev->cmd_cnt, 1); + hdev->acl_cnt = 0; + hdev->sco_cnt = 0; + hdev->le_cnt = 0; + hdev->iso_cnt = 0; if (hci_test_quirk(hdev, HCI_QUIRK_RESET_ON_CLOSE) && !auto_off && !hci_dev_test_flag(hdev, HCI_UNCONFIGURED)) { set_bit(HCI_INIT, &hdev->flags); |
