aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-04-29 18:29:31 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-04-29 18:29:31 +0000
commite931ffd678298d07d90618bb4e0685e6e1235301 (patch)
treeea56d617883b21308514802bdf93fde3c8f778d2 /target/linux/generic/files/drivers/net/phy/rtl8366rb.c
parent1d9400263fd52a054d50ce9726e4ec8e78b66672 (diff)
downloadupstream-e931ffd678298d07d90618bb4e0685e6e1235301.tar.gz
upstream-e931ffd678298d07d90618bb4e0685e6e1235301.tar.bz2
upstream-e931ffd678298d07d90618bb4e0685e6e1235301.zip
linux: rtl836x: add a generic reset_switch function
SVN-Revision: 31536
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/rtl8366rb.c')
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366rb.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
index 2323abf3b5..3901602f93 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
@@ -933,30 +933,6 @@ static int rtl8366rb_sw_reset_port_mibs(struct switch_dev *dev,
RTL8366RB_MIB_CTRL_PORT_RESET(val->port_vlan));
}
-static int rtl8366rb_sw_reset_switch(struct switch_dev *dev)
-{
- struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev);
- int err;
-
- err = rtl8366rb_reset_chip(smi);
- if (err)
- return err;
-
- err = rtl8366rb_setup(smi);
- if (err)
- return err;
-
- err = rtl8366_reset_vlan(smi);
- if (err)
- return err;
-
- err = rtl8366_enable_vlan(smi, 1);
- if (err)
- return err;
-
- return rtl8366_enable_all_ports(smi, 1);
-}
-
static struct switch_attr rtl8366rb_globals[] = {
{
.type = SWITCH_TYPE_INT,
@@ -1084,7 +1060,7 @@ static const struct switch_dev_ops rtl8366_ops = {
.set_vlan_ports = rtl8366_sw_set_vlan_ports,
.get_port_pvid = rtl8366_sw_get_port_pvid,
.set_port_pvid = rtl8366_sw_set_port_pvid,
- .reset_switch = rtl8366rb_sw_reset_switch,
+ .reset_switch = rtl8366_sw_reset_switch,
.get_port_link = rtl8366rb_sw_get_port_link,
};