Skip to content

Commit

Permalink
NFC: Send a receiver ready frame only to reply to an I frame
Browse files Browse the repository at this point in the history
Sending an RR as a reply to another RR is fine but not quite logical.
We should send RRs only as a reply to I frames.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Samuel Ortiz committed Jun 4, 2012
1 parent 8445796 commit 56af256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ static void nfc_llcp_recv_hdlc(struct nfc_llcp_local *local,
else if (ptype == LLCP_PDU_RNR)
llcp_sock->remote_ready = false;

if (nfc_llcp_queue_i_frames(llcp_sock) == 0)
if (nfc_llcp_queue_i_frames(llcp_sock) == 0 && ptype == LLCP_PDU_I)
nfc_llcp_send_rr(llcp_sock);

release_sock(sk);
Expand Down

0 comments on commit 56af256

Please sign in to comment.