netdev2adap(9)
π netdev2adap β the Kernel API Manual glow-up (section 9, bestie)
Okay so real talk, this one's a tiny little function but it's literally the glue holding your brain together when you're digging through the Chelsio driver. It's netdev2adap(9), and yes, the manual name is right there in the title because we're keeping it proper. π
β¨ NAME β¨
netdev2adap β bestie, it returns the adapter structure that's associated with a net_device. That's the whole assignment. Simple, iconic, no notes. π
πΈ SYNOPSIS πΈ
struct adapter * netdev2adap (const struct net_device *dev );
π¦ ARGUMENTS π¦
devβ the netdev. That's it, that's the argument. Hand it yournet_deviceand we're cooking. π
π DESCRIPTION π
So what does it do, you ask? It returns the struct adapter associated with a net_device. One job, does it well. No cap. β¨
π SEE ALSO π
- Kernel file
./drivers/net/ethernet/chelsio/cxgb4vf/adapter.h t4_read_reg(9),t4_write_reg(9),t4_read_reg64(9),t4_write_reg64(9)port_name(9),t4_os_set_hw_addr(9),netdev2pinfo(9),adap2pinfo(9)
Fr fr, go read the whole squad, they all hang out together. π«Ά
π§ Quick reminder: this is a kernel-level type situation, so keep thoseconstqualifiers exactly where they are. Respect theconst. π
That's the page! Sourced straight from ./drivers/net/ethernet/chelsio... and dated October 2026 β stay slaying out there, and may your adapters always be associated correctly. πππ₯
π¦ 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