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

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

NFC: nci: Add RF NFCEE action notification support



The NFCC sends an NCI_OP_RF_NFCEE_ACTION_NTF notification
to the host (DH) to let it know that for example an RF
transaction with a payment reader is done.
For now the notification handler is empty.

Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 447b27c4
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -499,6 +499,14 @@ struct nci_rf_deactivate_ntf {
	__u8	reason;
	__u8	reason;
} __packed;
} __packed;


#define NCI_OP_RF_NFCEE_ACTION_NTF	nci_opcode_pack(NCI_GID_RF_MGMT, 0x09)
struct nci_rf_nfcee_action_ntf {
	__u8 nfcee_id;
	__u8 trigger;
	__u8 supported_data_length;
	__u8 supported_data[0];
} __packed;

#define NCI_OP_NFCEE_DISCOVER_NTF nci_opcode_pack(NCI_GID_NFCEE_MGMT, 0x00)
#define NCI_OP_NFCEE_DISCOVER_NTF nci_opcode_pack(NCI_GID_NFCEE_MGMT, 0x00)
struct nci_nfcee_supported_protocol {
struct nci_nfcee_supported_protocol {
	__u8	num_protocol;
	__u8	num_protocol;
+11 −0
Original line number Original line Diff line number Diff line
@@ -752,6 +752,12 @@ exit:
	nci_req_complete(ndev, status);
	nci_req_complete(ndev, status);
}
}


static void nci_nfcee_action_ntf_packet(struct nci_dev *ndev,
					struct sk_buff *skb)
{
	pr_debug("\n");
}

void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb)
void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb)
{
{
	__u16 ntf_opcode = nci_opcode(skb->data);
	__u16 ntf_opcode = nci_opcode(skb->data);
@@ -793,6 +799,11 @@ void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb)
	case NCI_OP_NFCEE_DISCOVER_NTF:
	case NCI_OP_NFCEE_DISCOVER_NTF:
		nci_nfcee_discover_ntf_packet(ndev, skb);
		nci_nfcee_discover_ntf_packet(ndev, skb);
		break;
		break;

	case NCI_OP_RF_NFCEE_ACTION_NTF:
		nci_nfcee_action_ntf_packet(ndev, skb);
		break;

	default:
	default:
		pr_err("unknown ntf opcode 0x%x\n", ntf_opcode);
		pr_err("unknown ntf opcode 0x%x\n", ntf_opcode);
		break;
		break;