diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-07-15 13:05:29 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-07-15 13:05:29 +0000 |
commit | b956ede575a798da612bf65b4936f5be605add55 (patch) | |
tree | 6abc8e4604bccf6768d2a961694222398d6b8a6f /target | |
parent | 6938bc08dfa57eff5a2b479099e996389b18c900 (diff) |
generic: rtl8366: make rtl8366_{g,s}et_pvid static
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22198 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/rtl8366_smi.c | 83 | ||||
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/rtl8366_smi.h | 2 |
2 files changed, 41 insertions, 44 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c index b1f455696..a596c311c 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c @@ -349,45 +349,7 @@ int rtl8366_set_vlan(struct rtl8366_smi *smi, int vid, u32 member, u32 untag, } EXPORT_SYMBOL_GPL(rtl8366_set_vlan); -int rtl8366_reset_vlan(struct rtl8366_smi *smi) -{ - struct rtl8366_vlan_mc vlanmc; - int err; - int i; - - /* clear VLAN member configurations */ - vlanmc.vid = 0; - vlanmc.priority = 0; - vlanmc.member = 0; - vlanmc.untag = 0; - vlanmc.fid = 0; - for (i = 0; i < smi->num_vlan_mc; i++) { - err = smi->ops->set_vlan_mc(smi, i, &vlanmc); - if (err) - return err; - } - - for (i = 0; i < smi->num_ports; i++) { - if (i == smi->cpu_port) - continue; - - err = rtl8366_set_vlan(smi, (i + 1), - (1 << i) | (1 << smi->cpu_port), - (1 << i) | (1 << smi->cpu_port), - 0); - if (err) - return err; - - err = rtl8366_set_pvid(smi, i, (i + 1)); - if (err) - return err; - } - - return 0; -} -EXPORT_SYMBOL_GPL(rtl8366_reset_vlan); - -int rtl8366_get_pvid(struct rtl8366_smi *smi, int port, int *val) +static int rtl8366_get_pvid(struct rtl8366_smi *smi, int port, int *val) { struct rtl8366_vlan_mc vlanmc; int err; @@ -404,9 +366,9 @@ int rtl8366_get_pvid(struct rtl8366_smi *smi, int port, int *val) *val = vlanmc.vid; return 0; } -EXPORT_SYMBOL_GPL(rtl8366_get_pvid); -int rtl8366_set_pvid(struct rtl8366_smi *smi, unsigned port, unsigned vid) +static int rtl8366_set_pvid(struct rtl8366_smi *smi, unsigned port, + unsigned vid) { struct rtl8366_vlan_mc vlanmc; struct rtl8366_vlan_4k vlan4k; @@ -486,7 +448,44 @@ int rtl8366_set_pvid(struct rtl8366_smi *smi, unsigned port, unsigned vid) return -ENOSPC; } -EXPORT_SYMBOL_GPL(rtl8366_set_pvid); + +int rtl8366_reset_vlan(struct rtl8366_smi *smi) +{ + struct rtl8366_vlan_mc vlanmc; + int err; + int i; + + /* clear VLAN member configurations */ + vlanmc.vid = 0; + vlanmc.priority = 0; + vlanmc.member = 0; + vlanmc.untag = 0; + vlanmc.fid = 0; + for (i = 0; i < smi->num_vlan_mc; i++) { + err = smi->ops->set_vlan_mc(smi, i, &vlanmc); + if (err) + return err; + } + + for (i = 0; i < smi->num_ports; i++) { + if (i == smi->cpu_port) + continue; + + err = rtl8366_set_vlan(smi, (i + 1), + (1 << i) | (1 << smi->cpu_port), + (1 << i) | (1 << smi->cpu_port), + 0); + if (err) + return err; + + err = rtl8366_set_pvid(smi, i, (i + 1)); + if (err) + return err; + } + + return 0; +} +EXPORT_SYMBOL_GPL(rtl8366_reset_vlan); #ifdef CONFIG_RTL8366S_PHY_DEBUG_FS int rtl8366_debugfs_open(struct inode *inode, struct file *file) diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h index f9008f9fc..d27d94768 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h +++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h @@ -98,8 +98,6 @@ int rtl8366_smi_rmwr(struct rtl8366_smi *smi, u32 addr, u32 mask, u32 data); int rtl8366_set_vlan(struct rtl8366_smi *smi, int vid, u32 member, u32 untag, u32 fid); int rtl8366_reset_vlan(struct rtl8366_smi *smi); -int rtl8366_get_pvid(struct rtl8366_smi *smi, int port, int *val); -int rtl8366_set_pvid(struct rtl8366_smi *smi, unsigned port, unsigned vid); #ifdef CONFIG_RTL8366S_PHY_DEBUG_FS int rtl8366_debugfs_open(struct inode *inode, struct file *file); |