#define pr_fmt(fmt) …
#include <linux/moduleparam.h>
#include <linux/inetdevice.h>
#include <linux/export.h>
#include <linux/sched/signal.h>
#include "core.h"
#include "cfg80211.h"
#include "debug.h"
#include "hif-ops.h"
#include "testmode.h"
#define RATETAB_ENT(_rate, _rateid, _flags) …
#define CHAN2G(_channel, _freq, _flags) …
#define CHAN5G(_channel, _flags) …
#define DEFAULT_BG_SCAN_PERIOD …
struct ath6kl_cfg80211_match_probe_ssid { … };
static struct ieee80211_rate ath6kl_rates[] = …;
#define ath6kl_a_rates …
#define ath6kl_a_rates_size …
#define ath6kl_g_rates …
#define ath6kl_g_rates_size …
#define ath6kl_g_htcap …
#define ath6kl_a_htcap …
static struct ieee80211_channel ath6kl_2ghz_channels[] = …;
static struct ieee80211_channel ath6kl_5ghz_a_channels[] = …;
static struct ieee80211_supported_band ath6kl_band_2ghz = …;
static struct ieee80211_supported_band ath6kl_band_5ghz = …;
#define CCKM_KRK_CIPHER_SUITE …
static bool __ath6kl_cfg80211_sscan_stop(struct ath6kl_vif *vif)
{ … }
static void ath6kl_cfg80211_sscan_disable(struct ath6kl_vif *vif)
{ … }
static int ath6kl_set_wpa_version(struct ath6kl_vif *vif,
enum nl80211_wpa_versions wpa_version)
{ … }
static int ath6kl_set_auth_type(struct ath6kl_vif *vif,
enum nl80211_auth_type auth_type)
{ … }
static int ath6kl_set_cipher(struct ath6kl_vif *vif, u32 cipher, bool ucast)
{ … }
static void ath6kl_set_key_mgmt(struct ath6kl_vif *vif, u32 key_mgmt)
{ … }
static bool ath6kl_cfg80211_ready(struct ath6kl_vif *vif)
{ … }
static bool ath6kl_is_wpa_ie(const u8 *pos)
{ … }
static bool ath6kl_is_rsn_ie(const u8 *pos)
{ … }
static bool ath6kl_is_wps_ie(const u8 *pos)
{ … }
static int ath6kl_set_assoc_req_ies(struct ath6kl_vif *vif, const u8 *ies,
size_t ies_len)
{ … }
static int ath6kl_nliftype_to_drv_iftype(enum nl80211_iftype type, u8 *nw_type)
{ … }
static bool ath6kl_is_valid_iftype(struct ath6kl *ar, enum nl80211_iftype type,
u8 *if_idx, u8 *nw_type)
{ … }
static bool ath6kl_is_tx_pending(struct ath6kl *ar)
{ … }
static void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif,
bool enable)
{ … }
static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme)
{ … }
static struct cfg80211_bss *
ath6kl_add_bss_if_needed(struct ath6kl_vif *vif,
enum network_type nw_type,
const u8 *bssid,
struct ieee80211_channel *chan,
const u8 *beacon_ie,
size_t beacon_ie_len)
{ … }
void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel,
u8 *bssid, u16 listen_intvl,
u16 beacon_intvl,
enum network_type nw_type,
u8 beacon_ie_len, u8 assoc_req_len,
u8 assoc_resp_len, u8 *assoc_info)
{ … }
static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy,
struct net_device *dev, u16 reason_code)
{ … }
void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason,
u8 *bssid, u8 assoc_resp_len,
u8 *assoc_info, u16 proto_reason)
{ … }
static int ath6kl_set_probed_ssids(struct ath6kl *ar,
struct ath6kl_vif *vif,
struct cfg80211_ssid *ssids, int n_ssids,
struct cfg80211_match_set *match_set,
int n_match_ssid)
{ … }
static int ath6kl_cfg80211_scan(struct wiphy *wiphy,
struct cfg80211_scan_request *request)
{ … }
void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted)
{ … }
void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
enum wmi_phy_mode mode)
{ … }
static int ath6kl_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 ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
int link_id, u8 key_index, bool pairwise,
const u8 *mac_addr)
{ … }
static int ath6kl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
int link_id, u8 key_index, bool pairwise,
const u8 *mac_addr, void *cookie,
void (*callback) (void *cookie,
struct key_params *))
{ … }
static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
struct net_device *ndev, int link_id,
u8 key_index, bool unicast,
bool multicast)
{ … }
void ath6kl_cfg80211_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid,
bool ismcast)
{ … }
static int ath6kl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
{ … }
static int ath6kl_cfg80211_set_txpower(struct wiphy *wiphy,
struct wireless_dev *wdev,
enum nl80211_tx_power_setting type,
int mbm)
{ … }
static int ath6kl_cfg80211_get_txpower(struct wiphy *wiphy,
struct wireless_dev *wdev,
int *dbm)
{ … }
static int ath6kl_cfg80211_set_power_mgmt(struct wiphy *wiphy,
struct net_device *dev,
bool pmgmt, int timeout)
{ … }
static struct wireless_dev *ath6kl_cfg80211_add_iface(struct wiphy *wiphy,
const char *name,
unsigned char name_assign_type,
enum nl80211_iftype type,
struct vif_params *params)
{ … }
static int ath6kl_cfg80211_del_iface(struct wiphy *wiphy,
struct wireless_dev *wdev)
{ … }
static int ath6kl_cfg80211_change_iface(struct wiphy *wiphy,
struct net_device *ndev,
enum nl80211_iftype type,
struct vif_params *params)
{ … }
static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_ibss_params *ibss_param)
{ … }
static int ath6kl_cfg80211_leave_ibss(struct wiphy *wiphy,
struct net_device *dev)
{ … }
static const u32 cipher_suites[] = …;
static bool is_rate_legacy(s32 rate)
{ … }
static bool is_rate_ht20(s32 rate, u8 *mcs, bool *sgi)
{ … }
static bool is_rate_ht40(s32 rate, u8 *mcs, bool *sgi)
{ … }
static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_info *sinfo)
{ … }
static int ath6kl_set_pmksa(struct wiphy *wiphy, struct net_device *netdev,
struct cfg80211_pmksa *pmksa)
{ … }
static int ath6kl_del_pmksa(struct wiphy *wiphy, struct net_device *netdev,
struct cfg80211_pmksa *pmksa)
{ … }
static int ath6kl_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev)
{ … }
static int ath6kl_wow_usr(struct ath6kl *ar, struct ath6kl_vif *vif,
struct cfg80211_wowlan *wow, u32 *filter)
{ … }
static int ath6kl_wow_ap(struct ath6kl *ar, struct ath6kl_vif *vif)
{ … }
static int ath6kl_wow_sta(struct ath6kl *ar, struct ath6kl_vif *vif)
{ … }
static int is_hsleep_mode_procsed(struct ath6kl_vif *vif)
{ … }
static bool is_ctrl_ep_empty(struct ath6kl *ar)
{ … }
static int ath6kl_cfg80211_host_sleep(struct ath6kl *ar, struct ath6kl_vif *vif)
{ … }
static int ath6kl_wow_suspend_vif(struct ath6kl_vif *vif,
struct cfg80211_wowlan *wow, u32 *filter)
{ … }
static int ath6kl_wow_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
{ … }
static int ath6kl_wow_resume_vif(struct ath6kl_vif *vif)
{ … }
static int ath6kl_wow_resume(struct ath6kl *ar)
{ … }
static int ath6kl_cfg80211_deepsleep_suspend(struct ath6kl *ar)
{ … }
static int ath6kl_cfg80211_deepsleep_resume(struct ath6kl *ar)
{ … }
int ath6kl_cfg80211_suspend(struct ath6kl *ar,
enum ath6kl_cfg_suspend_mode mode,
struct cfg80211_wowlan *wow)
{ … }
EXPORT_SYMBOL(…);
int ath6kl_cfg80211_resume(struct ath6kl *ar)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_PM
static int __ath6kl_cfg80211_suspend(struct wiphy *wiphy,
struct cfg80211_wowlan *wow)
{ … }
static int __ath6kl_cfg80211_resume(struct wiphy *wiphy)
{ … }
void ath6kl_check_wow_status(struct ath6kl *ar)
{ … }
#else
void ath6kl_check_wow_status(struct ath6kl *ar)
{
}
#endif
static int ath6kl_set_htcap(struct ath6kl_vif *vif, enum nl80211_band band,
bool ht_enable)
{ … }
static int ath6kl_restore_htcap(struct ath6kl_vif *vif)
{ … }
static bool ath6kl_is_p2p_ie(const u8 *pos)
{ … }
static int ath6kl_set_ap_probe_resp_ies(struct ath6kl_vif *vif,
const u8 *ies, size_t ies_len)
{ … }
static int ath6kl_set_ies(struct ath6kl_vif *vif,
struct cfg80211_beacon_data *info)
{ … }
static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
u8 *rsn_capab)
{ … }
static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ap_settings *info)
{ … }
static int ath6kl_change_beacon(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ap_update *params)
{ … }
static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev,
unsigned int link_id)
{ … }
static const u8 bcast_addr[ETH_ALEN] = …;
static int ath6kl_del_station(struct wiphy *wiphy, struct net_device *dev,
struct station_del_parameters *params)
{ … }
static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac,
struct station_parameters *params)
{ … }
static int ath6kl_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
unsigned int duration,
u64 *cookie)
{ … }
static int ath6kl_cancel_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
u64 cookie)
{ … }
static int ath6kl_send_go_probe_resp(struct ath6kl_vif *vif,
const u8 *buf, size_t len,
unsigned int freq)
{ … }
static bool ath6kl_mgmt_powersave_ap(struct ath6kl_vif *vif,
u32 id,
u32 freq,
u32 wait,
const u8 *buf,
size_t len,
bool *more_data,
bool no_cck)
{ … }
static bool ath6kl_is_p2p_go_ssid(const u8 *buf, size_t len)
{ … }
static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params, u64 *cookie)
{ … }
static int ath6kl_get_antenna(struct wiphy *wiphy,
u32 *tx_ant, u32 *rx_ant)
{ … }
static void ath6kl_update_mgmt_frame_registrations(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct mgmt_frame_regs *upd)
{ … }
static int ath6kl_cfg80211_sscan_start(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_sched_scan_request *request)
{ … }
static int ath6kl_cfg80211_sscan_stop(struct wiphy *wiphy,
struct net_device *dev, u64 reqid)
{ … }
static int ath6kl_cfg80211_set_bitrate(struct wiphy *wiphy,
struct net_device *dev,
unsigned int link_id,
const u8 *addr,
const struct cfg80211_bitrate_mask *mask)
{ … }
static int ath6kl_cfg80211_set_txe_config(struct wiphy *wiphy,
struct net_device *dev,
u32 rate, u32 pkts, u32 intvl)
{ … }
static const struct ieee80211_txrx_stypes
ath6kl_mgmt_stypes[NUM_NL80211_IFTYPES] = …;
static struct cfg80211_ops ath6kl_cfg80211_ops = …;
void ath6kl_cfg80211_stop(struct ath6kl_vif *vif)
{ … }
void ath6kl_cfg80211_stop_all(struct ath6kl *ar)
{ … }
static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
struct regulatory_request *request)
{ … }
static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif)
{ … }
void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready)
{ … }
void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif)
{ … }
static const char ath6kl_gstrings_sta_stats[][ETH_GSTRING_LEN] = …;
#define ATH6KL_STATS_LEN …
static int ath6kl_get_sset_count(struct net_device *dev, int sset)
{ … }
static void ath6kl_get_stats(struct net_device *dev,
struct ethtool_stats *stats,
u64 *data)
{ … }
static void ath6kl_get_strings(struct net_device *dev, u32 sset, u8 *data)
{ … }
static const struct ethtool_ops ath6kl_ethtool_ops = …;
struct wireless_dev *ath6kl_interface_add(struct ath6kl *ar, const char *name,
unsigned char name_assign_type,
enum nl80211_iftype type,
u8 fw_vif_idx, u8 nw_type)
{ … }
#ifdef CONFIG_PM
static const struct wiphy_wowlan_support ath6kl_wowlan_support = …;
#endif
int ath6kl_cfg80211_init(struct ath6kl *ar)
{ … }
void ath6kl_cfg80211_cleanup(struct ath6kl *ar)
{ … }
struct ath6kl *ath6kl_cfg80211_create(void)
{ … }
void ath6kl_cfg80211_destroy(struct ath6kl *ar)
{ … }