]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gianfar: remove unnecessary zeroing coalesce settings
authorJakub Kicinski <kuba@kernel.org>
Wed, 4 Mar 2020 02:26:12 +0000 (18:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Mar 2020 03:22:12 +0000 (19:22 -0800)
Core already zeroes out the struct ethtool_coalesce structure,
drivers don't have to set every field to 0 individually.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar_ethtool.c

index a7cc371ee94f5dc78f27632482a73b809038fe75..f82e0be4d309f1103e5fbf5041bd6648ce5e2e24 100644 (file)
@@ -272,35 +272,6 @@ static int gfar_gcoalesce(struct net_device *dev,
        cvals->tx_coalesce_usecs = gfar_ticks2usecs(priv, txtime);
        cvals->tx_max_coalesced_frames = txcount;
 
-       cvals->use_adaptive_rx_coalesce = 0;
-       cvals->use_adaptive_tx_coalesce = 0;
-
-       cvals->pkt_rate_low = 0;
-       cvals->rx_coalesce_usecs_low = 0;
-       cvals->rx_max_coalesced_frames_low = 0;
-       cvals->tx_coalesce_usecs_low = 0;
-       cvals->tx_max_coalesced_frames_low = 0;
-
-       /* When the packet rate is below pkt_rate_high but above
-        * pkt_rate_low (both measured in packets per second) the
-        * normal {rx,tx}_* coalescing parameters are used.
-        */
-
-       /* When the packet rate is (measured in packets per second)
-        * is above pkt_rate_high, the {rx,tx}_*_high parameters are
-        * used.
-        */
-       cvals->pkt_rate_high = 0;
-       cvals->rx_coalesce_usecs_high = 0;
-       cvals->rx_max_coalesced_frames_high = 0;
-       cvals->tx_coalesce_usecs_high = 0;
-       cvals->tx_max_coalesced_frames_high = 0;
-
-       /* How often to do adaptive coalescing packet rate sampling,
-        * measured in seconds.  Must not be zero.
-        */
-       cvals->rate_sample_interval = 0;
-
        return 0;
 }