linux/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c

// SPDX-License-Identifier: ISC
/* Copyright (C) 2019 MediaTek Inc.
 *
 * Author: Roy Luo <[email protected]>
 *         Ryder Lee <[email protected]>
 */

#include <linux/firmware.h>
#include "mt7615.h"
#include "mcu.h"
#include "mac.h"
#include "eeprom.h"

static bool prefer_offload_fw =;
module_param(prefer_offload_fw, bool, 0644);
MODULE_PARM_DESC();

struct mt7615_patch_hdr {} __packed;

struct mt7615_fw_trailer {} __packed;

#define FW_V3_COMMON_TAILER_SIZE
#define FW_V3_REGION_TAILER_SIZE
#define FW_START_OVERRIDE
#define FW_START_DLYCAL
#define FW_START_WORKING_PDA_CR4

struct mt7663_fw_buf {};

#define MT7615_PATCH_ADDRESS
#define MT7622_PATCH_ADDRESS
#define MT7663_PATCH_ADDRESS

#define N9_REGION_NUM
#define CR4_REGION_NUM

#define IMG_CRC_LEN

void mt7615_mcu_fill_msg(struct mt7615_dev *dev, struct sk_buff *skb,
			 int cmd, int *wait_seq)
{}
EXPORT_SYMBOL_GPL();

int mt7615_mcu_parse_response(struct mt76_dev *mdev, int cmd,
			      struct sk_buff *skb, int seq)
{}
EXPORT_SYMBOL_GPL();

static int
mt7615_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
			int cmd, int *seq)
{}

u32 mt7615_rf_rr(struct mt7615_dev *dev, u32 wf, u32 reg)
{}

int mt7615_rf_wr(struct mt7615_dev *dev, u32 wf, u32 reg, u32 val)
{}

void mt7622_trigger_hif_int(struct mt7615_dev *dev, bool en)
{}
EXPORT_SYMBOL_GPL();

static int mt7615_mcu_drv_pmctrl(struct mt7615_dev *dev)
{}

static int mt7615_mcu_lp_drv_pmctrl(struct mt7615_dev *dev)
{}

static int mt7615_mcu_fw_pmctrl(struct mt7615_dev *dev)
{}

static void
mt7615_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
{}

static void
mt7615_mcu_rx_csa_notify(struct mt7615_dev *dev, struct sk_buff *skb)
{}

static void
mt7615_mcu_rx_radar_detected(struct mt7615_dev *dev, struct sk_buff *skb)
{}

static void
mt7615_mcu_rx_log_message(struct mt7615_dev *dev, struct sk_buff *skb)
{}

static void
mt7615_mcu_rx_ext_event(struct mt7615_dev *dev, struct sk_buff *skb)
{}

static void
mt7615_mcu_scan_event(struct mt7615_dev *dev, struct sk_buff *skb)
{}

static void
mt7615_mcu_roc_event(struct mt7615_dev *dev, struct sk_buff *skb)
{}

static void
mt7615_mcu_beacon_loss_event(struct mt7615_dev *dev, struct sk_buff *skb)
{}

static void
mt7615_mcu_bss_event(struct mt7615_dev *dev, struct sk_buff *skb)
{}

static void
mt7615_mcu_rx_unsolicited_event(struct mt7615_dev *dev, struct sk_buff *skb)
{}

void mt7615_mcu_rx_event(struct mt7615_dev *dev, struct sk_buff *skb)
{}

static int
mt7615_mcu_muar_config(struct mt7615_dev *dev, struct ieee80211_vif *vif,
		       bool bssid, bool enable)
{}

static int
mt7615_mcu_add_dev(struct mt7615_phy *phy, struct ieee80211_vif *vif,
		   bool enable)
{}

static int
mt7615_mcu_add_beacon_offload(struct mt7615_dev *dev,
			      struct ieee80211_hw *hw,
			      struct ieee80211_vif *vif, bool enable)
{}

static int
mt7615_mcu_ctrl_pm_state(struct mt7615_dev *dev, int band, int state)
{}

static int
mt7615_mcu_add_bss(struct mt7615_phy *phy, struct ieee80211_vif *vif,
		   struct ieee80211_sta *sta, bool enable)
{}

static int
mt7615_mcu_wtbl_tx_ba(struct mt7615_dev *dev,
		      struct ieee80211_ampdu_params *params,
		      bool enable)
{}

static int
mt7615_mcu_wtbl_rx_ba(struct mt7615_dev *dev,
		      struct ieee80211_ampdu_params *params,
		      bool enable)
{}

static int
mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif,
			struct ieee80211_sta *sta, bool enable)
{}

static int
mt7615_mcu_wtbl_update_hdr_trans(struct mt7615_dev *dev,
				 struct ieee80211_vif *vif,
				 struct ieee80211_sta *sta)
{}

static const struct mt7615_mcu_ops wtbl_update_ops =;

static int
mt7615_mcu_sta_ba(struct mt7615_dev *dev,
		  struct ieee80211_ampdu_params *params,
		  bool enable, bool tx)
{}

static int
mt7615_mcu_sta_tx_ba(struct mt7615_dev *dev,
		     struct ieee80211_ampdu_params *params,
		     bool enable)
{}

static int
mt7615_mcu_sta_rx_ba(struct mt7615_dev *dev,
		     struct ieee80211_ampdu_params *params,
		     bool enable)
{}

static int
__mt7615_mcu_add_sta(struct mt76_phy *phy, struct ieee80211_vif *vif,
		     struct ieee80211_sta *sta, bool enable, int cmd,
		     bool offload_fw)
{}

static int
mt7615_mcu_add_sta(struct mt7615_phy *phy, struct ieee80211_vif *vif,
		   struct ieee80211_sta *sta, bool enable)
{}

static int
mt7615_mcu_sta_update_hdr_trans(struct mt7615_dev *dev,
				struct ieee80211_vif *vif,
				struct ieee80211_sta *sta)
{}

static const struct mt7615_mcu_ops sta_update_ops =;

static int
mt7615_mcu_uni_ctrl_pm_state(struct mt7615_dev *dev, int band, int state)
{}

static int
mt7615_mcu_uni_add_beacon_offload(struct mt7615_dev *dev,
				  struct ieee80211_hw *hw,
				  struct ieee80211_vif *vif,
				  bool enable)
{}

static int
mt7615_mcu_uni_add_dev(struct mt7615_phy *phy, struct ieee80211_vif *vif,
		       bool enable)
{}

static int
mt7615_mcu_uni_add_bss(struct mt7615_phy *phy, struct ieee80211_vif *vif,
		       struct ieee80211_sta *sta, bool enable)
{}

static inline int
mt7615_mcu_uni_add_sta(struct mt7615_phy *phy, struct ieee80211_vif *vif,
		       struct ieee80211_sta *sta, bool enable)
{}

static int
mt7615_mcu_uni_tx_ba(struct mt7615_dev *dev,
		     struct ieee80211_ampdu_params *params,
		     bool enable)
{}

static int
mt7615_mcu_uni_rx_ba(struct mt7615_dev *dev,
		     struct ieee80211_ampdu_params *params,
		     bool enable)
{}

static int
mt7615_mcu_sta_uni_update_hdr_trans(struct mt7615_dev *dev,
				    struct ieee80211_vif *vif,
				    struct ieee80211_sta *sta)
{}

static const struct mt7615_mcu_ops uni_update_ops =;

int mt7615_mcu_restart(struct mt76_dev *dev)
{}
EXPORT_SYMBOL_GPL();

static int mt7615_load_patch(struct mt7615_dev *dev, u32 addr, const char *name)
{}

static int
mt7615_mcu_send_ram_firmware(struct mt7615_dev *dev,
			     const struct mt7615_fw_trailer *hdr,
			     const u8 *data, bool is_cr4)
{}

static int mt7615_load_n9(struct mt7615_dev *dev, const char *name)
{}

static int mt7615_load_cr4(struct mt7615_dev *dev, const char *name)
{}

static int mt7615_load_ram(struct mt7615_dev *dev)
{}

static int mt7615_load_firmware(struct mt7615_dev *dev)
{}

static int mt7622_load_firmware(struct mt7615_dev *dev)
{}

int mt7615_mcu_fw_log_2_host(struct mt7615_dev *dev, u8 ctrl)
{}

static int mt7615_mcu_cal_cache_apply(struct mt7615_dev *dev)
{}

static int mt7663_load_n9(struct mt7615_dev *dev, const char *name)
{}

static int
mt7663_load_rom_patch(struct mt7615_dev *dev, const char **n9_firmware)
{}

int __mt7663_load_firmware(struct mt7615_dev *dev)
{}
EXPORT_SYMBOL_GPL();

static int mt7663_load_firmware(struct mt7615_dev *dev)
{}

int mt7615_mcu_init(struct mt7615_dev *dev)
{}
EXPORT_SYMBOL_GPL();

void mt7615_mcu_exit(struct mt7615_dev *dev)
{}
EXPORT_SYMBOL_GPL();

int mt7615_mcu_set_eeprom(struct mt7615_dev *dev)
{}

int mt7615_mcu_set_wmm(struct mt7615_dev *dev, u8 queue,
		       const struct ieee80211_tx_queue_params *params)
{}

int mt7615_mcu_set_dbdc(struct mt7615_dev *dev)
{}

int mt7615_mcu_del_wtbl_all(struct mt7615_dev *dev)
{}

int mt7615_mcu_set_fcc5_lpn(struct mt7615_dev *dev, int val)
{}

int mt7615_mcu_set_pulse_th(struct mt7615_dev *dev,
			    const struct mt7615_dfs_pulse *pulse)
{}

int mt7615_mcu_set_radar_th(struct mt7615_dev *dev, int index,
			    const struct mt7615_dfs_pattern *pattern)
{}

int mt7615_mcu_rdd_send_pattern(struct mt7615_dev *dev)
{}

static void mt7615_mcu_set_txpower_sku(struct mt7615_phy *phy, u8 *sku)
{}

static u8 mt7615_mcu_chan_bw(struct cfg80211_chan_def *chandef)
{}

int mt7615_mcu_set_chan_info(struct mt7615_phy *phy, int cmd)
{}

int mt7615_mcu_get_temperature(struct mt7615_dev *dev)
{}

int mt7615_mcu_set_test_param(struct mt7615_dev *dev, u8 param, bool test_mode,
			      u32 val)
{}

int mt7615_mcu_set_sku_en(struct mt7615_phy *phy, bool enable)
{}

static int mt7615_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
{}

static int mt7615_dcoc_freq_idx(u16 freq, u8 bw)
{}

int mt7615_mcu_apply_rx_dcoc(struct mt7615_phy *phy)
{}

static int mt7615_dpd_freq_idx(u16 freq, u8 bw)
{}


int mt7615_mcu_apply_tx_dpd(struct mt7615_phy *phy)
{}

int mt7615_mcu_set_rx_hdr_trans_blacklist(struct mt7615_dev *dev)
{}

int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif,
			  bool enable)
{}

int mt7615_mcu_set_roc(struct mt7615_phy *phy, struct ieee80211_vif *vif,
		       struct ieee80211_channel *chan, int duration)
{}