summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-05-08 13:30:26 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-05-08 13:30:26 +0000
commitef530298708a90b0e2bfc0db8840c492f428dd32 (patch)
treec11d2a37a2f34903b548b0f6260b1fe93566b5ae
parentba1c1e901615fd7cefc0966bbdd9d0d81581ae95 (diff)
downloadmtk-20170518-ef530298708a90b0e2bfc0db8840c492f428dd32.zip
mtk-20170518-ef530298708a90b0e2bfc0db8840c492f428dd32.tar.gz
mtk-20170518-ef530298708a90b0e2bfc0db8840c492f428dd32.tar.bz2
ar71xx: ag71xx: fix build error if debugfs is enabled
SVN-Revision: 26854
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c
index e41162a..90a50da 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c
@@ -184,14 +184,15 @@ static ssize_t read_file_ring(struct file *file, char __user *user_buf,
desc_hw = ag71xx_rr(ag, desc_reg);
for (i = 0; i < ring_size; i++) {
struct ag71xx_buf *ab = &ring->buf[i];
+ u32 desc_dma = ((u32) ring->descs_dma) + i * ring->desc_size;
len += snprintf(buf + len, buflen - len,
"%3d %c%c%c %08x %08x %08x %08x %c %10lu\n",
i,
(i == curr) ? 'C' : ' ',
(i == dirty) ? 'D' : ' ',
- (desc_hw == ab->desc_dma) ? 'H' : ' ',
- ab->desc_dma,
+ (desc_hw == desc_dma) ? 'H' : ' ',
+ desc_dma,
ab->desc->next,
ab->desc->data,
ab->desc->ctrl,