rtl8366_smi: fix parameter checking in rtl8366_attr_get_vlan_info
authorGabor Juhos <juhosg@openwrt.org>
Wed, 20 Jan 2010 09:30:25 +0000 (09:30 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Wed, 20 Jan 2010 09:30:25 +0000 (09:30 +0000)
SVN-Revision: 19241

target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c

index 6c807bc020f545d68aa9f9fa5e2053e8865d3efc..46069067e782a10055121e6f1c1c2aa3087edd64 100644 (file)
@@ -1359,7 +1359,7 @@ static int rtl8366_attr_get_vlan_info(struct switch_dev *dev,
        struct rtl8366_smi *smi = sw_to_rtl8366(dev);
        char *buf = smi->buf;
 
-       if (val->port_vlan >= RTL8366_NUM_PORTS)
+       if (val->port_vlan >= RTL8366_NUM_VLANS)
                return -EINVAL;
 
        memset(buf, '\0', sizeof(smi->buf));