mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
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>
This commit is contained in:
parent
4b8b6267be
commit
c79d9f9ef8
1 changed files with 2 additions and 5 deletions
|
@ -366,7 +366,6 @@ static int nci_extract_activation_params_nfc_dep(struct nci_dev *ndev,
|
||||||
struct nci_rf_intf_activated_ntf *ntf, __u8 *data)
|
struct nci_rf_intf_activated_ntf *ntf, __u8 *data)
|
||||||
{
|
{
|
||||||
struct activation_params_poll_nfc_dep *poll;
|
struct activation_params_poll_nfc_dep *poll;
|
||||||
int i;
|
|
||||||
|
|
||||||
switch (ntf->activation_rf_tech_and_mode) {
|
switch (ntf->activation_rf_tech_and_mode) {
|
||||||
case NCI_NFC_A_PASSIVE_POLL_MODE:
|
case NCI_NFC_A_PASSIVE_POLL_MODE:
|
||||||
|
@ -374,10 +373,8 @@ static int nci_extract_activation_params_nfc_dep(struct nci_dev *ndev,
|
||||||
poll = &ntf->activation_params.poll_nfc_dep;
|
poll = &ntf->activation_params.poll_nfc_dep;
|
||||||
poll->atr_res_len = min_t(__u8, *data++, 63);
|
poll->atr_res_len = min_t(__u8, *data++, 63);
|
||||||
pr_debug("atr_res_len %d\n", poll->atr_res_len);
|
pr_debug("atr_res_len %d\n", poll->atr_res_len);
|
||||||
if (poll->atr_res_len > 0) {
|
if (poll->atr_res_len > 0)
|
||||||
for (i = 0; i < poll->atr_res_len; i++)
|
memcpy(poll->atr_res, data, poll->atr_res_len);
|
||||||
poll->atr_res[poll->atr_res_len-1-i] = data[i];
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue