aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Peek <mp@FreeBSD.org>2024-03-13 23:53:07 +0000
committerMark Peek <mp@FreeBSD.org>2024-03-31 16:49:01 +0000
commita26e93052a3897bb55301954dff7e40547d7f291 (patch)
tree8f73ac4d77df7316824bd1bef4a3bcd57e33487a
parentf3b21c5536816eae4d8ecbbddd790419753d403a (diff)
downloadsrc-a26e93052a3897bb55301954dff7e40547d7f291.tar.gz
src-a26e93052a3897bb55301954dff7e40547d7f291.zip
hyperv/hn: Don't return error when setting media to autoselect
Setting media to autoselect would always return EOPNOTSUPP. As autoselect is the only valid media, this change now returns success instead. PR: 264253 Reported by: Prakash Shiva <prakashs0234@gmail.com> Reviewed by: Dexuan Cui <decui microsoft com>, whu Approved by: whu MFC after: 2 weeks (cherry picked from commit 63a7c4be4ad524629292eee659d6542f1c5e9c21)
-rw-r--r--sys/dev/hyperv/netvsc/if_hn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index a18f608e1aab..dc90f7b0dd22 100644
--- a/sys/dev/hyperv/netvsc/if_hn.c
+++ b/sys/dev/hyperv/netvsc/if_hn.c
@@ -1111,7 +1111,8 @@ static int
hn_ifmedia_upd(struct ifnet *ifp __unused)
{
- return EOPNOTSUPP;
+ /* Ignore since autoselect is the only defined and valid media */
+ return (0);
}
static void