summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/ring_mode.c
diff options
context:
space:
mode:
authorSong, Yoong Siang <yoong.siang.song@intel.com>2020-09-16 09:40:20 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-17 00:22:52 +0200
commitaa042f60e4961d4bec57e3268624df1f3a6befa4 (patch)
treec0d0bb6a3feab3d44a0ad1901b20b15e04b1bdc5 /drivers/net/ethernet/stmicro/stmmac/ring_mode.c
parentMerge branch 'mlxsw-Refactor-headroom-management' (diff)
downloadlinux-aa042f60e4961d4bec57e3268624df1f3a6befa4.tar.xz
linux-aa042f60e4961d4bec57e3268624df1f3a6befa4.zip
net: stmmac: Add support to Ethtool get/set ring parameters
This patch add support to --show-ring & --set-ring Ethtool functions: - Adding min, max, power of two check to new ring parameter's value. - Bring down the network interface before changing the value of ring parameters. - Bring up the network interface after changing the value of ring parameters. Signed-off-by: Song, Yoong Siang <yoong.siang.song@intel.com> Signed-off-by: Voon Weifeng <weifeng.voon@intel.com> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/ring_mode.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/ring_mode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/ring_mode.c b/drivers/net/ethernet/stmicro/stmmac/ring_mode.c
index 14bd5e7b9875..8ad900949dc8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/ring_mode.c
+++ b/drivers/net/ethernet/stmicro/stmmac/ring_mode.c
@@ -51,7 +51,7 @@ static int jumbo_frm(void *p, struct sk_buff *skb, int csum)
stmmac_prepare_tx_desc(priv, desc, 1, bmax, csum,
STMMAC_RING_MODE, 0, false, skb->len);
tx_q->tx_skbuff[entry] = NULL;
- entry = STMMAC_GET_ENTRY(entry, DMA_TX_SIZE);
+ entry = STMMAC_GET_ENTRY(entry, priv->dma_tx_size);
if (priv->extend_desc)
desc = (struct dma_desc *)(tx_q->dma_etx + entry);