#include <linux/etherdevice.h>
#include <linux/moduleparam.h>
#include <net/netlink.h>
#include <net/cfg80211.h>
#include "wil6210.h"
#include "wmi.h"
#include "fw.h"
#define WIL_MAX_ROC_DURATION_MS …
#define WIL_EDMG_CHANNEL_9_SUBCHANNELS …
#define WIL_EDMG_CHANNEL_10_SUBCHANNELS …
#define WIL_EDMG_CHANNEL_11_SUBCHANNELS …
#define WIL_EDMG_BW_CONFIGURATION …
#define WIL_EDMG_CHANNELS …
bool disable_ap_sme;
module_param(disable_ap_sme, bool, 0444);
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_PM
static struct wiphy_wowlan_support wil_wowlan_support = …;
#endif
#define CHAN60G(_channel, _flags) …
static struct ieee80211_channel wil_60ghz_channels[] = …;
enum wil_rx_cb_mode { … };
static int wil_rx_cb_mode_to_n_bonded(u8 cb_mode)
{ … }
static int wil_tx_cb_mode_to_n_bonded(u8 cb_mode)
{ … }
static void
wil_memdup_ie(u8 **pdst, size_t *pdst_len, const u8 *src, size_t src_len)
{ … }
static int wil_num_supported_channels(struct wil6210_priv *wil)
{ … }
void update_supported_bands(struct wil6210_priv *wil)
{ … }
#define QCA_NL80211_VENDOR_ID …
#define WIL_MAX_RF_SECTORS …
#define WIL_CID_ALL …
enum qca_wlan_vendor_attr_rf_sector { … };
enum qca_wlan_vendor_attr_dmg_rf_sector_type { … };
enum qca_wlan_vendor_attr_dmg_rf_sector_cfg { … };
static const struct
nla_policy wil_rf_sector_policy[QCA_ATTR_DMG_RF_SECTOR_MAX + 1] = …;
static const struct
nla_policy wil_rf_sector_cfg_policy[QCA_ATTR_DMG_RF_SECTOR_CFG_MAX + 1] = …;
enum qca_nl80211_vendor_subcmds { … };
static int wil_rf_sector_get_cfg(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len);
static int wil_rf_sector_set_cfg(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len);
static int wil_rf_sector_get_selected(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len);
static int wil_rf_sector_set_selected(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len);
static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = …;
static struct ieee80211_supported_band wil_band_60ghz = …;
static const struct ieee80211_txrx_stypes
wil_mgmt_stypes[NUM_NL80211_IFTYPES] = …;
static const u32 wil_cipher_suites[] = …;
static const char * const key_usage_str[] = …;
int wil_iftype_nl2wmi(enum nl80211_iftype type)
{ … }
int wil_spec2wmi_ch(u8 spec_ch, u8 *wmi_ch)
{ … }
int wil_wmi2spec_ch(u8 wmi_ch, u8 *spec_ch)
{ … }
int wil_cid_fill_sinfo(struct wil6210_vif *vif, int cid,
struct station_info *sinfo)
{ … }
static int wil_cfg80211_get_station(struct wiphy *wiphy,
struct net_device *ndev,
const u8 *mac, struct station_info *sinfo)
{ … }
int wil_find_cid_by_idx(struct wil6210_priv *wil, u8 mid, int idx)
{ … }
static int wil_cfg80211_dump_station(struct wiphy *wiphy,
struct net_device *dev, int idx,
u8 *mac, struct station_info *sinfo)
{ … }
static int wil_cfg80211_start_p2p_device(struct wiphy *wiphy,
struct wireless_dev *wdev)
{ … }
static void wil_cfg80211_stop_p2p_device(struct wiphy *wiphy,
struct wireless_dev *wdev)
{ … }
static int wil_cfg80211_validate_add_iface(struct wil6210_priv *wil,
enum nl80211_iftype new_type)
{ … }
static int wil_cfg80211_validate_change_iface(struct wil6210_priv *wil,
struct wil6210_vif *vif,
enum nl80211_iftype new_type)
{ … }
static struct wireless_dev *
wil_cfg80211_add_iface(struct wiphy *wiphy, const char *name,
unsigned char name_assign_type,
enum nl80211_iftype type,
struct vif_params *params)
{ … }
int wil_vif_prepare_stop(struct wil6210_vif *vif)
{ … }
static int wil_cfg80211_del_iface(struct wiphy *wiphy,
struct wireless_dev *wdev)
{ … }
static bool wil_is_safe_switch(enum nl80211_iftype from,
enum nl80211_iftype to)
{ … }
static int wil_cfg80211_change_iface(struct wiphy *wiphy,
struct net_device *ndev,
enum nl80211_iftype type,
struct vif_params *params)
{ … }
static int wil_cfg80211_scan(struct wiphy *wiphy,
struct cfg80211_scan_request *request)
{ … }
static void wil_cfg80211_abort_scan(struct wiphy *wiphy,
struct wireless_dev *wdev)
{ … }
static void wil_print_crypto(struct wil6210_priv *wil,
struct cfg80211_crypto_settings *c)
{ … }
static const char *
wil_get_auth_type_name(enum nl80211_auth_type auth_type)
{ … }
static void wil_print_connect_params(struct wil6210_priv *wil,
struct cfg80211_connect_params *sme)
{ … }
static int wil_ft_connect(struct wiphy *wiphy,
struct net_device *ndev,
struct cfg80211_connect_params *sme)
{ … }
static int wil_get_wmi_edmg_channel(struct wil6210_priv *wil, u8 edmg_bw_config,
u8 edmg_channels, u8 *wmi_ch)
{ … }
static int wil_cfg80211_connect(struct wiphy *wiphy,
struct net_device *ndev,
struct cfg80211_connect_params *sme)
{ … }
static int wil_cfg80211_disconnect(struct wiphy *wiphy,
struct net_device *ndev,
u16 reason_code)
{ … }
static int wil_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
{ … }
int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
u64 *cookie)
{ … }
static int wil_cfg80211_set_channel(struct wiphy *wiphy,
struct cfg80211_chan_def *chandef)
{ … }
static enum wmi_key_usage wil_detect_key_usage(struct wireless_dev *wdev,
bool pairwise)
{ … }
static struct wil_sta_info *
wil_find_sta_by_key_usage(struct wil6210_priv *wil, u8 mid,
enum wmi_key_usage key_usage, const u8 *mac_addr)
{ … }
void wil_set_crypto_rx(u8 key_index, enum wmi_key_usage key_usage,
struct wil_sta_info *cs,
struct key_params *params)
{ … }
static void wil_del_rx_key(u8 key_index, enum wmi_key_usage key_usage,
struct wil_sta_info *cs)
{ … }
static int wil_cfg80211_add_key(struct wiphy *wiphy,
struct net_device *ndev, int link_id,
u8 key_index, bool pairwise,
const u8 *mac_addr,
struct key_params *params)
{ … }
static int wil_cfg80211_del_key(struct wiphy *wiphy,
struct net_device *ndev, int link_id,
u8 key_index, bool pairwise,
const u8 *mac_addr)
{ … }
static int wil_cfg80211_set_default_key(struct wiphy *wiphy,
struct net_device *ndev, int link_id,
u8 key_index, bool unicast,
bool multicast)
{ … }
static int wil_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
unsigned int duration,
u64 *cookie)
{ … }
static int wil_cancel_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
u64 cookie)
{ … }
static const u8 *_wil_cfg80211_find_ie(const u8 *ies, u16 ies_len, const u8 *ie,
u16 ie_len)
{ … }
static int _wil_cfg80211_merge_extra_ies(const u8 *ies1, u16 ies1_len,
const u8 *ies2, u16 ies2_len,
u8 **merged_ies, u16 *merged_len)
{ … }
static void wil_print_bcon_data(struct cfg80211_beacon_data *b)
{ … }
static u8 *
_wil_cfg80211_get_proberesp_ies(const u8 *proberesp, u16 proberesp_len,
u16 *ies_len)
{ … }
static int _wil_cfg80211_set_ies(struct wil6210_vif *vif,
struct cfg80211_beacon_data *bcon)
{ … }
static int _wil_cfg80211_start_ap(struct wiphy *wiphy,
struct net_device *ndev,
const u8 *ssid, size_t ssid_len, u32 privacy,
int bi, u8 chan, u8 wmi_edmg_channel,
struct cfg80211_beacon_data *bcon,
u8 hidden_ssid, u32 pbss)
{ … }
void wil_cfg80211_ap_recovery(struct wil6210_priv *wil)
{ … }
static int wil_cfg80211_change_beacon(struct wiphy *wiphy,
struct net_device *ndev,
struct cfg80211_ap_update *params)
{ … }
static int wil_cfg80211_start_ap(struct wiphy *wiphy,
struct net_device *ndev,
struct cfg80211_ap_settings *info)
{ … }
static int wil_cfg80211_stop_ap(struct wiphy *wiphy,
struct net_device *ndev,
unsigned int link_id)
{ … }
static int wil_cfg80211_add_station(struct wiphy *wiphy,
struct net_device *dev,
const u8 *mac,
struct station_parameters *params)
{ … }
static int wil_cfg80211_del_station(struct wiphy *wiphy,
struct net_device *dev,
struct station_del_parameters *params)
{ … }
static int wil_cfg80211_change_station(struct wiphy *wiphy,
struct net_device *dev,
const u8 *mac,
struct station_parameters *params)
{ … }
static void wil_probe_client_handle(struct wil6210_priv *wil,
struct wil6210_vif *vif,
struct wil_probe_client_req *req)
{ … }
static struct list_head *next_probe_client(struct wil6210_vif *vif)
{ … }
void wil_probe_client_worker(struct work_struct *work)
{ … }
void wil_probe_client_flush(struct wil6210_vif *vif)
{ … }
static int wil_cfg80211_probe_client(struct wiphy *wiphy,
struct net_device *dev,
const u8 *peer, u64 *cookie)
{ … }
static int wil_cfg80211_change_bss(struct wiphy *wiphy,
struct net_device *dev,
struct bss_parameters *params)
{ … }
static int wil_cfg80211_set_power_mgmt(struct wiphy *wiphy,
struct net_device *dev,
bool enabled, int timeout)
{ … }
static int wil_cfg80211_suspend(struct wiphy *wiphy,
struct cfg80211_wowlan *wow)
{ … }
static int wil_cfg80211_resume(struct wiphy *wiphy)
{ … }
static int
wil_cfg80211_sched_scan_start(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_sched_scan_request *request)
{ … }
static int
wil_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev,
u64 reqid)
{ … }
static int
wil_cfg80211_update_ft_ies(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_update_ft_ies_params *ftie)
{ … }
static int wil_cfg80211_set_multicast_to_unicast(struct wiphy *wiphy,
struct net_device *dev,
const bool enabled)
{ … }
static int wil_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy,
struct net_device *dev,
s32 rssi_thold, u32 rssi_hyst)
{ … }
static const struct cfg80211_ops wil_cfg80211_ops = …;
static void wil_wiphy_init(struct wiphy *wiphy)
{ … }
int wil_cfg80211_iface_combinations_from_fw(
struct wil6210_priv *wil, const struct wil_fw_record_concurrency *conc)
{ … }
struct wil6210_priv *wil_cfg80211_init(struct device *dev)
{ … }
void wil_cfg80211_deinit(struct wil6210_priv *wil)
{ … }
void wil_p2p_wdev_free(struct wil6210_priv *wil)
{ … }
static int wil_rf_sector_status_to_rc(u8 status)
{ … }
static int wil_rf_sector_get_cfg(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len)
{ … }
static int wil_rf_sector_set_cfg(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len)
{ … }
static int wil_rf_sector_get_selected(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len)
{ … }
static int wil_rf_sector_wmi_set_selected(struct wil6210_priv *wil,
u8 mid, u16 sector_index,
u8 sector_type, u8 cid)
{ … }
static int wil_rf_sector_set_selected(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data, int data_len)
{ … }