diff options
-rw-r--r-- | include/net/nfc/nci_core.h | 1 | ||||
-rw-r--r-- | net/nfc/nci/core.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index ff87f8611fa3..34a6e09b3f7f 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h | |||
@@ -71,6 +71,7 @@ struct nci_ops { | |||
71 | int (*close)(struct nci_dev *ndev); | 71 | int (*close)(struct nci_dev *ndev); |
72 | int (*send)(struct nci_dev *ndev, struct sk_buff *skb); | 72 | int (*send)(struct nci_dev *ndev, struct sk_buff *skb); |
73 | int (*setup)(struct nci_dev *ndev); | 73 | int (*setup)(struct nci_dev *ndev); |
74 | int (*fw_download)(struct nci_dev *ndev, const char *firmware_name); | ||
74 | __u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol); | 75 | __u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol); |
75 | int (*discover_se)(struct nci_dev *ndev); | 76 | int (*discover_se)(struct nci_dev *ndev); |
76 | int (*disable_se)(struct nci_dev *ndev, u32 se_idx); | 77 | int (*disable_se)(struct nci_dev *ndev, u32 se_idx); |
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 9575a1892607..49ff32106080 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c | |||
@@ -907,6 +907,16 @@ static int nci_se_io(struct nfc_dev *nfc_dev, u32 se_idx, | |||
907 | return 0; | 907 | return 0; |
908 | } | 908 | } |
909 | 909 | ||
910 | static int nci_fw_download(struct nfc_dev *nfc_dev, const char *firmware_name) | ||
911 | { | ||
912 | struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); | ||
913 | |||
914 | if (!ndev->ops->fw_download) | ||
915 | return -ENOTSUPP; | ||
916 | |||
917 | return ndev->ops->fw_download(ndev, firmware_name); | ||
918 | } | ||
919 | |||
910 | static struct nfc_ops nci_nfc_ops = { | 920 | static struct nfc_ops nci_nfc_ops = { |
911 | .dev_up = nci_dev_up, | 921 | .dev_up = nci_dev_up, |
912 | .dev_down = nci_dev_down, | 922 | .dev_down = nci_dev_down, |
@@ -922,6 +932,7 @@ static struct nfc_ops nci_nfc_ops = { | |||
922 | .disable_se = nci_disable_se, | 932 | .disable_se = nci_disable_se, |
923 | .discover_se = nci_discover_se, | 933 | .discover_se = nci_discover_se, |
924 | .se_io = nci_se_io, | 934 | .se_io = nci_se_io, |
935 | .fw_download = nci_fw_download, | ||
925 | }; | 936 | }; |
926 | 937 | ||
927 | /* ---- Interface to NCI drivers ---- */ | 938 | /* ---- Interface to NCI drivers ---- */ |