diff options
Diffstat (limited to 'drivers/net/tc35815.c')
-rw-r--r-- | drivers/net/tc35815.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 033408f589fb..d838d4015c63 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -1941,18 +1941,18 @@ tc35815_set_multicast_list(struct net_device *dev) | |||
1941 | /* Enable promiscuous mode */ | 1941 | /* Enable promiscuous mode */ |
1942 | tc_writel(CAM_CompEn | CAM_BroadAcc | CAM_GroupAcc | CAM_StationAcc, &tr->CAM_Ctl); | 1942 | tc_writel(CAM_CompEn | CAM_BroadAcc | CAM_GroupAcc | CAM_StationAcc, &tr->CAM_Ctl); |
1943 | } else if ((dev->flags & IFF_ALLMULTI) || | 1943 | } else if ((dev->flags & IFF_ALLMULTI) || |
1944 | dev->mc_count > CAM_ENTRY_MAX - 3) { | 1944 | netdev_mc_count(dev) > CAM_ENTRY_MAX - 3) { |
1945 | /* CAM 0, 1, 20 are reserved. */ | 1945 | /* CAM 0, 1, 20 are reserved. */ |
1946 | /* Disable promiscuous mode, use normal mode. */ | 1946 | /* Disable promiscuous mode, use normal mode. */ |
1947 | tc_writel(CAM_CompEn | CAM_BroadAcc | CAM_GroupAcc, &tr->CAM_Ctl); | 1947 | tc_writel(CAM_CompEn | CAM_BroadAcc | CAM_GroupAcc, &tr->CAM_Ctl); |
1948 | } else if (dev->mc_count) { | 1948 | } else if (!netdev_mc_empty(dev)) { |
1949 | struct dev_mc_list *cur_addr = dev->mc_list; | 1949 | struct dev_mc_list *cur_addr = dev->mc_list; |
1950 | int i; | 1950 | int i; |
1951 | int ena_bits = CAM_Ena_Bit(CAM_ENTRY_SOURCE); | 1951 | int ena_bits = CAM_Ena_Bit(CAM_ENTRY_SOURCE); |
1952 | 1952 | ||
1953 | tc_writel(0, &tr->CAM_Ctl); | 1953 | tc_writel(0, &tr->CAM_Ctl); |
1954 | /* Walk the address list, and load the filter */ | 1954 | /* Walk the address list, and load the filter */ |
1955 | for (i = 0; i < dev->mc_count; i++, cur_addr = cur_addr->next) { | 1955 | for (i = 0; i < netdev_mc_count(dev); i++, cur_addr = cur_addr->next) { |
1956 | if (!cur_addr) | 1956 | if (!cur_addr) |
1957 | break; | 1957 | break; |
1958 | /* entry 0,1 is reserved. */ | 1958 | /* entry 0,1 is reserved. */ |