aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-01-06 17:39:25 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:09:24 -0500
commit042671040db95a896c5ca960b9b656692a787892 (patch)
treeb96a4e931b65c912f2800b02480b14008125c01b /drivers/net/wireless/rt2x00/rt2x00dev.c
parent3867705bb773818b39e0ca8d02ccb71fb4d2ffb8 (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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index a771a092434b..9b2bd9176467 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,
988 entry[i].flags = 0; 988 entry[i].flags = 0;
989 entry[i].ring = ring; 989 entry[i].ring = ring;
990 entry[i].skb = NULL; 990 entry[i].skb = NULL;
991 entry[i].entry_idx = i;
991 } 992 }
992 993
993 ring->entry = entry; 994 ring->entry = entry;
@@ -1115,6 +1116,7 @@ exit:
1115static int rt2x00lib_alloc_rings(struct rt2x00_dev *rt2x00dev) 1116static int rt2x00lib_alloc_rings(struct rt2x00_dev *rt2x00dev)
1116{ 1117{
1117 struct data_ring *ring; 1118 struct data_ring *ring;
1119 unsigned int index;
1118 1120
1119 /* 1121 /*
1120 * We need the following rings: 1122 * We need the following rings:
@@ -1145,8 +1147,10 @@ static int rt2x00lib_alloc_rings(struct rt2x00_dev *rt2x00dev)
1145 * cw_min: 2^5 = 32. 1147 * cw_min: 2^5 = 32.
1146 * cw_max: 2^10 = 1024. 1148 * cw_max: 2^10 = 1024.
1147 */ 1149 */
1150 index = 0;
1148 ring_for_each(rt2x00dev, ring) { 1151 ring_for_each(rt2x00dev, ring) {
1149 ring->rt2x00dev = rt2x00dev; 1152 ring->rt2x00dev = rt2x00dev;
1153 ring->queue_idx = index++;
1150 ring->tx_params.aifs = 2; 1154 ring->tx_params.aifs = 2;
1151 ring->tx_params.cw_min = 5; 1155 ring->tx_params.cw_min = 5;
1152 ring->tx_params.cw_max = 10; 1156 ring->tx_params.cw_max = 10;