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: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Maxime Chevallier 2018-07-12 13:54:15 +02:00 committed by David S. Miller
parent 4c4a5686c4
commit 790d32c6d3

View File

@ -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 */