linux/drivers/net/wireless/ath/ath12k/mac.c

// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#include <net/mac80211.h>
#include <linux/etherdevice.h>

#include "mac.h"
#include "core.h"
#include "debug.h"
#include "wmi.h"
#include "hw.h"
#include "dp_tx.h"
#include "dp_rx.h"
#include "peer.h"
#include "debugfs.h"
#include "hif.h"
#include "wow.h"

#define CHAN2G(_channel, _freq, _flags)

#define CHAN5G(_channel, _freq, _flags)

#define CHAN6G(_channel, _freq, _flags)

static const struct ieee80211_channel ath12k_2ghz_channels[] =;

static const struct ieee80211_channel ath12k_5ghz_channels[] =;

static const struct ieee80211_channel ath12k_6ghz_channels[] =;

static struct ieee80211_rate ath12k_legacy_rates[] =;

static const int
ath12k_phymodes[NUM_NL80211_BANDS][ATH12K_CHAN_WIDTH_NUM] =;

const struct htt_rx_ring_tlv_filter ath12k_mac_mon_status_filter_default =;

#define ATH12K_MAC_FIRST_OFDM_RATE_IDX
#define ath12k_g_rates
#define ath12k_g_rates_size
#define ath12k_a_rates
#define ath12k_a_rates_size

#define ATH12K_MAC_SCAN_TIMEOUT_MSECS

static const u32 ath12k_smps_map[] =;

static int ath12k_start_vdev_delay(struct ath12k *ar,
				   struct ath12k_vif *arvif);
static void ath12k_mac_stop(struct ath12k *ar);
static int ath12k_mac_vdev_create(struct ath12k *ar, struct ieee80211_vif *vif);
static int ath12k_mac_vdev_delete(struct ath12k *ar, struct ieee80211_vif *vif);

static const char *ath12k_mac_phymode_str(enum wmi_phy_mode mode)
{}

enum rate_info_bw
ath12k_mac_bw_to_mac80211_bw(enum ath12k_supported_bw bw)
{}

enum ath12k_supported_bw ath12k_mac_mac80211_bw_to_ath12k_bw(enum rate_info_bw bw)
{}

int ath12k_mac_hw_ratecode_to_legacy_rate(u8 hw_rc, u8 preamble, u8 *rateidx,
					  u16 *rate)
{}

u8 ath12k_mac_bitrate_to_idx(const struct ieee80211_supported_band *sband,
			     u32 bitrate)
{}

static u32
ath12k_mac_max_ht_nss(const u8 *ht_mcs_mask)
{}

static u32
ath12k_mac_max_vht_nss(const u16 *vht_mcs_mask)
{}

static u8 ath12k_parse_mpdudensity(u8 mpdudensity)
{}

static int ath12k_mac_vif_chan(struct ieee80211_vif *vif,
			       struct cfg80211_chan_def *def)
{}

static bool ath12k_mac_bitrate_is_cck(int bitrate)
{}

u8 ath12k_mac_hw_rate_to_idx(const struct ieee80211_supported_band *sband,
			     u8 hw_rate, bool cck)
{}

static u8 ath12k_mac_bitrate_to_rate(int bitrate)
{}

static void ath12k_get_arvif_iter(void *data, u8 *mac,
				  struct ieee80211_vif *vif)
{}

struct ath12k_vif *ath12k_mac_get_arvif(struct ath12k *ar, u32 vdev_id)
{}

struct ath12k_vif *ath12k_mac_get_arvif_by_vdev_id(struct ath12k_base *ab,
						   u32 vdev_id)
{}

struct ath12k *ath12k_mac_get_ar_by_vdev_id(struct ath12k_base *ab, u32 vdev_id)
{}

struct ath12k *ath12k_mac_get_ar_by_pdev_id(struct ath12k_base *ab, u32 pdev_id)
{}

static struct ath12k *ath12k_mac_get_ar_by_chan(struct ieee80211_hw *hw,
						struct ieee80211_channel *channel)
{}

static struct ath12k *ath12k_get_ar_by_ctx(struct ieee80211_hw *hw,
					   struct ieee80211_chanctx_conf *ctx)
{}

static struct ath12k *ath12k_get_ar_by_vif(struct ieee80211_hw *hw,
					   struct ieee80211_vif *vif)
{}

static struct ath12k_vif *ath12k_mac_get_vif_up(struct ath12k *ar)
{}

static bool ath12k_mac_band_match(enum nl80211_band band1, enum WMI_HOST_WLAN_BAND band2)
{}

static u8 ath12k_mac_get_target_pdev_id_from_vif(struct ath12k_vif *arvif)
{}

u8 ath12k_mac_get_target_pdev_id(struct ath12k *ar)
{}

static void ath12k_pdev_caps_update(struct ath12k *ar)
{}

static int ath12k_mac_txpower_recalc(struct ath12k *ar)
{}

static int ath12k_recalc_rtscts_prot(struct ath12k_vif *arvif)
{}

static int ath12k_mac_set_kickout(struct ath12k_vif *arvif)
{}

void ath12k_mac_peer_cleanup_all(struct ath12k *ar)
{}

static int ath12k_mac_vdev_setup_sync(struct ath12k *ar)
{}

static int ath12k_monitor_vdev_up(struct ath12k *ar, int vdev_id)
{}

static int ath12k_mac_monitor_vdev_start(struct ath12k *ar, int vdev_id,
					 struct cfg80211_chan_def *chandef)
{}

static int ath12k_mac_monitor_vdev_stop(struct ath12k *ar)
{}

static int ath12k_mac_monitor_vdev_create(struct ath12k *ar)
{}

static int ath12k_mac_monitor_vdev_delete(struct ath12k *ar)
{}

static void
ath12k_mac_get_any_chandef_iter(struct ieee80211_hw *hw,
				struct ieee80211_chanctx_conf *conf,
				void *data)
{}

static int ath12k_mac_monitor_start(struct ath12k *ar)
{}

static int ath12k_mac_monitor_stop(struct ath12k *ar)
{}

static int ath12k_mac_vdev_stop(struct ath12k_vif *arvif)
{}

static int ath12k_mac_config(struct ath12k *ar, u32 changed)
{}

static int ath12k_mac_op_config(struct ieee80211_hw *hw, u32 changed)
{}

static int ath12k_mac_setup_bcn_p2p_ie(struct ath12k_vif *arvif,
				       struct sk_buff *bcn)
{}

static int ath12k_mac_remove_vendor_ie(struct sk_buff *skb, unsigned int oui,
				       u8 oui_type, size_t ie_offset)
{}

static void ath12k_mac_set_arvif_ies(struct ath12k_vif *arvif, struct sk_buff *bcn,
				     u8 bssid_index, bool *nontx_profile_found)
{}

static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_vif *arvif)
{}

static int ath12k_mac_setup_bcn_tmpl(struct ath12k_vif *arvif)
{}

static void ath12k_control_beaconing(struct ath12k_vif *arvif,
				     struct ieee80211_bss_conf *info)
{}

static void ath12k_mac_handle_beacon_iter(void *data, u8 *mac,
					  struct ieee80211_vif *vif)
{}

void ath12k_mac_handle_beacon(struct ath12k *ar, struct sk_buff *skb)
{}

static void ath12k_mac_handle_beacon_miss_iter(void *data, u8 *mac,
					       struct ieee80211_vif *vif)
{}

void ath12k_mac_handle_beacon_miss(struct ath12k *ar, u32 vdev_id)
{}

static void ath12k_mac_vif_sta_connection_loss_work(struct work_struct *work)
{}

static void ath12k_peer_assoc_h_basic(struct ath12k *ar,
				      struct ieee80211_vif *vif,
				      struct ieee80211_sta *sta,
				      struct ath12k_wmi_peer_assoc_arg *arg)
{}

static void ath12k_peer_assoc_h_crypto(struct ath12k *ar,
				       struct ieee80211_vif *vif,
				       struct ieee80211_sta *sta,
				       struct ath12k_wmi_peer_assoc_arg *arg)
{}

static void ath12k_peer_assoc_h_rates(struct ath12k *ar,
				      struct ieee80211_vif *vif,
				      struct ieee80211_sta *sta,
				      struct ath12k_wmi_peer_assoc_arg *arg)
{}

static bool
ath12k_peer_assoc_h_ht_masked(const u8 *ht_mcs_mask)
{}

static bool
ath12k_peer_assoc_h_vht_masked(const u16 *vht_mcs_mask)
{}

static void ath12k_peer_assoc_h_ht(struct ath12k *ar,
				   struct ieee80211_vif *vif,
				   struct ieee80211_sta *sta,
				   struct ath12k_wmi_peer_assoc_arg *arg)
{}

static int ath12k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss)
{}

static u16
ath12k_peer_assoc_h_vht_limit(u16 tx_mcs_set,
			      const u16 vht_mcs_limit[NL80211_VHT_NSS_MAX])
{}

static void ath12k_peer_assoc_h_vht(struct ath12k *ar,
				    struct ieee80211_vif *vif,
				    struct ieee80211_sta *sta,
				    struct ath12k_wmi_peer_assoc_arg *arg)
{}

static void ath12k_peer_assoc_h_he(struct ath12k *ar,
				   struct ieee80211_vif *vif,
				   struct ieee80211_sta *sta,
				   struct ath12k_wmi_peer_assoc_arg *arg)
{}

static void ath12k_peer_assoc_h_he_6ghz(struct ath12k *ar,
					struct ieee80211_vif *vif,
					struct ieee80211_sta *sta,
					struct ath12k_wmi_peer_assoc_arg *arg)
{}

static int ath12k_get_smps_from_capa(const struct ieee80211_sta_ht_cap *ht_cap,
				     const struct ieee80211_he_6ghz_capa *he_6ghz_capa,
				     int *smps)
{}

static void ath12k_peer_assoc_h_smps(struct ieee80211_sta *sta,
				     struct ath12k_wmi_peer_assoc_arg *arg)
{}

static void ath12k_peer_assoc_h_qos(struct ath12k *ar,
				    struct ieee80211_vif *vif,
				    struct ieee80211_sta *sta,
				    struct ath12k_wmi_peer_assoc_arg *arg)
{}

static int ath12k_peer_assoc_qos_ap(struct ath12k *ar,
				    struct ath12k_vif *arvif,
				    struct ieee80211_sta *sta)
{}

static bool ath12k_mac_sta_has_ofdm_only(struct ieee80211_sta *sta)
{}

static enum wmi_phy_mode ath12k_mac_get_phymode_vht(struct ath12k *ar,
						    struct ieee80211_sta *sta)
{}

static enum wmi_phy_mode ath12k_mac_get_phymode_he(struct ath12k *ar,
						   struct ieee80211_sta *sta)
{}

static enum wmi_phy_mode ath12k_mac_get_phymode_eht(struct ath12k *ar,
						    struct ieee80211_sta *sta)
{}

static void ath12k_peer_assoc_h_phymode(struct ath12k *ar,
					struct ieee80211_vif *vif,
					struct ieee80211_sta *sta,
					struct ath12k_wmi_peer_assoc_arg *arg)
{}

static void ath12k_mac_set_eht_mcs(u8 rx_tx_mcs7, u8 rx_tx_mcs9,
				   u8 rx_tx_mcs11, u8 rx_tx_mcs13,
				   u32 *rx_mcs, u32 *tx_mcs)
{}

static void ath12k_mac_set_eht_ppe_threshold(const u8 *ppe_thres,
					     struct ath12k_wmi_ppe_threshold_arg *ppet)
{}

static void ath12k_peer_assoc_h_eht(struct ath12k *ar,
				    struct ieee80211_vif *vif,
				    struct ieee80211_sta *sta,
				    struct ath12k_wmi_peer_assoc_arg *arg)
{}

static void ath12k_peer_assoc_prepare(struct ath12k *ar,
				      struct ieee80211_vif *vif,
				      struct ieee80211_sta *sta,
				      struct ath12k_wmi_peer_assoc_arg *arg,
				      bool reassoc)
{}

static int ath12k_setup_peer_smps(struct ath12k *ar, struct ath12k_vif *arvif,
				  const u8 *addr,
				  const struct ieee80211_sta_ht_cap *ht_cap,
				  const struct ieee80211_he_6ghz_capa *he_6ghz_capa)
{}

static void ath12k_bss_assoc(struct ath12k *ar,
			     struct ath12k_vif *arvif,
			     struct ieee80211_bss_conf *bss_conf)
{}

static void ath12k_bss_disassoc(struct ath12k *ar,
				struct ath12k_vif *arvif)
{}

static u32 ath12k_mac_get_rate_hw_value(int bitrate)
{}

static void ath12k_recalculate_mgmt_rate(struct ath12k *ar,
					 struct ieee80211_vif *vif,
					 struct cfg80211_chan_def *def)
{}

static int ath12k_mac_fils_discovery(struct ath12k_vif *arvif,
				     struct ieee80211_bss_conf *info)
{}

static void ath12k_mac_vif_setup_ps(struct ath12k_vif *arvif)
{}

static void ath12k_mac_bss_info_changed(struct ath12k *ar,
					struct ath12k_vif *arvif,
					struct ieee80211_bss_conf *info,
					u64 changed)
{}

static struct ath12k_vif_cache *ath12k_arvif_get_cache(struct ath12k_vif *arvif)
{}

static void ath12k_arvif_put_cache(struct ath12k_vif *arvif)
{}

static void ath12k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
					   struct ieee80211_vif *vif,
					   struct ieee80211_bss_conf *info,
					   u64 changed)
{}

static struct ath12k*
ath12k_mac_select_scan_device(struct ieee80211_hw *hw,
			      struct ieee80211_vif *vif,
			      u32 center_freq)
{}

void __ath12k_mac_scan_finish(struct ath12k *ar)
{}

void ath12k_mac_scan_finish(struct ath12k *ar)
{}

static int ath12k_scan_stop(struct ath12k *ar)
{}

static void ath12k_scan_abort(struct ath12k *ar)
{}

static void ath12k_scan_timeout_work(struct work_struct *work)
{}

static int ath12k_start_scan(struct ath12k *ar,
			     struct ath12k_wmi_scan_req_arg *arg)
{}

static int ath12k_mac_op_hw_scan(struct ieee80211_hw *hw,
				 struct ieee80211_vif *vif,
				 struct ieee80211_scan_request *hw_req)
{}

static void ath12k_mac_op_cancel_hw_scan(struct ieee80211_hw *hw,
					 struct ieee80211_vif *vif)
{}

static int ath12k_install_key(struct ath12k_vif *arvif,
			      struct ieee80211_key_conf *key,
			      enum set_key_cmd cmd,
			      const u8 *macaddr, u32 flags)
{}

static int ath12k_clear_peer_keys(struct ath12k_vif *arvif,
				  const u8 *addr)
{}

static int ath12k_mac_set_key(struct ath12k *ar, enum set_key_cmd cmd,
			      struct ieee80211_vif *vif, struct ieee80211_sta *sta,
			      struct ieee80211_key_conf *key)
{}

static int ath12k_mac_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
				 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
				 struct ieee80211_key_conf *key)
{}

static int
ath12k_mac_bitrate_mask_num_vht_rates(struct ath12k *ar,
				      enum nl80211_band band,
				      const struct cfg80211_bitrate_mask *mask)
{}

static int
ath12k_mac_set_peer_vht_fixed_rate(struct ath12k_vif *arvif,
				   struct ieee80211_sta *sta,
				   const struct cfg80211_bitrate_mask *mask,
				   enum nl80211_band band)
{}

static int ath12k_station_assoc(struct ath12k *ar,
				struct ieee80211_vif *vif,
				struct ieee80211_sta *sta,
				bool reassoc)
{}

static int ath12k_station_disassoc(struct ath12k *ar,
				   struct ieee80211_vif *vif,
				   struct ieee80211_sta *sta)
{}

static void ath12k_sta_rc_update_wk(struct work_struct *wk)
{}

static int ath12k_mac_inc_num_stations(struct ath12k_vif *arvif,
				       struct ieee80211_sta *sta)
{}

static void ath12k_mac_dec_num_stations(struct ath12k_vif *arvif,
					struct ieee80211_sta *sta)
{}

static int ath12k_mac_station_add(struct ath12k *ar,
				  struct ieee80211_vif *vif,
				  struct ieee80211_sta *sta)
{}

static u32 ath12k_mac_ieee80211_sta_bw_to_wmi(struct ath12k *ar,
					      struct ieee80211_sta *sta)
{}

static int ath12k_mac_op_sta_state(struct ieee80211_hw *hw,
				   struct ieee80211_vif *vif,
				   struct ieee80211_sta *sta,
				   enum ieee80211_sta_state old_state,
				   enum ieee80211_sta_state new_state)
{}

static int ath12k_mac_op_sta_set_txpwr(struct ieee80211_hw *hw,
				       struct ieee80211_vif *vif,
				       struct ieee80211_sta *sta)
{}

static void ath12k_mac_op_sta_rc_update(struct ieee80211_hw *hw,
					struct ieee80211_vif *vif,
					struct ieee80211_sta *sta,
					u32 changed)
{}

static int ath12k_conf_tx_uapsd(struct ath12k_vif *arvif,
				u16 ac, bool enable)
{}

static int ath12k_mac_conf_tx(struct ath12k_vif *arvif,
			      unsigned int link_id, u16 ac,
			      const struct ieee80211_tx_queue_params *params)
{}

static int ath12k_mac_op_conf_tx(struct ieee80211_hw *hw,
				 struct ieee80211_vif *vif,
				 unsigned int link_id, u16 ac,
				 const struct ieee80211_tx_queue_params *params)
{}

static struct ieee80211_sta_ht_cap
ath12k_create_ht_cap(struct ath12k *ar, u32 ar_ht_cap, u32 rate_cap_rx_chainmask)
{}

static int ath12k_mac_set_txbf_conf(struct ath12k_vif *arvif)
{}

static void ath12k_set_vht_txbf_cap(struct ath12k *ar, u32 *vht_cap)
{}

static struct ieee80211_sta_vht_cap
ath12k_create_vht_cap(struct ath12k *ar, u32 rate_cap_tx_chainmask,
		      u32 rate_cap_rx_chainmask)
{}

static void ath12k_mac_setup_ht_vht_cap(struct ath12k *ar,
					struct ath12k_pdev_cap *cap,
					u32 *ht_cap_info)
{}

static int ath12k_check_chain_mask(struct ath12k *ar, u32 ant, bool is_tx_ant)
{}

static void ath12k_gen_ppe_thresh(struct ath12k_wmi_ppe_threshold_arg *fw_ppet,
				  u8 *he_ppet)
{}

static void
ath12k_mac_filter_he_cap_mesh(struct ieee80211_he_cap_elem *he_cap_elem)
{}

static __le16 ath12k_mac_setup_he_6ghz_cap(struct ath12k_pdev_cap *pcap,
					   struct ath12k_band_cap *bcap)
{}

static void ath12k_mac_copy_he_cap(struct ath12k_band_cap *band_cap,
				   int iftype, u8 num_tx_chains,
				   struct ieee80211_sta_he_cap *he_cap)
{}

static void
ath12k_mac_copy_eht_mcs_nss(struct ath12k_band_cap *band_cap,
			    struct ieee80211_eht_mcs_nss_supp *mcs_nss,
			    const struct ieee80211_he_cap_elem *he_cap,
			    const struct ieee80211_eht_cap_elem_fixed *eht_cap)
{}

static void ath12k_mac_copy_eht_ppe_thresh(struct ath12k_wmi_ppe_threshold_arg *fw_ppet,
					   struct ieee80211_sta_eht_cap *cap)
{}

static void
ath12k_mac_filter_eht_cap_mesh(struct ieee80211_eht_cap_elem_fixed
			       *eht_cap_elem)
{}

static void ath12k_mac_copy_eht_cap(struct ath12k *ar,
				    struct ath12k_band_cap *band_cap,
				    struct ieee80211_he_cap_elem *he_cap_elem,
				    int iftype,
				    struct ieee80211_sta_eht_cap *eht_cap)
{}

static int ath12k_mac_copy_sband_iftype_data(struct ath12k *ar,
					     struct ath12k_pdev_cap *cap,
					     struct ieee80211_sband_iftype_data *data,
					     int band)
{}

static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
					       struct ath12k_pdev_cap *cap)
{}

static int __ath12k_set_antenna(struct ath12k *ar, u32 tx_ant, u32 rx_ant)
{}

static void ath12k_mgmt_over_wmi_tx_drop(struct ath12k *ar, struct sk_buff *skb)
{}

int ath12k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx)
{}

static int ath12k_mac_vif_txmgmt_idr_remove(int buf_id, void *skb, void *ctx)
{}

static int ath12k_mac_mgmt_tx_wmi(struct ath12k *ar, struct ath12k_vif *arvif,
				  struct sk_buff *skb)
{}

static void ath12k_mgmt_over_wmi_tx_purge(struct ath12k *ar)
{}

static void ath12k_mgmt_over_wmi_tx_work(struct work_struct *work)
{}

static int ath12k_mac_mgmt_tx(struct ath12k *ar, struct sk_buff *skb,
			      bool is_prb_rsp)
{}

static void ath12k_mac_add_p2p_noa_ie(struct ath12k *ar,
				      struct ieee80211_vif *vif,
				      struct sk_buff *skb,
				      bool is_prb_rsp)
{}

static void ath12k_mac_op_tx(struct ieee80211_hw *hw,
			     struct ieee80211_tx_control *control,
			     struct sk_buff *skb)
{}

void ath12k_mac_drain_tx(struct ath12k *ar)
{}

static int ath12k_mac_config_mon_status_default(struct ath12k *ar, bool enable)
{}

static int ath12k_mac_start(struct ath12k *ar)
{}

static void ath12k_drain_tx(struct ath12k_hw *ah)
{}

static int ath12k_mac_op_start(struct ieee80211_hw *hw)
{}

int ath12k_mac_rfkill_config(struct ath12k *ar)
{}

int ath12k_mac_rfkill_enable_radio(struct ath12k *ar, bool enable)
{}

static void ath12k_mac_stop(struct ath12k *ar)
{}

static void ath12k_mac_op_stop(struct ieee80211_hw *hw, bool suspend)
{}

static u8
ath12k_mac_get_vdev_stats_id(struct ath12k_vif *arvif)
{}

static int ath12k_mac_setup_vdev_params_mbssid(struct ath12k_vif *arvif,
					       u32 *flags, u32 *tx_vdev_id)
{}

static int ath12k_mac_setup_vdev_create_arg(struct ath12k_vif *arvif,
					    struct ath12k_wmi_vdev_create_arg *arg)
{}

static u32
ath12k_mac_prepare_he_mode(struct ath12k_pdev *pdev, u32 viftype)
{}

static int ath12k_set_he_mu_sounding_mode(struct ath12k *ar,
					  struct ath12k_vif *arvif)
{}

static void ath12k_mac_update_vif_offload(struct ath12k_vif *arvif)
{}

static void ath12k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
					     struct ieee80211_vif *vif)
{}

static int ath12k_mac_vdev_create(struct ath12k *ar, struct ieee80211_vif *vif)
{}

static void ath12k_mac_vif_cache_flush(struct ath12k *ar,  struct ieee80211_vif *vif)
{}

static struct ath12k *ath12k_mac_assign_vif_to_vdev(struct ieee80211_hw *hw,
						    struct ieee80211_vif *vif,
						    struct ieee80211_chanctx_conf *ctx)
{}

static int ath12k_mac_op_add_interface(struct ieee80211_hw *hw,
				       struct ieee80211_vif *vif)
{}

static void ath12k_mac_vif_unref(struct ath12k_dp *dp, struct ieee80211_vif *vif)
{}

static int ath12k_mac_vdev_delete(struct ath12k *ar, struct ieee80211_vif *vif)
{}

static void ath12k_mac_op_remove_interface(struct ieee80211_hw *hw,
					   struct ieee80211_vif *vif)
{}

/* FIXME: Has to be verified. */
#define SUPPORTED_FILTERS

static void ath12k_mac_configure_filter(struct ath12k *ar,
					unsigned int total_flags)
{}

static void ath12k_mac_op_configure_filter(struct ieee80211_hw *hw,
					   unsigned int changed_flags,
					   unsigned int *total_flags,
					   u64 multicast)
{}

static int ath12k_mac_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
{}

static int ath12k_mac_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
{}

static int ath12k_mac_ampdu_action(struct ath12k_vif *arvif,
				   struct ieee80211_ampdu_params *params)
{}

static int ath12k_mac_op_ampdu_action(struct ieee80211_hw *hw,
				      struct ieee80211_vif *vif,
				      struct ieee80211_ampdu_params *params)
{}

static int ath12k_mac_op_add_chanctx(struct ieee80211_hw *hw,
				     struct ieee80211_chanctx_conf *ctx)
{}

static void ath12k_mac_op_remove_chanctx(struct ieee80211_hw *hw,
					 struct ieee80211_chanctx_conf *ctx)
{}

static enum wmi_phy_mode
ath12k_mac_check_down_grade_phy_mode(struct ath12k *ar,
				     enum wmi_phy_mode mode,
				     enum nl80211_band band,
				     enum nl80211_iftype type)
{}

static int
ath12k_mac_vdev_start_restart(struct ath12k_vif *arvif,
			      struct ieee80211_chanctx_conf *ctx,
			      bool restart)
{}

static int ath12k_mac_vdev_start(struct ath12k_vif *arvif,
				 struct ieee80211_chanctx_conf *ctx)
{}

static int ath12k_mac_vdev_restart(struct ath12k_vif *arvif,
				   struct ieee80211_chanctx_conf *ctx)
{}

struct ath12k_mac_change_chanctx_arg {};

static void
ath12k_mac_change_chanctx_cnt_iter(void *data, u8 *mac,
				   struct ieee80211_vif *vif)
{}

static void
ath12k_mac_change_chanctx_fill_iter(void *data, u8 *mac,
				    struct ieee80211_vif *vif)
{}

static u32 ath12k_mac_nlwidth_to_wmiwidth(enum nl80211_chan_width width)
{}

static int ath12k_mac_update_peer_puncturing_width(struct ath12k *ar,
						   struct ath12k_vif *arvif,
						   struct cfg80211_chan_def def)
{}

static void
ath12k_mac_update_vif_chan(struct ath12k *ar,
			   struct ieee80211_vif_chanctx_switch *vifs,
			   int n_vifs)
{}

static void
ath12k_mac_update_active_vif_chan(struct ath12k *ar,
				  struct ieee80211_chanctx_conf *ctx)
{}

static void ath12k_mac_op_change_chanctx(struct ieee80211_hw *hw,
					 struct ieee80211_chanctx_conf *ctx,
					 u32 changed)
{}

static int ath12k_start_vdev_delay(struct ath12k *ar,
				   struct ath12k_vif *arvif)
{}

static int
ath12k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
				 struct ieee80211_vif *vif,
				 struct ieee80211_bss_conf *link_conf,
				 struct ieee80211_chanctx_conf *ctx)
{}

static void
ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
				   struct ieee80211_vif *vif,
				   struct ieee80211_bss_conf *link_conf,
				   struct ieee80211_chanctx_conf *ctx)
{}

static int
ath12k_mac_op_switch_vif_chanctx(struct ieee80211_hw *hw,
				 struct ieee80211_vif_chanctx_switch *vifs,
				 int n_vifs,
				 enum ieee80211_chanctx_switch_mode mode)
{}

static int
ath12k_set_vdev_param_to_all_vifs(struct ath12k *ar, int param, u32 value)
{}

/* mac80211 stores device specific RTS/Fragmentation threshold value,
 * this is set interface specific to firmware from ath12k driver
 */
static int ath12k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
{}

static int ath12k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
{}

static int ath12k_mac_flush(struct ath12k *ar)
{}

int ath12k_mac_wait_tx_complete(struct ath12k *ar)
{}

static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
				u32 queues, bool drop)
{}

static int
ath12k_mac_bitrate_mask_num_ht_rates(struct ath12k *ar,
				     enum nl80211_band band,
				     const struct cfg80211_bitrate_mask *mask)
{}

static bool
ath12k_mac_has_single_legacy_rate(struct ath12k *ar,
				  enum nl80211_band band,
				  const struct cfg80211_bitrate_mask *mask)
{}

static bool
ath12k_mac_bitrate_mask_get_single_nss(struct ath12k *ar,
				       enum nl80211_band band,
				       const struct cfg80211_bitrate_mask *mask,
				       int *nss)
{}

static int
ath12k_mac_get_single_legacy_rate(struct ath12k *ar,
				  enum nl80211_band band,
				  const struct cfg80211_bitrate_mask *mask,
				  u32 *rate, u8 *nss)
{}

static int ath12k_mac_set_fixed_rate_params(struct ath12k_vif *arvif,
					    u32 rate, u8 nss, u8 sgi, u8 ldpc)
{}

static bool
ath12k_mac_vht_mcs_range_present(struct ath12k *ar,
				 enum nl80211_band band,
				 const struct cfg80211_bitrate_mask *mask)
{}

static void ath12k_mac_set_bitrate_mask_iter(void *data,
					     struct ieee80211_sta *sta)
{}

static void ath12k_mac_disable_peer_fixed_rate(void *data,
					       struct ieee80211_sta *sta)
{}

static int
ath12k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
			       struct ieee80211_vif *vif,
			       const struct cfg80211_bitrate_mask *mask)
{}

static void
ath12k_mac_op_reconfig_complete(struct ieee80211_hw *hw,
				enum ieee80211_reconfig_type reconfig_type)
{}

static void
ath12k_mac_update_bss_chan_survey(struct ath12k *ar,
				  struct ieee80211_channel *channel)
{}

static int ath12k_mac_op_get_survey(struct ieee80211_hw *hw, int idx,
				    struct survey_info *survey)
{}

static void ath12k_mac_op_sta_statistics(struct ieee80211_hw *hw,
					 struct ieee80211_vif *vif,
					 struct ieee80211_sta *sta,
					 struct station_info *sinfo)
{}

static int ath12k_mac_op_cancel_remain_on_channel(struct ieee80211_hw *hw,
						  struct ieee80211_vif *vif)
{}

static int ath12k_mac_op_remain_on_channel(struct ieee80211_hw *hw,
					   struct ieee80211_vif *vif,
					   struct ieee80211_channel *chan,
					   int duration,
					   enum ieee80211_roc_type type)
{}

static void ath12k_mac_op_set_rekey_data(struct ieee80211_hw *hw,
					 struct ieee80211_vif *vif,
					 struct cfg80211_gtk_rekey_data *data)
{}

static const struct ieee80211_ops ath12k_ops =;

static void ath12k_mac_update_ch_list(struct ath12k *ar,
				      struct ieee80211_supported_band *band,
				      u32 freq_low, u32 freq_high)
{}

static u32 ath12k_get_phy_id(struct ath12k *ar, u32 band)
{}

static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
					   u32 supported_bands,
					   struct ieee80211_supported_band *bands[])
{}

static u16 ath12k_mac_get_ifmodes(struct ath12k_hw *ah)
{}

static bool ath12k_mac_is_iface_mode_enable(struct ath12k_hw *ah,
					    enum nl80211_iftype type)
{}

static int ath12k_mac_setup_iface_combinations(struct ath12k_hw *ah)
{}

static const u8 ath12k_if_types_ext_capa[] =;

static const u8 ath12k_if_types_ext_capa_sta[] =;

static const u8 ath12k_if_types_ext_capa_ap[] =;

static const struct wiphy_iftype_ext_capab ath12k_iftypes_ext_capa[] =;

static void ath12k_mac_cleanup_unregister(struct ath12k *ar)
{}

static void ath12k_mac_hw_unregister(struct ath12k_hw *ah)
{}

static int ath12k_mac_setup_register(struct ath12k *ar,
				     u32 *ht_cap,
				     struct ieee80211_supported_band *bands[])
{}

static int ath12k_mac_hw_register(struct ath12k_hw *ah)
{}

static void ath12k_mac_setup(struct ath12k *ar)
{}

int ath12k_mac_register(struct ath12k_base *ab)
{}

void ath12k_mac_unregister(struct ath12k_base *ab)
{}

static void ath12k_mac_hw_destroy(struct ath12k_hw *ah)
{}

static struct ath12k_hw *ath12k_mac_hw_allocate(struct ath12k_base *ab,
						struct ath12k_pdev_map *pdev_map,
						u8 num_pdev_map)
{}

void ath12k_mac_destroy(struct ath12k_base *ab)
{}

int ath12k_mac_allocate(struct ath12k_base *ab)
{}

int ath12k_mac_vif_set_keepalive(struct ath12k_vif *arvif,
				 enum wmi_sta_keepalive_method method,
				 u32 interval)
{}