mii_check_media(9)
πΈ mii_check_media(9) πΈ
okay bestie, so this is a page from the Kernel API Manual β yes, the kernel, like, the actual beating heart of your OS β and it's all about one lil function called mii_check_media. it's giving network-interface-glow-up-inspector and honestly? we love her. π
β¨ NAME β¨
mii_check_media β literally just checks the MII interface to see if the carrier, speed, or duplex changed. that's it. that's the whole vibe. π¦
β¨ SYNOPSIS β¨
unsigned int mii_check_media (struct mii_if_info *mii , unsigned int ok_to_print , unsigned int init_media );
β¨ ARGUMENTS β¨
miiβ the MII interface itself. the main character of this whole situation πok_to_printβ if this one's a yes, you're allowed to print the link up/down messages. it's basically the "can I say the thing out loud" permission slip fr fr π«Άinit_mediaβ if this is a yes, the duplex mode gets saved inmii. like, keeping receipts, but for duplex. πΎ
β¨ DESCRIPTION β¨
so here's the tea: this function returns 1 if the duplex mode changed, and 0 if it didn't. simple as. β¨
but wait β if the media type is forced, it always returns 0. no change, no drama, no notes. periodt. π
β¨ SEE ALSO β¨
you already know we're linking the whole friend group π β the kernel file lives at ./drivers/net/mii.c, and it's got the whole crew:
mii_ethtool_gset(9)mii_ethtool_get_link_ksettings(9)mii_ethtool_sset(9)mii_ethtool_set_link_ksettings(9)mii_check_gmii_support(9)mii_link_ok(9)mii_nway_restart(9)mii_check_link(9)generic_mii_ioctl(9)
all of them, no skips, run the full playlist. π₯
and that's the page!! π sourced from ./drivers/net, dated October 2026, and obviously it's mii_check_media(9) β kthanksbye, go check those media bestie, mwah ππ§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms