diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-01-06 22:39:25 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 23:09:24 (GMT) |
commit | 042671040db95a896c5ca960b9b656692a787892 (patch) | |
tree | b96a4e931b65c912f2800b02480b14008125c01b /drivers/net/wireless/rt2x00/rt2x00debug.c | |
parent | 3867705bb773818b39e0ca8d02ccb71fb4d2ffb8 (diff) | |
download | linux-042671040db95a896c5ca960b9b656692a787892.tar.xz |
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/rt2x00debug.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00debug.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c index c55bf0e..b44a9f4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c @@ -120,12 +120,8 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, struct sk_buff *skbcopy; struct rt2x00dump_hdr *dump_hdr; struct timeval timestamp; - unsigned int ring_index; - unsigned int entry_index; do_gettimeofday(×tamp); - ring_index = ARRAY_INDEX(desc->ring, rt2x00dev->rx); - entry_index = ARRAY_INDEX(desc->entry, desc->ring->entry); if (!test_bit(FRAME_DUMP_FILE_OPEN, &intf->frame_dump_flags)) return; @@ -151,8 +147,8 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, dump_hdr->chip_rf = cpu_to_le16(rt2x00dev->chip.rf); dump_hdr->chip_rev = cpu_to_le32(rt2x00dev->chip.rev); dump_hdr->type = cpu_to_le16(desc->frame_type); - dump_hdr->ring_index = ring_index; - dump_hdr->entry_index = entry_index; + dump_hdr->ring_index = desc->ring->queue_idx; + dump_hdr->entry_index = desc->entry->entry_idx; dump_hdr->timestamp_sec = cpu_to_le32(timestamp.tv_sec); dump_hdr->timestamp_usec = cpu_to_le32(timestamp.tv_usec); |