Clear full-duplex when half-duplex flag is set. This actually makes
'mediaopt half-duplex' working as it should. It is now equivalent of '-mediaopt full-duplex'.
This commit is contained in:
parent
b472f371b2
commit
f7c6b0a8c6
@ -303,9 +303,13 @@ domediaopt(const char *val, int clear, int s)
|
|||||||
ifr.ifr_media = ifmr->ifm_current;
|
ifr.ifr_media = ifmr->ifm_current;
|
||||||
if (clear)
|
if (clear)
|
||||||
ifr.ifr_media &= ~options;
|
ifr.ifr_media &= ~options;
|
||||||
else
|
else {
|
||||||
|
if (options & IFM_HDX) {
|
||||||
|
ifr.ifr_media &= ~IFM_FDX;
|
||||||
|
options &= ~IFM_HDX;
|
||||||
|
}
|
||||||
ifr.ifr_media |= options;
|
ifr.ifr_media |= options;
|
||||||
|
}
|
||||||
ifmr->ifm_current = ifr.ifr_media;
|
ifmr->ifm_current = ifr.ifr_media;
|
||||||
callback_register(setifmediacallback, (void *)ifmr);
|
callback_register(setifmediacallback, (void *)ifmr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user