Commit 5c244fa2 authored by John W. Linville's avatar John W. Linville

Merge tag 'nfc-fixes-3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-fixes

Samuel Ortiz <sameo@linux.intel.com> says:

"NFC: 3.17 fixes

We have 3 NFC fixes for 3.17:

- 2 potential build failures for ST21NFCA and ST21NFCB, triggered by a
  depmod dependenyc cycle.
- One potential buffer overflow in the microread driver."
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parents dda3b191 300c627f
......@@ -501,9 +501,13 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate,
targets->sens_res =
be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]);
targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK];
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
skb->data[MICROREAD_EMCF_A_LEN]);
targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN];
if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
r = -EINVAL;
goto exit_free;
}
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
targets->nfcid1_len);
break;
case MICROREAD_GATE_ID_MREAD_ISO_A_3:
targets->supported_protocols =
......@@ -511,9 +515,13 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate,
targets->sens_res =
be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]);
targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK];
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
skb->data[MICROREAD_EMCF_A3_LEN]);
targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN];
if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
r = -EINVAL;
goto exit_free;
}
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
targets->nfcid1_len);
break;
case MICROREAD_GATE_ID_MREAD_ISO_B:
targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK;
......
......@@ -2,7 +2,8 @@
# Makefile for ST21NFCA HCI based NFC driver
#
st21nfca_i2c-objs = i2c.o
st21nfca_hci-objs = st21nfca.o st21nfca_dep.o
obj-$(CONFIG_NFC_ST21NFCA) += st21nfca_hci.o
obj-$(CONFIG_NFC_ST21NFCA) += st21nfca.o st21nfca_dep.o
st21nfca_i2c-objs = i2c.o
obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o
......@@ -2,7 +2,8 @@
# Makefile for ST21NFCB NCI based NFC driver
#
st21nfcb_i2c-objs = i2c.o
st21nfcb_nci-objs = ndlc.o st21nfcb.o
obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb_nci.o
obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb.o ndlc.o
st21nfcb_i2c-objs = i2c.o
obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment