aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-04-01 17:22:09 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-03 17:22:11 -0400
commita748ee2426817a95b1f03012d8f339c45c722ae1 (patch)
tree37cb9f8836f05bd49b86eb52ddeff3e98185cc58 /net/8021q
parent9fc4178b149ae8b0a2fbf83f2f4df3cf8789177b (diff)
net: move address list functions to a separate file
+little renaming of unicast functions to be smooth with multicast ones Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c4
-rw-r--r--net/8021q/vlan_dev.c14
2 files changed, 9 insertions, 9 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index c39a5f41169c..bd33f02013ec 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -356,13 +356,13 @@ static void vlan_sync_address(struct net_device *dev,
356 * the new address */ 356 * the new address */
357 if (compare_ether_addr(vlandev->dev_addr, vlan->real_dev_addr) && 357 if (compare_ether_addr(vlandev->dev_addr, vlan->real_dev_addr) &&
358 !compare_ether_addr(vlandev->dev_addr, dev->dev_addr)) 358 !compare_ether_addr(vlandev->dev_addr, dev->dev_addr))
359 dev_unicast_delete(dev, vlandev->dev_addr); 359 dev_uc_del(dev, vlandev->dev_addr);
360 360
361 /* vlan address was equal to the old address and is different from 361 /* vlan address was equal to the old address and is different from
362 * the new address */ 362 * the new address */
363 if (!compare_ether_addr(vlandev->dev_addr, vlan->real_dev_addr) && 363 if (!compare_ether_addr(vlandev->dev_addr, vlan->real_dev_addr) &&
364 compare_ether_addr(vlandev->dev_addr, dev->dev_addr)) 364 compare_ether_addr(vlandev->dev_addr, dev->dev_addr))
365 dev_unicast_add(dev, vlandev->dev_addr); 365 dev_uc_add(dev, vlandev->dev_addr);
366 366
367 memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); 367 memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN);
368} 368}
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 9e83272fc5b0..7f4d247237e4 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -461,7 +461,7 @@ static int vlan_dev_open(struct net_device *dev)
461 return -ENETDOWN; 461 return -ENETDOWN;
462 462
463 if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr)) { 463 if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr)) {
464 err = dev_unicast_add(real_dev, dev->dev_addr); 464 err = dev_uc_add(real_dev, dev->dev_addr);
465 if (err < 0) 465 if (err < 0)
466 goto out; 466 goto out;
467 } 467 }
@@ -490,7 +490,7 @@ clear_allmulti:
490 dev_set_allmulti(real_dev, -1); 490 dev_set_allmulti(real_dev, -1);
491del_unicast: 491del_unicast:
492 if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr)) 492 if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr))
493 dev_unicast_delete(real_dev, dev->dev_addr); 493 dev_uc_del(real_dev, dev->dev_addr);
494out: 494out:
495 netif_carrier_off(dev); 495 netif_carrier_off(dev);
496 return err; 496 return err;
@@ -505,14 +505,14 @@ static int vlan_dev_stop(struct net_device *dev)
505 vlan_gvrp_request_leave(dev); 505 vlan_gvrp_request_leave(dev);
506 506
507 dev_mc_unsync(real_dev, dev); 507 dev_mc_unsync(real_dev, dev);
508 dev_unicast_unsync(real_dev, dev); 508 dev_uc_unsync(real_dev, dev);
509 if (dev->flags & IFF_ALLMULTI) 509 if (dev->flags & IFF_ALLMULTI)
510 dev_set_allmulti(real_dev, -1); 510 dev_set_allmulti(real_dev, -1);
511 if (dev->flags & IFF_PROMISC) 511 if (dev->flags & IFF_PROMISC)
512 dev_set_promiscuity(real_dev, -1); 512 dev_set_promiscuity(real_dev, -1);
513 513
514 if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr)) 514 if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr))
515 dev_unicast_delete(real_dev, dev->dev_addr); 515 dev_uc_del(real_dev, dev->dev_addr);
516 516
517 netif_carrier_off(dev); 517 netif_carrier_off(dev);
518 return 0; 518 return 0;
@@ -531,13 +531,13 @@ static int vlan_dev_set_mac_address(struct net_device *dev, void *p)
531 goto out; 531 goto out;
532 532
533 if (compare_ether_addr(addr->sa_data, real_dev->dev_addr)) { 533 if (compare_ether_addr(addr->sa_data, real_dev->dev_addr)) {
534 err = dev_unicast_add(real_dev, addr->sa_data); 534 err = dev_uc_add(real_dev, addr->sa_data);
535 if (err < 0) 535 if (err < 0)
536 return err; 536 return err;
537 } 537 }
538 538
539 if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr)) 539 if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr))
540 dev_unicast_delete(real_dev, dev->dev_addr); 540 dev_uc_del(real_dev, dev->dev_addr);
541 541
542out: 542out:
543 memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); 543 memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
@@ -654,7 +654,7 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
654static void vlan_dev_set_rx_mode(struct net_device *vlan_dev) 654static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)
655{ 655{
656 dev_mc_sync(vlan_dev_info(vlan_dev)->real_dev, vlan_dev); 656 dev_mc_sync(vlan_dev_info(vlan_dev)->real_dev, vlan_dev);
657 dev_unicast_sync(vlan_dev_info(vlan_dev)->real_dev, vlan_dev); 657 dev_uc_sync(vlan_dev_info(vlan_dev)->real_dev, vlan_dev);
658} 658}
659 659
660/* 660/*