NFC: Correct outgoing frame before requeueing
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Fri, 7 Sep 2012 09:08:30 +0000 (11:08 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 24 Sep 2012 22:17:24 +0000 (00:17 +0200)
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>
net/nfc/hci/shdlc.c

index ed8796b78f3993b604629f899af82b04d57cbb11..9357ba7362f66d04cdc6e6de05434b7095ea00cd 100644 (file)
@@ -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;