#include <linux/ieee80211.h>
#include <linux/nl80211.h>
#include <linux/rtnetlink.h>
#include <linux/slab.h>
#include <net/net_namespace.h>
#include <linux/rcupdate.h>
#include <linux/fips.h>
#include <linux/if_ether.h>
#include <net/cfg80211.h>
#include "ieee80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "mesh.h"
#include "wme.h"
static struct ieee80211_link_data *
ieee80211_link_or_deflink(struct ieee80211_sub_if_data *sdata, int link_id,
bool require_valid)
{ … }
static void ieee80211_set_mu_mimo_follow(struct ieee80211_sub_if_data *sdata,
struct vif_params *params)
{ … }
static int ieee80211_set_mon_options(struct ieee80211_sub_if_data *sdata,
struct vif_params *params)
{ … }
static int ieee80211_set_ap_mbssid_options(struct ieee80211_sub_if_data *sdata,
struct cfg80211_mbssid_config params,
struct ieee80211_bss_conf *link_conf)
{ … }
static struct wireless_dev *ieee80211_add_iface(struct wiphy *wiphy,
const char *name,
unsigned char name_assign_type,
enum nl80211_iftype type,
struct vif_params *params)
{ … }
static int ieee80211_del_iface(struct wiphy *wiphy, struct wireless_dev *wdev)
{ … }
static int ieee80211_change_iface(struct wiphy *wiphy,
struct net_device *dev,
enum nl80211_iftype type,
struct vif_params *params)
{ … }
static int ieee80211_start_p2p_device(struct wiphy *wiphy,
struct wireless_dev *wdev)
{ … }
static void ieee80211_stop_p2p_device(struct wiphy *wiphy,
struct wireless_dev *wdev)
{ … }
static int ieee80211_start_nan(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct cfg80211_nan_conf *conf)
{ … }
static void ieee80211_stop_nan(struct wiphy *wiphy,
struct wireless_dev *wdev)
{ … }
static int ieee80211_nan_change_conf(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct cfg80211_nan_conf *conf,
u32 changes)
{ … }
static int ieee80211_add_nan_func(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct cfg80211_nan_func *nan_func)
{ … }
static struct cfg80211_nan_func *
ieee80211_find_nan_func_by_cookie(struct ieee80211_sub_if_data *sdata,
u64 cookie)
{ … }
static void ieee80211_del_nan_func(struct wiphy *wiphy,
struct wireless_dev *wdev, u64 cookie)
{ … }
static int ieee80211_set_noack_map(struct wiphy *wiphy,
struct net_device *dev,
u16 noack_map)
{ … }
static int ieee80211_set_tx(struct ieee80211_sub_if_data *sdata,
const u8 *mac_addr, u8 key_idx)
{ … }
static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
int link_id, u8 key_idx, bool pairwise,
const u8 *mac_addr, struct key_params *params)
{ … }
static struct ieee80211_key *
ieee80211_lookup_key(struct ieee80211_sub_if_data *sdata, int link_id,
u8 key_idx, bool pairwise, const u8 *mac_addr)
{ … }
static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev,
int link_id, u8 key_idx, bool pairwise,
const u8 *mac_addr)
{ … }
static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev,
int link_id, u8 key_idx, bool pairwise,
const u8 *mac_addr, void *cookie,
void (*callback)(void *cookie,
struct key_params *params))
{ … }
static int ieee80211_config_default_key(struct wiphy *wiphy,
struct net_device *dev,
int link_id, u8 key_idx, bool uni,
bool multi)
{ … }
static int ieee80211_config_default_mgmt_key(struct wiphy *wiphy,
struct net_device *dev,
int link_id, u8 key_idx)
{ … }
static int ieee80211_config_default_beacon_key(struct wiphy *wiphy,
struct net_device *dev,
int link_id, u8 key_idx)
{ … }
void sta_set_rate_info_tx(struct sta_info *sta,
const struct ieee80211_tx_rate *rate,
struct rate_info *rinfo)
{ … }
static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
int idx, u8 *mac, struct station_info *sinfo)
{ … }
static int ieee80211_dump_survey(struct wiphy *wiphy, struct net_device *dev,
int idx, struct survey_info *survey)
{ … }
static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_info *sinfo)
{ … }
static int ieee80211_set_monitor_channel(struct wiphy *wiphy,
struct cfg80211_chan_def *chandef)
{ … }
static int
ieee80211_set_probe_resp(struct ieee80211_sub_if_data *sdata,
const u8 *resp, size_t resp_len,
const struct ieee80211_csa_settings *csa,
const struct ieee80211_color_change_settings *cca,
struct ieee80211_link_data *link)
{ … }
static int ieee80211_set_fils_discovery(struct ieee80211_sub_if_data *sdata,
struct cfg80211_fils_discovery *params,
struct ieee80211_link_data *link,
struct ieee80211_bss_conf *link_conf,
u64 *changed)
{ … }
static int
ieee80211_set_unsol_bcast_probe_resp(struct ieee80211_sub_if_data *sdata,
struct cfg80211_unsol_bcast_probe_resp *params,
struct ieee80211_link_data *link,
struct ieee80211_bss_conf *link_conf,
u64 *changed)
{ … }
static int ieee80211_set_ftm_responder_params(
struct ieee80211_sub_if_data *sdata,
const u8 *lci, size_t lci_len,
const u8 *civicloc, size_t civicloc_len,
struct ieee80211_bss_conf *link_conf)
{ … }
static int
ieee80211_copy_mbssid_beacon(u8 *pos, struct cfg80211_mbssid_elems *dst,
struct cfg80211_mbssid_elems *src)
{ … }
static int
ieee80211_copy_rnr_beacon(u8 *pos, struct cfg80211_rnr_elems *dst,
struct cfg80211_rnr_elems *src)
{ … }
static int
ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
struct ieee80211_link_data *link,
struct cfg80211_beacon_data *params,
const struct ieee80211_csa_settings *csa,
const struct ieee80211_color_change_settings *cca,
u64 *changed)
{ … }
static u8 ieee80211_num_beaconing_links(struct ieee80211_sub_if_data *sdata)
{ … }
static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ap_settings *params)
{ … }
static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ap_update *params)
{ … }
static void ieee80211_free_next_beacon(struct ieee80211_link_data *link)
{ … }
static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev,
unsigned int link_id)
{ … }
static int sta_apply_auth_flags(struct ieee80211_local *local,
struct sta_info *sta,
u32 mask, u32 set)
{ … }
static void sta_apply_mesh_params(struct ieee80211_local *local,
struct sta_info *sta,
struct station_parameters *params)
{ … }
enum sta_link_apply_mode { … };
static int sta_link_apply_parameters(struct ieee80211_local *local,
struct sta_info *sta,
enum sta_link_apply_mode mode,
struct link_station_parameters *params)
{ … }
static int sta_apply_parameters(struct ieee80211_local *local,
struct sta_info *sta,
struct station_parameters *params)
{ … }
static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac,
struct station_parameters *params)
{ … }
static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev,
struct station_del_parameters *params)
{ … }
static int ieee80211_change_station(struct wiphy *wiphy,
struct net_device *dev, const u8 *mac,
struct station_parameters *params)
{ … }
#ifdef CONFIG_MAC80211_MESH
static int ieee80211_add_mpath(struct wiphy *wiphy, struct net_device *dev,
const u8 *dst, const u8 *next_hop)
{ … }
static int ieee80211_del_mpath(struct wiphy *wiphy, struct net_device *dev,
const u8 *dst)
{ … }
static int ieee80211_change_mpath(struct wiphy *wiphy, struct net_device *dev,
const u8 *dst, const u8 *next_hop)
{ … }
static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop,
struct mpath_info *pinfo)
{ … }
static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev,
u8 *dst, u8 *next_hop, struct mpath_info *pinfo)
{ … }
static int ieee80211_dump_mpath(struct wiphy *wiphy, struct net_device *dev,
int idx, u8 *dst, u8 *next_hop,
struct mpath_info *pinfo)
{ … }
static void mpp_set_pinfo(struct mesh_path *mpath, u8 *mpp,
struct mpath_info *pinfo)
{ … }
static int ieee80211_get_mpp(struct wiphy *wiphy, struct net_device *dev,
u8 *dst, u8 *mpp, struct mpath_info *pinfo)
{ … }
static int ieee80211_dump_mpp(struct wiphy *wiphy, struct net_device *dev,
int idx, u8 *dst, u8 *mpp,
struct mpath_info *pinfo)
{ … }
static int ieee80211_get_mesh_config(struct wiphy *wiphy,
struct net_device *dev,
struct mesh_config *conf)
{ … }
static inline bool _chg_mesh_attr(enum nl80211_meshconf_params parm, u32 mask)
{ … }
static int copy_mesh_setup(struct ieee80211_if_mesh *ifmsh,
const struct mesh_setup *setup)
{ … }
static int ieee80211_update_mesh_config(struct wiphy *wiphy,
struct net_device *dev, u32 mask,
const struct mesh_config *nconf)
{ … }
static int ieee80211_join_mesh(struct wiphy *wiphy, struct net_device *dev,
const struct mesh_config *conf,
const struct mesh_setup *setup)
{ … }
static int ieee80211_leave_mesh(struct wiphy *wiphy, struct net_device *dev)
{ … }
#endif
static int ieee80211_change_bss(struct wiphy *wiphy,
struct net_device *dev,
struct bss_parameters *params)
{ … }
static int ieee80211_set_txq_params(struct wiphy *wiphy,
struct net_device *dev,
struct ieee80211_txq_params *params)
{ … }
#ifdef CONFIG_PM
static int ieee80211_suspend(struct wiphy *wiphy,
struct cfg80211_wowlan *wowlan)
{ … }
static int ieee80211_resume(struct wiphy *wiphy)
{ … }
#else
#define ieee80211_suspend …
#define ieee80211_resume …
#endif
static int ieee80211_scan(struct wiphy *wiphy,
struct cfg80211_scan_request *req)
{ … }
static void ieee80211_abort_scan(struct wiphy *wiphy, struct wireless_dev *wdev)
{ … }
static int
ieee80211_sched_scan_start(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_sched_scan_request *req)
{ … }
static int
ieee80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev,
u64 reqid)
{ … }
static int ieee80211_auth(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_auth_request *req)
{ … }
static int ieee80211_assoc(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_assoc_request *req)
{ … }
static int ieee80211_deauth(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_deauth_request *req)
{ … }
static int ieee80211_disassoc(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_disassoc_request *req)
{ … }
static int ieee80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ibss_params *params)
{ … }
static int ieee80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
{ … }
static int ieee80211_join_ocb(struct wiphy *wiphy, struct net_device *dev,
struct ocb_setup *setup)
{ … }
static int ieee80211_leave_ocb(struct wiphy *wiphy, struct net_device *dev)
{ … }
static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev,
int rate[NUM_NL80211_BANDS])
{ … }
static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
{ … }
static int ieee80211_set_tx_power(struct wiphy *wiphy,
struct wireless_dev *wdev,
enum nl80211_tx_power_setting type, int mbm)
{ … }
static int ieee80211_get_tx_power(struct wiphy *wiphy,
struct wireless_dev *wdev,
int *dbm)
{ … }
static void ieee80211_rfkill_poll(struct wiphy *wiphy)
{ … }
#ifdef CONFIG_NL80211_TESTMODE
static int ieee80211_testmode_cmd(struct wiphy *wiphy,
struct wireless_dev *wdev,
void *data, int len)
{ … }
static int ieee80211_testmode_dump(struct wiphy *wiphy,
struct sk_buff *skb,
struct netlink_callback *cb,
void *data, int len)
{ … }
#endif
int __ieee80211_request_smps_mgd(struct ieee80211_sub_if_data *sdata,
struct ieee80211_link_data *link,
enum ieee80211_smps_mode smps_mode)
{ … }
static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
bool enabled, int timeout)
{ … }
static void ieee80211_set_cqm_rssi_link(struct ieee80211_sub_if_data *sdata,
struct ieee80211_link_data *link,
s32 rssi_thold, u32 rssi_hyst,
s32 rssi_low, s32 rssi_high)
{ … }
static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy,
struct net_device *dev,
s32 rssi_thold, u32 rssi_hyst)
{ … }
static int ieee80211_set_cqm_rssi_range_config(struct wiphy *wiphy,
struct net_device *dev,
s32 rssi_low, s32 rssi_high)
{ … }
static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
struct net_device *dev,
unsigned int link_id,
const u8 *addr,
const struct cfg80211_bitrate_mask *mask)
{ … }
static int ieee80211_start_radar_detection(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_chan_def *chandef,
u32 cac_time_ms)
{ … }
static void ieee80211_end_cac(struct wiphy *wiphy,
struct net_device *dev)
{ … }
static struct cfg80211_beacon_data *
cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon)
{ … }
void ieee80211_csa_finish(struct ieee80211_vif *vif, unsigned int link_id)
{ … }
EXPORT_SYMBOL(…);
void ieee80211_channel_switch_disconnect(struct ieee80211_vif *vif, bool block_tx)
{ … }
EXPORT_SYMBOL(…);
static int ieee80211_set_after_csa_beacon(struct ieee80211_link_data *link_data,
u64 *changed)
{ … }
static int __ieee80211_csa_finalize(struct ieee80211_link_data *link_data)
{ … }
static void ieee80211_csa_finalize(struct ieee80211_link_data *link_data)
{ … }
void ieee80211_csa_finalize_work(struct wiphy *wiphy, struct wiphy_work *work)
{ … }
static int ieee80211_set_csa_beacon(struct ieee80211_link_data *link_data,
struct cfg80211_csa_settings *params,
u64 *changed)
{ … }
static void ieee80211_color_change_abort(struct ieee80211_link_data *link)
{ … }
static int
__ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_csa_settings *params)
{ … }
int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_csa_settings *params)
{ … }
u64 ieee80211_mgmt_tx_cookie(struct ieee80211_local *local)
{ … }
int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,
u64 *cookie, gfp_t gfp)
{ … }
static void
ieee80211_update_mgmt_frame_registrations(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct mgmt_frame_regs *upd)
{ … }
static int ieee80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
{ … }
static int ieee80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant)
{ … }
static int ieee80211_set_rekey_data(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_gtk_rekey_data *data)
{ … }
static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
const u8 *peer, u64 *cookie)
{ … }
static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
unsigned int link_id,
struct cfg80211_chan_def *chandef)
{ … }
#ifdef CONFIG_PM
static void ieee80211_set_wakeup(struct wiphy *wiphy, bool enabled)
{ … }
#endif
static int ieee80211_set_qos_map(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_qos_map *qos_map)
{ … }
static int ieee80211_set_ap_chanwidth(struct wiphy *wiphy,
struct net_device *dev,
unsigned int link_id,
struct cfg80211_chan_def *chandef)
{ … }
static int ieee80211_add_tx_ts(struct wiphy *wiphy, struct net_device *dev,
u8 tsid, const u8 *peer, u8 up,
u16 admitted_time)
{ … }
static int ieee80211_del_tx_ts(struct wiphy *wiphy, struct net_device *dev,
u8 tsid, const u8 *peer)
{ … }
void ieee80211_nan_func_terminated(struct ieee80211_vif *vif,
u8 inst_id,
enum nl80211_nan_func_term_reason reason,
gfp_t gfp)
{ … }
EXPORT_SYMBOL(…);
void ieee80211_nan_func_match(struct ieee80211_vif *vif,
struct cfg80211_nan_match_params *match,
gfp_t gfp)
{ … }
EXPORT_SYMBOL(…);
static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy,
struct net_device *dev,
const bool enabled)
{ … }
void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats,
struct txq_info *txqi)
{ … }
static int ieee80211_get_txq_stats(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct cfg80211_txq_stats *txqstats)
{ … }
static int
ieee80211_get_ftm_responder_stats(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_ftm_responder_stats *ftm_stats)
{ … }
static int
ieee80211_start_pmsr(struct wiphy *wiphy, struct wireless_dev *dev,
struct cfg80211_pmsr_request *request)
{ … }
static void
ieee80211_abort_pmsr(struct wiphy *wiphy, struct wireless_dev *dev,
struct cfg80211_pmsr_request *request)
{ … }
static int ieee80211_set_tid_config(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_tid_config *tid_conf)
{ … }
static int ieee80211_reset_tid_config(struct wiphy *wiphy,
struct net_device *dev,
const u8 *peer, u8 tids)
{ … }
static int ieee80211_set_sar_specs(struct wiphy *wiphy,
struct cfg80211_sar_specs *sar)
{ … }
static int
ieee80211_set_after_color_change_beacon(struct ieee80211_link_data *link,
u64 *changed)
{ … }
static int
ieee80211_set_color_change_beacon(struct ieee80211_link_data *link,
struct cfg80211_color_change_settings *params,
u64 *changed)
{ … }
static void
ieee80211_color_change_bss_config_notify(struct ieee80211_link_data *link,
u8 color, int enable, u64 changed)
{ … }
static int ieee80211_color_change_finalize(struct ieee80211_link_data *link)
{ … }
void ieee80211_color_change_finalize_work(struct wiphy *wiphy,
struct wiphy_work *work)
{ … }
void ieee80211_color_collision_detection_work(struct work_struct *work)
{ … }
void ieee80211_color_change_finish(struct ieee80211_vif *vif, u8 link_id)
{ … }
EXPORT_SYMBOL_GPL(…);
void
ieee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
u64 color_bitmap, u8 link_id)
{ … }
EXPORT_SYMBOL_GPL(…);
static int
ieee80211_color_change(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_color_change_settings *params)
{ … }
static int
ieee80211_set_radar_background(struct wiphy *wiphy,
struct cfg80211_chan_def *chandef)
{ … }
static int ieee80211_add_intf_link(struct wiphy *wiphy,
struct wireless_dev *wdev,
unsigned int link_id)
{ … }
static void ieee80211_del_intf_link(struct wiphy *wiphy,
struct wireless_dev *wdev,
unsigned int link_id)
{ … }
static int
ieee80211_add_link_station(struct wiphy *wiphy, struct net_device *dev,
struct link_station_parameters *params)
{ … }
static int
ieee80211_mod_link_station(struct wiphy *wiphy, struct net_device *dev,
struct link_station_parameters *params)
{ … }
static int
ieee80211_del_link_station(struct wiphy *wiphy, struct net_device *dev,
struct link_station_del_parameters *params)
{ … }
static int ieee80211_set_hw_timestamp(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_set_hw_timestamp *hwts)
{ … }
static int
ieee80211_set_ttlm(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ttlm_params *params)
{ … }
const struct cfg80211_ops mac80211_config_ops = …;