On 09/06/2012 06:02 PM, Eric Lapuyade wrote: > Hi Waldemar, > > On 09/06/2012 12:22 PM, Waldemar Rymarkiewicz wrote: >> /* Largest headroom needed for outgoing custom commands */ >> #define PN544_CMDS_HEADROOM 2 >> +#define PN544_CMDS_TAILROOM 2 As a side effect of my comment on the second patch, this should be defined like this: #define PN544_CMDS_HEADROOM 2 +#define PN544_FRAME_HEADROOM 1 +#define PN544_FRAME_TAILROOM 2 >> static int pn544_hci_xmit(struct nfc_shdlc *shdlc, struct sk_buff *skb) >> { >> struct pn544_hci_info *info = nfc_shdlc_get_clientdata(shdlc); >> @@ -584,6 +599,8 @@ static int pn544_hci_xmit(struct nfc_shdlc *shdlc, struct sk_buff *skb) >> if (info->hard_fault != 0) >> return info->hard_fault; >> >> + pn544_hci_add_len_crc(skb); >> + >> return pn544_hci_i2c_write(client, skb->data, skb->len); Here, we would have: r = pn544_hci_i2c_write(client, skb->data, skb->len); pn544_hci_remove_len_crc(skb); return r; >> info->shdlc = nfc_shdlc_allocate(&pn544_shdlc_ops, >> &init_data, protocols, >> - PN544_CMDS_HEADROOM, 0, >> + PN544_CMDS_HEADROOM, PN544_CMDS_TAILROOM, >> PN544_HCI_LLC_MAX_PAYLOAD, >> dev_name(&client->dev)); And this should be: info->shdlc = nfc_shdlc_allocate(&pn544_shdlc_ops, &init_data, protocols, PN544_CMDS_HEADROOM + PN544_FRAME_HEADROOM, PN544_FRAME_TAILROOM, PN544_HCI_LLC_MAX_PAYLOAD, dev_name(&client->dev)); note that PN544_CMDS_HEADROOM is really only for skb allocated by HCI (or NFC Core), not by those allocated by shdlc, but we aggregate it all in a single parameter for simplicity. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html