When setting a media with no sub-type specified also reset the type

specific options along with the global ones so these options don't
stick when f.e. switching to IFM_AUTO.

MFC after:	2 weeks
This commit is contained in:
marius 2010-11-13 22:40:37 +00:00
parent 554a219f6e
commit 6011bea49b

View File

@ -276,7 +276,7 @@ setmedia(const char *val, int d, int s, const struct afswtch *afp)
IFM_TYPE(ifmr->ifm_ulist[0]) | subtype;
if ((ifr.ifr_media & IFM_TMASK) == 0) {
ifr.ifr_media &= ~IFM_GMASK;
ifr.ifr_media &= ~(IFM_GMASK | IFM_OMASK);
}
ifmr->ifm_current = ifr.ifr_media;