Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a7f0c7f authored by Yi Zou's avatar Yi Zou Committed by James Bottomley
Browse files

[SCSI] fcoe: Fix validation of mac address when checking for spma support



Fix this bug of validating the wrong mac address while checking for SAN MAC
address support from LLD as we should check ha->addr not ctlr.ctl_src_addr.

Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 3c0d1d94
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -329,7 +329,7 @@ static int fcoe_netdev_config(struct fc_lport *lp, struct net_device *netdev)
	rcu_read_lock();
	for_each_dev_addr(netdev, ha) {
		if ((ha->type == NETDEV_HW_ADDR_T_SAN) &&
		    (is_valid_ether_addr(fc->ctlr.ctl_src_addr))) {
		    (is_valid_ether_addr(ha->addr))) {
			memcpy(fc->ctlr.ctl_src_addr, ha->addr, ETH_ALEN);
			fc->ctlr.spma = 1;
			break;