net: dsa: qca8k: move port set status/eee/ethtool stats function to common code
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 27 Jul 2022 11:35:16 +0000 (13:35 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Jul 2022 05:24:38 +0000 (22:24 -0700)
commit472fcea160f27a5d9b7526093d9d8d89ba0b6137
tree98deb954305971240dba3bfd6c52c45a3a877633
parentfce1ec0c4e2d03d9c62ffc615a42bdba78eb4c14
net: dsa: qca8k: move port set status/eee/ethtool stats function to common code

The same logic to disable/enable port, set eee and get ethtool stats is
used by drivers based on qca8k family switch.
Move it to common code to make it accessible also by other drivers.
While at it also drop unnecessary qca8k_priv cast for void pointers.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/qca/qca8k-8xxx.c
drivers/net/dsa/qca/qca8k-common.c
drivers/net/dsa/qca/qca8k.h