rtl8366_obtain_mc(9)
π¦ rtl8366_obtain_mc(9) π¦
okay so bestie, welcome to the rtl8366_obtain_mc(9) page β yes that's the whole manual name, we're in the Kernel API Manual today and honestly? iconic behavior. this is the function that either finds you a VLAN member config or makes you a fresh one, no cap. let's get into it π
β¨ NAME β¨
rtl8366_obtain_mc β retrieve or allocate a VLAN member configuration π
like, retrieve it if it exists, allocate it if it doesn't. she does both. main character energy fr fr.
πΈ SYNOPSIS πΈ
int rtl8366_obtain_mc (struct realtek_priv *priv , int vid , struct
rtl8366_vlan_mc *vlanmc );
that's the whole vibe check right there. returns an int, takes three args. copy it exactly, don't @ me π
π ARGUMENTS π
privβ the Realtek SMI device instance. this is your device bestie, the whole actual hardware situation you're talking to π«Άvidβ the VLAN ID to look up or allocate. so like, which VLAN are we talking about here, that one β¨vlanmcβ the pointer will be assigned to a pointer to a valid member config if successful. yes that's a pointer to a pointer, it's giving inception but it's fine, she's valid π
π₯ RETURN π₯
index of a new member config or negative error number π
so if it's >= 0 you got yourself an index and you're thriving. if it's negative, something went sideways, go check your error handling babes.
π§ SEE ALSO π§
Kernel file ./drivers/net/dsa/realtek/rtl8366-core.c β that's where the source lives, go read it, it's lowkey fascinating π
ngl bestie, the member config pointer only gets assigned if successful β so don't go dereferencing vlanmc before you've checked that return value, that's the whole plot twist π
and that's the page!! mwah π
source & version vibes: ./drivers/net/dsa/realtek β dated October 2026, so she's fresh, she's current, she's slay β
π¦ 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