802.11 mode bits are now masks; convert to suit

This commit is contained in:
sam 2004-01-15 15:19:19 +00:00
parent 50d3eaced7
commit 10ba1b2264

View File

@ -325,7 +325,7 @@ setmediamode(const char *val, int d, int s, const struct afswtch *afp)
free(mwords);
strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
ifr.ifr_media = (ifmr.ifm_current & ~IFM_MMASK) | IFM_MAKEMODE(mode);
ifr.ifr_media = (ifmr.ifm_current & ~IFM_MMASK) | mode;
if (ioctl(s, SIOCSIFMEDIA, (caddr_t)&ifr) < 0)
err(1, "SIOCSIFMEDIA (mode)");