Commit f8d4aa29 authored by Tobias Klauser's avatar Tobias Klauser Committed by David S. Miller

net: vxge: Use is_multicast_ether_addr helper

Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d8ce2fc1
...@@ -684,8 +684,7 @@ static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac) ...@@ -684,8 +684,7 @@ static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac)
new_mac_entry->state = mac->state; new_mac_entry->state = mac->state;
vpath->mac_addr_cnt++; vpath->mac_addr_cnt++;
/* Is this a multicast address */ if (is_multicast_ether_addr(mac->macaddr))
if (0x01 & mac->macaddr[0])
vpath->mcast_addr_cnt++; vpath->mcast_addr_cnt++;
return TRUE; return TRUE;
...@@ -699,7 +698,7 @@ vxge_add_mac_addr(struct vxgedev *vdev, struct macInfo *mac) ...@@ -699,7 +698,7 @@ vxge_add_mac_addr(struct vxgedev *vdev, struct macInfo *mac)
struct vxge_vpath *vpath; struct vxge_vpath *vpath;
enum vxge_hw_vpath_mac_addr_add_mode duplicate_mode; enum vxge_hw_vpath_mac_addr_add_mode duplicate_mode;
if (0x01 & mac->macaddr[0]) /* multicast address */ if (is_multicast_ether_addr(mac->macaddr))
duplicate_mode = VXGE_HW_VPATH_MAC_ADDR_ADD_DUPLICATE; duplicate_mode = VXGE_HW_VPATH_MAC_ADDR_ADD_DUPLICATE;
else else
duplicate_mode = VXGE_HW_VPATH_MAC_ADDR_REPLACE_DUPLICATE; 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,8 +1077,7 @@ static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
kfree((struct vxge_mac_addrs *)entry); kfree((struct vxge_mac_addrs *)entry);
vpath->mac_addr_cnt--; vpath->mac_addr_cnt--;
/* Is this a multicast address */ if (is_multicast_ether_addr(mac->macaddr))
if (0x01 & mac->macaddr[0])
vpath->mcast_addr_cnt--; vpath->mcast_addr_cnt--;
return TRUE; return TRUE;
} }
...@@ -1201,8 +1199,7 @@ static void vxge_set_multicast(struct net_device *dev) ...@@ -1201,8 +1199,7 @@ static void vxge_set_multicast(struct net_device *dev)
mac_address = (u8 *)&mac_entry->macaddr; mac_address = (u8 *)&mac_entry->macaddr;
memcpy(mac_info.macaddr, mac_address, ETH_ALEN); memcpy(mac_info.macaddr, mac_address, ETH_ALEN);
/* Is this a multicast address */ if (is_multicast_ether_addr(mac_info.macaddr)) {
if (0x01 & mac_info.macaddr[0]) {
for (vpath_idx = 0; vpath_idx < for (vpath_idx = 0; vpath_idx <
vdev->no_of_vpath; vdev->no_of_vpath;
vpath_idx++) { vpath_idx++) {
...@@ -1244,8 +1241,7 @@ static void vxge_set_multicast(struct net_device *dev) ...@@ -1244,8 +1241,7 @@ static void vxge_set_multicast(struct net_device *dev)
mac_address = (u8 *)&mac_entry->macaddr; mac_address = (u8 *)&mac_entry->macaddr;
memcpy(mac_info.macaddr, mac_address, ETH_ALEN); memcpy(mac_info.macaddr, mac_address, ETH_ALEN);
/* Is this a multicast address */ if (is_multicast_ether_addr(mac_info.macaddr))
if (0x01 & mac_info.macaddr[0])
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment