/* initialize workqueue's */
INIT_WORK(&priv->stats_work,
(void (*)(void *)) prism54_update_stats, priv);
-
priv->stats_timestamp = 0;
+ INIT_WORK(&priv->reset_task, islpci_do_reset_and_wake, priv);
+ priv->reset_task_pending = 0;
+
/* allocate various memory areas */
if (islpci_alloc_memory(priv))
goto do_free_netdev;
/* The card reports full 802.11 packets but with a 20 bytes
* header and without the FCS. But there a is a bit that
* indicates if the packet is corrupted :-) */
- /* int i; */
- if (skb->data[8] & 0x01){
+ if (skb->data[8] & 0x01)
/* This one is bad. Drop it !*/
discard = 1;
- /* printk("BAD\n");*/
- }
- /*
- for(i=0;i<50;i++)
- printk("%2.2X:",skb->data[i]);
- printk("\n");
- */
skb_pull(skb, 20);
skb->protocol = htons(ETH_P_802_2);
skb->mac.raw = skb->data;
return 0;
}
+void
+islpci_do_reset_and_wake(void *data)
+{
+ islpci_private *priv = (islpci_private *) data;
+ islpci_reset(priv, 1);
+ netif_wake_queue(priv->ndev);
+ priv->reset_task_pending = 0;
+}
+
void
islpci_eth_tx_timeout(struct net_device *ndev)
{
/* increment the transmit error counter */
statistics->tx_errors++;
-#if 0
- /* don't do this here! we are not allowed to sleep since we are in interrupt context */
- if (islpci_reset(priv))
- printk(KERN_ERR "%s: error on TX timeout card reset!\n",
- ndev->name);
-#endif
+ if(!priv->reset_task_pending) {
+ priv->reset_task_pending = 1;
+ netif_stop_queue(ndev);
+ schedule_work(&priv->reset_task);
+ }
- /* netif_wake_queue(ndev); */
return;
}
int islpci_eth_transmit(struct sk_buff *, struct net_device *);
int islpci_eth_receive(islpci_private *);
void islpci_eth_tx_timeout(struct net_device *);
+void islpci_do_reset_and_wake(void *data);
#endif /* _ISL_GEN_H */