Skip to content

Commit

Permalink
NFC: Correct outgoing frame before requeueing
Browse files Browse the repository at this point in the history
Driver must handle its data added to the frame, so at this point
removeing control field of shdlc frame is enough.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Acked-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Waldemar Rymarkiewicz authored and Samuel Ortiz committed Sep 24, 2012
1 parent ade6720 commit c1be211
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/nfc/hci/shdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ static void nfc_shdlc_requeue_ack_pending(struct nfc_shdlc *shdlc)
pr_debug("ns reset to %d\n", shdlc->dnr);

while ((skb = skb_dequeue_tail(&shdlc->ack_pending_q))) {
skb_pull(skb, 2); /* remove len+control */
skb_trim(skb, skb->len - 2); /* remove crc */
skb_pull(skb, 1); /* remove control field */
skb_queue_head(&shdlc->send_q, skb);
}
shdlc->ns = shdlc->dnr;
Expand Down

0 comments on commit c1be211

Please sign in to comment.