Commit 96e829b4 authored by Mark A. Greer's avatar Mark A. Greer Committed by Samuel Ortiz

NFC: digital: SENSF_RES excludes RD when SENSF_REQ RC is zero

The check in digital_tg_send_sensf_res() that excludes
the 'RD' field from the SENSF_RES is inverted.  The 'RD'
field should be excluded when the SENSF_REQ 'RC' field
is equal to DIGITAL_SENSF_REQ_RC_NONE instead of when
its not equal.  This is described in section 6.6.2.11
of the NFC Digital Specification.

CC: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: default avatarMark A. Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 0c942b00
...@@ -1101,7 +1101,7 @@ static int digital_tg_send_sensf_res(struct nfc_digital_dev *ddev, ...@@ -1101,7 +1101,7 @@ static int digital_tg_send_sensf_res(struct nfc_digital_dev *ddev,
size = sizeof(struct digital_sensf_res); size = sizeof(struct digital_sensf_res);
if (sensf_req->rc != DIGITAL_SENSF_REQ_RC_NONE) if (sensf_req->rc == DIGITAL_SENSF_REQ_RC_NONE)
size -= sizeof(sensf_res->rd); size -= sizeof(sensf_res->rd);
skb = digital_skb_alloc(ddev, size); skb = digital_skb_alloc(ddev, size);
......
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