rt2x00: rt2x00queue: setup queue->threshold from queue->limit

Use the queue->limit value instead of the
qdesc->entry_num to compute the threshold.
The two source values are the same and the
data queue descriptor structure will be
removed by a later patch.

Also separate the computation from the rest
of the init code to make further changes
easier.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Gabor Juhos 2013-06-04 13:40:41 +02:00 committed by John W. Linville
parent 56e8256351
commit 04453e9bda
1 changed files with 2 additions and 1 deletions

View File

@ -1323,11 +1323,12 @@ static void rt2x00queue_init(struct rt2x00_dev *rt2x00dev,
BUG_ON(!qdesc);
queue->limit = qdesc->entry_num;
queue->threshold = DIV_ROUND_UP(qdesc->entry_num, 10);
queue->data_size = qdesc->data_size;
queue->desc_size = qdesc->desc_size;
queue->winfo_size = qdesc->winfo_size;
queue->priv_size = qdesc->priv_size;
queue->threshold = DIV_ROUND_UP(queue->limit, 10);
}
int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev)