net: gemini: Look up L3 maxlen from table
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Jul 2018 19:32:41 +0000 (21:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jul 2018 00:39:15 +0000 (17:39 -0700)
commitcedca4180127e097e4823018e748b1635c0667f0
treef950dc26ac8359898de1c6f545c4713576f01abb
parent750c721ee04fc18e8b66a6a8711c09a33cd76c58
net: gemini: Look up L3 maxlen from table

The code to calculate the hardware register enumerator
for the maximum L3 length isn't entirely simple to read.
Use the existing defines and rewrite the function into a
table look-up.

Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cortina/gemini.c