Commit 2d267313 authored by Christophe Ricard's avatar Christophe Ricard Committed by Kamal Mostafa

NFC: st21nfcb: Do not remove header once the payload is sent

commit 09f39a95 upstream.

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.
Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent c2ca68fc
...@@ -87,11 +87,6 @@ static void st21nfcb_nci_i2c_disable(void *phy_id) ...@@ -87,11 +87,6 @@ static void st21nfcb_nci_i2c_disable(void *phy_id)
gpio_set_value(phy->gpio_reset, 1); 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. * Writing a frame must not return the number of written bytes.
* It must return either zero for success, or <0 for error. * 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) ...@@ -121,8 +116,6 @@ static int st21nfcb_nci_i2c_write(void *phy_id, struct sk_buff *skb)
r = 0; r = 0;
} }
st21nfcb_nci_remove_header(skb);
return r; return r;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment