]> git.hungrycats.org Git - linux/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)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 4 Jul 2015 03:02:25 +0000 (23:02 -0400)
[ Upstream commit 09f39a950523b1bb830c30a8670b77e0067da092 ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/nfc/st21nfcb/i2c.c

index 2cf867b9796d8132db61996debd7f8af82b91f96..000e0e10dc151df2d6db2c9e9491cd921036ff4a 100644 (file)
@@ -90,11 +90,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.
@@ -124,8 +119,6 @@ static int st21nfcb_nci_i2c_write(void *phy_id, struct sk_buff *skb)
                        r = 0;
        }
 
-       st21nfcb_nci_remove_header(skb);
-
        return r;
 }