aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAdam Baker <linux@baker-net.org.uk>2008-02-10 16:48:19 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:18 -0500
commit231be4e92cc0398781e6acda0e3f8ea54a7fa10f (patch)
treeee5a745fa4bdbe9ac694bdb8815819bb18af986e /drivers
parent16938a24ae19562f078fd43a28500526ff78cd87 (diff)
rt2x00: correct address calc for queue private data
When calculating the offset to add to the queue entry base to get the individual entry's private data area the base address must be treated as a char * not a struct queue_entry so we can do byte oriented pointer arithmetic with it. Signed-off-by: Adam Baker <linux@baker-net.org.uk> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index fde64ea3f4ef..943afc9067b1 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -160,7 +160,8 @@ static int rt2x00queue_alloc_entries(struct data_queue *queue,
160 return -ENOMEM; 160 return -ENOMEM;
161 161
162#define QUEUE_ENTRY_PRIV_OFFSET(__base, __index, __limit, __esize, __psize) \ 162#define QUEUE_ENTRY_PRIV_OFFSET(__base, __index, __limit, __esize, __psize) \
163 ( (__base) + ((__limit) * (__esize)) + ((__index) * (__psize)) ) 163 ( ((char *)(__base)) + ((__limit) * (__esize)) + \
164 ((__index) * (__psize)) )
164 165
165 for (i = 0; i < queue->limit; i++) { 166 for (i = 0; i < queue->limit; i++) {
166 entries[i].flags = 0; 167 entries[i].flags = 0;