Commit 790d32c6 authored by Maxime Chevallier's avatar Maxime Chevallier Committed by David S. Miller
Browse files

net: mvpp2: fix hardcoded number of rx queues



There's a dedicated #define that indicates the number of rx queues per
port per cpu, this commit removes a harcoded use of that value

This doesn't fix any runtime bugs since the harcoded value matches the
expected value.

Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c4a5686
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3993,8 +3993,8 @@ static int mvpp2_port_init(struct mvpp2_port *port)
	    MVPP2_MAX_PORTS * priv->max_port_rxqs)
		return -EINVAL;

	if (port->nrxqs % 4 || (port->nrxqs > priv->max_port_rxqs) ||
	    (port->ntxqs > MVPP2_MAX_TXQ))
	if (port->nrxqs % MVPP2_DEFAULT_RXQ ||
	    port->nrxqs > priv->max_port_rxqs || port->ntxqs > MVPP2_MAX_TXQ)
		return -EINVAL;

	/* Disable port */