}
header = (void *)skb_put(skb, sizeof(*header));
- header->size = cpu_to_le16(sizeof(*header));
+ header->size = cpu_to_le16(0);
header->vpi = cpu_to_le16(vcc->vpi);
header->vci = cpu_to_le16(vcc->vci);
header->type = cpu_to_le16(PKT_POPEN);
}
header = (void *)skb_put(skb, sizeof(*header));
- header->size = cpu_to_le16(sizeof(*header));
+ header->size = cpu_to_le16(0);
header->vpi = cpu_to_le16(vcc->vpi);
header->vci = cpu_to_le16(vcc->vci);
header->type = cpu_to_le16(PKT_PCLOSE);
struct solos_card *card = vcc->dev->dev_data;
struct sk_buff *skb2 = NULL;
struct pkt_hdr *header;
+ int pktlen;
//dev_dbg(&card->dev->dev, "psend called.\n");
//dev_dbg(&card->dev->dev, "dev,vpi,vci = %d,%d,%d\n",SOLOS_CHAN(vcc->dev),vcc->vpi,vcc->vci);
return 0;
}
- if (skb->len > (BUF_SIZE - sizeof(*header))) {
+ pktlen = skb->len;
+ if (pktlen > (BUF_SIZE - sizeof(*header))) {
dev_warn(&card->dev->dev, "Length of PDU is too large. Dropping PDU.\n");
solos_pop(vcc, skb);
return 0;
header = (void *)skb_push(skb, sizeof(*header));
- header->size = cpu_to_le16(skb->len);
+ /* This does _not_ include the size of the header */
+ header->size = cpu_to_le16(pktlen);
header->vpi = cpu_to_le16(vcc->vpi);
header->vci = cpu_to_le16(vcc->vci);
header->type = cpu_to_le16(PKT_DATA);