net: stmmac: fix maxmtu assignment to be within valid range

There is no checking valid value of maxmtu when getting it from
device tree. This resolution added the checking condition to
ensure the assignment is made within a valid range.

Signed-off-by: Kweh, Hock Leong <>
Reviewed-by: Andy Shevchenko <>
Signed-off-by: David S. Miller <>
2 files changed