commit 9c7ba2b31484fa8e7388cfe2c3e11a9e0aa3f02c Author: Jiri Slaby Date: Tue Jul 17 08:12:33 2007 +0200 reset tasklet (reset is too long (delays) for hardisr) diff --git a/ath.c b/ath.c index dfa2f68..2f3597d 100644 --- a/ath.c +++ b/ath.c @@ -115,6 +115,7 @@ static struct pci_device_id ath_pci_id_table[] __devinitdata = { MODULE_DEVICE_TABLE(pci, ath_pci_id_table); static void ath_led_event(struct ath_softc *, int); +static int ath_reset(struct ieee80211_hw *); #if AR_DEBUG static void ath_printrxbuf(struct ath_buf *bf, int done) @@ -151,6 +152,13 @@ static inline void ath_dump_skb(struct sk_buff *skb, unsigned int rx) static inline void ath_dump_skb(struct sk_buff *skb, unsigned int rx) {} #endif +static void ath_tasklet_reset(unsigned long data) +{ + struct ath_softc *sc = (void *)data; + + ath_reset(sc->hw); +} + static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) { struct ieee80211_tx_status txs = {}; @@ -1270,10 +1278,10 @@ static irqreturn_t ath_intr(int irq, void *dev_id) * by the hal. */ sc->stats.ast_hardware++; - ath_reset(sc->hw); + tasklet_schedule(&sc->restq); } else if (unlikely(status & AR5K_INT_RXORN)) { sc->stats.ast_rxorn++; - ath_reset(sc->hw); + tasklet_schedule(&sc->restq); } else { if (status & AR5K_INT_SWBA) { /* @@ -1773,6 +1781,7 @@ static int ath_attach(struct pci_dev *pdev, struct ieee80211_hw *hw) tasklet_init(&sc->rxtq, ath_tasklet_rx, (unsigned long)sc); tasklet_init(&sc->txtq, ath_tasklet_tx, (unsigned long)sc); + tasklet_init(&sc->restq, ath_tasklet_reset, (unsigned long)sc); setup_timer(&sc->calib_tim, ath_calibrate, (unsigned long)sc); setup_timer(&sc->led_tim, ath_led_off, (unsigned long)sc); diff --git a/ath.h b/ath.h index 61019ad..b496893 100644 --- a/ath.h +++ b/ath.h @@ -205,6 +205,8 @@ struct ath_softc { int sc_rx_th_len; struct tasklet_struct sc_radartq; /* Radar detection */ #endif + struct tasklet_struct restq; /* reset tasklet */ + unsigned int rxbufsize; /* rx size based on mtu */ struct list_head rxbuf; /* receive buffer */ spinlock_t rxbuflock;