net: dsa: bcm_sf2: Introduce helper for port override offset
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 15 Aug 2022 17:50:08 +0000 (10:50 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 17 Aug 2022 17:55:03 +0000 (10:55 -0700)
commit1ed26ce4850accf88aedd1b1c7974a94396305d0
tree50a7bc5653ff9618410f36d537f4be3db9ed77fb
parent815f5f574144aaef4bce6540214cb37434be637c
net: dsa: bcm_sf2: Introduce helper for port override offset

Depending upon the generation of switches, we have different offsets for
configuring a given port's status override where link parameters are
applied. Introduce a helper function that we re-use throughout the code
in order to let phylink callbacks configure the IMP/CPU port(s) in
subsequent changes.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/bcm_sf2.c