aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-02-10 16:51:41 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:21 -0500
commit8f539276ee97bd174f644fb6c18bb9965b596032 (patch)
treeb449a9c8e3a0538661c796ea485ebc56b2681acc /drivers/net/wireless
parent647d0ca905f7d975e0bf41f571de6f443c814913 (diff)
rt2x00: Fix queue->qid initialization
As Adam Baker reported the queue->qid was not initialized correctly. The QID_AC_BE was assigned to the RX ring. This will move the queue initialization into a seperate function and makes sure that all queues are initialized directly with the correct qids. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-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}