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

Commit fdf79bd4 authored by Robert Baldyga's avatar Robert Baldyga Committed by Samuel Ortiz
Browse files

NFC: nci: Add post_setup handler



Some drivers require non-standard configuration after NCI_CORE_INIT
request, because they need to know ndev->manufact_specific_info or
ndev->manufact_id. This patch adds post_setup handler allowing to do
such custom configuration.

Signed-off-by: default avatarRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent aaee24ac
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ struct nci_ops {
	int   (*close)(struct nci_dev *ndev);
	int   (*send)(struct nci_dev *ndev, struct sk_buff *skb);
	int   (*setup)(struct nci_dev *ndev);
	int   (*post_setup)(struct nci_dev *ndev);
	int   (*fw_download)(struct nci_dev *ndev, const char *firmware_name);
	__u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol);
	int   (*discover_se)(struct nci_dev *ndev);
+4 −0
Original line number Diff line number Diff line
@@ -388,6 +388,10 @@ static int nci_open_device(struct nci_dev *ndev)
				   msecs_to_jiffies(NCI_INIT_TIMEOUT));
	}

	if (ndev->ops->post_setup) {
		rc = ndev->ops->post_setup(ndev);
	}

	if (!rc) {
		rc = __nci_request(ndev, nci_init_complete_req, 0,
				   msecs_to_jiffies(NCI_INIT_TIMEOUT));