diff mbox series

[RFC,v4,net-next,08/17] net: dsa: felix: populate mac_capabilities for all ports

Message ID 20221008185152.2411007-9-colin.foster@in-advantage.com
State New
Headers show
Series add support for the the vsc7512 internal copper phys | expand

Commit Message

Colin Foster Oct. 8, 2022, 6:51 p.m. UTC
phylink_generic_validate() requires that mac_capabilities is correctly
populated. While no existing felix drivers have used
phylink_generic_validate(), the ocelot_ext.c driver will. Populate this
element so the use of existing functions is possible.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---

v3-v4
    * No change

v2
    * Updated commit message to indicate "no existing felix drivers"
      instead of "no existing drivers"

v1 from previous RFC:
    * New patch

---
 drivers/net/dsa/ocelot/felix.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index d56f6f67f648..1d938675bd3a 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -1050,6 +1050,9 @@  static void felix_phylink_get_caps(struct dsa_switch *ds, int port,
 
 	__set_bit(ocelot->ports[port]->phy_mode,
 		  config->supported_interfaces);
+
+	config->mac_capabilities = MAC_SYM_PAUSE | MAC_ASYM_PAUSE | MAC_10 |
+				   MAC_100 | MAC_1000FD | MAC_2500FD;
 }
 
 static void felix_phylink_validate(struct dsa_switch *ds, int port,