diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-08-18 16:00:34 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-08-18 16:00:34 +0000 |
commit | 9b8451815865b55c7f467aad488b71ff52e52eac (patch) | |
tree | 4254d265eb7bd97f7bf53c94e6bfee371a33ecdd /target/linux/generic/files/drivers/net/phy/rtl8366rb.c | |
parent | 8c2be2e3b53cf77c1b0a6f909f5a14b2268897f6 (diff) | |
download | master-187ad058-9b8451815865b55c7f467aad488b71ff52e52eac.tar.gz master-187ad058-9b8451815865b55c7f467aad488b71ff52e52eac.tar.bz2 master-187ad058-9b8451815865b55c7f467aad488b71ff52e52eac.zip |
generic: rtl8366: add enable_vlan{,4k} to smi_ops
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22702 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/rtl8366rb.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/rtl8366rb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c index d442d2feb8..27ceda142a 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c @@ -560,13 +560,13 @@ static int rtl8366rb_is_vlan_valid(struct rtl8366_smi *smi, unsigned vlan) return 1; } -static int rtl8366rb_vlan_set_vlan(struct rtl8366_smi *smi, int enable) +static int rtl8366rb_enable_vlan(struct rtl8366_smi *smi, int enable) { return rtl8366_smi_rmwr(smi, RTL8366RB_SGCR, RTL8366RB_SGCR_EN_VLAN, (enable) ? RTL8366RB_SGCR_EN_VLAN : 0); } -static int rtl8366rb_vlan_set_4ktable(struct rtl8366_smi *smi, int enable) +static int rtl8366rb_enable_vlan4k(struct rtl8366_smi *smi, int enable) { return rtl8366_smi_rmwr(smi, RTL8366RB_SGCR, RTL8366RB_SGCR_EN_VLAN_4KTB, @@ -644,9 +644,9 @@ static int rtl8366rb_sw_set_vlan_enable(struct switch_dev *dev, struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev); if (attr->ofs == 1) - return rtl8366rb_vlan_set_vlan(smi, val->value.i); + return rtl8366rb_enable_vlan(smi, val->value.i); else - return rtl8366rb_vlan_set_4ktable(smi, val->value.i); + return rtl8366rb_enable_vlan4k(smi, val->value.i); } static int rtl8366rb_sw_get_learning_enable(struct switch_dev *dev, @@ -1028,6 +1028,8 @@ static struct rtl8366_smi_ops rtl8366rb_smi_ops = { .set_mc_index = rtl8366rb_set_mc_index, .get_mib_counter = rtl8366rb_get_mib_counter, .is_vlan_valid = rtl8366rb_is_vlan_valid, + .enable_vlan = rtl8366rb_enable_vlan, + .enable_vlan4k = rtl8366rb_enable_vlan4k, }; static int __init rtl8366rb_probe(struct platform_device *pdev) |