Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fda7a49c authored by Christophe Ricard's avatar Christophe Ricard Committed by Samuel Ortiz
Browse files

NFC: hci: Change event_received handler gate parameter to pipe



Several pipes may point to the same CLF gate, so getting the gate ID
as an input is not enough.
For example dual secure element may have 2 pipes (1 for uicc and
1 for eSE) pointing to the connectivity gate.

As resolving gate and host IDs can be done from a pipe, we now pass
the pipe ID to the event received handler.

Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 6da7c85c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -51,7 +51,7 @@ struct nfc_hci_ops {
	int (*tm_send)(struct nfc_hci_dev *hdev, struct sk_buff *skb);
	int (*tm_send)(struct nfc_hci_dev *hdev, struct sk_buff *skb);
	int (*check_presence)(struct nfc_hci_dev *hdev,
	int (*check_presence)(struct nfc_hci_dev *hdev,
			      struct nfc_target *target);
			      struct nfc_target *target);
	int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event,
	int (*event_received)(struct nfc_hci_dev *hdev, u8 pipe, u8 event,
			      struct sk_buff *skb);
			      struct sk_buff *skb);
	int (*fw_download)(struct nfc_hci_dev *hdev, const char *firmware_name);
	int (*fw_download)(struct nfc_hci_dev *hdev, const char *firmware_name);
	int (*discover_se)(struct nfc_hci_dev *dev);
	int (*discover_se)(struct nfc_hci_dev *dev);
+1 −1
Original line number Original line Diff line number Diff line
@@ -338,7 +338,7 @@ void nfc_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event,
	}
	}


	if (hdev->ops->event_received) {
	if (hdev->ops->event_received) {
		r = hdev->ops->event_received(hdev, gate, event, skb);
		r = hdev->ops->event_received(hdev, pipe, event, skb);
		if (r <= 0)
		if (r <= 0)
			goto exit_noskb;
			goto exit_noskb;
	}
	}