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

/* 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.
 */

#ifndef ATH12K_CORE_H
#define ATH12K_CORE_H

#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/bitfield.h>
#include <linux/dmi.h>
#include <linux/ctype.h>
#include <linux/firmware.h>
#include <linux/panic_notifier.h>
#include "qmi.h"
#include "htc.h"
#include "wmi.h"
#include "hal.h"
#include "dp.h"
#include "ce.h"
#include "mac.h"
#include "hw.h"
#include "hal_rx.h"
#include "reg.h"
#include "dbring.h"
#include "fw.h"
#include "acpi.h"
#include "wow.h"
#include "debugfs_htt_stats.h"

#define SM(_v, _f)

#define ATH12K_TX_MGMT_NUM_PENDING_MAX

#define ATH12K_TX_MGMT_TARGET_MAX_SUPPORT_WMI

/* Pending management packets threshold for dropping probe responses */
#define ATH12K_PRB_RSP_DROP_THRESHOLD

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

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

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

#define ATH12K_INVALID_HW_MAC_ID
#define ATH12K_CONNECTION_LOSS_HZ
#define ATH12K_RX_RATE_TABLE_NUM
#define ATH12K_RX_RATE_TABLE_11AX_NUM

#define ATH12K_MON_TIMER_INTERVAL
#define ATH12K_RESET_TIMEOUT_HZ
#define ATH12K_RESET_MAX_FAIL_COUNT_FIRST
#define ATH12K_RESET_MAX_FAIL_COUNT_FINAL
#define ATH12K_RESET_FAIL_TIMEOUT_HZ
#define ATH12K_RECONFIGURE_TIMEOUT_HZ
#define ATH12K_RECOVER_START_TIMEOUT_HZ

enum ath12k_bdf_search {};

enum wme_ac {};

#define ATH12K_HT_MCS_MAX
#define ATH12K_VHT_MCS_MAX
#define ATH12K_HE_MCS_MAX

enum ath12k_crypt_mode {};

static inline enum wme_ac ath12k_tid_to_ac(u32 tid)
{}

enum ath12k_skb_flags {};

struct ath12k_skb_cb {};

struct ath12k_skb_rxcb {};

enum ath12k_hw_rev {};

enum ath12k_firmware_mode {};

#define ATH12K_IRQ_NUM_MAX
#define ATH12K_EXT_IRQ_NUM_MAX

struct ath12k_ext_irq_grp {};

struct ath12k_smbios_bdf {} __packed;

#define HEHANDLE_CAP_PHYINFO_SIZE
#define HECAP_PHYINFO_SIZE
#define HECAP_MACINFO_SIZE
#define HECAP_TXRX_MCS_NSS_SIZE
#define HECAP_PPET16_PPET8_MAX_SIZE

#define HE_PPET16_PPET8_SIZE

/* 802.11ax PPE (PPDU packet Extension) threshold */
struct he_ppe_threshold {};

struct ath12k_he {};

enum {};

enum ath12k_scan_state {};

enum ath12k_dev_flags {};

struct ath12k_tx_conf {};

struct ath12k_key_conf {};

struct ath12k_vif_cache {};

struct ath12k_rekey_data {};

struct ath12k_vif {};

struct ath12k_vif_iter {};

#define HAL_AST_IDX_INVALID
#define HAL_RX_MAX_MCS
#define HAL_RX_MAX_MCS_HT
#define HAL_RX_MAX_MCS_VHT
#define HAL_RX_MAX_MCS_HE
#define HAL_RX_MAX_NSS
#define HAL_RX_MAX_NUM_LEGACY_RATES
#define ATH12K_RX_RATE_TABLE_11AX_NUM
#define ATH12K_RX_RATE_TABLE_NUM

struct ath12k_rx_peer_rate_stats {};

struct ath12k_rx_peer_stats {};

#define ATH12K_HE_MCS_NUM
#define ATH12K_VHT_MCS_NUM
#define ATH12K_BW_NUM
#define ATH12K_NSS_NUM
#define ATH12K_LEGACY_NUM
#define ATH12K_GI_NUM
#define ATH12K_HT_MCS_NUM

enum ath12k_pkt_rx_err {};

enum ath12k_ampdu_subfrm_num {};

enum ath12k_amsdu_subfrm_num {};

enum ath12k_counter_type {};

enum ath12k_stats_type {};

struct ath12k_htt_data_stats {};

struct ath12k_htt_tx_stats {};

struct ath12k_per_ppdu_tx_stats {};

struct ath12k_wbm_tx_stats {};

struct ath12k_sta {};

#define ATH12K_MIN_5G_FREQ
#define ATH12K_MIN_6G_FREQ
#define ATH12K_MAX_6G_FREQ
#define ATH12K_NUM_CHANS
#define ATH12K_MAX_5G_CHAN

enum ath12k_hw_state {};

/* Antenna noise floor */
#define ATH12K_DEFAULT_NOISE_FLOOR

struct ath12k_fw_stats {};

struct ath12k_dbg_htt_stats {};

struct ath12k_debug {};

struct ath12k_per_peer_tx_stats {};

#define ATH12K_FLUSH_TIMEOUT
#define ATH12K_VDEV_DELETE_TIMEOUT_HZ

struct ath12k {};

struct ath12k_hw {};

struct ath12k_band_cap {};

struct ath12k_pdev_cap {};

struct mlo_timestamp {};

struct ath12k_pdev {};

struct ath12k_fw_pdev {};

struct ath12k_board_data {};

struct ath12k_soc_dp_tx_err_stats {};

struct ath12k_soc_dp_stats {};

/**
 * enum ath12k_link_capable_flags - link capable flags
 *
 * Single/Multi link capability information
 *
 * @ATH12K_INTRA_DEVICE_MLO_SUPPORT: SLO/MLO form between the radio, where all
 *	the links (radios) present within a device.
 * @ATH12K_INTER_DEVICE_MLO_SUPPORT: SLO/MLO form between the radio, where all
 *	the links (radios) present across the devices.
 */
enum ath12k_link_capable_flags {};

/* Master structure to hold the hw data which may be used in core module */
struct ath12k_base {};

struct ath12k_pdev_map {};

int ath12k_core_qmi_firmware_ready(struct ath12k_base *ab);
int ath12k_core_pre_init(struct ath12k_base *ab);
int ath12k_core_init(struct ath12k_base *ath12k);
void ath12k_core_deinit(struct ath12k_base *ath12k);
struct ath12k_base *ath12k_core_alloc(struct device *dev, size_t priv_size,
				      enum ath12k_bus bus);
void ath12k_core_free(struct ath12k_base *ath12k);
int ath12k_core_fetch_board_data_api_1(struct ath12k_base *ab,
				       struct ath12k_board_data *bd,
				       char *filename);
int ath12k_core_fetch_bdf(struct ath12k_base *ath12k,
			  struct ath12k_board_data *bd);
void ath12k_core_free_bdf(struct ath12k_base *ab, struct ath12k_board_data *bd);
int ath12k_core_fetch_regdb(struct ath12k_base *ab, struct ath12k_board_data *bd);
int ath12k_core_check_dt(struct ath12k_base *ath12k);
int ath12k_core_check_smbios(struct ath12k_base *ab);
void ath12k_core_halt(struct ath12k *ar);
int ath12k_core_resume_early(struct ath12k_base *ab);
int ath12k_core_resume(struct ath12k_base *ab);
int ath12k_core_suspend(struct ath12k_base *ab);
int ath12k_core_suspend_late(struct ath12k_base *ab);

const struct firmware *ath12k_core_firmware_request(struct ath12k_base *ab,
						    const char *filename);
u32 ath12k_core_get_max_station_per_radio(struct ath12k_base *ab);
u32 ath12k_core_get_max_peers_per_radio(struct ath12k_base *ab);
u32 ath12k_core_get_max_num_tids(struct ath12k_base *ab);

static inline const char *ath12k_scan_state_str(enum ath12k_scan_state state)
{}

static inline struct ath12k_skb_cb *ATH12K_SKB_CB(struct sk_buff *skb)
{}

static inline struct ath12k_skb_rxcb *ATH12K_SKB_RXCB(struct sk_buff *skb)
{}

static inline struct ath12k_vif *ath12k_vif_to_arvif(struct ieee80211_vif *vif)
{}

static inline struct ath12k_sta *ath12k_sta_to_arsta(struct ieee80211_sta *sta)
{}

static inline struct ath12k *ath12k_ab_to_ar(struct ath12k_base *ab,
					     int mac_id)
{}

static inline void ath12k_core_create_firmware_path(struct ath12k_base *ab,
						    const char *filename,
						    void *buf, size_t buf_len)
{}

static inline const char *ath12k_bus_str(enum ath12k_bus bus)
{}

static inline struct ath12k_hw *ath12k_hw_to_ah(struct ieee80211_hw  *hw)
{}

static inline struct ath12k *ath12k_ah_to_ar(struct ath12k_hw *ah, u8 hw_link_id)
{}

static inline struct ath12k_hw *ath12k_ar_to_ah(struct ath12k *ar)
{}

static inline struct ieee80211_hw *ath12k_ar_to_hw(struct ath12k *ar)
{}

#define for_each_ar(ah, ar, index)
#endif /* _CORE_H_ */