wwan_create_port(9)
β¨ wwan_create_port(9) β the Kernel API Manual glow-up β¨
okay so bestie, welcome to wwan_create_port(9) π this is the page for wwan_create_port from the Kernel API Manual, and honestly? it's giving "one function to bring a whole new WWAN port into existence" and we're obsessed π
πΈ NAME πΈ
wwan_create_port β Add a new WWAN port β¨
like, literally, that's the whole job. new port, who dis π
π¦ SYNOPSIS π¦
struct wwan_port * wwan_create_port (struct device *parent , enum
wwan_port_type type , const struct wwan_port_ops *ops , struct
wwan_port_caps *caps , void *drvdata );
copy that exactly, no cap π«Ά
π ARGUMENTS π
parentβ the Device to use as parent, shared by all WWAN ports πtypeβ the WWAN port type, iykyk π¦opsβ the WWAN port operations β the whole personality of the port tbh β¨capsβ the WWAN port capabilities πdrvdataβ Pointer to caller driver data, your little extra something π
π DESCRIPTION π
okay so here's the tea β this function allocates and registers a new WWAN port. the port gets automatically exposed to user as a character device (slay) and attached to the right virtual WWAN device, based on the parent pointer. the way that parent pointer works is it's the device shared by all components of a same WWAN modem β like e.g. USB dev, PCI dev, MHI controller... you get it πΈ
drvdata will be placed in the WWAN port device driver data and can be retrieved with wwan_port_get_drvdata β so like, put it in, take it out, iconic behaviour fr fr π₯
bestie, note this: this function must be balanced with a call to wwan_remove_port. what goes up must come down, main character energy demands it π
β RETURN β
a valid pointer to wwan_port on success, or PTR_ERR on failure π (yes, check it under the hood β use PTR_ERR / the usual error-pointer manners, ngl it's the move)
π§ SEE ALSO π§
- Kernel file
./include/linux/wwan.henum wwan_port_type(9) wwan_remove_port(9)wwan_port_rx(9)wwan_port_txoff(9)wwan_port_txon(9)wwan_port_get_drvdata(9)struct wwan_netdev_priv(9)struct wwan_ops(9)
go read those too, they're all part of the friend group π«Άπ
kisses bestie, that's the page π this lil manpage came from ./include/linux and is dated October 2026 β periodt ππ¦π
π¦ 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