Skip to content

Commit

Permalink
net: rocker: Use ether_addr_equal
Browse files Browse the repository at this point in the history
A small cleanup to make use of the ether_addr_equal helper.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Simon Horman authored and David S. Miller committed May 2, 2015
1 parent 36c8296 commit 629161f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/rocker/rocker.c
Original file line number Diff line number Diff line change
Expand Up @@ -2500,7 +2500,7 @@ static int rocker_flow_tbl_bridge(struct rocker_port *rocker_port,
if (eth_dst_mask) {
entry->key.bridge.has_eth_dst_mask = 1;
ether_addr_copy(entry->key.bridge.eth_dst_mask, eth_dst_mask);
if (memcmp(eth_dst_mask, ff_mac, ETH_ALEN))
if (!ether_addr_equal(eth_dst_mask, ff_mac))
wild = true;
}

Expand Down Expand Up @@ -2573,7 +2573,7 @@ static int rocker_flow_tbl_acl(struct rocker_port *rocker_port,

priority = ROCKER_PRIORITY_ACL_NORMAL;
if (eth_dst && eth_dst_mask) {
if (memcmp(eth_dst_mask, mcast_mac, ETH_ALEN) == 0)
if (ether_addr_equal(eth_dst_mask, mcast_mac))
priority = ROCKER_PRIORITY_ACL_DFLT;
else if (is_link_local_ether_addr(eth_dst))
priority = ROCKER_PRIORITY_ACL_CTRL;
Expand Down

0 comments on commit 629161f

Please sign in to comment.