Directly initialize nxge's ifaddrp pointer to ifnetp->if_addr rather

than indirecting through ifaddr_byindex, which makes things easier with
respect to virtualized network stacks.

Submitted by:	Marko Zec <zec at icir dot org>
Reviewed by:	Leonid Grossman <Leonid dot Grossman at neterion dot com>
Approved by:	re (kensmith)
This commit is contained in:
rwatson 2007-07-12 10:03:29 +00:00
parent 7d726d3c98
commit 66809d9057

View File

@ -2246,7 +2246,7 @@ void xge_initialize(device_t dev, xge_hal_channel_reopen_e option)
xge_hal_device_enable(hldev);
/* Get MAC address and update in HAL */
ifaddrp = ifaddr_byindex(ifnetp->if_index);
ifaddrp = ifnetp->if_addr;
sockaddrp = (struct sockaddr_dl *)ifaddrp->ifa_addr;
sockaddrp->sdl_type = IFT_ETHER;
sockaddrp->sdl_alen = ifnetp->if_addrlen;