Selaa lähdekoodia

Bluetooth: Fix missing update of pend_le_reports

When calling Remove Device for an entry using HCI_AUTO_CONN_REPORT we
need to decrement the pend_le_reports value correspondingly. This patch
fixes one such missing action in the Remove Device command handler.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Johan Hedberg 11 vuotta sitten
vanhempi
commit
617ca1bf11
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      net/bluetooth/mgmt.c

+ 3 - 0
net/bluetooth/mgmt.c

@@ -5198,6 +5198,9 @@ static int remove_device(struct sock *sk, struct hci_dev *hdev,
 			goto unlock;
 			goto unlock;
 		}
 		}
 
 
+		if (params->auto_connect == HCI_AUTO_CONN_REPORT)
+			hdev->pend_le_reports--;
+
 		hci_pend_le_conn_del(hdev, &cp->addr.bdaddr, addr_type);
 		hci_pend_le_conn_del(hdev, &cp->addr.bdaddr, addr_type);
 		list_del(&params->list);
 		list_del(&params->list);
 		kfree(params);
 		kfree(params);