linux/drivers/net/wireless/ath/ath10k/core.h

/* SPDX-License-Identifier: ISC */
/*
 * Copyright (c) 2005-2011 Atheros Communications Inc.
 * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#ifndef _CORE_H_
#define _CORE_H_

#include <linux/completion.h>
#include <linux/if_ether.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/uuid.h>
#include <linux/time.h>
#include <linux/leds.h>

#include "htt.h"
#include "htc.h"
#include "hw.h"
#include "targaddrs.h"
#include "wmi.h"
#include "../ath.h"
#include "../regd.h"
#include "../dfs_pattern_detector.h"
#include "spectral.h"
#include "thermal.h"
#include "wow.h"
#include "swap.h"

#define MS(_v, _f)
#define SM(_v, _f)
#define WO(_f)

#define ATH10K_SCAN_ID
#define ATH10K_SCAN_CHANNEL_SWITCH_WMI_EVT_OVERHEAD
#define WMI_READY_TIMEOUT
#define ATH10K_FLUSH_TIMEOUT_HZ
#define ATH10K_CONNECTION_LOSS_HZ
#define ATH10K_NUM_CHANS
#define ATH10K_MAX_5G_CHAN

/* Antenna noise floor */
#define ATH10K_DEFAULT_NOISE_FLOOR

#define ATH10K_INVALID_RSSI

#define ATH10K_MAX_NUM_MGMT_PENDING

/* number of failed packets (20 packets with 16 sw reties each) */
#define ATH10K_KICKOUT_THRESHOLD

/*
 * Use insanely high numbers to make sure that the firmware implementation
 * won't start, we have the same functionality already in hostapd. Unit
 * is seconds.
 */
#define ATH10K_KEEPALIVE_MIN_IDLE
#define ATH10K_KEEPALIVE_MAX_IDLE
#define ATH10K_KEEPALIVE_MAX_UNRESPONSIVE

/* SMBIOS type containing Board Data File Name Extension */
#define ATH10K_SMBIOS_BDF_EXT_TYPE

/* SMBIOS type structure length (excluding strings-set) */
#define ATH10K_SMBIOS_BDF_EXT_LENGTH

/* Offset pointing to Board Data File Name Extension */
#define ATH10K_SMBIOS_BDF_EXT_OFFSET

/* Board Data File Name Extension string length.
 * String format: BDF_<Customer ID>_<Extension>\0
 */
#define ATH10K_SMBIOS_BDF_EXT_STR_LENGTH

/* The magic used by QCA spec */
#define ATH10K_SMBIOS_BDF_EXT_MAGIC

/* Default Airtime weight multiplier (Tuned for multiclient performance) */
#define ATH10K_AIRTIME_WEIGHT_MULTIPLIER

#define ATH10K_MAX_RETRY_COUNT

#define ATH10K_ITER_NORMAL_FLAGS
#define ATH10K_ITER_RESUME_FLAGS

struct ath10k;

static inline const char *ath10k_bus_str(enum ath10k_bus bus)
{}

enum ath10k_skb_flags {};

struct ath10k_skb_cb {} __packed;

struct ath10k_skb_rxcb {};

static inline struct ath10k_skb_cb *ATH10K_SKB_CB(struct sk_buff *skb)
{}

static inline struct ath10k_skb_rxcb *ATH10K_SKB_RXCB(struct sk_buff *skb)
{}

#define ATH10K_RXCB_SKB(rxcb)

static inline u32 host_interest_item_address(u32 item_offset)
{}

enum ath10k_phy_mode {};

/* Data rate 100KBPS based on IE Index */
struct ath10k_index_ht_data_rate_type {};

/* Data rate 100KBPS based on IE Index */
struct ath10k_index_vht_data_rate_type {};

struct ath10k_bmi {};

struct ath10k_mem_chunk {};

struct ath10k_wmi {};

struct ath10k_fw_stats_peer {};

struct ath10k_fw_extd_stats_peer {};

struct ath10k_fw_stats_vdev {};

struct ath10k_fw_stats_vdev_extd {};

struct ath10k_fw_stats_pdev {};

struct ath10k_fw_stats {};

#define ATH10K_TPC_TABLE_TYPE_FLAG
#define ATH10K_TPC_PREAM_TABLE_END

struct ath10k_tpc_table {};

struct ath10k_tpc_stats {};

struct ath10k_tpc_table_final {};

struct ath10k_tpc_stats_final {};

struct ath10k_dfs_stats {};

enum ath10k_radar_confirmation_state {};

struct ath10k_radar_found_info {};

#define ATH10K_MAX_NUM_PEER_IDS

struct ath10k_peer {};

struct ath10k_txq {};

enum ath10k_pkt_rx_err {};

enum ath10k_ampdu_subfrm_num {};

enum ath10k_amsdu_subfrm_num {};

struct ath10k_sta_tid_stats {};

enum ath10k_counter_type {};

enum ath10k_stats_type {};

struct ath10k_htt_data_stats {};

struct ath10k_htt_tx_stats {};

#define ATH10K_TID_MAX

struct ath10k_sta {};

#define ATH10K_VDEV_SETUP_TIMEOUT_HZ
#define ATH10K_VDEV_DELETE_TIMEOUT_HZ

enum ath10k_beacon_state {};

struct ath10k_vif {};

struct ath10k_vif_iter {};

/* Copy Engine register dump, protected by ce-lock */
struct ath10k_ce_crash_data {};

struct ath10k_ce_crash_hdr {};

#define MAX_MEM_DUMP_TYPE

/* used for crash-dump storage, protected by data-lock */
struct ath10k_fw_crash_data {};

struct ath10k_debug {};

enum ath10k_state {};

enum ath10k_firmware_mode {};

enum ath10k_fw_features {};

enum ath10k_dev_flags {};

enum ath10k_cal_mode {};

enum ath10k_crypt_mode {};

static inline const char *ath10k_cal_mode_str(enum ath10k_cal_mode mode)
{}

enum ath10k_scan_state {};

static inline const char *ath10k_scan_state_str(enum ath10k_scan_state state)
{}

enum ath10k_tx_pause_reason {};

struct ath10k_fw_file {};

struct ath10k_fw_components {};

struct ath10k_per_peer_tx_stats {};

enum ath10k_dev_type {};

struct ath10k_bus_params {};

struct ath10k {};

static inline bool ath10k_peer_stats_enabled(struct ath10k *ar)
{}

extern unsigned int ath10k_frame_mode;
extern unsigned long ath10k_coredump_mask;

void ath10k_core_napi_sync_disable(struct ath10k *ar);
void ath10k_core_napi_enable(struct ath10k *ar);
struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,
				  enum ath10k_bus bus,
				  enum ath10k_hw_rev hw_rev,
				  const struct ath10k_hif_ops *hif_ops);
void ath10k_core_destroy(struct ath10k *ar);
void ath10k_core_get_fw_features_str(struct ath10k *ar,
				     char *buf,
				     size_t max_len);
int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
				     struct ath10k_fw_file *fw_file);

int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
		      const struct ath10k_fw_components *fw_components);
int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt);
void ath10k_core_stop(struct ath10k *ar);
void ath10k_core_start_recovery(struct ath10k *ar);
int ath10k_core_register(struct ath10k *ar,
			 const struct ath10k_bus_params *bus_params);
void ath10k_core_unregister(struct ath10k *ar);
int ath10k_core_fetch_board_file(struct ath10k *ar, int bd_ie_type);
int ath10k_core_check_dt(struct ath10k *ar);
void ath10k_core_free_board_files(struct ath10k *ar);

#endif /* _CORE_H_ */