summaryrefslogtreecommitdiff
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-07-15 13:05:29 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-07-15 13:05:29 +0000
commite110321fce65b665a56d59e2673b80e09fdfe560 (patch)
tree3a271a983b9602b6e46a4ac947f92935ff313649 /target/linux/generic/files
parente561b185219b92d916cb5c9b764911d752a0573b (diff)
downloadmtk-20170518-e110321fce65b665a56d59e2673b80e09fdfe560.zip
mtk-20170518-e110321fce65b665a56d59e2673b80e09fdfe560.tar.gz
mtk-20170518-e110321fce65b665a56d59e2673b80e09fdfe560.tar.bz2
generic: rtl8366: make rtl8366_{g,s}et_pvid static
SVN-Revision: 22198
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366_smi.c83
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366_smi.h2
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 b1f4556..a596c31 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 f9008f9..d27d947 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);