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

// SPDX-License-Identifier: ISC
/* Copyright (C) 2023 MediaTek Inc. */

#include <linux/fs.h>
#include <linux/firmware.h>
#include "mt7925.h"
#include "mcu.h"
#include "mac.h"

#define MT_STA_BFER
#define MT_STA_BFEE

static bool mt7925_disable_clc;
module_param_named(disable_clc, mt7925_disable_clc, bool, 0644);
MODULE_PARM_DESC();

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

int mt7925_mcu_regval(struct mt792x_dev *dev, u32 regidx, u32 *val, bool set)
{}
EXPORT_SYMBOL_GPL();

int mt7925_mcu_update_arp_filter(struct mt76_dev *dev,
				 struct ieee80211_bss_conf *link_conf)
{}

#ifdef CONFIG_PM
static int
mt7925_connac_mcu_set_wow_ctrl(struct mt76_phy *phy, struct ieee80211_vif *vif,
			       bool suspend, struct cfg80211_wowlan *wowlan)
{}

static int
mt7925_mcu_set_wow_pattern(struct mt76_dev *dev,
			   struct ieee80211_vif *vif,
			   u8 index, bool enable,
			   struct cfg80211_pkt_pattern *pattern)
{}

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

#endif /* CONFIG_PM */

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

static void
mt7925_mcu_connection_loss_event(struct mt792x_dev *dev, struct sk_buff *skb)
{}

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

static void mt7925_mcu_roc_handle_grant(struct mt792x_dev *dev,
					struct tlv *tlv)
{}

static void
mt7925_mcu_uni_roc_event(struct mt792x_dev *dev, struct sk_buff *skb)
{}

static void
mt7925_mcu_scan_event(struct mt792x_dev *dev, struct sk_buff *skb)
{}

static void
mt7925_mcu_tx_done_event(struct mt792x_dev *dev, struct sk_buff *skb)
{}

static void
mt7925_mcu_uni_debug_msg_event(struct mt792x_dev *dev, struct sk_buff *skb)
{}

static void
mt7925_mcu_uni_rx_unsolicited_event(struct mt792x_dev *dev,
				    struct sk_buff *skb)
{}

void mt7925_mcu_rx_event(struct mt792x_dev *dev, struct sk_buff *skb)
{}

static int
mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
		  struct ieee80211_ampdu_params *params,
		  bool enable, bool tx)
{}

/** starec & wtbl **/
int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
			 struct ieee80211_ampdu_params *params,
			 bool enable)
{}

int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
			 struct ieee80211_ampdu_params *params,
			 bool enable)
{}

static int mt7925_load_clc(struct mt792x_dev *dev, const char *fw_name)
{}

int mt7925_mcu_fw_log_2_host(struct mt792x_dev *dev, u8 ctrl)
{}

int mt7925_mcu_get_temperature(struct mt792x_phy *phy)
{}

static void
mt7925_mcu_parse_phy_cap(struct mt792x_dev *dev, char *data)
{}

static void
mt7925_mcu_parse_eml_cap(struct mt792x_dev *dev, char *data)
{}

static int
mt7925_mcu_get_nic_capability(struct mt792x_dev *dev)
{}

int mt7925_mcu_chip_config(struct mt792x_dev *dev, const char *cmd)
{}

int mt7925_mcu_set_deep_sleep(struct mt792x_dev *dev, bool enable)
{}
EXPORT_SYMBOL_GPL();

int mt7925_run_firmware(struct mt792x_dev *dev)
{}
EXPORT_SYMBOL_GPL();

static void
mt7925_mcu_sta_hdr_trans_tlv(struct sk_buff *skb,
			     struct ieee80211_vif *vif,
			     struct ieee80211_link_sta *link_sta)
{}

int mt7925_mcu_wtbl_update_hdr_trans(struct mt792x_dev *dev,
				     struct ieee80211_vif *vif,
				     struct ieee80211_sta *sta,
				     int link_id)
{}

int mt7925_mcu_set_tx(struct mt792x_dev *dev,
		      struct ieee80211_bss_conf *bss_conf)
{}

static int
mt7925_mcu_sta_key_tlv(struct mt76_wcid *wcid,
		       struct mt76_connac_sta_key_conf *sta_key_conf,
		       struct sk_buff *skb,
		       struct ieee80211_key_conf *key,
		       enum set_key_cmd cmd,
		       struct mt792x_sta *msta)
{}

int mt7925_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
		       struct mt76_connac_sta_key_conf *sta_key_conf,
		       struct ieee80211_key_conf *key, int mcu_cmd,
		       struct mt76_wcid *wcid, enum set_key_cmd cmd,
		       struct mt792x_sta *msta)
{}

int mt7925_mcu_set_mlo_roc(struct mt792x_bss_conf *mconf, u16 sel_links,
			   int duration, u8 token_id)
{}

int mt7925_mcu_set_roc(struct mt792x_phy *phy, struct mt792x_bss_conf *mconf,
		       struct ieee80211_channel *chan, int duration,
		       enum mt7925_roc_req type, u8 token_id)
{}

int mt7925_mcu_abort_roc(struct mt792x_phy *phy, struct mt792x_bss_conf *mconf,
			 u8 token_id)
{}

int mt7925_mcu_set_eeprom(struct mt792x_dev *dev)
{}
EXPORT_SYMBOL_GPL();

int mt7925_mcu_uni_bss_ps(struct mt792x_dev *dev,
			  struct ieee80211_bss_conf *link_conf)
{}

static int
mt7925_mcu_uni_bss_bcnft(struct mt792x_dev *dev,
			 struct ieee80211_bss_conf *link_conf, bool enable)
{}

int
mt7925_mcu_set_bss_pm(struct mt792x_dev *dev,
		      struct ieee80211_bss_conf *link_conf,
		      bool enable)
{}

static void
mt7925_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_link_sta *link_sta)
{}

static void
mt7925_mcu_sta_he_6g_tlv(struct sk_buff *skb,
			 struct ieee80211_link_sta *link_sta)
{}

static void
mt7925_mcu_sta_eht_tlv(struct sk_buff *skb, struct ieee80211_link_sta *link_sta)
{}

static void
mt7925_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_link_sta *link_sta)
{}

static void
mt7925_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_link_sta *link_sta)
{}

static void
mt7925_mcu_sta_amsdu_tlv(struct sk_buff *skb,
			 struct ieee80211_vif *vif,
			 struct ieee80211_link_sta *link_sta)
{}

static void
mt7925_mcu_sta_phy_tlv(struct sk_buff *skb,
		       struct ieee80211_vif *vif,
		       struct ieee80211_link_sta *link_sta)
{}

static void
mt7925_mcu_sta_state_v2_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
			    struct ieee80211_link_sta *link_sta,
			    struct ieee80211_vif *vif,
			    u8 rcpi, u8 sta_state)
{}

static void
mt7925_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb,
			     struct ieee80211_vif *vif,
			     struct ieee80211_link_sta *link_sta)
{}

static void
mt7925_mcu_sta_eht_mld_tlv(struct sk_buff *skb,
			   struct ieee80211_vif *vif, struct ieee80211_sta *sta)
{}

static void
mt7925_mcu_sta_mld_tlv(struct sk_buff *skb,
		       struct ieee80211_vif *vif, struct ieee80211_sta *sta)
{}

static int
mt7925_mcu_sta_cmd(struct mt76_phy *phy,
		   struct mt76_sta_cmd_info *info)
{}

static void
mt7925_mcu_sta_remove_tlv(struct sk_buff *skb)
{}

static int
mt7925_mcu_mlo_sta_cmd(struct mt76_phy *phy,
		       struct mt76_sta_cmd_info *info)
{}

int mt7925_mcu_sta_update(struct mt792x_dev *dev,
			  struct ieee80211_link_sta *link_sta,
			  struct ieee80211_vif *vif, bool enable,
			  enum mt76_sta_info_state state)
{}

int mt7925_mcu_set_beacon_filter(struct mt792x_dev *dev,
				 struct ieee80211_vif *vif,
				 bool enable)
{}

int mt7925_get_txpwr_info(struct mt792x_dev *dev, u8 band_idx, struct mt7925_txpwr *txpwr)
{}

int mt7925_mcu_set_sniffer(struct mt792x_dev *dev, struct ieee80211_vif *vif,
			   bool enable)
{}

int mt7925_mcu_config_sniffer(struct mt792x_vif *vif,
			      struct ieee80211_chanctx_conf *ctx)
{}

int
mt7925_mcu_uni_add_beacon_offload(struct mt792x_dev *dev,
				  struct ieee80211_hw *hw,
				  struct ieee80211_vif *vif,
				  bool enable)
{}

static
void mt7925_mcu_bss_rlm_tlv(struct sk_buff *skb, struct mt76_phy *phy,
			    struct ieee80211_bss_conf *link_conf,
			    struct ieee80211_chanctx_conf *ctx)
{}

static struct sk_buff *
__mt7925_mcu_alloc_bss_req(struct mt76_dev *dev, struct mt76_vif *mvif, int len)
{}

int mt7925_mcu_set_chctx(struct mt76_phy *phy, struct mt76_vif *mvif,
			 struct ieee80211_bss_conf *link_conf,
			 struct ieee80211_chanctx_conf *ctx)
{}

static u8
mt7925_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
			enum nl80211_band band,
			struct ieee80211_link_sta *link_sta)
{}

static void
mt7925_mcu_bss_basic_tlv(struct sk_buff *skb,
			 struct ieee80211_bss_conf *link_conf,
			 struct ieee80211_link_sta *link_sta,
			 struct ieee80211_chanctx_conf *ctx,
			 struct mt76_phy *phy, u16 wlan_idx,
			 bool enable)
{}

static void
mt7925_mcu_bss_sec_tlv(struct sk_buff *skb,
		       struct ieee80211_bss_conf *link_conf)
{}

static void
mt7925_mcu_bss_bmc_tlv(struct sk_buff *skb, struct mt792x_phy *phy,
		       struct ieee80211_chanctx_conf *ctx,
		       struct ieee80211_bss_conf *link_conf)
{}

static void
mt7925_mcu_bss_mld_tlv(struct sk_buff *skb,
		       struct ieee80211_bss_conf *link_conf)
{}

static void
mt7925_mcu_bss_qos_tlv(struct sk_buff *skb, struct ieee80211_bss_conf *link_conf)
{}

static void
mt7925_mcu_bss_he_tlv(struct sk_buff *skb, struct ieee80211_bss_conf *link_conf,
		      struct mt792x_phy *phy)
{}

static void
mt7925_mcu_bss_color_tlv(struct sk_buff *skb, struct ieee80211_bss_conf *link_conf,
			 bool enable)
{}

static void
mt7925_mcu_bss_ifs_tlv(struct sk_buff *skb,
		       struct ieee80211_bss_conf *link_conf)
{}

int mt7925_mcu_set_timing(struct mt792x_phy *phy,
			  struct ieee80211_bss_conf *link_conf)
{}

int mt7925_mcu_add_bss_info(struct mt792x_phy *phy,
			    struct ieee80211_chanctx_conf *ctx,
			    struct ieee80211_bss_conf *link_conf,
			    struct ieee80211_link_sta *link_sta,
			    int enable)
{}

int mt7925_mcu_set_dbdc(struct mt76_phy *phy)
{}

#define MT76_CONNAC_SCAN_CHANNEL_TIME

int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
		       struct ieee80211_scan_request *scan_req)
{}
EXPORT_SYMBOL_GPL();

int mt7925_mcu_sched_scan_req(struct mt76_phy *phy,
			      struct ieee80211_vif *vif,
			      struct cfg80211_sched_scan_request *sreq)
{}
EXPORT_SYMBOL_GPL();

int
mt7925_mcu_sched_scan_enable(struct mt76_phy *phy,
			     struct ieee80211_vif *vif,
			     bool enable)
{}

int mt7925_mcu_cancel_hw_scan(struct mt76_phy *phy,
			      struct ieee80211_vif *vif)
{}
EXPORT_SYMBOL_GPL();

int mt7925_mcu_set_channel_domain(struct mt76_phy *phy)
{}
EXPORT_SYMBOL_GPL();

static int
__mt7925_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2,
		     enum environment_cap env_cap,
		     struct mt7925_clc *clc, u8 idx)
{}

int mt7925_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2,
		       enum environment_cap env_cap)
{}

int mt7925_mcu_fill_message(struct mt76_dev *mdev, struct sk_buff *skb,
			    int cmd, int *wait_seq)
{}
EXPORT_SYMBOL_GPL();

int mt7925_mcu_set_rts_thresh(struct mt792x_phy *phy, u32 val)
{}

int mt7925_mcu_set_radio_en(struct mt792x_phy *phy, bool enable)
{}

static void
mt7925_mcu_build_sku(struct mt76_dev *dev, s8 *sku,
		     struct mt76_power_limits *limits,
		     enum nl80211_band band)
{}

static int
mt7925_mcu_rate_txpower_band(struct mt76_phy *phy,
			     enum nl80211_band band)
{}

int mt7925_mcu_set_rate_txpower(struct mt76_phy *phy)
{}

int mt7925_mcu_set_rxfilter(struct mt792x_dev *dev, u32 fif,
			    u8 bit_op, u32 bit_map)
{}