aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/nci
diff options
context:
space:
mode:
authorHiren Tandel <hirent@marvell.com>2014-05-06 02:51:50 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2014-05-19 17:58:08 -0400
commitc79d9f9ef86683824c195b093106222ff0611c10 (patch)
treee9981c9cf7859889cbbe8938ba3bf1b2a74f073e /net/nfc/nci
parent4b8b6267bed9261c5c2f52e6b1ff258cd9305ad2 (diff)
NFC: NCI: No need to reverse ATR_RES Response
ATR_RES response received within Activation Parameters is already in correct order. Reversing it fails LLCP magic number check and so P2P functionality fails. Signed-off-by: Hiren Tandel <hirent@marvell.com> Signed-off-by: Rahul Tank <rahult@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/nci')
-rw-r--r--net/nfc/nci/ntf.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index 1e905097456b..f8f6af231381 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -366,7 +366,6 @@ static int nci_extract_activation_params_nfc_dep(struct nci_dev *ndev,
366 struct nci_rf_intf_activated_ntf *ntf, __u8 *data) 366 struct nci_rf_intf_activated_ntf *ntf, __u8 *data)
367{ 367{
368 struct activation_params_poll_nfc_dep *poll; 368 struct activation_params_poll_nfc_dep *poll;
369 int i;
370 369
371 switch (ntf->activation_rf_tech_and_mode) { 370 switch (ntf->activation_rf_tech_and_mode) {
372 case NCI_NFC_A_PASSIVE_POLL_MODE: 371 case NCI_NFC_A_PASSIVE_POLL_MODE:
@@ -374,10 +373,8 @@ static int nci_extract_activation_params_nfc_dep(struct nci_dev *ndev,
374 poll = &ntf->activation_params.poll_nfc_dep; 373 poll = &ntf->activation_params.poll_nfc_dep;
375 poll->atr_res_len = min_t(__u8, *data++, 63); 374 poll->atr_res_len = min_t(__u8, *data++, 63);
376 pr_debug("atr_res_len %d\n", poll->atr_res_len); 375 pr_debug("atr_res_len %d\n", poll->atr_res_len);
377 if (poll->atr_res_len > 0) { 376 if (poll->atr_res_len > 0)
378 for (i = 0; i < poll->atr_res_len; i++) 377 memcpy(poll->atr_res, data, poll->atr_res_len);
379 poll->atr_res[poll->atr_res_len-1-i] = data[i];
380 }
381 break; 378 break;
382 379
383 default: 380 default: