diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2012-04-10 19:43:14 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-12 21:10:41 +0200 |
commit | 279cf174aea84202c5fef4675ff3f1265f071c8e (patch) | |
tree | 6195f9cd789cf21314d77ce9941f416d63b762be /net/nfc/llcp/llcp.c | |
parent | NFC: Dump LLCP frames (diff) | |
download | linux-279cf174aea84202c5fef4675ff3f1265f071c8e.tar.xz linux-279cf174aea84202c5fef4675ff3f1265f071c8e.zip |
NFC: No need to apply twice the modulo op to LLCP's recv_n
recv_n is set properly when receiving an HDLC frame.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/llcp/llcp.c')
-rw-r--r-- | net/nfc/llcp/llcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c index d5e87c35002a..2cf01e642566 100644 --- a/net/nfc/llcp/llcp.c +++ b/net/nfc/llcp/llcp.c @@ -428,7 +428,7 @@ static u8 nfc_llcp_nr(struct sk_buff *pdu) static void nfc_llcp_set_nrns(struct nfc_llcp_sock *sock, struct sk_buff *pdu) { - pdu->data[2] = (sock->send_n << 4) | (sock->recv_n % 16); + pdu->data[2] = (sock->send_n << 4) | (sock->recv_n); sock->send_n = (sock->send_n + 1) % 16; sock->recv_ack_n = (sock->recv_n - 1) % 16; } |