Name

struct cfg80211_ops — backend description for wireless configuration

Synopsis

struct cfg80211_ops {
  int (* suspend) (struct wiphy *wiphy, struct cfg80211_wowlan *wow);
  int (* resume) (struct wiphy *wiphy);
  struct net_device * (* add_virtual_intf) (struct wiphy *wiphy,char *name,enum nl80211_iftype type,u32 *flags,struct vif_params *params);
  int (* del_virtual_intf) (struct wiphy *wiphy, struct net_device *dev);
  int (* change_virtual_intf) (struct wiphy *wiphy,struct net_device *dev,enum nl80211_iftype type, u32 *flags,struct vif_params *params);
  int (* add_key) (struct wiphy *wiphy, struct net_device *netdev,u8 key_index, bool pairwise, const u8 *mac_addr,struct key_params *params);
  int (* get_key) (struct wiphy *wiphy, struct net_device *netdev,u8 key_index, bool pairwise, const u8 *mac_addr,void *cookie,void (*callback);
  int (* del_key) (struct wiphy *wiphy, struct net_device *netdev,u8 key_index, bool pairwise, const u8 *mac_addr);
  int (* set_default_key) (struct wiphy *wiphy,struct net_device *netdev,u8 key_index, bool unicast, bool multicast);
  int (* set_default_mgmt_key) (struct wiphy *wiphy,struct net_device *netdev,u8 key_index);
  int (* add_beacon) (struct wiphy *wiphy, struct net_device *dev,struct beacon_parameters *info);
  int (* set_beacon) (struct wiphy *wiphy, struct net_device *dev,struct beacon_parameters *info);
  int (* del_beacon) (struct wiphy *wiphy, struct net_device *dev);
  int (* add_station) (struct wiphy *wiphy, struct net_device *dev,u8 *mac, struct station_parameters *params);
  int (* del_station) (struct wiphy *wiphy, struct net_device *dev,u8 *mac);
  int (* change_station) (struct wiphy *wiphy, struct net_device *dev,u8 *mac, struct station_parameters *params);
  int (* get_station) (struct wiphy *wiphy, struct net_device *dev,u8 *mac, struct station_info *sinfo);
  int (* dump_station) (struct wiphy *wiphy, struct net_device *dev,int idx, u8 *mac, struct station_info *sinfo);
  int (* add_mpath) (struct wiphy *wiphy, struct net_device *dev,u8 *dst, u8 *next_hop);
  int (* del_mpath) (struct wiphy *wiphy, struct net_device *dev,u8 *dst);
  int (* change_mpath) (struct wiphy *wiphy, struct net_device *dev,u8 *dst, 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_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 (* change_bss) (struct wiphy *wiphy, struct net_device *dev,struct bss_parameters *params);
  int (* set_txq_params) (struct wiphy *wiphy,struct ieee80211_txq_params *params);
  int (* set_channel) (struct wiphy *wiphy, struct net_device *dev,struct ieee80211_channel *chan,enum nl80211_channel_type channel_type);
  int (* scan) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_scan_request *request);
  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,void *cookie);
  int (* disassoc) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_disassoc_request *req,void *cookie);
  int (* connect) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_connect_params *sme);
  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_wiphy_params) (struct wiphy *wiphy, u32 changed);
  int (* set_tx_power) (struct wiphy *wiphy,enum nl80211_tx_power_setting type, int mbm);
  int (* get_tx_power) (struct wiphy *wiphy, int *dbm);
  int (* set_wds_peer) (struct wiphy *wiphy, struct net_device *dev,const u8 *addr);
  void (* rfkill_poll) (struct wiphy *wiphy);
#ifdef CONFIG_NL80211_TESTMODE
  int (* testmode_cmd) (struct wiphy *wiphy, void *data, int len);
#endif
  int (* set_bitrate_mask) (struct wiphy *wiphy,struct net_device *dev,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 net_device *dev,struct ieee80211_channel *chan,enum nl80211_channel_type channel_type,unsigned int duration,u64 *cookie);
  int (* cancel_remain_on_channel) (struct wiphy *wiphy,struct net_device *dev,u64 cookie);
  int (* mgmt_tx) (struct wiphy *wiphy, struct net_device *dev,struct ieee80211_channel *chan, bool offchan,enum nl80211_channel_type channel_type,bool channel_type_valid, unsigned int wait,const u8 *buf, size_t len, u64 *cookie);
  int (* mgmt_tx_cancel_wait) (struct wiphy *wiphy,struct net_device *dev,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);
  void (* mgmt_frame_register) (struct wiphy *wiphy,struct net_device *dev,u16 frame_type, bool reg);
  int (* set_antenna) (struct wiphy *wiphy, u32 tx_ant, u32 rx_ant);
  int (* get_antenna) (struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant);
  int (* set_ringparam) (struct wiphy *wiphy, u32 tx, u32 rx);
  void (* get_ringparam) (struct wiphy *wiphy,u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
  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);
};  

Members

suspend

wiphy device needs to be suspended. The variable wow will be NULL or contain the enabled Wake-on-Wireless triggers that are configured for the device.

resume

wiphy device needs to be resumed

add_virtual_intf

create a new virtual interface with the given name, must set the struct wireless_dev's iftype. Beware: You must create the new netdev in the wiphy's network namespace! Returns the netdev, or an ERR_PTR.

del_virtual_intf

remove the virtual interface determined by ifindex.

change_virtual_intf

change type/configuration of virtual interface, keep the struct wireless_dev's iftype updated.

add_key

add a key with the given parameters. mac_addr will be NULL when adding a group key.

get_key

get information about the key with the given parameters. mac_addr will be NULL when 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, -ENOENT if it doesn't exist.

del_key

remove a key given the mac_addr (NULL for a group key) and key_index, return -ENOENT if the key doesn't exist.

set_default_key

set the default key on an interface

set_default_mgmt_key

set the default management frame key on an interface

add_beacon

Add a beacon with given parameters, head, interval and dtim_period will be valid, tail is optional.

set_beacon

Change the beacon parameters for an access point mode interface. This should reject the call when no beacon has been configured.

del_beacon

Remove beacon configuration and stop sending the beacon.

add_station

Add a new station.

del_station

Remove a station; mac may be NULL to remove all stations.

change_station

Modify a given station.

get_station

get station information for the station identified by mac

dump_station

dump station callback -- resume dump at index idx

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 index idx

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

leave_mesh

leave the current mesh network

change_bss

Modify parameters for a given BSS.

set_txq_params

Set TX queue parameters

set_channel

Set channel for a given wireless interface. Some devices may support multi-channel operation (by channel hopping) so cfg80211 doesn't verify much. Note, however, that the passed netdev may be NULL as well if the user requested changing the channel for the device itself, or for a monitor interface.

scan

Request to do a scan. If returning zero, the scan request is given the driver, and will be valid until passed to cfg80211_scan_done. For scan results, call cfg80211_inform_bss; you can call this outside the scan/scan_done bracket too.

auth

Request to authenticate with the specified peer

assoc

Request to (re)associate with the specified peer

deauth

Request to deauthenticate from the specified peer

disassoc

Request to disassociate from the specified peer

connect

Connect to the ESS with the specified parameters. When connected, call cfg80211_connect_result with status code WLAN_STATUS_SUCCESS. If the connection fails for some reason, call cfg80211_connect_result with the status from the AP.

disconnect

Disconnect from the BSS/ESS.

join_ibss

Join the specified IBSS (or create if necessary). Once done, call cfg80211_ibss_joined, also call that function when changing BSSID due to a merge.

leave_ibss

Leave the IBSS.

set_wiphy_params

Notify that wiphy parameters have changed; changed bitfield (see enum wiphy_params_flags) describes which values have changed. The actual parameter values are available in struct wiphy. If returning an error, no value should be changed.

set_tx_power

set the transmit power according to the parameters

get_tx_power

store the current TX power into the dbm variable; return 0 if successful

set_wds_peer

set the WDS peer for a WDS interface

rfkill_poll

polls the hw rfkill line, use cfg80211 reporting functions to adjust rfkill hw state

testmode_cmd

run a test mode command

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.

del_pmksa

Delete a cached PMKID.

flush_pmksa

Flush all 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 calling cfg80211_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 -1 allows the driver to adjust the dynamic ps timeout value.

set_cqm_rssi_config

Configure connection quality monitor RSSI threshold.

mgmt_frame_register

Notify driver that a management frame type was registered. Note that this callback may not sleep, and cannot run concurrently with itself.

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 see nl80211.h NL80211_ATTR_WIPHY_ANTENNA_TX).

get_antenna

Get current antenna configuration from device (tx_ant, rx_ant).

set_ringparam

Set tx and rx ring sizes.

get_ringparam

Get tx and rx ring current and maximum sizes.

sched_scan_start

Tell the driver to start a scheduled scan.

sched_scan_stop

Tell the driver to stop an ongoing scheduled scan. The driver_initiated flag specifies whether the driver itself has informed that the scan has stopped.

Description

This struct is registered by fullmac card drivers and/or wireless stacks in order to handle configuration requests on their interfaces.

All callbacks except where otherwise noted should return 0 on success or a negative error code.

All operations are currently invoked under rtnl for consistency with the wireless extensions but this is subject to reevaluation as soon as this code is used more widely and we have a first user without wext.