wiphy_new(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 wiphy_new(9) β€” Kernel API Manual 🌸

okay so bestie, welcome to wiphy_new β€” it's giving "let there be wifi" energy, and it's from the kernel API manual, so you know it's gonna be a little iconic. πŸ’…


✨ NAME ✨

wiphy_new β€” create a new wiphy for use with cfg80211 🌈


✨ SYNOPSIS ✨

struct wiphy * wiphy_new (const struct cfg80211_ops *ops , int
sizeof_priv );

like, that's the whole vibe. one function, two args, infinite possibilities. πŸ¦‹


✨ ARGUMENTS ✨

  • ops β€” the configuration operations for this device. yup, this is where you pass in all the behaviour your device is gonna have. it's literally the personality of your wiphy. πŸŽ€
  • sizeof_priv β€” the size of the private area to allocate. so you're telling it "hey, give me this many bytes to keep my own stuff in." no cap, it does exactly that. πŸ’–

✨ DESCRIPTION ✨

so what does it actually do? it creates a brand new wiphy and associates the given operations with it β€” like, it makes the wiphy and immediately pairs it up with ops so they're basically besties from birth. 🫢

on top of that, sizeof_priv bytes are allocated for private use, so you've got your own lil corner of memory to do whatever with. it's giving "here's your room, decorate it however." ✨


✨ RETURN ✨

it returns a pointer to the new wiphy. πŸ”₯

⚠️ but listen β€” this pointer must be assigned to each netdev's ieee80211_ptr for proper operation. like, not optional, not a suggestion. if you skip that step, things are NOT gonna slay. 😭

and yeah, that's part one, bestie β€” there's more coming so don't go anywhere πŸ’œ

πŸŽ€ the header itself

  • Kernel file ./include/net/cfg80211.h β€” literally the source file every single thing on this page lives in. this is the address, bestie 🏠
  • Introduction(9) β€” the start-here energy ✨
  • Device registration(9) β€” the whole register-your-stuff saga πŸ‘‘

🌸 the band / channel / rate lore

if you wanna know what a channel is before you go making one:

  • enum ieee80211_channel_flags(9)
  • struct ieee80211_channel(9)
  • enum ieee80211_rate_flags(9)
  • enum ieee80211_bss_type(9)
  • enum ieee80211_privacy(9)
  • struct ieee80211_rate(9)

πŸ¦‹ caps, caps, and more caps

ht, vht, he, eht, uhr β€” the alphabet soup of "yes my card can do that":

πŸ’… actions and configuration β€” the big one

fair warning: this section is a whole thing. it's giving "everything you can actually make the hardware do":

πŸ“ scanning and BSS list handling

the "who's out there and what did we hear" cluster πŸ“‘:

  • Scanning and BSS list handling(9) β€” the section itself, iconic
  • struct cfg80211_ssid(9)
  • struct cfg80211_scan_info(9)
  • struct cfg80211_scan_6ghz_params(9)
  • struct cfg80211_scan_request(9)
  • struct cfg80211_match_set(9)
  • struct cfg80211_sched_scan_plan(9)
  • struct cfg80211_bss_select_adjust(9)
  • struct cfg80211_sched_scan_request(9)
  • enum cfg80211_signal_type(9)
  • struct cfg80211_inform_bss(9)
  • struct cfg80211_bss_ies(9)
  • struct cfg80211_bss(9)
  • ieee80211_bss_get_elem(9)
  • ieee80211_bss_get_ie(9)
  • struct cfg80211_auth_request(9)
  • struct cfg80211_assoc_link(9)
  • struct cfg80211_ml_reconf_req(9)
  • enum cfg80211_assoc_req_flags(9)
  • struct cfg80211_assoc_request(9)
  • struct cfg80211_deauth_request(9)
  • struct cfg80211_disassoc_request(9)
  • struct cfg80211_ibss_params(9)
  • struct cfg80211_bss_selection(9)
  • struct cfg80211_connect_params(9)
  • enum cfg80211_connect_params_changed(9)
  • enum wiphy_params_flags(9)
  • struct cfg80211_pmksa(9)
  • struct cfg80211_pkt_pattern(9)
  • struct cfg80211_wowlan_tcp(9)
  • struct cfg80211_wowlan(9)
  • struct cfg80211_coalesce_rules(9)
  • struct cfg80211_coalesce(9)
  • struct cfg80211_wowlan_nd_match(9)
  • struct cfg80211_wowlan_nd_info(9)
  • struct cfg80211_wowlan_wakeup(9)
  • struct cfg80211_gtk_rekey_data(9)
  • struct cfg80211_update_ft_ies_params(9)
  • struct cfg80211_mgmt_tx_params(9)
  • struct cfg80211_dscp_exception(9)
  • struct cfg80211_dscp_range(9)
  • struct cfg80211_qos_map(9)

🧚 NAN, PMKSA, PMSR and friends

neighbor awareness, peer measurement, all the fancy stuff πŸŽ€:

  • Neighbor Awareness Networking (NAN)(9)
  • struct cfg80211_nan_band_config(9)
  • struct cfg80211_nan_conf(9)
  • struct cfg80211_nan_channel(9)
  • struct cfg80211_nan_local_sched(9)
  • struct cfg80211_nan_peer_map(9)
  • struct cfg80211_nan_peer_sched(9)
  • enum cfg80211_nan_conf_changes(9)
  • struct cfg80211_nan_func_filter(9)
  • struct cfg80211_nan_func(9)
  • struct cfg80211_pmk_conf(9)
  • struct cfg80211_external_auth_params(9)
  • struct cfg80211_ftm_responder_stats(9)
  • struct cfg80211_pmsr_ftm_result(9)
  • struct cfg80211_pmsr_result(9)
  • struct cfg80211_pmsr_ftm_request_peer(9)
  • struct cfg80211_pmsr_request_peer(9)
  • struct cfg80211_pmsr_request(9)
  • struct cfg80211_update_owe_info(9)
  • struct mgmt_frame_regs(9)

πŸ‘‘ the wiphy struct itself (and everything you do to it)

this is the main character of the whole page, no cap:

🌈 utility functions

little helpers that are lowkey the most-used stuff in the whole subsystem:

πŸ’œ data path helpers

frames going in, frames coming out, and element-finding like a treasure hunt πŸ”Ž:

🚨 regulatory enforcement infrastructure

"is this freq even allowed where you are" β€” the vibes check of the wireless world πŸ—ΊοΈ:

and the inside-the-house db stuff:

⭐ notifications, MLME, and all the telling-people-things

stuff you call to be like "hey, this happened" πŸ“£:

πŸŽ€ rfkill integration

when the hardware says "no wifi for you, babes" πŸ›‘:

πŸ›οΈ vendor commands

for the driver-specific extra credit stuff 🧒:

πŸ§ͺ test mode

testing, testing, one two 🎀:

🫢 the connect / roam / station / cqm mega-cluster

the rest of the "tell userspace what just went down" family, all together:

okay that is literally every single one of them, no skipping, no cap πŸ’€ (and yes, we're still going β€” the page keeps going, so keep reading 🫢)

…and the rest of the crew, because this list is long and every single one of them deserves their moment, bestie πŸ’…:

Like, go read 'em, they're all right there in their own pages and they're all lowkey doing the most πŸ’–


πŸŽ€ and that's the whole page, bestie πŸŽ€ We got there, no cap. This lil masterpiece lives over in ./include/net and it's dated October 2026 β€” the <hotpink>wiphy_new(9)</hotpink> era, iconic, periodt βœ¨πŸ¦‹

πŸ“¦ where this page comes from