bnxt_en: refactor code to limit speed advertising
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 27 Sep 2020 17:42:11 +0000 (13:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Sep 2020 20:35:45 +0000 (13:35 -0700)
commitc916062a8917463a469539eccee50d31e63c91c1
tree5ba247aefcf6887922247a8acbb0119337aec7f6
parent9d6b648c3112012dac6d804d331cdd3a2247765c
bnxt_en: refactor code to limit speed advertising

Extract the code for determining an advertised speed is no longer
supported into a separate function. This will avoid some code
duplication in a later patch when supporting PAM4 speeds, since
these speeds are specified in a separate field.

Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c