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

Commit e997ebbe authored by Michael Thalmeier's avatar Michael Thalmeier Committed by Samuel Ortiz
Browse files

NFC: pn533: Send ATR_REQ only if NFC_PROTO_NFC_DEP bit is set



Currently it is not possible to only poll for passive targets
with the pn533 driver. To change this ATR_REQ is only sent when
NFC_PROTO_NFC_DEP is explicitly requested in poll_protocols.
As most implementations (e.g. neard) poll for all protocols
that are reported to be supported by the adapter, this should
not have much of an effect on current implementations.

Signed-off-by: default avatarMichael Thalmeier <michael.thalmeier@hale.at>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 03c5b534
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1540,6 +1540,7 @@ static int pn533_start_poll_complete(struct pn533 *dev, struct sk_buff *resp)
	int rc, tgdata_len;

	/* Toggle the DEP polling */
	if (dev->poll_protocols & NFC_PROTO_NFC_DEP_MASK)
		dev->poll_dep = 1;

	nbtg = resp->data[0];
@@ -2054,7 +2055,7 @@ static int pn533_send_poll_frame(struct pn533 *dev)
	dev_dbg(&dev->interface->dev, "%s mod len %d\n",
		__func__, mod->len);

	if (dev->poll_dep)  {
	if ((dev->poll_protocols & NFC_PROTO_NFC_DEP_MASK) && dev->poll_dep)  {
		dev->poll_dep = 0;
		return pn533_poll_dep(dev->nfc_dev);
	}