aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-02-26 10:54:13 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-02-26 10:54:13 +0000
commit72599f0c610cf73c91b2fa589d084ef44a4a4d00 (patch)
tree2f5cf1ace733a5108d9d3b7a03c5fca51603baf8 /target/linux/ramips
parent100f76a010efdbc3d41a356a797caed90c1dd8ab (diff)
downloadupstream-72599f0c610cf73c91b2fa589d084ef44a4a4d00.tar.gz
upstream-72599f0c610cf73c91b2fa589d084ef44a4a4d00.tar.bz2
upstream-72599f0c610cf73c91b2fa589d084ef44a4a4d00.zip
ramips: don't read RAMIPS_RX_CALC_IDX0 register in the loop
SVN-Revision: 30733
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c b/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c
index 60001e3bc1..beceb9441e 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c
@@ -717,13 +717,15 @@ ramips_eth_rx_hw(unsigned long ptr)
int rx;
int max_rx = 16;
+ rx = ramips_fe_rr(RAMIPS_RX_CALC_IDX0);
+
while (max_rx) {
struct raeth_rx_info *rxi;
struct ramips_rx_dma *rxd;
struct sk_buff *rx_skb, *new_skb;
int pktlen;
- rx = (ramips_fe_rr(RAMIPS_RX_CALC_IDX0) + 1) % NUM_RX_DESC;
+ rx = (rx + 1) % NUM_RX_DESC;
rxi = &re->rx_info[rx];
rxd = rxi->rx_desc;