Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291211
b: refs/heads/master
c: 53aef92
h: refs/heads/master
i:
  291209: 48ea599
  291207: 996ac46
v: v3
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Mar 6, 2012
1 parent 1d434b5 commit 0a570b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4722d2b70b80098e1e429e093a7e04aad360260a
refs/heads/master: 53aef92054e7fbffe66d3e2f95d122f39a33c211
16 changes: 11 additions & 5 deletions trunk/net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,15 +671,15 @@ static void nfc_llcp_recv_hdlc(struct nfc_llcp_local *local,
nfc_llcp_sock_put(llcp_sock);
}

if (ns == llcp_sock->recv_n)
llcp_sock->recv_n = (llcp_sock->recv_n + 1) % 16;
else
pr_err("Received out of sequence I PDU\n");

/* Pass the payload upstream */
if (ptype == LLCP_PDU_I) {
pr_debug("I frame, queueing on %p\n", &llcp_sock->sk);

if (ns == llcp_sock->recv_n)
llcp_sock->recv_n = (llcp_sock->recv_n + 1) % 16;
else
pr_err("Received out of sequence I PDU\n");

skb_pull(skb, LLCP_HEADER_SIZE + LLCP_SEQUENCE_SIZE);
if (sock_queue_rcv_skb(&llcp_sock->sk, skb)) {
pr_err("receive queue is full\n");
Expand All @@ -700,6 +700,11 @@ static void nfc_llcp_recv_hdlc(struct nfc_llcp_local *local,
}
}

if (ptype == LLCP_PDU_RR)
llcp_sock->remote_ready = true;
else if (ptype == LLCP_PDU_RNR)
llcp_sock->remote_ready = false;

nfc_llcp_queue_i_frames(llcp_sock);

release_sock(sk);
Expand Down Expand Up @@ -813,6 +818,7 @@ static void nfc_llcp_rx_work(struct work_struct *work)

case LLCP_PDU_I:
case LLCP_PDU_RR:
case LLCP_PDU_RNR:
pr_debug("I frame\n");
nfc_llcp_recv_hdlc(local, skb);
break;
Expand Down

0 comments on commit 0a570b1

Please sign in to comment.