aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c3
-rw-r--r--drivers/scsi/fcoe/fcoe.c2
-rw-r--r--drivers/scsi/fcoe/fcoe_ctlr.c22
-rw-r--r--drivers/scsi/fcoe/fcoe_sysfs.c2
-rw-r--r--drivers/scsi/fnic/fnic_fcs.c6
5 files changed, 17 insertions, 18 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 27f2cc4b97a5..23f6eea3fa7a 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -542,8 +542,7 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
542 vn_port = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); 542 vn_port = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id));
543 if (vn_port) { 543 if (vn_port) {
544 port = lport_priv(vn_port); 544 port = lport_priv(vn_port);
545 if (compare_ether_addr(port->data_src_addr, dest_mac) 545 if (!ether_addr_equal(port->data_src_addr, dest_mac)) {
546 != 0) {
547 BNX2FC_HBA_DBG(lport, "fpma mismatch\n"); 546 BNX2FC_HBA_DBG(lport, "fpma mismatch\n");
548 put_cpu(); 547 put_cpu();
549 kfree_skb(skb); 548 kfree_skb(skb);
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 8626988e12a5..f3170008ae71 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1462,7 +1462,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
1462 eh = eth_hdr(skb); 1462 eh = eth_hdr(skb);
1463 1463
1464 if (is_fip_mode(ctlr) && 1464 if (is_fip_mode(ctlr) &&
1465 compare_ether_addr(eh->h_source, ctlr->dest_addr)) { 1465 !ether_addr_equal(eh->h_source, ctlr->dest_addr)) {
1466 FCOE_NETDEV_DBG(netdev, "wrong source mac address:%pM\n", 1466 FCOE_NETDEV_DBG(netdev, "wrong source mac address:%pM\n",
1467 eh->h_source); 1467 eh->h_source);
1468 goto err; 1468 goto err;
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index 2aba32f12f13..34a1b1f333b4 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -339,7 +339,7 @@ static void fcoe_ctlr_announce(struct fcoe_ctlr *fip)
339 spin_unlock_bh(&fip->ctlr_lock); 339 spin_unlock_bh(&fip->ctlr_lock);
340 sel = fip->sel_fcf; 340 sel = fip->sel_fcf;
341 341
342 if (sel && !compare_ether_addr(sel->fcf_mac, fip->dest_addr)) 342 if (sel && ether_addr_equal(sel->fcf_mac, fip->dest_addr))
343 goto unlock; 343 goto unlock;
344 if (!is_zero_ether_addr(fip->dest_addr)) { 344 if (!is_zero_ether_addr(fip->dest_addr)) {
345 printk(KERN_NOTICE "libfcoe: host%d: " 345 printk(KERN_NOTICE "libfcoe: host%d: "
@@ -1039,7 +1039,7 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb)
1039 if (fcf->switch_name == new.switch_name && 1039 if (fcf->switch_name == new.switch_name &&
1040 fcf->fabric_name == new.fabric_name && 1040 fcf->fabric_name == new.fabric_name &&
1041 fcf->fc_map == new.fc_map && 1041 fcf->fc_map == new.fc_map &&
1042 compare_ether_addr(fcf->fcf_mac, new.fcf_mac) == 0) { 1042 ether_addr_equal(fcf->fcf_mac, new.fcf_mac)) {
1043 found = 1; 1043 found = 1;
1044 break; 1044 break;
1045 } 1045 }
@@ -1379,7 +1379,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,
1379 mp = (struct fip_mac_desc *)desc; 1379 mp = (struct fip_mac_desc *)desc;
1380 if (dlen < sizeof(*mp)) 1380 if (dlen < sizeof(*mp))
1381 goto err; 1381 goto err;
1382 if (compare_ether_addr(mp->fd_mac, fcf->fcf_mac)) 1382 if (!ether_addr_equal(mp->fd_mac, fcf->fcf_mac))
1383 goto err; 1383 goto err;
1384 desc_mask &= ~BIT(FIP_DT_MAC); 1384 desc_mask &= ~BIT(FIP_DT_MAC);
1385 break; 1385 break;
@@ -1457,8 +1457,8 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,
1457 * 'port_id' is already validated, check MAC address and 1457 * 'port_id' is already validated, check MAC address and
1458 * wwpn 1458 * wwpn
1459 */ 1459 */
1460 if (compare_ether_addr(fip->get_src_addr(vn_port), 1460 if (!ether_addr_equal(fip->get_src_addr(vn_port),
1461 vp->fd_mac) != 0 || 1461 vp->fd_mac) ||
1462 get_unaligned_be64(&vp->fd_wwpn) != 1462 get_unaligned_be64(&vp->fd_wwpn) !=
1463 vn_port->wwpn) 1463 vn_port->wwpn)
1464 continue; 1464 continue;
@@ -1521,12 +1521,12 @@ static int fcoe_ctlr_recv_handler(struct fcoe_ctlr *fip, struct sk_buff *skb)
1521 goto drop; 1521 goto drop;
1522 eh = eth_hdr(skb); 1522 eh = eth_hdr(skb);
1523 if (fip->mode == FIP_MODE_VN2VN) { 1523 if (fip->mode == FIP_MODE_VN2VN) {
1524 if (compare_ether_addr(eh->h_dest, fip->ctl_src_addr) && 1524 if (!ether_addr_equal(eh->h_dest, fip->ctl_src_addr) &&
1525 compare_ether_addr(eh->h_dest, fcoe_all_vn2vn) && 1525 !ether_addr_equal(eh->h_dest, fcoe_all_vn2vn) &&
1526 compare_ether_addr(eh->h_dest, fcoe_all_p2p)) 1526 !ether_addr_equal(eh->h_dest, fcoe_all_p2p))
1527 goto drop; 1527 goto drop;
1528 } else if (compare_ether_addr(eh->h_dest, fip->ctl_src_addr) && 1528 } else if (!ether_addr_equal(eh->h_dest, fip->ctl_src_addr) &&
1529 compare_ether_addr(eh->h_dest, fcoe_all_enode)) 1529 !ether_addr_equal(eh->h_dest, fcoe_all_enode))
1530 goto drop; 1530 goto drop;
1531 fiph = (struct fip_header *)skb->data; 1531 fiph = (struct fip_header *)skb->data;
1532 op = ntohs(fiph->fip_op); 1532 op = ntohs(fiph->fip_op);
@@ -1898,7 +1898,7 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_lport *lport,
1898 * address_mode flag to use FC_OUI-based Ethernet DA. 1898 * address_mode flag to use FC_OUI-based Ethernet DA.
1899 * Otherwise we use the FCoE gateway addr 1899 * Otherwise we use the FCoE gateway addr
1900 */ 1900 */
1901 if (!compare_ether_addr(sa, (u8[6])FC_FCOE_FLOGI_MAC)) { 1901 if (ether_addr_equal(sa, (u8[6])FC_FCOE_FLOGI_MAC)) {
1902 fcoe_ctlr_map_dest(fip); 1902 fcoe_ctlr_map_dest(fip);
1903 } else { 1903 } else {
1904 memcpy(fip->dest_addr, sa, ETH_ALEN); 1904 memcpy(fip->dest_addr, sa, ETH_ALEN);
diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c
index 922c9deeb243..d0d9a2d6120f 100644
--- a/drivers/scsi/fcoe/fcoe_sysfs.c
+++ b/drivers/scsi/fcoe/fcoe_sysfs.c
@@ -653,7 +653,7 @@ static int fcoe_fcf_device_match(struct fcoe_fcf_device *new,
653 if (new->switch_name == old->switch_name && 653 if (new->switch_name == old->switch_name &&
654 new->fabric_name == old->fabric_name && 654 new->fabric_name == old->fabric_name &&
655 new->fc_map == old->fc_map && 655 new->fc_map == old->fc_map &&
656 compare_ether_addr(new->mac, old->mac) == 0) 656 ether_addr_equal(new->mac, old->mac))
657 return 1; 657 return 1;
658 return 0; 658 return 0;
659} 659}
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index 006fa92a02df..902520c65387 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -651,13 +651,13 @@ void fnic_update_mac_locked(struct fnic *fnic, u8 *new)
651 651
652 if (is_zero_ether_addr(new)) 652 if (is_zero_ether_addr(new))
653 new = ctl; 653 new = ctl;
654 if (!compare_ether_addr(data, new)) 654 if (ether_addr_equal(data, new))
655 return; 655 return;
656 FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, "update_mac %pM\n", new); 656 FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, "update_mac %pM\n", new);
657 if (!is_zero_ether_addr(data) && compare_ether_addr(data, ctl)) 657 if (!is_zero_ether_addr(data) && !ether_addr_equal(data, ctl))
658 vnic_dev_del_addr(fnic->vdev, data); 658 vnic_dev_del_addr(fnic->vdev, data);
659 memcpy(data, new, ETH_ALEN); 659 memcpy(data, new, ETH_ALEN);
660 if (compare_ether_addr(new, ctl)) 660 if (!ether_addr_equal(new, ctl))
661 vnic_dev_add_addr(fnic->vdev, new); 661 vnic_dev_add_addr(fnic->vdev, new);
662} 662}
663 663