static void rt2800usb_kill_tx_queue(struct data_queue *queue) { if (queue->qid == QID_BEACON) rt2x00usb_register_write(queue->rt2x00dev, BCN_TIME_CFG, 0); rt2x00usb_kill_tx_queue(queue); }
static void rt2x00usb_watchdog_tx_dma(struct data_queue *queue) { struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; unsigned short threshold = queue->threshold; WARNING(queue->rt2x00dev, "TX queue %d DMA timed out," " invoke forced forced reset", queue->qid); /* * Temporarily disable the TX queue, this will force mac80211 * to use the other queues until this queue has been restored. * * Set the queue threshold to the queue limit. This prevents the * queue from being enabled during the txdone handler. */ queue->threshold = queue->limit; ieee80211_stop_queue(rt2x00dev->hw, queue->qid); /* * Kill all entries in the queue, afterwards we need to * wait a bit for all URBs to be cancelled. */ rt2x00usb_kill_tx_queue(queue); /* * In case that a driver has overriden the txdone_work * function, we invoke the TX done through there. */ rt2x00dev->txdone_work.func(&rt2x00dev->txdone_work); /* * The queue has been reset, and mac80211 is allowed to use the * queue again. */ queue->threshold = threshold; ieee80211_wake_queue(rt2x00dev->hw, queue->qid); }