mdiobus_free(smi->mii_bus);
}
+int rtl8366_sw_get_port_pvid(struct switch_dev *dev, int port, int *val)
+{
+ struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev);
+ return rtl8366_get_pvid(smi, port, val);
+}
+EXPORT_SYMBOL_GPL(rtl8366_sw_get_port_pvid);
+
+int rtl8366_sw_set_port_pvid(struct switch_dev *dev, int port, int val)
+{
+ struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev);
+ return rtl8366_set_pvid(smi, port, val);
+}
+EXPORT_SYMBOL_GPL(rtl8366_sw_set_port_pvid);
+
struct rtl8366_smi *rtl8366_smi_alloc(struct device *parent)
{
struct rtl8366_smi *smi;
return container_of(sw, struct rtl8366_smi, sw_dev);
}
+int rtl8366_sw_get_port_pvid(struct switch_dev *dev, int port, int *val);
+int rtl8366_sw_set_port_pvid(struct switch_dev *dev, int port, int val);
+
#endif /* _RTL8366_SMI_H */
return rtl8366_set_vlan(smi, val->port_vlan, member, untag, 0);
}
-static int rtl8366rb_sw_get_port_pvid(struct switch_dev *dev, int port, int *val)
-{
- struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev);
- return rtl8366_get_pvid(smi, port, val);
-}
-
-static int rtl8366rb_sw_set_port_pvid(struct switch_dev *dev, int port, int val)
-{
- struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev);
- return rtl8366_set_pvid(smi, port, val);
-}
-
static int rtl8366rb_sw_reset_switch(struct switch_dev *dev)
{
struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev);
.get_vlan_ports = rtl8366rb_sw_get_vlan_ports,
.set_vlan_ports = rtl8366rb_sw_set_vlan_ports,
- .get_port_pvid = rtl8366rb_sw_get_port_pvid,
- .set_port_pvid = rtl8366rb_sw_set_port_pvid,
+ .get_port_pvid = rtl8366_sw_get_port_pvid,
+ .set_port_pvid = rtl8366_sw_set_port_pvid,
.reset_switch = rtl8366rb_sw_reset_switch,
};
return rtl8366_set_vlan(smi, val->port_vlan, member, untag, 0);
}
-static int rtl8366s_sw_get_port_pvid(struct switch_dev *dev, int port, int *val)
-{
- struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev);
- return rtl8366_get_pvid(smi, port, val);
-}
-
-static int rtl8366s_sw_set_port_pvid(struct switch_dev *dev, int port, int val)
-{
- struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev);
- return rtl8366_set_pvid(smi, port, val);
-}
-
static int rtl8366s_sw_reset_switch(struct switch_dev *dev)
{
struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev);
.get_vlan_ports = rtl8366s_sw_get_vlan_ports,
.set_vlan_ports = rtl8366s_sw_set_vlan_ports,
- .get_port_pvid = rtl8366s_sw_get_port_pvid,
- .set_port_pvid = rtl8366s_sw_set_port_pvid,
+ .get_port_pvid = rtl8366_sw_get_port_pvid,
+ .set_port_pvid = rtl8366_sw_set_port_pvid,
.reset_switch = rtl8366s_sw_reset_switch,
};