aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxge/vxge-main.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2011-07-03 19:58:04 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-04 23:27:30 -0400
commitf8d4aa29762fe1ae78ec3164f8f612f7b06d58ea (patch)
treee9742175124036efb1f20e178255403c28254f2b /drivers/net/vxge/vxge-main.c
parentd8ce2fc1adc38fb8c71bbf44b87a982bbee5cda0 (diff)
net: vxge: Use is_multicast_ether_addr helper
Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge/vxge-main.c')
-rw-r--r--drivers/net/vxge/vxge-main.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 1c92af392992..15d878b4547c 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -684,8 +684,7 @@ static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac)
684 new_mac_entry->state = mac->state; 684 new_mac_entry->state = mac->state;
685 vpath->mac_addr_cnt++; 685 vpath->mac_addr_cnt++;
686 686
687 /* Is this a multicast address */ 687 if (is_multicast_ether_addr(mac->macaddr))
688 if (0x01 & mac->macaddr[0])
689 vpath->mcast_addr_cnt++; 688 vpath->mcast_addr_cnt++;
690 689
691 return TRUE; 690 return TRUE;
@@ -699,7 +698,7 @@ vxge_add_mac_addr(struct vxgedev *vdev, struct macInfo *mac)
699 struct vxge_vpath *vpath; 698 struct vxge_vpath *vpath;
700 enum vxge_hw_vpath_mac_addr_add_mode duplicate_mode; 699 enum vxge_hw_vpath_mac_addr_add_mode duplicate_mode;
701 700
702 if (0x01 & mac->macaddr[0]) /* multicast address */ 701 if (is_multicast_ether_addr(mac->macaddr))
703 duplicate_mode = VXGE_HW_VPATH_MAC_ADDR_ADD_DUPLICATE; 702 duplicate_mode = VXGE_HW_VPATH_MAC_ADDR_ADD_DUPLICATE;
704 else 703 else
705 duplicate_mode = VXGE_HW_VPATH_MAC_ADDR_REPLACE_DUPLICATE; 704 duplicate_mode = VXGE_HW_VPATH_MAC_ADDR_REPLACE_DUPLICATE;
@@ -1078,8 +1077,7 @@ static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
1078 kfree((struct vxge_mac_addrs *)entry); 1077 kfree((struct vxge_mac_addrs *)entry);
1079 vpath->mac_addr_cnt--; 1078 vpath->mac_addr_cnt--;
1080 1079
1081 /* Is this a multicast address */ 1080 if (is_multicast_ether_addr(mac->macaddr))
1082 if (0x01 & mac->macaddr[0])
1083 vpath->mcast_addr_cnt--; 1081 vpath->mcast_addr_cnt--;
1084 return TRUE; 1082 return TRUE;
1085 } 1083 }
@@ -1201,8 +1199,7 @@ static void vxge_set_multicast(struct net_device *dev)
1201 mac_address = (u8 *)&mac_entry->macaddr; 1199 mac_address = (u8 *)&mac_entry->macaddr;
1202 memcpy(mac_info.macaddr, mac_address, ETH_ALEN); 1200 memcpy(mac_info.macaddr, mac_address, ETH_ALEN);
1203 1201
1204 /* Is this a multicast address */ 1202 if (is_multicast_ether_addr(mac_info.macaddr)) {
1205 if (0x01 & mac_info.macaddr[0]) {
1206 for (vpath_idx = 0; vpath_idx < 1203 for (vpath_idx = 0; vpath_idx <
1207 vdev->no_of_vpath; 1204 vdev->no_of_vpath;
1208 vpath_idx++) { 1205 vpath_idx++) {
@@ -1244,8 +1241,7 @@ _set_all_mcast:
1244 mac_address = (u8 *)&mac_entry->macaddr; 1241 mac_address = (u8 *)&mac_entry->macaddr;
1245 memcpy(mac_info.macaddr, mac_address, ETH_ALEN); 1242 memcpy(mac_info.macaddr, mac_address, ETH_ALEN);
1246 1243
1247 /* Is this a multicast address */ 1244 if (is_multicast_ether_addr(mac_info.macaddr))
1248 if (0x01 & mac_info.macaddr[0])
1249 break; 1245 break;
1250 } 1246 }
1251 1247