STRUCT CFG80211_OPS(9)
πΈ NAME πΈ
ok so welcome to struct cfg80211_ops(9) bestie!! π this is page 9 of the Kernel API Manual, and no cap, it's kind of a big deal.
struct cfg80211_ops β it's the backend description for wireless configuration β¨ literally what it says on the tin. think of it as the little contract your wireless driver signs to tell the kernel "yeah i can do config stuff, here's how" π«Ά
heads up bestie: this page is LONG, like long long, so it's coming at you in parts β buckle in, we're not even close to done π
β¨ SYNOPSIS β¨
okay bestie, buckle up π this is the whole struct cfg80211_ops β it's the giant function-pointer menu that a wireless driver fills in to tell the kernel "yeah i can do that." it is long. like, unreasonably long. but she's iconic for it π
here's the literal thing, verbatim, no edits, no cap:
struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
int (*resume)(struct wiphy *wiphy);
void (*set_wakeup)(struct wiphy *wiphy, bool enabled);
struct wireless_dev * (*add_virtual_intf)(struct wiphy *wiphy, const
char *name, unsigned char name_assign_type, enum nl80211_iftype type,
struct vif_params *params);
int (*del_virtual_intf)(struct wiphy *wiphy, struct wireless_dev
*wdev);
int (*change_virtual_intf)(struct wiphy *wiphy, struct net_device
*dev, enum nl80211_iftype type, struct vif_params *params);
int (*add_intf_link)(struct wiphy *wiphy, struct wireless_dev *wdev,
unsigned int link_id);
void (*del_intf_link)(struct wiphy *wiphy, struct wireless_dev
*wdev, unsigned int link_id);
int (*add_key)(struct wiphy *wiphy, struct wireless_dev *wdev, int
link_id, u8 key_index, bool pairwise, const u8 *mac_addr, struct
key_params *params);
int (*get_key)(struct wiphy *wiphy, struct wireless_dev *wdev, int
link_id, u8 key_index, bool pairwise, const u8 *mac_addr, void *cookie,
void (*callback)(void *cookie, struct key_params*));
int (*del_key)(struct wiphy *wiphy, struct wireless_dev *wdev, int
link_id, u8 key_index, bool pairwise, const u8 *mac_addr);
int (*set_default_key)(struct wiphy *wiphy, struct net_device
*netdev, int link_id, u8 key_index, bool unicast, bool multicast);
int (*set_default_mgmt_key)(struct wiphy *wiphy, struct wireless_dev
*wdev, int link_id, u8 key_index);
int (*set_default_beacon_key)(struct wiphy *wiphy, struct
wireless_dev *wdev, int link_id, u8 key_index);
int (*start_ap)(struct wiphy *wiphy, struct net_device *dev, struct
cfg80211_ap_settings *settings);
int (*change_beacon)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ap_update *info);
int (*stop_ap)(struct wiphy *wiphy, struct net_device *dev, unsigned
int link_id);
int (*add_station)(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_parameters *params);
int (*del_station)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params);
int (*change_station)(struct wiphy *wiphy, struct wireless_dev
*wdev, const u8 *mac, struct station_parameters *params);
int (*get_station)(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo);
int (*dump_station)(struct wiphy *wiphy, struct wireless_dev *wdev,
int idx, u8 *mac, struct station_info *sinfo);
int (*add_mpath)(struct wiphy *wiphy, struct net_device *dev, const
u8 *dst, const u8 *next_hop);
int (*del_mpath)(struct wiphy *wiphy, struct net_device *dev, const
u8 *dst);
int (*change_mpath)(struct wiphy *wiphy, struct net_device *dev,
const u8 *dst, const u8 *next_hop);
int (*get_mpath)(struct wiphy *wiphy, struct net_device *dev, u8
*dst, u8 *next_hop, struct mpath_info *pinfo);
int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev, int
idx, u8 *dst, u8 *next_hop, struct mpath_info *pinfo);
int (*get_mpp)(struct wiphy *wiphy, struct net_device *dev, u8 *dst,
u8 *mpp, struct mpath_info *pinfo);
int (*dump_mpp)(struct wiphy *wiphy, struct net_device *dev, int
idx, u8 *dst, u8 *mpp, struct mpath_info *pinfo);
int (*get_mesh_config)(struct wiphy *wiphy, struct net_device *dev,
struct mesh_config *conf);
int (*update_mesh_config)(struct wiphy *wiphy, struct net_device
*dev, u32 mask, const struct mesh_config *nconf);
int (*join_mesh)(struct wiphy *wiphy, struct net_device *dev, const
struct mesh_config *conf, const struct mesh_setup *setup);
int (*leave_mesh)(struct wiphy *wiphy, struct net_device *dev);
int (*join_ocb)(struct wiphy *wiphy, struct net_device *dev, struct
ocb_setup *setup);
int (*leave_ocb)(struct wiphy *wiphy, struct net_device *dev);
int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
struct bss_parameters *params);
void (*inform_bss)(struct wiphy *wiphy, struct cfg80211_bss *bss,
const struct cfg80211_bss_ies *ies, void *data);
int (*set_txq_params)(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_txq_params *params);
int (*libertas_set_mesh_channel)(struct wiphy *wiphy, struct
net_device *dev, struct ieee80211_channel *chan);
int (*set_monitor_channel)(struct wiphy *wiphy, struct net_device
*dev, struct cfg80211_chan_def *chandef);
int (*scan)(struct wiphy *wiphy, struct cfg80211_scan_request
*request);
void (*abort_scan)(struct wiphy *wiphy, struct wireless_dev *wdev);
int (*auth)(struct wiphy *wiphy, struct net_device *dev, struct
cfg80211_auth_request *req);
int (*assoc)(struct wiphy *wiphy, struct net_device *dev, struct
cfg80211_assoc_request *req);
int (*deauth)(struct wiphy *wiphy, struct net_device *dev, struct
cfg80211_deauth_request *req);
int (*disassoc)(struct wiphy *wiphy, struct net_device *dev, struct
cfg80211_disassoc_request *req);
int (*connect)(struct wiphy *wiphy, struct net_device *dev, struct
cfg80211_connect_params *sme);
int (*update_connect_params)(struct wiphy *wiphy, struct net_device
*dev, struct cfg80211_connect_params *sme, u32 changed);
int (*disconnect)(struct wiphy *wiphy, struct net_device *dev, u16
reason_code);
int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev, struct
cfg80211_ibss_params *params);
int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev);
int (*set_mcast_rate)(struct wiphy *wiphy, struct net_device *dev,
int rate[NUM_NL80211_BANDS]);
int (*set_wiphy_params)(struct wiphy *wiphy, int radio_idx, u32
changed);
int (*set_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
int radio_idx, enum nl80211_tx_power_setting type, int mbm);
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
int radio_idx, unsigned int link_id, int *dbm);
void (*rfkill_poll)(struct wiphy *wiphy);
#ifdef CONFIG_NL80211_TESTMODE;
int (*testmode_cmd)(struct wiphy *wiphy, struct wireless_dev *wdev,
void *data, int len);
int (*testmode_dump)(struct wiphy *wiphy, struct sk_buff *skb,
struct netlink_callback *cb, void *data, int len);
#endif;
int (*set_bitrate_mask)(struct wiphy *wiphy, struct net_device *dev,
unsigned int link_id, const u8 *peer, const struct cfg80211_bitrate_mask
*mask);
int (*dump_survey)(struct wiphy *wiphy, struct net_device *netdev,
int idx, struct survey_info *info);
int (*set_pmksa)(struct wiphy *wiphy, struct net_device *netdev,
struct cfg80211_pmksa *pmksa);
int (*del_pmksa)(struct wiphy *wiphy, struct net_device *netdev,
struct cfg80211_pmksa *pmksa);
int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev);
int (*remain_on_channel)(struct wiphy *wiphy, struct wireless_dev
*wdev, struct ieee80211_channel *chan, unsigned int duration, u64
cookie, const u8 *rx_addr);
int (*cancel_remain_on_channel)(struct wiphy *wiphy, struct
wireless_dev *wdev, u64 cookie);
int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params, u64 cookie);
int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy, struct wireless_dev
*wdev, u64 cookie);
int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev,
bool enabled, int timeout);
int (*set_cqm_rssi_config)(struct wiphy *wiphy, struct net_device
*dev, s32 rssi_thold, u32 rssi_hyst);
int (*set_cqm_rssi_range_config)(struct wiphy *wiphy, struct
net_device *dev, s32 rssi_low, s32 rssi_high);
int (*set_cqm_txe_config)(struct wiphy *wiphy, struct net_device
*dev, u32 rate, u32 pkts, u32 intvl);
void (*update_mgmt_frame_registrations)(struct wiphy *wiphy, struct
wireless_dev *wdev, struct mgmt_frame_regs *upd);
int (*set_antenna)(struct wiphy *wiphy, int radio_idx, u32 tx_ant,
u32 rx_ant);
int (*get_antenna)(struct wiphy *wiphy, int radio_idx, u32 *tx_ant,
u32 *rx_ant);
int (*sched_scan_start)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_sched_scan_request *request);
int (*sched_scan_stop)(struct wiphy *wiphy, struct net_device *dev,
u64 reqid);
int (*set_rekey_data)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_gtk_rekey_data *data);
int (*tdls_mgmt)(struct wiphy *wiphy, struct net_device *dev, const
u8 *peer, int link_id, u8 action_code, u8 dialog_token, u16 status_code,
u32 peer_capability, bool initiator, const u8 *buf, size_t len);
int (*tdls_oper)(struct wiphy *wiphy, struct net_device *dev, const
u8 *peer, enum nl80211_tdls_operation oper);
int (*probe_peer)(struct wiphy *wiphy, struct net_device *dev, const
u8 *peer, u64 cookie);
int (*set_noack_map)(struct wiphy *wiphy, struct net_device *dev,
u16 noack_map);
int (*get_channel)(struct wiphy *wiphy, struct wireless_dev *wdev,
unsigned int link_id, struct cfg80211_chan_def *chandef);
int (*start_p2p_device)(struct wiphy *wiphy, struct wireless_dev
*wdev);
void (*stop_p2p_device)(struct wiphy *wiphy, struct wireless_dev
*wdev);
int (*set_mac_acl)(struct wiphy *wiphy, struct net_device *dev,
const struct cfg80211_acl_data *params);
int (*start_radar_detection)(struct wiphy *wiphy, struct net_device
*dev, struct cfg80211_chan_def *chandef, u32 cac_time_ms, int link_id);
void (*end_cac)(struct wiphy *wiphy, struct net_device *dev,
unsigned int link_id);
int (*update_ft_ies)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_update_ft_ies_params *ftie);
int (*crit_proto_start)(struct wiphy *wiphy, struct wireless_dev
*wdev, enum nl80211_crit_proto_id protocol, u16 duration);
void (*crit_proto_stop)(struct wiphy *wiphy, struct wireless_dev
*wdev);
int (*set_coalesce)(struct wiphy *wiphy, struct cfg80211_coalesce
*coalesce);
int (*channel_switch)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_csa_settings *params);
int (*set_qos_map)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_qos_map *qos_map);
int (*set_ap_chanwidth)(struct wiphy *wiphy, struct net_device *dev,
unsigned int link_id, struct cfg80211_chan_def *chandef);
int (*add_tx_ts)(struct wiphy *wiphy, struct net_device *dev, u8
tsid, const u8 *peer, u8 user_prio, u16 admitted_time);
int (*del_tx_ts)(struct wiphy *wiphy, struct net_device *dev, u8
tsid, const u8 *peer);
int (*tdls_channel_switch)(struct wiphy *wiphy, struct net_device
*dev, const u8 *addr, u8 oper_class, struct cfg80211_chan_def *chandef);
void (*tdls_cancel_channel_switch)(struct wiphy *wiphy, struct
net_device *dev, const u8 *addr);
int (*start_nan)(struct wiphy *wiphy, struct wireless_dev *wdev,
π«Ά a lil survival guide for reading that
okay so real talk, that block is a lot, and it's not even done yet β she keeps going π but here's how to not panic:
- every single line is a function pointer. like,
int (*suspend)(...)means "there's a slot calledsuspendthat points to a function with these exact arguments." the driver decides whether to plug something in or leave itNULL. - almost everything returns
int, which is the classic "did it work or nah" signal. a few arevoidβ those are the "no takebacks, no error report, just vibes" ones, likeset_wakeup,rfkill_poll,inform_bss,abort_scan,crit_proto_stop,end_cac, and thetdls_cancel_channel_switch/del_intf_link/stop_p2p_devicecrew. - basically every op gets a
struct wiphy *wiphyas its first arg β that's the hardware/device identity card, and she's everywhere. many of them also take astruct net_device *devor astruct wireless_dev *wdevdepending on what flavour of interface they're talking about. - see
link_idpopping up all over? (add_intf_link,del_intf_link,add_key,get_key,del_key,set_default_key,set_default_mgmt_key,set_default_beacon_key,stop_ap,get_tx_power,set_bitrate_mask,get_channel,start_radar_detection,end_cac,set_ap_chanwidth,tdls_mgmtβ¦) yeah, multi-link is thriving in here. not me counting them all π radio_idxshows up on the wiphy-parameter and antenna and tx-power ops βset_wiphy_params,set_tx_power,get_tx_power,set_antenna,get_antenna. keep an eye on her, she's the "which radio are we even talking about" question β¨NUM_NL80211_BANDSinset_mcast_rateβ that's literally arate[NUM_NL80211_BANDS]array, one entry per band. yes she's fancy.- and NOT the
#ifdef CONFIG_NL80211_TESTMODE;block βtestmode_cmdandtestmode_dumponly exist when that config is on. conditional queen π (also yes, the semicolons after#ifdef/#endifare really there in the source text, so they're really there here too π )
side note bestie: those weird line breaks mid-signature? that's just the manpage text wrapping doing its thing. the C is all one line per op, fr fr. don't go reformatting your driver over it π
and yeah, start_nan is where this chunk cuts off β she's mid-sentence, iconically. more ops incoming, so don't close the tab πΈ
struct cfg80211_nan_conf *conf);
void (*stop_nan)(struct wiphy *wiphy, struct wireless_dev *wdev);
int (*add_nan_func)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_nan_func *nan_func);
void (*del_nan_func)(struct wiphy *wiphy, struct wireless_dev *wdev,
u64 cookie);
int (*nan_change_conf)(struct wiphy *wiphy, struct wireless_dev
*wdev, struct cfg80211_nan_conf *conf, u32 changes);
int (*nan_set_local_sched)(struct wiphy *wiphy, struct wireless_dev
*wdev, struct cfg80211_nan_local_sched *sched);
int (*nan_set_peer_sched)(struct wiphy *wiphy, struct wireless_dev
*wdev, struct cfg80211_nan_peer_sched *sched);
int (*set_multicast_to_unicast)(struct wiphy *wiphy, struct
net_device *dev, const bool enabled);
int (*get_txq_stats)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_txq_stats *txqstats);
int (*set_pmk)(struct wiphy *wiphy, struct net_device *dev, const
struct cfg80211_pmk_conf *conf);
int (*del_pmk)(struct wiphy *wiphy, struct net_device *dev, const u8
*aa);
int (*external_auth)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_external_auth_params *params);
int (*tx_control_port)(struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len, const u8 *dest, const __be16 proto, const
bool noencrypt, int link_id, u64 cookie);
int (*get_ftm_responder_stats)(struct wiphy *wiphy, struct
net_device *dev, struct cfg80211_ftm_responder_stats *ftm_stats);
int (*start_pmsr)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_pmsr_request *request);
void (*abort_pmsr)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_pmsr_request *request);
int (*update_owe_info)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_update_owe_info *owe_info);
int (*probe_mesh_link)(struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len);
int (*set_tid_config)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_tid_config *tid_conf);
int (*reset_tid_config)(struct wiphy *wiphy, struct net_device *dev,
const u8 *peer, u8 tids);
int (*set_sar_specs)(struct wiphy *wiphy, struct cfg80211_sar_specs
*sar);
int (*color_change)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_color_change_settings *params);
int (*set_fils_aad)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_fils_aad *fils_aad);
int (*set_radar_background)(struct wiphy *wiphy, struct
cfg80211_chan_def *chandef);
int (*add_link_station)(struct wiphy *wiphy, struct net_device *dev,
struct link_station_parameters *params);
int (*mod_link_station)(struct wiphy *wiphy, struct net_device *dev,
struct link_station_parameters *params);
int (*del_link_station)(struct wiphy *wiphy, struct net_device *dev,
struct link_station_del_parameters *params);
int (*set_hw_timestamp)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_set_hw_timestamp *hwts);
int (*set_ttlm)(struct wiphy *wiphy, struct net_device *dev, struct
cfg80211_ttlm_params *params);
u32 (*get_radio_mask)(struct wiphy *wiphy, struct net_device *dev);
int (*assoc_ml_reconf)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ml_reconf_req *req);
int (*set_epcs)(struct wiphy *wiphy, struct net_device *dev, bool
val);
int (*start_pd)(struct wiphy *wiphy, struct wireless_dev *wdev);
void (*stop_pd)(struct wiphy *wiphy, struct wireless_dev *wdev);
};
π Members π
Okay bestie, this is the actual meat of the page β every single callback in the ops struct, explained. Buckle up, there are a LOT. π
suspendβ the wiphy device needs to be suspended. The variablewowwill beNULL, or it'll hold the enabled Wake-on-Wireless triggers that are configured for the device.resumeβ the wiphy device needs to be resumed. β¨set_wakeupβ called when WoWLAN is enabled/disabled. Use this callback to calldevice_set_wakeup_enableto enable/disable wakeup from the device.add_virtual_intfβ create a new virtual interface with the given name, and it must set thestruct wireless_dev'siftype. β οΈ Beware: you must create the new netdev in the wiphy's network namespace! Returns thestruct wireless_dev, or anERR_PTR. For P2P device wdevs, the driver must also set theaddressmember in the wdev. This additionally holds theRTNLto be able to do netdev changes.del_virtual_intfβ remove the virtual interface. This additionally holds theRTNLto be able to do netdev changes.change_virtual_intfβ change type/configuration of virtual interface, and keep thestruct wireless_dev'siftypeupdated. This additionally holds theRTNLto be able to do netdev changes.add_intf_linkβ add a new MLO link to the given interface. Note that thewdev->link[]data structure has been updated, so the new link address is available. πdel_intf_linkβ remove an MLO link from the given interface.add_keyβ add a key with the given parameters.mac_addrwill beNULLwhen adding a group key.link_idwill be-1for non-MLO connection. For MLO connection,link_idwill be>= 0for group key and-1for pairwise key, andmac_addrwill be the peer's MLD address for MLO pairwise key.get_keyβ get information about the key with the given parameters.mac_addrwill beNULLwhen requesting information for a group key. All pointers given to the callback function need not be valid after it returns. This function should return an error if it is not possible to retrieve the key, or-ENOENTif it doesn't exist.link_idwill be-1for non-MLO connection. For MLO connection,link_idwill be>= 0for group key and-1for pairwise key, andmac_addrwill be the peer's MLD address for MLO pairwise key.del_keyβ remove a key given themac_addr(NULLfor a group key) andkey_index, and return-ENOENTif the key doesn't exist.link_idwill be-1for non-MLO connection. For MLO connection,link_idwill be>= 0for group key and-1for pairwise key, andmac_addrwill be the peer's MLD address for MLO pairwise key.set_default_keyβ set the default key on an interface.link_idwill be>= 0for MLO connection and-1for non-MLO connection. πset_default_mgmt_keyβ set the default management frame key on an interface.link_idwill be>= 0for MLO connection and-1for non-MLO connection.set_default_beacon_keyβ set the default Beacon frame key on an interface.link_idwill be>= 0for MLO connection and-1for non-MLO connection.start_apβ Start acting in AP mode defined by the parameters. πchange_beaconβ Change the beacon parameters for an access point mode interface. This should reject the call when AP mode wasn't started.stop_apβ Stop being an AP, including stopping beaconing.add_stationβ Add a new station. π«Άdel_stationβ Remove a station.change_stationβ Modify a given station. Heads up, flags changes are not much validated in cfg80211 β in particular the auth/assoc/authorized flags might come to the driver in invalid combinations, so make sure to check them, also against the existing state! Drivers must callcfg80211_check_station_changeto validate the information. π No cap, do the check.get_stationβ get station information for the station identified bymac.dump_stationβ dump station callback β resume dump at indexidx.add_mpathβ add a fixed mesh path.del_mpathβ delete a given mesh path.change_mpathβ change a given mesh path.get_mpathβ get a mesh path for the given parameters.dump_mpathβ dump mesh path callback β resume dump at indexidx.get_mppβ get a mesh proxy path for the given parameters.dump_mppβ dump mesh proxy path callback β resume dump at indexidx.get_mesh_configβ Get the current mesh configuration.update_mesh_configβ Update mesh parameters on a running mesh. The mask is a bitfield which tells us which parameters to set, and which to leave alone. π¦join_meshβ join the mesh network with the specified parameters (invoked with thewireless_devmutex held).leave_meshβ leave the current mesh network (invoked with thewireless_devmutex held).join_ocbβ join the OCB network with the specified parameters (invoked with thewireless_devmutex held).leave_ocbβ leave the current OCB network (invoked with thewireless_devmutex held).change_bssβ Modify parameters for a given BSS.inform_bssβ called by cfg80211 while being informed about new BSS data for every BSS found within the reported data or frame. This is called from within thecfg8011inform_bsshandlers while holding thebss_lock. Thedataparameter is passed through fromdrv_datainsidestruct cfg80211_inform_bss. The new IE data for the BSS is explicitly passed. πΈset_txq_paramsβ Set TX queue parameters.libertas_set_mesh_channelβ Only for backward compatibility for libertas, as it doesn't implementjoin_meshand needs to set the channel to join the mesh instead.set_monitor_channelβ Set the monitor mode channel for the device. If other interfaces are active, this callback should reject the configuration. If no interfaces are active or the device is down, the channel should be stored for when a monitor interface becomes active. πscanβ Request to do a scan. If returning zero, the scan request is given the driver, and will be valid until passed tocfg80211_scan_done. For scan results, callcfg80211_inform_bss; you can call this outside thescan/scan_donebracket too. π₯abort_scanβ Tell the driver to abort an ongoing scan. The driver shall indicate the status of the scan throughcfg80211_scan_done.authβ Request to authenticate with the specified peer (invoked with thewireless_devmutex held).assocβ Request to (re)associate with the specified peer (invoked with thewireless_devmutex held).deauthβ Request to deauthenticate from the specified peer (invoked with thewireless_devmutex held).
and yes there are still more members coming, we are literally not done yet ππ
disassocβ bestie, this one's the "we're done here" button: a request to disassociate from the specified peer. (invoked with thewireless_devmutex held)connectβ connect to the ESS with the specified parameters. When you're connected, callcfg80211_connect_result/cfg80211_connect_bsswith status codeWLAN_STATUS_SUCCESS. If the connection fails for some reason, callcfg80211_connect_result/cfg80211_connect_bsswith the status code from the AP, orcfg80211_connect_timeoutif no frame with a status code was received.
The driver is allowed to roam to other BSSes within the ESS when the other BSS matches the connect parameters. When such roaming is initiated by the driver, the driver is expected to verify that the target matches the configured security parameters and to use a Reassociation Request frame instead of an Association Request frame.
The connect function can also be used to request the driver to perform a specific roam when connected to an ESS. In that case, the prev_bssid parameter is set to the BSSID of the currently associated BSS as an indication of requesting reassociation.
In both the driver-initiated and new connect call initiated roaming cases, the result of roaming is indicated with a call to cfg80211_roamed. (invoked with the wireless_dev mutex held)
update_connect_paramsβ update the connect parameters while connected to a BSS. Those updated parameters can be used by driver/firmware for subsequent BSS selection (roaming) decisions and to form the Authentication/(Re)Association Request frames. Heads up: this call does not request an immediate disassociation or reassociation with the current BSS β it impacts only subsequent (re)associations. The bits inchangedare defined inenum cfg80211_connect_params_changed. (invoked with thewireless_devmutex held)disconnectβ disconnect from the BSS/ESS, or stop connection attempts if a connection is in progress. Once done, callcfg80211_disconnectedin case the connection was already established (invoked with thewireless_devmutex held), otherwise callcfg80211_connect_timeout.join_ibssβ join the specified IBSS (or create it if necessary). Once done, callcfg80211_ibss_joinedβ also call that function when changing BSSID due to a merge. (invoked with thewireless_devmutex held)leave_ibssβ leave the IBSS. That's it. Bye. (invoked with thewireless_devmutex held)set_mcast_rateβ set the specified multicast rate (only if the vif is inADHOCorMESHmode, iykyk).set_wiphy_paramsβ notify that wiphy parameters have changed; thechangedbitfield (seeenum wiphy_params_flags) describes which values have changed. The actual parameter values are available instruct wiphy. If returning an error, no value should be changed. πset_tx_powerβ set the transmit power according to the parameters; the power passed is in mBm, so to get dBm useMBM_TO_DBM. The wdev may beNULLif power was set for the wiphy, and will always beNULLunless the driver supports per-vif TX power (as advertised by the nl80211 feature flag.)get_tx_powerβ store the current TX power into thedbmvariable; return0if successful.rfkill_pollβ polls the hw rfkill line; use the cfg80211 reporting functions to adjust rfkill hw state.testmode_cmdβ run a test mode command; wdev may beNULL.testmode_dumpβ implement a test mode dump. Thecb->args[2]and up may be used by the function, but0and1must not be touched. Additionally β and this is the spicy part β returning error codes other than-ENOBUFSand-ENOENTwill terminate the dump and return to userspace with an error, so be careful. If any data was passed in from userspace then thedata/lenarguments will be present and point to the data contained inNL80211_ATTR_TESTDATA.set_bitrate_maskβ set the bitrate mask configuration.dump_surveyβ get site survey information.set_pmksaβ cache a PMKID for a BSSID. This is mostly useful for fullmac devices running firmwares capable of generating the (re)association RSN IE. It allows for faster roaming between WPA2 BSSIDs. kind of a slay tbh β¨del_pmksaβ delete a cached PMKID.flush_pmksaβ flush all the cached PMKIDs.remain_on_channelβ request the driver to remain awake on the specified channel for the specified duration to complete an off-channel operation (e.g., public action frame exchange). When the driver is ready on the requested channel, it must indicate this with an event notification by callingcfg80211_ready_on_channel.cancel_remain_on_channelβ cancel an on-going remain-on-channel operation. This allows the operation to be terminated prior to timeout based on the duration value.mgmt_txβ transmit a management frame.mgmt_tx_cancel_waitβ cancel the wait time from transmitting a management frame on another channel.set_power_mgmtβ configure WLAN power management. A timeout value of-1allows the driver to adjust the dynamic ps timeout value.set_cqm_rssi_configβ configure the connection quality monitor RSSI threshold. After configuration, the driver should (soon) send an event indicating the current level is above/below the configured threshold; this may need some care when the configuration is changed (without first being disabled.)set_cqm_rssi_range_configβ configure two RSSI thresholds in the connection quality monitor. An event is to be sent only when the signal level is found to be outside the two values. The driver should setNL80211_EXT_FEATURE_CQM_RSSI_LISTif this method is implemented. If it is provided then there's no point providingset_cqm_rssi_config.set_cqm_txe_configβ configure connection quality monitor TX error thresholds.update_mgmt_frame_registrationsβ notify the driver that management frame registrations were updated. The callback is allowed to sleep. π΄set_antennaβ set antenna configuration (tx_ant,rx_ant) on the device. Parameters are bitmaps of allowed antennas to use for TX/RX. Drivers may reject TX/RX mask combinations they cannot support by returning-EINVAL(also seenl80211.hNL80211_ATTR_WIPHY_ANTENNA_TX).get_antennaβ get the current antenna configuration from the device (tx_ant,rx_ant).sched_scan_startβ tell the driver to start a scheduled scan.sched_scan_stopβ tell the driver to stop an ongoing scheduled scan with the given request id. This call must stop the scheduled scan and be ready for starting a new one before it returns, i.e.sched_scan_startmay be called immediately after that again and should not fail in that case. The driver should not callcfg80211_sched_scan_stoppedfor a requested stop (when this method returns0).set_rekey_dataβ give the data necessary for GTK rekeying to the driver.tdls_mgmtβ transmit a TDLS management frame.tdls_operβ perform a high-level TDLS operation (e.g. TDLS link setup).probe_peerβ probe a connected peer (AP: STA MAC required; STA: no MAC), and it must use the cookie as provided, which is later passed tocfg80211_probe_status.set_noack_mapβ set the NoAck Map for the TIDs.get_channelβ get the current operating channel for the virtual interface. For monitor interfaces, it should returnNULLunless there's a single current monitoring channel.start_p2p_deviceβ start the given P2P device.stop_p2p_deviceβ stop the given P2P device.set_mac_aclβ sets the MAC address control list in AP and P2P GO mode. Parameters include the ACL policy, an array of MAC addresses of stations and the number of MAC addresses. If there is already a list in the driver, this new list replaces the existing one. The driver has to clear its ACL when the number of MAC address entries is passed as0. Drivers which advertise the support for MAC based ACL have to implement this callback β no skipping, bestie.start_radar_detectionβ start radar detection in the driver. π¨end_cacβ end a running CAC, probably because a related CAC was finished on another phy.update_ft_iesβ provide updated Fast BSS Transition information to the driver. If the SME is in the driver/firmware, this information can be used in building Authentication and Reassociation Request frames.crit_proto_startβ indicates a critical protocol needs more link reliability for a given duration (milliseconds). The protocol is provided so the driver can take the most appropriate actions.crit_proto_stopβ indicates a critical protocol no longer needs increased link reliability. This operation can not fail. (iconic of it, honestly)set_coalesceβ set coalesce parameters.channel_switchβ initiate channel-switch procedure (with CSA). The driver is responsible for veryfing if the switch is possible. Since this is inherently tricky the driver may decide to disconnect an interface later withcfg80211_stop_iface. This doesn't mean the driver can accept everything β it should do it's best to verify requests and reject them as soon as possible.set_qos_mapβ set QoS mapping information to the driver.set_ap_chanwidthβ set the AP (including P2P GO) mode channel width for the given interface. This is used e.g. for dynamic HT 20/40 MHz channel width changes during the lifetime of the BSS.add_tx_tsβ bestie, this one either validates the params (whenadmitted_timeis 0) or actually adds a TX TS to the device with the parameters you handed over. The action frame exchange? Already handled by userspace, so all you gotta do is tweak the TX path so it takes the TS into account. If the admitted time is 0, just validate the parameters to make sure the session can be created at all β and yeah, it's totally valid to just always return success for that, but lowkey that may result in inefficient behaviour (picture it: handshake with the peer, then immediate teardown when the addition gets rejected later π). So validate properly if you can.del_tx_tsβ remove an existing TX TS. Simple. Iconic. No notes. β¨tdls_channel_switchβ start channel-switching with a TDLS peer. Heads up: the driver is responsible for continually initiating channel-switching operations and returning to the base channel for communication with the AP. That's on you, not us. π«Άtdls_cancel_channel_switchβ stop channel-switching with a TDLS peer. Non-negotiable detail: both peers must be on the base channel when the call completes. πΈstart_nanβ start the NAN interface.stop_nanβ stop the NAN interface. (yes queen, symmetry π )add_nan_funcβ add a NAN function. Returns negative value on failure. On success,nan_funcownership is transferred to the driver and it may access it outside of the scope of this function. The driver should free thenan_funcwhen it's no longer needed by callingcfg80211_free_nan_func. On success the driver should assign aninstance_idin the providednan_func. Ownership transfer is real, bestie β don't ghost it.del_nan_funcβ delete a NAN function.nan_change_confβ changes NAN configuration. The changed parameters must be specified inchanges(usingenum cfg80211_nan_conf_changes); all other parameters must be ignored. No sneaky reading of the rest, okay? πnan_set_local_schedβ configure the local schedule for NAN. The schedule consists of an array ofcfg80211_nan_channeland the schedule itself, in which each entry maps each time slot to the channel on which the radio should operate on. And listen: if the chandef of a NAN channel is not changed, the channel entry must also remain unchanged β and it is the driver's responsibility to verify this. Vibe check your entries.nan_set_peer_schedβ configure the peer schedule for NAN. The schedule consists of an array ofcfg80211_nan_channeland the schedule itself, in which each entry maps each time slot to a channel on which the radio should operate on. On top of that it contains more peer's schedule information such as committed DW, etc. When updating an existing peer schedule, the full new schedule is provided β partial updates are not supported, and the new schedule completely replaces the previous one. Full replace or nothing, periodt.set_multicast_to_unicastβ configure multicast to unicast conversion for BSS.get_txq_statsβ get TXQ stats for interface or phy. IfwdevisNULL, this function should return phy stats, and interface stats otherwise. Easy rule, don't overthink it πset_pmkβ configure the PMK to be used for offloaded 802.1X 4-Way handshake. If not deleted throughdel_pmkthe PMK remains valid until disconnect, upon which the driver should clear it. (invoked with thewireless_devmutex held)del_pmkβ delete the previously configured PMK for the given authenticator. (invoked with thewireless_devmutex held)external_authβ indicates result of offloaded authentication processing from user space.tx_control_portβ TX a control port frame (EAPoL). Thenoencryptparameter tells the driver that the frame should not be encrypted. Acookievalue of 0 means the caller does not want TX status reporting. Zero cookie = no status, noted.get_ftm_responder_statsβ retrieve FTM responder statistics, if available. Statistics should be cumulative, and currently no way to reset is provided. So yeah β no reset button, sorry bestie πstart_pmsrβ start peer measurement (e.g. FTM).abort_pmsrβ abort peer measurement.update_owe_infoβ provide updated OWE info to driver. A driver implementing SME but offloading OWE processing to the user space will get the updated DH IE through this interface.probe_mesh_linkβ probe direct Mesh peer's link quality by sending data frame and overrule HWMP path selection algorithm. Chaotic but make it functional.set_tid_configβ TID specific configuration, this can be peer or BSS specific. This callback may sleep. π΄reset_tid_configβ reset TID specific configuration for the peer, for the given TIDs. This callback may sleep. π΄set_sar_specsβ update the SAR (TX power) settings.color_changeβ initiate a color change.set_fils_aadβ set FILS AAD data to the AP driver so that the driver can use those to decrypt (Re)Association Request and encrypt (Re)Association Response frame.set_radar_backgroundβ configure dedicated offchannel chain available for radar/CAC detection on some hw. This chain can't be used to transmit or receive frames and it is bounded to a runningwdev. Background radar/CAC detection allows to avoid the CAC downtime switching to a different channel during CAC detection on the selected radar channel. The caller is expected to set thechandefpointer toNULLin order to disable background CAC/radar detection. NULL chandef = off switch, remember it.add_link_stationβ add a link to a station.mod_link_stationβ modify a link of a station.del_link_stationβ remove a link of a station. (add / mod / del β a whole glow-up trilogy β¨)set_hw_timestampβ enable/disable HW timestamping of TM/FTM frames.set_ttlmβ set the TID to link mapping.get_radio_maskβ get bitmask of radios in use. (invoked with thewiphymutex held)assoc_ml_reconfβ request a non-AP MLO connection to perform ML reconfiguration, i.e., add and/or remove links to/from the association using ML reconfiguration action frames. Successfully added links will be added to the set of valid links. Successfully removed links will be removed from the set of valid links. The driver must indicate removed links by callingcfg80211_links_removedand added links by callingcfg80211_mlo_reconf_add_done. When callingcfg80211_mlo_reconf_add_donethebsspointer must be given for each link for which MLO reconfiguration 'add' operation was requested. Bookkeeping is mandatory, bestie β no vibes-only reporting.set_epcsβ enable/disable EPCS for station mode.start_pdβ start the PD interface.stop_pdβ stop the PD interface.
π« DESCRIPTION π«
Okay so, big picture: this struct is registered by fullmac card drivers and/or wireless stacks in order to handle configuration requests on their interfaces. That's the whole raison d'Γͺtre, iykyk.
All callbacks except where otherwise noted should return 0 on success or a negative error code. No creative return values, please π
β οΈ All operations are invoked with the wiphy mutex held. The RTNL may be held in addition (due to wireless extensions) but this cannot be relied upon except in cases where documented below. Note that due to ordering, the RTNL also cannot be acquired in any handlers. So like β don't try to grab the RTNL in a handler. Fr fr. That's the rule.
π SEE ALSO π
okay bestie, this is the part where the manpage just dumps the whole friend group into the group chat ππ«Ά. like, every single cross-reference. i kept all of them, exact names, character for character, because these are literally the other pages you should go read when you're done here. no cap. go say hi π
π the header file + the big intros
- Kernel file
./include/net/cfg80211.h Introduction(9)Device registration(9)
then the whole channel / rate / capability crew rolls in:
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)struct ieee80211_he_obss_pd(9)struct cfg80211_he_bss_color(9)struct ieee80211_sta_ht_cap(9)struct ieee80211_sta_vht_cap(9)struct ieee80211_sta_he_cap(9)struct ieee80211_eht_mcs_nss_supp(9)struct ieee80211_sta_eht_cap(9)struct ieee80211_sta_uhr_cap(9)struct ieee80211_sband_iftype_data(9)enum ieee80211_edmg_bw_config(9)struct ieee80211_edmg(9)struct ieee80211_sta_s1g_cap(9)struct ieee80211_supported_band(9)_ieee80211_set_sband_iftype_data(9)ieee80211_set_sband_iftype_data(9)for_each_sband_iftype_data(9)ieee80211_get_sband_iftype_data(9)ieee80211_get_he_iftype_cap(9)ieee80211_get_he_6ghz_capa(9)ieee80211_get_eht_iftype_cap(9)ieee80211_get_uhr_iftype_cap(9)wiphy_read_of_freq_limits(9)
yes bestie, _ieee80211_set_sband_iftype_data(9) really does start with an underscore, and yes you bet that's the internal one π
π οΈ Actions and configuration
Actions and configuration(9)struct vif_params(9)struct key_params(9)struct cfg80211_chan_def(9)struct cfg80211_tid_cfg(9)struct cfg80211_tid_config(9)struct cfg80211_fils_aad(9)struct cfg80211_set_hw_timestamp(9)
the chandef girlies, all iconic, all obsessed with bandwidth
cfg80211_get_chandef_type(9)cfg80211_chandef_create(9)cfg80211_chandef_identical(9)cfg80211_chandef_is_edmg(9)cfg80211_chandef_is_s1g(9)cfg80211_chandef_compatible(9)nl80211_chan_width_to_mhz(9)cfg80211_chandef_get_width(9)cfg80211_chandef_valid(9)cfg80211_chandef_usable(9)cfg80211_chandef_dfs_required(9)cfg80211_chandef_dfs_usable(9)cfg80211_chandef_dfs_cac_time(9)cfg80211_chandef_primary(9)cfg80211_chandef_npca_valid(9)cfg80211_chandef_add_npca(9)cfg80211_chandef_add_dbe(9)nl80211_send_chandef(9)ieee80211_chandef_max_power(9)cfg80211_chandef_s1g_pri_width(9)cfg80211_any_usable_channels(9)
surveys, crypto, beacons, AP stuff β¨
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)
stations, links, rates, stats π«Ά
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)
sar + mesh + ocb + txq (the ones nobody remembers until they need them) π¦
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)
π Scanning and BSS list handling
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)
auth, assoc, deauth, disassoc, ibss β the whole connection storyline π
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)
pmksa / wowlan / coalesce / qos β lowkey my fave section name, "wowlan" is iconic
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)
π§ Neighbor Awareness Networking (NAN)
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)
pmk, external auth, FTM, PMSR, OWE π«Ά
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 zone π (this is the main character energy section, ngl)
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)
the wiphy lifecycle + locking + workqueue besties β¨
wiphy_priv(9)priv_to_wiphy(9)set_wiphy_dev(9)wiphy_dev(9)wiphy_name(9)wiphy_new_nm(9)wiphy_new(9)wiphy_register(9)rcu_dereference_wiphy(9)wiphy_dereference(9)get_wiphy_regdom(9)wiphy_unregister(9)wiphy_free(9)wiphy_lock(9)wiphy_unlock(9)wiphy_work_queue(9)wiphy_work_cancel(9)wiphy_work_flush(9)wiphy_delayed_work_queue(9)wiphy_delayed_work_cancel(9)wiphy_delayed_work_flush(9)wiphy_delayed_work_pending(9)wiphy_hrtimer_work_queue(9)wiphy_hrtimer_work_cancel(9)wiphy_hrtimer_work_flush(9)wiphy_hrtimer_work_pending(9)enum ieee80211_ap_reg_power(9)struct wireless_dev(9)wdev_priv(9)wdev_chandef(9)
π¦ Utility functions
Utility functions(9)ieee80211_channel_equal(9)ieee80211_channel_to_khz(9)ieee80211_channel_to_freq_khz(9)ieee80211_channel_to_frequency(9)ieee80211_freq_khz_to_channel(9)ieee80211_frequency_to_channel(9)ieee80211_get_channel_khz(9)ieee80211_get_channel(9)cfg80211_channel_is_psc(9)ieee80211_radio_freq_range_valid(9)cfg80211_radio_chandef_valid(9)cfg80211_wdev_channel_allowed(9)ieee80211_get_response_rate(9)ieee80211_mandatory_rates(9)
radiotap + header length crew π
struct ieee80211_radiotap_iterator(9)ieee80211_get_hdrlen_from_skb(9)ieee80211_hdrlen(9)ieee80211_get_mesh_hdrlen(9)
πΈ Data path helpers
Data path helpers(9)ieee80211_data_to_8023_exthdr(9)ieee80211_data_to_8023(9)ieee80211_is_valid_amsdu(9)ieee80211_amsdu_to_8023s(9)ieee80211_get_8023_tunnel_proto(9)ieee80211_strip_8023_mesh_hdr(9)cfg80211_classify8021d(9)
the element-hunting squad (find it, find it ext, find it vendor) π
cfg80211_find_elem_match(9)cfg80211_find_ie_match(9)cfg80211_find_elem(9)cfg80211_find_ie(9)cfg80211_find_ext_elem(9)cfg80211_find_ext_ie(9)cfg80211_find_vendor_elem(9)cfg80211_find_vendor_ie(9)enum cfg80211_rnr_iter_ret(9)cfg80211_iter_rnr(9)cfg80211_defragment_element(9)cfg80211_send_layer2_update(9)
βοΈ Regulatory enforcement infrastructure
Regulatory enforcement infrastructure(9)regulatory_hint(9)regulatory_set_wiphy_regd(9)regulatory_set_wiphy_regd_sync(9)wiphy_apply_custom_regulatory(9)freq_reg_info(9)reg_initiator_name(9)regulatory_pre_cac_allowed(9)
Internal regulatory db functions
Internal regulatory db functions(9)reg_query_regdb_wmm(9)
π the BSS lifecycle / MLME / notification pile
no divider here bestie, the manpage just keeps going and honestly, same π
cfg80211_scan_done(9)cfg80211_sched_scan_results(9)cfg80211_sched_scan_stopped(9)cfg80211_sched_scan_stopped_locked(9)cfg80211_inform_bss_frame_data(9)cfg80211_gen_new_bssid(9)cfg80211_is_element_inherited(9)cfg80211_merge_profile(9)enum cfg80211_bss_frame_type(9)cfg80211_get_ies_channel_number(9)cfg80211_ssid_eq(9)cfg80211_inform_bss_data(9)__cfg80211_get_bss(9)cfg80211_get_bss(9)cfg80211_ref_bss(9)cfg80211_put_bss(9)cfg80211_unlink_bss(9)cfg80211_bss_iter(9)
MLME events π«Ά
cfg80211_rx_mlme_mgmt(9)cfg80211_auth_timeout(9)struct cfg80211_rx_assoc_resp_data(9)cfg80211_rx_assoc_resp(9)struct cfg80211_assoc_failure(9)cfg80211_assoc_failure(9)cfg80211_tx_mlme_mgmt(9)cfg80211_rx_unprot_mlme_mgmt(9)cfg80211_michael_mic_failure(9)cfg80211_ibss_joined(9)cfg80211_notify_new_peer_candidate(9)
π‘ RFkill integration
RFkill integration(9)wiphy_rfkill_set_hw_state_reason(9)wiphy_rfkill_start_polling(9)wiphy_rfkill_stop_polling(9)
π Vendor commands
Vendor commands(9)cfg80211_vendor_cmd_alloc_reply_skb(9)cfg80211_vendor_cmd_reply(9)cfg80211_vendor_cmd_get_sender(9)cfg80211_vendor_event_alloc(9)cfg80211_vendor_event_alloc_ucast(9)cfg80211_vendor_event(9)
π§ͺ Test mode
Test mode(9)cfg80211_testmode_alloc_reply_skb(9)cfg80211_testmode_reply(9)cfg80211_testmode_alloc_event_skb(9)cfg80211_testmode_event(9)
π and the rest of the list (she's still going)
connect / roam / disconnect π
struct cfg80211_fils_resp_params(9)struct cfg80211_connect_resp_params(9)cfg80211_connect_done(9)cfg80211_connect_bss(9)cfg80211_connect_result(9)cfg80211_connect_timeout(9)struct cfg80211_roam_info(9)cfg80211_roamed(9)cfg80211_port_authorized(9)cfg80211_disconnected(9)
channel / mgmt-tx timing β³
station info + tid stats β¨
cfg80211_sinfo_alloc_tid_stats(9)cfg80211_link_sinfo_alloc_tid_stats(9)cfg80211_sinfo_release_content(9)cfg80211_new_sta(9)cfg80211_del_sta_sinfo(9)cfg80211_del_sta(9)cfg80211_conn_failed(9)
rx / tx mgmt + control port π¨
struct cfg80211_rx_info(9)cfg80211_rx_mgmt_ext(9)cfg80211_rx_mgmt_khz(9)cfg80211_rx_mgmt(9)struct cfg80211_tx_status(9)cfg80211_mgmt_tx_status_ext(9)cfg80211_mgmt_tx_status(9)cfg80211_control_port_tx_status(9)cfg80211_rx_control_port(9)
CQM + radar + CAC + gtk rekey + pmksa candidates π¨
cfg80211_cqm_rssi_notify(9)cfg80211_cqm_pktloss_notify(9)cfg80211_cqm_txe_notify(9)cfg80211_cqm_beacon_loss_notify(9)__cfg80211_radar_event(9)cfg80211_sta_opmode_change_notify(9)cfg80211_cac_event(9)cfg80211_background_cac_abort(9)cfg80211_gtk_rekey_notify(9)cfg80211_pmksa_candidate_notify(9)
and the very last stragglers π
cfg80211_rx_spurious_frame(9)cfg80211_rx_unexpected_4addr_frame(9)cfg80211_probe_status(9)cfg80211_report_obss_beacon_khz(9)cfg80211_report_obss_beacon(9)struct cfg80211_beaconing_check_config(9)
okay that's genuinely all of them, bestie β nothing cut, nothing merged, no flags invented π more coming right upβ¦
...and the deep-lore chapter continues, because this page's SEE ALSO is not a snack, it's a whole buffet. π Grab a drink, bestie, we're doing the rest of the list:
cfg80211_reg_check_beaconing(9)cfg80211_reg_can_beacon(9)cfg80211_reg_can_beacon_relax(9)cfg80211_ch_switch_notify(9)cfg80211_ch_switch_started_notify(9)ieee80211_operating_class_to_band(9)ieee80211_operating_class_to_chandef(9)ieee80211_chandef_to_operating_class(9)ieee80211_chandef_to_khz(9)cfg80211_tdls_oper_request(9)cfg80211_calculate_bitrate(9)cfg80211_unregister_wdev(9)cfg80211_register_netdevice(9)cfg80211_unregister_netdevice(9)struct cfg80211_ft_event_params(9)cfg80211_ft_event(9)cfg80211_get_p2p_attr(9)ieee80211_ie_split_ric(9)ieee80211_ie_split(9)ieee80211_fragment_element(9)cfg80211_report_wowlan_wakeup(9)cfg80211_crit_proto_stopped(9)ieee80211_get_num_supported_channels(9)
Okay the operating-class / chandef conversion squad is genuinely satisfying β four whole pages that just translate between formats all day, icons of consistency π
cfg80211_check_combinations(9)cfg80211_iter_combinations(9)cfg80211_get_radio_idx_by_chan(9)cfg80211_stop_link(9)cfg80211_stop_iface(9)cfg80211_shutdown_all_interfaces(9)wiphy_ext_feature_set(9)wiphy_ext_feature_isset(9)
The feature set/isset duo, the check/iter combination duo, the stop-link/stop-iface/shutdown trio β manpage authors love a matched set, and honestly? Slay. β¨
cfg80211_free_nan_func(9)struct cfg80211_nan_match_params(9)cfg80211_nan_match(9)cfg80211_nan_func_terminated(9)cfg80211_nan_sched_update_done(9)cfg80211_external_auth_request(9)cfg80211_pmsr_report(9)cfg80211_pmsr_complete(9)cfg80211_iftype_allowed(9)cfg80211_assoc_comeback(9)cfg80211_update_owe_info_event(9)cfg80211_bss_flush(9)cfg80211_bss_color_notify(9)cfg80211_obss_color_collision_notify(9)cfg80211_color_change_started_notify(9)cfg80211_color_change_aborted_notify(9)cfg80211_color_change_notify(9)cfg80211_6ghz_power_type(9)cfg80211_links_removed(9)struct cfg80211_mlo_reconf_done_data(9)cfg80211_mlo_reconf_add_done(9)
Not the whole color-change notify family showing up in full β¨startedβ¨ / β¨abortedβ¨ / β¨notifyβ¨ formation β it's giving "we finish what we start", and we respect it π«Ά
cfg80211_schedule_channels_check(9)cfg80211_epcs_changed(9)cfg80211_next_nan_dw_notif(9)cfg80211_nan_cluster_joined(9)cfg80211_nan_ulw_update(9)cfg80211_nan_channel_evac(9)wiphy_locked_debugfs_read(9)wiphy_locked_debugfs_write(9)cfg80211_s1g_get_start_freq_khz(9)cfg80211_s1g_get_end_freq_khz(9)cfg80211_s1g_get_primary_sibling(9)cfg80211_incumbent_signal_notify(9)
And that's the list, bestie β every last reference, from the beacon checks all the way down to the very last cfg80211_incumbent_signal_notify(9). Ngl, hitting the end of a 64-entry SEE ALSO is a moment. ππ
Okay so here's the cute little sign-off you asked for: this page lives in ./include/net, it's dated October 2026, and its title/version tag is struct cfg80211_ops(9) β so if you're citing it, cite it properly, and if you're out here reading kernel WiFi internals for fun, you're literally main character energy. π¦ Go touch some grass (the driver kind, obviously). 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