here is the transmit function of the linux dlci.c module:
static int dlci_transmit(struct sk_buff *skb, struct device *dev)
{
struct dlci_local *dlp;
int ret;
ret = 0;
if (!skb || !dev)
return(0);
if (dev->tbusy)
return(1);
dlp = dev->priv;
if (set_bit(0, (void*)&dev->tbusy) != 0)
printk(KERN_WARNING "%s: transmitter access conflict.\n",
dev->name);
else
{
ret = dlp->slave->hard_start_xmit(skb, dlp->slave);
switch (ret)
{
case DLCI_RET_OK:
dlp->stats.tx_packets++;
ret = 0;
break;
case DLCI_RET_ERR:
dlp->stats.tx_errors++;
ret = 0;
break;
case DLCI_RET_DROP:
dlp->stats.tx_dropped++;
ret = 1;
break;
}
/* Alan Cox recommends always returning 0, and always freeing
the packet */
/* experience suggest a slightly more conservative approach */
if (!ret)
dev_kfree_skb(skb, FREE_WRITE);
dev->tbusy = 0;
}
return(ret);
}
By calling dlp->slave->hard_start_transmit , I store the skb->data
buffer into a linked list.
But when this list is full, I return DLCI_RET_DROP.... and then the
kernel crashes...damned!!!
Is the dev->tbusy =1 missing in the dlci module??
Fabien
Ciao
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]