diff options
author | John Crispin <john@openwrt.org> | 2015-10-05 10:26:21 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-10-05 10:26:21 +0000 |
commit | 6b4985b105d39ca22bc2de9da6889157cdac97a8 (patch) | |
tree | 31682012e01d8f95ea46288f6b284dcdcab27087 /target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c | |
parent | 1aab21df9f92194f78cd5864974f5c81d426e479 (diff) | |
download | upstream-6b4985b105d39ca22bc2de9da6889157cdac97a8.tar.gz upstream-6b4985b105d39ca22bc2de9da6889157cdac97a8.tar.bz2 upstream-6b4985b105d39ca22bc2de9da6889157cdac97a8.zip |
ramips: Fix setting of rx buffer length
The length of the DMA rx buffer was always set to 0 because the function
for extracting the length was used to calculate the value for setting it.
Instead the macro has to be split in a get and set function similar to the
TX_DMA_(GET_|)PLEN(0|1) macro.
No problem was noticed on MT7621a before this was changed and thus maybe it
was hidden by different problem which is not yet fixed.
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
SVN-Revision: 47115
Diffstat (limited to 'target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c index db6b1977f8..2691cfb710 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c @@ -849,7 +849,7 @@ static int fe_poll_rx(struct napi_struct *napi, int budget, dma_unmap_single(&netdev->dev, trxd.rxd1, ring->rx_buf_size, DMA_FROM_DEVICE); - pktlen = RX_DMA_PLEN0(trxd.rxd2); + pktlen = RX_DMA_GET_PLEN0(trxd.rxd2); skb->dev = netdev; skb_put(skb, pktlen); if (trxd.rxd4 & checksum_bit) { |