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

Commit 83724c33 authored by Vincent Cuissard's avatar Vincent Cuissard Committed by Samuel Ortiz
Browse files

NFC: NCI: Fix NCI RF FRAME interface usage



NCI RF FRAME interface is used for all kind of tags
except ISODEP ones. So for all other kind of tags the
status byte has to be removed.

Signed-off-by: default avatarVincent Cuissard <cuissard@marvell.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 3c1c0f5d
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -241,9 +241,12 @@ void nci_rx_data_packet(struct nci_dev *ndev, struct sk_buff *skb)
	/* strip the nci data header */
	/* strip the nci data header */
	skb_pull(skb, NCI_DATA_HDR_SIZE);
	skb_pull(skb, NCI_DATA_HDR_SIZE);


	if (ndev->target_active_prot == NFC_PROTO_MIFARE) {
	if (ndev->target_active_prot == NFC_PROTO_MIFARE ||
	    ndev->target_active_prot == NFC_PROTO_JEWEL ||
	    ndev->target_active_prot == NFC_PROTO_FELICA ||
	    ndev->target_active_prot == NFC_PROTO_ISO15693) {
		/* frame I/F => remove the status byte */
		/* frame I/F => remove the status byte */
		pr_debug("NFC_PROTO_MIFARE => remove the status byte\n");
		pr_debug("frame I/F => remove the status byte\n");
		skb_trim(skb, (skb->len - 1));
		skb_trim(skb, (skb->len - 1));
	}
	}