aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 943afc9067b1..9188323f067b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -228,6 +228,18 @@ void rt2x00queue_uninitialize(struct rt2x00_dev *rt2x00dev)
228 } 228 }
229} 229}
230 230
231static void rt2x00queue_init(struct rt2x00_dev *rt2x00dev,
232 struct data_queue *queue, enum data_queue_qid qid)
233{
234 spin_lock_init(&queue->lock);
235
236 queue->rt2x00dev = rt2x00dev;
237 queue->qid = qid;
238 queue->aifs = 2;
239 queue->cw_min = 5;
240 queue->cw_max = 10;
241}
242
231int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev) 243int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev)
232{ 244{
233 struct data_queue *queue; 245 struct data_queue *queue;
@@ -265,24 +277,15 @@ int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev)
265 * TX: cw_max: 2^10 = 1024. 277 * TX: cw_max: 2^10 = 1024.
266 * BCN & Atim: qid = QID_MGMT 278 * BCN & Atim: qid = QID_MGMT
267 */ 279 */
268 qid = QID_AC_BE; 280 rt2x00queue_init(rt2x00dev, rt2x00dev->rx, QID_RX);
269 queue_for_each(rt2x00dev, queue) {
270 spin_lock_init(&queue->lock);
271 281
272 queue->rt2x00dev = rt2x00dev; 282 qid = QID_AC_BE;
273 queue->qid = qid++; 283 tx_queue_for_each(rt2x00dev, queue)
274 queue->aifs = 2; 284 rt2x00queue_init(rt2x00dev, queue, qid++);
275 queue->cw_min = 5;
276 queue->cw_max = 10;
277 }
278 285
279 /* 286 rt2x00queue_init(rt2x00dev, &rt2x00dev->bcn[0], QID_MGMT);
280 * Fix non-TX data qid's
281 */
282 rt2x00dev->rx->qid = QID_RX;
283 rt2x00dev->bcn[0].qid = QID_MGMT;
284 if (req_atim) 287 if (req_atim)
285 rt2x00dev->bcn[1].qid = QID_MGMT; 288 rt2x00queue_init(rt2x00dev, &rt2x00dev->bcn[1], QID_MGMT);
286 289
287 return 0; 290 return 0;
288} 291}