aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-01-17 21:17:49 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-01-17 21:17:49 +0000
commitf55beb9e9b7f471da0d5e0d4c93811b2cd8c5424 (patch)
tree60e120304948972604b09ca229e05c0de5770b15 /target/linux
parent7f9b0eca90f42892f1ade55df58f0c4ca47ea99a (diff)
downloadupstream-f55beb9e9b7f471da0d5e0d4c93811b2cd8c5424.tar.gz
upstream-f55beb9e9b7f471da0d5e0d4c93811b2cd8c5424.tar.bz2
upstream-f55beb9e9b7f471da0d5e0d4c93811b2cd8c5424.zip
rtl8366_smi: move memset into the rtl8366s_get_vlan_4k_entry function
SVN-Revision: 19198
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c b/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
index 557d849029..e5c65ccbc3 100644
--- a/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
+++ b/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
@@ -604,6 +604,7 @@ static int rtl8366s_get_vlan_4k_entry(struct rtl8366_smi *smi, u32 vid,
u32 data;
u16 *tableaddr;
+ memset(vlan4k, '\0', sizeof(struct rtl8366s_vlan4kentry));
vlan4k->vid = vid;
if (vid >= RTL8366_NUM_VIDS)
@@ -855,7 +856,6 @@ static int rtl8366_set_vlan_port_pvid(struct rtl8366_smi *smi, int port,
/* Updating the 4K entry; lookup it and change the port member set */
- memset(&vlan4K, '\0', sizeof(struct rtl8366s_vlan4kentry));
rtl8366s_get_vlan_4k_entry(smi, val, &vlan4K);
vlan4K.member |= ((1 << port) | RTL8366_PORT_CPU);
vlan4K.untag = RTL8366_PORT_ALL_BUT_CPU;
@@ -1367,7 +1367,6 @@ static int rtl8366_attr_get_vlan_info(struct switch_dev *dev,
memset(buf, '\0', sizeof(buf));
memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
- memset(&vlan4K, '\0', sizeof(struct rtl8366s_vlan4kentry));
rtl8366s_get_vlan_member_config(smi, val->port_vlan, &vlanMC);
rtl8366s_get_vlan_4k_entry(smi, vlanMC.vid, &vlan4K);
@@ -1494,7 +1493,6 @@ static int rtl8366_set_member(struct switch_dev *dev,
struct rtl8366s_vlan4kentry vlan4K;
struct rtl8366_smi *smi = to_rtl8366(dev);
memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
- memset(&vlan4K, '\0', sizeof(struct rtl8366s_vlan4kentry));
if (val->port_vlan >= RTL8366_NUM_VLANS)
return -EINVAL;
@@ -1518,7 +1516,6 @@ static int rtl8366_get_member(struct switch_dev *dev,
struct rtl8366s_vlan4kentry vlan4K;
struct rtl8366_smi *smi = to_rtl8366(dev);
memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
- memset(&vlan4K, '\0', sizeof(struct rtl8366s_vlan4kentry));
if (val->port_vlan >= RTL8366_NUM_VLANS)
return -EINVAL;
@@ -1540,7 +1537,6 @@ static int rtl8366_set_untag(struct switch_dev *dev,
struct rtl8366s_vlan4kentry vlan4K;
struct rtl8366_smi *smi = to_rtl8366(dev);
memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
- memset(&vlan4K, '\0', sizeof(struct rtl8366s_vlan4kentry));
if (val->port_vlan >= RTL8366_NUM_VLANS)
return -EINVAL;
@@ -1563,7 +1559,6 @@ static int rtl8366_get_untag(struct switch_dev *dev,
struct rtl8366s_vlan4kentry vlan4K;
struct rtl8366_smi *smi = to_rtl8366(dev);
memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
- memset(&vlan4K, '\0', sizeof(struct rtl8366s_vlan4kentry));
if (val->port_vlan >= RTL8366_NUM_VLANS)
return -EINVAL;