__cfg80211_get_bss(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ __cfg80211_get_bss β€” get a BSS reference πŸ’…

okay so bestie, welcome to __cfg80211_get_bss(9) β€” the Kernel API Manual page you didn't know you needed πŸŽ€ this one's a little function that goes and fetches you a BSS reference, and honestly? it's giving "library desk but for wireless" πŸ“šβœ¨


🌸 NAME 🌸

__cfg80211_get_bss β€” get a BSS reference 🫢

like, literally the whole point: you ask nicely, it hands you a reference-counted BSS. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct cfg80211_bss * __cfg80211_get_bss (struct wiphy *wiphy , struct
ieee80211_channel *channel , const u8 *bssid , const u8 *ssid , size_t
ssid_len , enum ieee80211_bss_type bss_type , enum ieee80211_privacy
privacy , u32 use_for , struct netlink_ext_ack *extack );

look at all those parameters 😭 that's a lot of arguments, but we stan a thorough function. every single one matters, so let's go through them one by one, no skipping πŸ”₯


πŸ’– ARGUMENTS πŸ’–

okay so here's the full cast of characters, in order, and yes you need to know all of them:

  • wiphy β€” the wiphy this BSS struct belongs to πŸ‘‘ like, which wireless device's world this BSS lives in.
  • channel β€” the channel to search on. you can pass NULL here, that's totally valid πŸ™ˆ
  • bssid β€” the desired BSSID. also allowed to be NULL if you're not picky πŸ’
  • ssid β€” the desired SSID. yep, NULL is fine here too ✨
  • ssid_len β€” length of the SSID. no SSID? then it's 0, simple as that πŸ“
  • bss_type β€” type of BSS, see enum ieee80211_bss_type πŸ‘€ go look it up bestie, it's not on this page.
  • privacy β€” privacy filter, see enum ieee80211_privacy πŸ”’ same deal, different enum.
  • use_for β€” indicates which use is intended 🎯 lowkey important, don't just put a random number.
  • extack β€” (optional) extack that is filled with the reason when no usable entry was found; may be NULL 🫢 so if it all goes wrong, this is where the why shows up. but it's optional, so NULL is fine β€” you just won't get the tea β˜•

⭐ RETURN ⭐

  • Reference-counted BSS on success πŸ’– like, you got it, it's yours (but mind the refcount, iykyk).
  • NULL on error πŸ’€ no BSS for you, sorry bestie.

πŸ‘€ SEE ALSO πŸ‘€

okay so this is the part of the page where the docs just go absolutely feral and list everyone. like the entire cfg80211 extended family showed up to the group chat at once πŸ’€ no cap, most of these are siblings of cfg80211_get_bss(9) in ./include/net/cfg80211.h, and the manpage is basically like "here's the whole roster, bestie, go nuts." stay with me 🫢

that first chunk is the capabilities-and-bands girlies ✨ they're all about what the radio can actually do. moving on, and this next stretch is the whole chandef situation, which is a LOT:

look at all those cfg80211_chandef_* siblings 😭 it's giving big family energy. next up, surveys + crypto + beacon/AP-adjacent situations:

  • enum survey_info_flags(9)
  • struct survey_info(9)
  • struct cfg80211_crypto_settings(9)
  • struct cfg80211_mbssid_config(9)
  • struct cfg80211_mbssid_elems(9)
  • struct cfg80211_rnr_elems(9)
  • struct cfg80211_beacon_data(9)
  • struct cfg80211_acl_data(9)
  • struct cfg80211_fils_discovery(9)
  • struct cfg80211_unsol_bcast_probe_resp(9)
  • struct cfg80211_s1g_short_beacon(9)
  • struct cfg80211_ap_settings(9)
  • struct cfg80211_ap_update(9)
  • struct cfg80211_csa_settings(9)
  • struct cfg80211_color_change_settings(9)
  • struct iface_combination_params(9)

then we get into stations, which is a whole arc okay:

  • enum station_parameters_apply_mask(9)
  • struct sta_txpwr(9)
  • struct link_station_parameters(9)
  • struct link_station_del_parameters(9)
  • struct cfg80211_ttlm_params(9)
  • struct station_parameters(9)
  • struct station_del_parameters(9)
  • enum cfg80211_station_type(9)
  • cfg80211_check_station_change(9)
  • enum rate_info_flags(9)
  • enum rate_info_bw(9)
  • struct rate_info(9)
  • enum bss_param_flags(9)
  • struct sta_bss_parameters(9)
  • struct cfg80211_txq_stats(9)
  • struct cfg80211_tid_stats(9)
  • struct link_station_info(9)
  • struct station_info(9)
  • struct cfg80211_sar_sub_specs(9)
  • struct cfg80211_sar_specs(9)
  • struct cfg80211_sar_freq_ranges(9)
  • struct cfg80211_sar_capa(9)
  • cfg80211_get_station(9)
  • enum monitor_flags(9)
  • enum mpath_info_flags(9)
  • struct mpath_info(9)
  • enum wiphy_bss_param_flags(9)
  • struct bss_parameters(9)
  • struct mesh_config(9)
  • struct mesh_setup(9)
  • struct ocb_setup(9)
  • struct ieee80211_txq_params(9)

and then β€” and this is the part that's literally our whole neighbourhood, since cfg80211_get_bss(9) lives here β€” Scanning and BSS list handling(9) and everyone in it πŸ’–

  • Scanning and BSS list handling(9)
  • 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)

the BSS girlies!! besties fr πŸ’… then connection-adjacent life:

  • 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 time πŸ¦‹ (yes, real thing, not me being cute):

  • 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)

now the big structural stuff β€” the wiphy ops and flags era πŸ‘‘

  • struct cfg80211_ops(9)
  • enum wiphy_flags(9)
  • struct ieee80211_iface_limit(9)
  • struct ieee80211_iface_combination(9)
  • enum wiphy_wowlan_support_flags(9)
  • struct wiphy_wowlan_support(9)
  • struct wiphy_coalesce_support(9)
  • enum wiphy_vendor_command_flags(9)
  • enum wiphy_opmode_flag(9)
  • struct sta_opmode_info(9)
  • struct wiphy_vendor_command(9)
  • struct wiphy_iftype_ext_capab(9)
  • cfg80211_get_iftype_ext_capa(9)
  • struct cfg80211_pmsr_capabilities(9)
  • struct wiphy_iftype_akm_suites(9)
  • struct wiphy_radio_cfg(9)
  • struct wiphy_radio_freq_range(9)
  • struct wiphy_radio(9)
  • enum wiphy_nan_flags(9)
  • struct wiphy_nan_capa(9)
  • struct wiphy(9)

and the wiphy lifecycle besties, from "hello world" to "bye":

the work-queue crew 🧚 (they handle the later stuff, iykyk):

then wdev things 🌸:

Utility functions(9) β€” the little helpers that do the actual math so you don't have to 😭

Data path helpers(9) β€” where frames get converted and headers get read πŸŽ€

Regulatory enforcement infrastructure(9) β€” the rules girlies βš–οΈ

and the internal regulatory db functions (yes, "internal" β€” act accordingly πŸ™ˆ):

then the notification/reporting crowd β€” genuinely so many of them, all iconic in their own way:

and look β€” there's our girl again!! πŸ‘‘

then the mlme mgmt hive 🐝:

RFkill integration(9) πŸ”Œ

Vendor commands(9) β€” the "your driver, your rules" corner πŸ’œ

Test mode(9) πŸ§ͺ

then the connect/roam/port-auth saga, which honestly deserves its own playlist:

and the notification wall (genuinely do not skip these, they're the "hey something happened" squad):

okay that's the whole list β€” every single one, no crumbs left πŸ“ and there's more page after this, so don't go anywhere ✨

okay bestie, final stretch β€” and listen, the cross-reference list on this one is not playing around. Sixty-four entries. Sixty-four!! So grab a snack πŸ“, we're doing this in little batches so nobody's eyes glaze over.


First batch, the regulatory + channel-switch girlies πŸ‘‘:

Next up, registration + FT + P2P + all the IE-parsing besties πŸŽ€ (yes the ieee80211_* ones are all right here, they're a lil clique):

Then the channels/combinations/maintenance crew β€” lowkey the backbone of this whole vibe ngl:

NAN squad, you already know πŸ’… (this block is so long, they really said "one more" forty times):

BSS + color change era 🌈 (the notify girls are having a moment):

And the last handful, no cap, we made it πŸ¦‹:


fr fr go read whichever one you actually need β€” this list is basically the group chat, and every single member is worth a text back πŸ’Œ

And that's a wrap on __cfg80211_get_bss(9), bestie!! 🫢 This whole page lives under ./include/net, dated October 2026 β€” iconic, timeless, periodt. Go read some kernel source, drink water, slay βœ¨πŸ‘‘

πŸ“¦ where this page comes from