Page MenuHomeFreeBSD

D54884.diff
No OneTemporary

D54884.diff

diff --git a/sys/dev/qlnx/qlnxe/qlnx_def.h b/sys/dev/qlnx/qlnxe/qlnx_def.h
--- a/sys/dev/qlnx/qlnxe/qlnx_def.h
+++ b/sys/dev/qlnx/qlnxe/qlnx_def.h
@@ -683,7 +683,6 @@
int hwfn_index);
extern int qlnx_idle_chk(qlnx_host_t *ha, uint32_t *num_dumped_dwords,
int hwfn_index);
-extern uint8_t *qlnx_get_mac_addr(qlnx_host_t *ha);
extern void qlnx_fill_link(qlnx_host_t *ha, struct ecore_hwfn *hwfn,
struct qlnx_link_output *if_link);
extern int qlnx_set_lldp_tlvx(qlnx_host_t *ha, qlnx_lldp_sys_tlvs_t *lldp_tlvs);
diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -101,6 +101,7 @@
static int qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp,
struct mbuf **m_headp);
static int qlnx_get_ifq_snd_maxlen(qlnx_host_t *ha);
+static void qlnx_get_mac_addr(qlnx_host_t *ha);
static uint32_t qlnx_get_optics(qlnx_host_t *ha,
struct qlnx_link_output *if_link);
static int qlnx_transmit(if_t ifp, struct mbuf *mp);
@@ -2322,7 +2323,7 @@
ha->max_frame_size = if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN;
- memcpy(ha->primary_mac, qlnx_get_mac_addr(ha), ETH_ALEN);
+ qlnx_get_mac_addr(ha);
if (!ha->primary_mac[0] && !ha->primary_mac[1] &&
!ha->primary_mac[2] && !ha->primary_mac[3] &&
@@ -3772,7 +3773,7 @@
return(TX_RING_SIZE - 1);
}
-uint8_t *
+static void
qlnx_get_mac_addr(qlnx_host_t *ha)
{
struct ecore_hwfn *p_hwfn;
@@ -3781,8 +3782,10 @@
p_hwfn = &ha->cdev.hwfns[0];
- if (qlnx_vf_device(ha) != 0)
- return (p_hwfn->hw_info.hw_mac_addr);
+ if (qlnx_vf_device(ha) != 0) {
+ memcpy(ha->primary_mac, p_hwfn->hw_info.hw_mac_addr, ETH_ALEN);
+ return;
+ }
ecore_vf_read_bulletin(p_hwfn, &p_is_forced);
if (ecore_vf_bulletin_get_forced_mac(p_hwfn, mac, &p_is_forced) ==
@@ -3792,8 +3795,6 @@
p_is_forced, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
memcpy(ha->primary_mac, mac, ETH_ALEN);
}
-
- return (ha->primary_mac);
}
static uint32_t

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 20, 9:22 AM (8 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31830067
Default Alt Text
D54884.diff (2 KB)

Event Timeline