Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236963
b: refs/heads/master
c: 0439f53
h: refs/heads/master
i:
  236961: 5efa624
  236959: 0f05ca7
v: v3
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Jan 31, 2011
1 parent 373168b commit b6d68bf
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1f4e808bb7a884d6563553c2c94cbdd901a16c7
refs/heads/master: 0439f5367c8d8bb2ebaca8d7329f51f3148b2fb2
7 changes: 7 additions & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2x00.h
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,13 @@ struct rt2x00_dev {
*/
struct ieee80211_low_level_stats low_level_stats;

/**
* Work queue for all work which should not be placed
* on the mac80211 workqueue (because of dependencies
* between various work structures).
*/
struct workqueue_struct *workqueue;

/*
* Scheduled work.
* NOTE: intf_work will use ieee80211_iterate_active_interfaces()
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,15 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
BIT(NL80211_IFTYPE_WDS);

/*
* Initialize configuration work.
* Initialize work.
*/
rt2x00dev->workqueue =
alloc_ordered_workqueue(wiphy_name(rt2x00dev->hw->wiphy), 0);
if (!rt2x00dev->workqueue) {
retval = -ENOMEM;
goto exit;
}

INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled);

/*
Expand Down Expand Up @@ -1057,6 +1064,7 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
cancel_work_sync(&rt2x00dev->intf_work);
cancel_work_sync(&rt2x00dev->rxdone_work);
cancel_work_sync(&rt2x00dev->txdone_work);
destroy_workqueue(rt2x00dev->workqueue);

/*
* Free the tx status fifo.
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2x00link.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ void rt2x00link_start_watchdog(struct rt2x00_dev *rt2x00dev)
!test_bit(DRIVER_SUPPORT_WATCHDOG, &rt2x00dev->flags))
return;

schedule_delayed_work(&link->watchdog_work, WATCHDOG_INTERVAL);
ieee80211_queue_delayed_work(rt2x00dev->hw,
&link->watchdog_work, WATCHDOG_INTERVAL);
}

void rt2x00link_stop_watchdog(struct rt2x00_dev *rt2x00dev)
Expand All @@ -441,7 +442,9 @@ static void rt2x00link_watchdog(struct work_struct *work)
rt2x00dev->ops->lib->watchdog(rt2x00dev);

if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
schedule_delayed_work(&link->watchdog_work, WATCHDOG_INTERVAL);
ieee80211_queue_delayed_work(rt2x00dev->hw,
&link->watchdog_work,
WATCHDOG_INTERVAL);
}

void rt2x00link_register(struct rt2x00_dev *rt2x00dev)
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/rt2x00/rt2x00usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
* Schedule the delayed work for reading the TX status
* from the device.
*/
ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->txdone_work);
queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);
}

static void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
Expand Down Expand Up @@ -320,7 +320,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
* Schedule the delayed work for reading the RX status
* from the device.
*/
ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->rxdone_work);
queue_work(rt2x00dev->workqueue, &rt2x00dev->rxdone_work);
}

static void rt2x00usb_kick_rx_entry(struct queue_entry *entry)
Expand Down Expand Up @@ -429,7 +429,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue)
* Schedule the completion handler manually, when this
* worker function runs, it should cleanup the queue.
*/
ieee80211_queue_work(queue->rt2x00dev->hw, completion);
queue_work(queue->rt2x00dev->workqueue, completion);

/*
* Wait for a little while to give the driver
Expand All @@ -453,7 +453,7 @@ static void rt2x00usb_watchdog_tx_status(struct data_queue *queue)
WARNING(queue->rt2x00dev, "TX queue %d status timed out,"
" invoke forced tx handler\n", queue->qid);

ieee80211_queue_work(queue->rt2x00dev->hw, &queue->rt2x00dev->txdone_work);
queue_work(queue->rt2x00dev->workqueue, &queue->rt2x00dev->txdone_work);
}

void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev)
Expand Down

0 comments on commit b6d68bf

Please sign in to comment.