mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 13:44:55 +00:00
qlnxe: Allow MAC address override
The qlnxe driver always sets the NIC's rx mac address to the card's default MAC, ignoring any MAC address set via ifconfig. PR: 278085 MFC after: 1 week
This commit is contained in:
parent
6cb8b61efe
commit
792226e530
|
@ -7055,8 +7055,17 @@ qlnx_set_rx_mode(qlnx_host_t *ha)
|
|||
{
|
||||
int rc = 0;
|
||||
uint8_t filter;
|
||||
const struct ifnet *ifp = ha->ifp;
|
||||
struct sockaddr_dl *sdl;
|
||||
|
||||
rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, ha->primary_mac);
|
||||
if (ifp->if_type == IFT_ETHER && ifp->if_addr != NULL &&
|
||||
ifp->if_addr->ifa_addr != NULL) {
|
||||
sdl = (struct sockaddr_dl *) ifp->if_addr->ifa_addr;
|
||||
|
||||
rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, LLADDR(sdl));
|
||||
} else {
|
||||
rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, ha->primary_mac);
|
||||
}
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
|
Loading…
Reference in a new issue