Change Details
| target/linux/generic/files/drivers/net/phy/rtl8366rb.c |
| 554 | 554 | |
| 555 | 555 | static int rtl8366rb_is_vlan_valid(struct rtl8366_smi *smi, unsigned vlan) |
| 556 | 556 | { |
| 557 | | if (vlan == 0 || vlan >= RTL8366RB_NUM_VLANS) |
| 557 | unsigned max = RTL8366RB_NUM_VLANS; |
| 558 | |
| 559 | if (smi->vlan4k_enabled) |
| 560 | max = RTL8366RB_NUM_VIDS - 1; |
| 561 | |
| 562 | if (vlan == 0 || vlan >= max) |
| 558 | 563 | return 0; |
| 559 | 564 | |
| 560 | 565 | return 1; |
| ... | ... | |
| 882 | 887 | dev->name = "RTL8366RB"; |
| 883 | 888 | dev->cpu_port = RTL8366RB_PORT_NUM_CPU; |
| 884 | 889 | dev->ports = RTL8366RB_NUM_PORTS; |
| 885 | | dev->vlans = RTL8366RB_NUM_VLANS; |
| 890 | dev->vlans = RTL8366RB_NUM_VIDS; |
| 886 | 891 | dev->ops = &rtl8366_ops; |
| 887 | 892 | dev->devname = dev_name(smi->parent); |
| 888 | 893 | |
| target/linux/generic/files/drivers/net/phy/rtl8366s.c |
| 593 | 593 | |
| 594 | 594 | static int rtl8366s_is_vlan_valid(struct rtl8366_smi *smi, unsigned vlan) |
| 595 | 595 | { |
| 596 | | if (vlan == 0 || vlan >= RTL8366S_NUM_VLANS) |
| 596 | unsigned max = RTL8366S_NUM_VLANS; |
| 597 | |
| 598 | if (smi->vlan4k_enabled) |
| 599 | max = RTL8366S_NUM_VIDS - 1; |
| 600 | |
| 601 | if (vlan == 0 || vlan >= max) |
| 597 | 602 | return 0; |
| 598 | 603 | |
| 599 | 604 | return 1; |
| ... | ... | |
| 909 | 914 | dev->name = "RTL8366S"; |
| 910 | 915 | dev->cpu_port = RTL8366S_PORT_NUM_CPU; |
| 911 | 916 | dev->ports = RTL8366S_NUM_PORTS; |
| 912 | | dev->vlans = RTL8366S_NUM_VLANS; |
| 917 | dev->vlans = RTL8366S_NUM_VIDS; |
| 913 | 918 | dev->ops = &rtl8366_ops; |
| 914 | 919 | dev->devname = dev_name(smi->parent); |
| 915 | 920 | |
Download the corresponding diff file