linux/drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.h

/* SPDX-License-Identifier: ISC */
/*
 * Copyright (C) 2016 Felix Fietkau <[email protected]>
 * Copyright (C) 2018 Lorenzo Bianconi <[email protected]>
 */

#ifndef __MT76x02_EEPROM_H
#define __MT76x02_EEPROM_H

#include "mt76x02.h"

enum mt76x02_eeprom_field {};

#define MT_EE_ANTENNA_DUAL

#define MT_EE_NIC_CONF_0_RX_PATH
#define MT_EE_NIC_CONF_0_TX_PATH
#define MT_EE_NIC_CONF_0_PA_TYPE
#define MT_EE_NIC_CONF_0_PA_INT_2G
#define MT_EE_NIC_CONF_0_PA_INT_5G
#define MT_EE_NIC_CONF_0_PA_IO_CURRENT
#define MT_EE_NIC_CONF_0_BOARD_TYPE

#define MT_EE_NIC_CONF_1_HW_RF_CTRL
#define MT_EE_NIC_CONF_1_TEMP_TX_ALC
#define MT_EE_NIC_CONF_1_LNA_EXT_2G
#define MT_EE_NIC_CONF_1_LNA_EXT_5G
#define MT_EE_NIC_CONF_1_TX_ALC_EN

#define MT_EE_NIC_CONF_2_ANT_OPT
#define MT_EE_NIC_CONF_2_ANT_DIV
#define MT_EE_NIC_CONF_2_XTAL_OPTION

#define MT_EFUSE_USAGE_MAP_SIZE

enum mt76x02_eeprom_modes {};

enum mt76x02_board_type {};

static inline bool mt76x02_field_valid(u8 val)
{}

static inline int
mt76x02_sign_extend(u32 val, unsigned int size)
{}

static inline int
mt76x02_sign_extend_optional(u32 val, unsigned int size)
{}

static inline s8 mt76x02_rate_power_val(u8 val)
{}

static inline int
mt76x02_eeprom_get(struct mt76x02_dev *dev,
		   enum mt76x02_eeprom_field field)
{}

bool mt76x02_ext_pa_enabled(struct mt76x02_dev *dev, enum nl80211_band band);
int mt76x02_get_efuse_data(struct mt76x02_dev *dev, u16 base, void *buf,
			   int len, enum mt76x02_eeprom_modes mode);
void mt76x02_get_rx_gain(struct mt76x02_dev *dev, enum nl80211_band band,
			 u16 *rssi_offset, s8 *lna_2g, s8 *lna_5g);
u8 mt76x02_get_lna_gain(struct mt76x02_dev *dev,
			s8 *lna_2g, s8 *lna_5g,
			struct ieee80211_channel *chan);
void mt76x02_eeprom_parse_hw_cap(struct mt76x02_dev *dev);
int mt76x02_eeprom_copy(struct mt76x02_dev *dev,
			enum mt76x02_eeprom_field field,
			void *dest, int len);

#endif /* __MT76x02_EEPROM_H */