STRUCT F_EEM_OPTS(9)
π struct f_eem_opts(9) π
okay so welcome to the Kernel API Manual, bestie β we're doing EEM function options today and honestly? it's giving "small struct, big responsibilities." let's get into it π«Ά
β¨ NAME β¨
struct f_eem_opts β the EEM function options. that's the whole name, that's the whole vibe. no cap. π
π SYNOPSIS π
struct f_eem_opts {
struct usb_function_instance func_inst;
struct net_device *net;
bool bound;
int bind_count;
struct mutex lock;
int refcnt;
};
six members, one struct, zero skips. we're listing every single one, periodt. πΈ
π Members π
okay so here's the cast of characters β main character energy only:
func_instβ the USB function instance. literally the whole point of the thing, it's astruct usb_function_instance. iconic. β¨netβ thestruct net_devicethat's associated with the EEM function. it's a pointer, so y'know, handle it like one πboundβ abool. it'sTrueif thenet_deviceis shared and already pre-registered during the legacy composite driver's bind phase (thinkmulti.c, iykyk). if it'sfalse, then no stress β the EEM function will register thenet_deviceitself during its own bind phase. two paths, one truth πbind_countβ anintthat tracks how many configurations the EEM function is bound to. its whole job is preventing double-registration of the net device. not me being the group chat's responsible friend ππ₯lockβ astruct mutexprotecting the data from concurrent access by configfsread/writeandcreatesymlink/removesymlink operations. it's the bouncer at the door fr fr π«Άrefcntβ the reference counter for the function instance. it's anint. don't lose track of it, bestie π
π¦ SEE ALSO π¦
- Kernel file
./drivers/usb/gadget/function/u_eem.hβ go read the header, it slays π
ok that's the whole page, no notes. every field accounted for, every doc line intact, we ate and left absolutely no crumbs π§ββοΈ
sign-off szn: this little beauty lives in ./drivers/usb/gadget/function and the manual's dated October 2026 β see you in the future, 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