aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 62c0e94a916f..25d3bcd179b1 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -65,7 +65,6 @@ static void bnx2fc_recv_frame(struct sk_buff *skb);
65 65
66static void bnx2fc_start_disc(struct bnx2fc_interface *interface); 66static void bnx2fc_start_disc(struct bnx2fc_interface *interface);
67static int bnx2fc_shost_config(struct fc_lport *lport, struct device *dev); 67static int bnx2fc_shost_config(struct fc_lport *lport, struct device *dev);
68static int bnx2fc_net_config(struct fc_lport *lp);
69static int bnx2fc_lport_config(struct fc_lport *lport); 68static int bnx2fc_lport_config(struct fc_lport *lport);
70static int bnx2fc_em_config(struct fc_lport *lport); 69static int bnx2fc_em_config(struct fc_lport *lport);
71static int bnx2fc_bind_adapter_devices(struct bnx2fc_hba *hba); 70static int bnx2fc_bind_adapter_devices(struct bnx2fc_hba *hba);
@@ -737,7 +736,7 @@ void bnx2fc_get_link_state(struct bnx2fc_hba *hba)
737 clear_bit(ADAPTER_STATE_LINK_DOWN, &hba->adapter_state); 736 clear_bit(ADAPTER_STATE_LINK_DOWN, &hba->adapter_state);
738} 737}
739 738
740static int bnx2fc_net_config(struct fc_lport *lport) 739static int bnx2fc_net_config(struct fc_lport *lport, struct net_device *netdev)
741{ 740{
742 struct bnx2fc_hba *hba; 741 struct bnx2fc_hba *hba;
743 struct bnx2fc_interface *interface; 742 struct bnx2fc_interface *interface;
@@ -763,11 +762,16 @@ static int bnx2fc_net_config(struct fc_lport *lport)
763 bnx2fc_link_speed_update(lport); 762 bnx2fc_link_speed_update(lport);
764 763
765 if (!lport->vport) { 764 if (!lport->vport) {
766 wwnn = fcoe_wwn_from_mac(interface->ctlr.ctl_src_addr, 1, 0); 765 if (fcoe_get_wwn(netdev, &wwnn, NETDEV_FCOE_WWNN))
766 wwnn = fcoe_wwn_from_mac(interface->ctlr.ctl_src_addr,
767 1, 0);
767 BNX2FC_HBA_DBG(lport, "WWNN = 0x%llx\n", wwnn); 768 BNX2FC_HBA_DBG(lport, "WWNN = 0x%llx\n", wwnn);
768 fc_set_wwnn(lport, wwnn); 769 fc_set_wwnn(lport, wwnn);
769 770
770 wwpn = fcoe_wwn_from_mac(interface->ctlr.ctl_src_addr, 2, 0); 771 if (fcoe_get_wwn(netdev, &wwpn, NETDEV_FCOE_WWPN))
772 wwpn = fcoe_wwn_from_mac(interface->ctlr.ctl_src_addr,
773 2, 0);
774
771 BNX2FC_HBA_DBG(lport, "WWPN = 0x%llx\n", wwpn); 775 BNX2FC_HBA_DBG(lport, "WWPN = 0x%llx\n", wwpn);
772 fc_set_wwpn(lport, wwpn); 776 fc_set_wwpn(lport, wwpn);
773 } 777 }
@@ -1367,7 +1371,7 @@ static struct fc_lport *bnx2fc_if_create(struct bnx2fc_interface *interface,
1367 fc_set_wwpn(lport, vport->port_name); 1371 fc_set_wwpn(lport, vport->port_name);
1368 } 1372 }
1369 /* Configure netdev and networking properties of the lport */ 1373 /* Configure netdev and networking properties of the lport */
1370 rc = bnx2fc_net_config(lport); 1374 rc = bnx2fc_net_config(lport, interface->netdev);
1371 if (rc) { 1375 if (rc) {
1372 printk(KERN_ERR PFX "Error on bnx2fc_net_config\n"); 1376 printk(KERN_ERR PFX "Error on bnx2fc_net_config\n");
1373 goto lp_config_err; 1377 goto lp_config_err;