u32 data;
u16 *tableaddr;
+ memset(vlanmconf, '\0', sizeof(struct rtl8366s_vlanconfig));
+
if (index >= RTL8366_NUM_VLANS)
return -EINVAL;
int index;
struct rtl8366s_vlanconfig vlanMC;
- memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
-
err = rtl8366_get_port_vlan_index(smi, port, &index);
if (err)
return err;
/* For the 16 entries more work needs to be done. First see if such
VID is already there and change it */
for (i = 0; i < RTL8366_NUM_VLANS; ++i) {
- memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
rtl8366s_get_vlan_member_config(smi, i, &vlanMC);
/* Try to find an existing vid and update port member set */
/* PVID could not be found from vlan table. Replace unused (one that
has no member ports) with new one */
for (i = 0; i < RTL8366_NUM_VLANS; ++i) {
- memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
rtl8366s_get_vlan_member_config(smi, i, &vlanMC);
/* See if this vlan member configuration is unused. It is
for (i = 0; i < RTL8366_NUM_VLANS; ++i) {
struct rtl8366s_vlanconfig vlanMC;
- memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
+
rtl8366s_get_vlan_member_config(smi, i, &vlanMC);
len += snprintf(buf + len, sizeof(buf) - len,
return -EINVAL;
memset(buf, '\0', sizeof(buf));
- memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
rtl8366s_get_vlan_member_config(smi, val->port_vlan, &vlanMC);
rtl8366s_get_vlan_4k_entry(smi, vlanMC.vid, &vlan4K);
struct rtl8366s_vlanconfig vlanMC;
struct rtl8366s_vlan4kentry vlan4K;
struct rtl8366_smi *smi = to_rtl8366(dev);
- memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
if (val->port_vlan >= RTL8366_NUM_VLANS)
return -EINVAL;
struct rtl8366s_vlanconfig vlanMC;
struct rtl8366s_vlan4kentry vlan4K;
struct rtl8366_smi *smi = to_rtl8366(dev);
- memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
if (val->port_vlan >= RTL8366_NUM_VLANS)
return -EINVAL;
struct rtl8366s_vlanconfig vlanMC;
struct rtl8366s_vlan4kentry vlan4K;
struct rtl8366_smi *smi = to_rtl8366(dev);
- memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
if (val->port_vlan >= RTL8366_NUM_VLANS)
return -EINVAL;
struct rtl8366s_vlanconfig vlanMC;
struct rtl8366s_vlan4kentry vlan4K;
struct rtl8366_smi *smi = to_rtl8366(dev);
- memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig));
if (val->port_vlan >= RTL8366_NUM_VLANS)
return -EINVAL;