mac_link_down(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to mac_link_down(9) from the Kernel API Manual β€” this is the little notification function that tells your MAC "hey girl, the link went down" πŸ“‰πŸ’” and honestly? she's short, she's sweet, she's iconic.


✨ NAME ✨

mac_link_down β€” notification that the link has gone down 🌧️


πŸ¦‹ SYNOPSIS πŸ¦‹

void mac_link_down (struct phylink_config *config , unsigned int mode ,
phy_interface_t interface );

like… that's the whole call. no cap, that's it πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • config β€” a pointer to a struct phylink_config. just a lil pointer, minding her business 🫢
  • mode β€” link autonegotiation mode. this one matters later, trust πŸ”₯
  • interface β€” link typedef phy_interface_t mode. yes the original says "typedef" and "mode", we're not editing the queen's words πŸ’€

🌸 DESCRIPTION 🌸

So the whole vibe: this function notifies the MAC that the link has gone down 😭🌧️

⚠️ Big caveat bestie β€” this will not be called unless mac_link_up has been previously called. so if mac_link_up never ran, don't expect this one to show up. it's giving "you can't break up if you never dated" πŸ’€

The MAC should stop processing packets for transmission and reception. both. at the same time. no half measures, periodt βœ‹

And here's the part where you gotta not do too much: phylink will have called netif_carrier_off to notify the networking stack that the link has gone down β€” so MAC drivers should not make this call themselves. like, stay in your lane, the phylink girlies already handled it πŸ’…βœ¨

One more thing, and this is important: if mode is MLO_AN_INBAND, then this function must not prevent the link coming up. do not sabotage the comeback. the link is allowed to rise again like a phoenix πŸ¦‹πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/phylink.h β€” and the whole extended friend group:


and that's the page, bestie 🌈✨ this lil icon lives in the kernel file ./include/linux, stamped October 2026 β€” so go forth, notify that MAC, and remember: <pink>don't call netif_carrier_off yourself, phylink already ate πŸ’–</pink> πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from