diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-01-18 20:17:28 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-01-18 20:17:28 +0000 |
commit | 7e7a5831f715435be276b7a7b3b6e879464a3699 (patch) | |
tree | 1c9675e9c7b3bd97c75c503138079ffccb1e34bc /target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c | |
parent | 2a76888e3f403821d79d62aa09c1e698da8f835a (diff) | |
download | master-187ad058-7e7a5831f715435be276b7a7b3b6e879464a3699.tar.gz master-187ad058-7e7a5831f715435be276b7a7b3b6e879464a3699.tar.bz2 master-187ad058-7e7a5831f715435be276b7a7b3b6e879464a3699.zip |
ralink: improve check rx sg function. use check frags instead of function call
Signed-off-by: michael lee <igvtee@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44046 3c298f89-4303-0410-b956-a3cf2f4a3e73
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 | 8 |
1 files changed, 4 insertions, 4 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 5a681f8e43..ad74550a4d 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 @@ -271,8 +271,8 @@ static int fe_alloc_rx(struct fe_priv *priv) goto no_rx_mem; priv->rx_dma[i].rxd1 = (unsigned int) dma_addr; - if (priv->soc->rx_dma) - priv->soc->rx_dma(&priv->rx_dma[i], priv->rx_buf_size); + if (priv->flags & FE_FLAG_RX_SG_DMA) + priv->rx_dma[i].rxd2 = RX_DMA_PLEN0(priv->rx_buf_size); else priv->rx_dma[i].rxd2 = RX_DMA_LSO; } @@ -827,8 +827,8 @@ static int fe_poll_rx(struct napi_struct *napi, int budget, rxd->rxd1 = (unsigned int) dma_addr; release_desc: - if (soc->rx_dma) - soc->rx_dma(rxd, priv->rx_buf_size); + if (priv->flags & FE_FLAG_RX_SG_DMA) + rxd->rxd2 = RX_DMA_PLEN0(priv->rx_buf_size); else rxd->rxd2 = RX_DMA_LSO; |