diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-06-04 07:40:41 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-12 14:59:35 -0400 |
commit | 04453e9bda9da510e79c66f56ab463215d042aa8 (patch) | |
tree | 483778c5c9dd2aadf93df66478326c67fa5ddfb6 | |
parent | 56e8256351c358d7a2003f6fe10dcb5e2bc394f7 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index c12d1c8ae618..3ae2264fdabc 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -1323,11 +1323,12 @@ static void rt2x00queue_init(struct rt2x00_dev *rt2x00dev, | |||
1323 | BUG_ON(!qdesc); | 1323 | BUG_ON(!qdesc); |
1324 | 1324 | ||
1325 | queue->limit = qdesc->entry_num; | 1325 | queue->limit = qdesc->entry_num; |
1326 | queue->threshold = DIV_ROUND_UP(qdesc->entry_num, 10); | ||
1327 | queue->data_size = qdesc->data_size; | 1326 | queue->data_size = qdesc->data_size; |
1328 | queue->desc_size = qdesc->desc_size; | 1327 | queue->desc_size = qdesc->desc_size; |
1329 | queue->winfo_size = qdesc->winfo_size; | 1328 | queue->winfo_size = qdesc->winfo_size; |
1330 | queue->priv_size = qdesc->priv_size; | 1329 | queue->priv_size = qdesc->priv_size; |
1330 | |||
1331 | queue->threshold = DIV_ROUND_UP(queue->limit, 10); | ||
1331 | } | 1332 | } |
1332 | 1333 | ||
1333 | int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev) | 1334 | int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev) |