diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-01-06 23:39:25 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:09:24 -0800 |
commit | 042671040db95a896c5ca960b9b656692a787892 (patch) | |
tree | b96a4e931b65c912f2800b02480b14008125c01b /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | 3867705bb773818b39e0ca8d02ccb71fb4d2ffb8 (diff) |
rt2x00: Store queue idx and entry idx in data_ring and data_entry
Store the queue idx inside structure data_ring
Store the entry idx inside structure data_entry
This saves us a few calls to ARRAY_INDEX() which is now unused.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index a771a092434..9b2bd917646 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -988,6 +988,7 @@ static int rt2x00lib_alloc_entries(struct data_ring *ring, entry[i].flags = 0; entry[i].ring = ring; entry[i].skb = NULL; + entry[i].entry_idx = i; } ring->entry = entry; @@ -1115,6 +1116,7 @@ exit: static int rt2x00lib_alloc_rings(struct rt2x00_dev *rt2x00dev) { struct data_ring *ring; + unsigned int index; /* * We need the following rings: @@ -1145,8 +1147,10 @@ static int rt2x00lib_alloc_rings(struct rt2x00_dev *rt2x00dev) * cw_min: 2^5 = 32. * cw_max: 2^10 = 1024. */ + index = 0; ring_for_each(rt2x00dev, ring) { ring->rt2x00dev = rt2x00dev; + ring->queue_idx = index++; ring->tx_params.aifs = 2; ring->tx_params.cw_min = 5; ring->tx_params.cw_max = 10; |