Avoid trying to set the media to Ethernet for WLAN devices.

It didn't really harm, but would always try to find a corresponding
media, fail and print an error.
This commit is contained in:
Michael Lotz 2013-03-29 23:45:59 +01:00
parent 15aa771390
commit 18004d3ac0
1 changed files with 4 additions and 4 deletions

View File

@ -53,11 +53,11 @@ compat_open(const char *name, uint32 flags, void **cookie)
if (!HAIKU_DRIVER_REQUIRES(FBSD_WLAN)) {
ifp->if_flags &= ~IFF_UP;
ifp->if_ioctl(ifp, SIOCSIFFLAGS, NULL);
}
memset(&ifr, 0, sizeof(ifr));
ifr.ifr_media = IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0);
ifp->if_ioctl(ifp, SIOCSIFMEDIA, (caddr_t)&ifr);
memset(&ifr, 0, sizeof(ifr));
ifr.ifr_media = IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0);
ifp->if_ioctl(ifp, SIOCSIFMEDIA, (caddr_t)&ifr);
}
ifp->if_flags |= IFF_UP;
ifp->if_ioctl(ifp, SIOCSIFFLAGS, NULL);