]> git.karo-electronics.de Git - linux-beck.git/commitdiff
NFC: st21nfcb: Do not remove header once the payload is sent
authorChristophe Ricard <christophe.ricard@gmail.com>
Sat, 6 Jun 2015 11:16:43 +0000 (13:16 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 8 Jun 2015 22:34:22 +0000 (00:34 +0200)
Once the data is sent, we need to preserve the full frame for
the ndlc state machine. If the NDLC ACK is not received in time,
the ndlc layer will resend the same frame.
Having the header byte pulled will corrupt the frame.

Cc: stable@vger.kernel.org
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/st21nfcb/i2c.c

index 76a4cad41cec9b3affa4f903683a313d4620b389..4bc15ec29b03a854a87fab06a2f5566d36e4475e 100644 (file)
@@ -87,11 +87,6 @@ static void st21nfcb_nci_i2c_disable(void *phy_id)
        gpio_set_value(phy->gpio_reset, 1);
 }
 
-static void st21nfcb_nci_remove_header(struct sk_buff *skb)
-{
-       skb_pull(skb, ST21NFCB_FRAME_HEADROOM);
-}
-
 /*
  * Writing a frame must not return the number of written bytes.
  * It must return either zero for success, or <0 for error.
@@ -121,8 +116,6 @@ static int st21nfcb_nci_i2c_write(void *phy_id, struct sk_buff *skb)
                        r = 0;
        }
 
-       st21nfcb_nci_remove_header(skb);
-
        return r;
 }