|
|
@@ -460,6 +460,7 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev)
|
|
|
{
|
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
|
struct nci_set_config_param param;
|
|
|
+ int rc;
|
|
|
|
|
|
param.val = nfc_get_local_general_bytes(nfc_dev, ¶m.len);
|
|
|
if ((param.val == NULL) || (param.len == 0))
|
|
|
@@ -470,6 +471,13 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev)
|
|
|
|
|
|
param.id = NCI_PN_ATR_REQ_GEN_BYTES;
|
|
|
|
|
|
+ rc = nci_request(ndev, nci_set_config_req, (unsigned long)¶m,
|
|
|
+ msecs_to_jiffies(NCI_SET_CONFIG_TIMEOUT));
|
|
|
+ if (rc)
|
|
|
+ return rc;
|
|
|
+
|
|
|
+ param.id = NCI_LN_ATR_RES_GEN_BYTES;
|
|
|
+
|
|
|
return nci_request(ndev, nci_set_config_req, (unsigned long)¶m,
|
|
|
msecs_to_jiffies(NCI_SET_CONFIG_TIMEOUT));
|
|
|
}
|
|
|
@@ -525,7 +533,7 @@ static int nci_start_poll(struct nfc_dev *nfc_dev,
|
|
|
return -EBUSY;
|
|
|
}
|
|
|
|
|
|
- if (im_protocols & NFC_PROTO_NFC_DEP_MASK) {
|
|
|
+ if ((im_protocols | tm_protocols) & NFC_PROTO_NFC_DEP_MASK) {
|
|
|
rc = nci_set_local_general_bytes(nfc_dev);
|
|
|
if (rc) {
|
|
|
pr_err("failed to set local general bytes\n");
|