Lines Matching defs:efuse

16 #include "efuse.h"
983 WARN(1, "invalid hw configuration from efuse\n");
1197 struct rtw_efuse *efuse = &rtwdev->efuse;
1227 if (efuse->hw_cap.nss == 1 || rtwdev->hal.txrx_1ss)
1404 wifi_only = !rtwdev->efuse.btcoex;
1545 struct rtw_efuse *efuse = &rtwdev->efuse;
1558 if (efuse->hw_cap.bw & BIT(RTW_CHANNEL_WIDTH_40))
1565 if (efuse->hw_cap.nss > 1) {
1581 struct rtw_efuse *efuse = &rtwdev->efuse;
1585 if (efuse->hw_cap.ptcl != EFUSE_HW_CAP_IGNORE &&
1586 efuse->hw_cap.ptcl != EFUSE_HW_CAP_PTCL_VHT)
1613 if (efuse->hw_cap.nss > 1) {
1822 struct rtw_efuse *efuse = &rtwdev->efuse;
1859 efuse->physical_size = chip->phy_efuse_size;
1860 efuse->logical_size = chip->log_efuse_size;
1861 efuse->protect_size = chip->ptct_efuse_size;
1914 struct rtw_efuse *efuse = &rtwdev->efuse;
1932 efuse->hw_cap.bw = hw_bw_cap_to_bitamp(bw);
1933 efuse->hw_cap.hci = GET_EFUSE_HW_CAP_HCI(hw_feature);
1934 efuse->hw_cap.nss = GET_EFUSE_HW_CAP_NSS(hw_feature);
1935 efuse->hw_cap.ptcl = GET_EFUSE_HW_CAP_PTCL(hw_feature);
1936 efuse->hw_cap.ant_num = GET_EFUSE_HW_CAP_ANT_NUM(hw_feature);
1938 rtw_hw_config_rf_ant_num(rtwdev, efuse->hw_cap.ant_num);
1940 if (efuse->hw_cap.nss == EFUSE_HW_CAP_IGNORE ||
1941 efuse->hw_cap.nss > rtwdev->hal.rf_path_num)
1942 efuse->hw_cap.nss = rtwdev->hal.rf_path_num;
1946 efuse->hw_cap.hci, efuse->hw_cap.bw, efuse->hw_cap.ptcl,
1947 efuse->hw_cap.ant_num, efuse->hw_cap.nss);
1960 struct rtw_efuse *efuse = &rtwdev->efuse;
1965 /* power on mac to read efuse */
1982 if (efuse->crystal_cap == 0xff)
1983 efuse->crystal_cap = 0;
1984 if (efuse->pa_type_2g == 0xff)
1985 efuse->pa_type_2g = 0;
1986 if (efuse->pa_type_5g == 0xff)
1987 efuse->pa_type_5g = 0;
1988 if (efuse->lna_type_2g == 0xff)
1989 efuse->lna_type_2g = 0;
1990 if (efuse->lna_type_5g == 0xff)
1991 efuse->lna_type_5g = 0;
1992 if (efuse->channel_plan == 0xff)
1993 efuse->channel_plan = 0x7f;
1994 if (efuse->rf_board_option == 0xff)
1995 efuse->rf_board_option = 0;
1996 if (efuse->bt_setting & BIT(0))
1997 efuse->share_ant = true;
1998 if (efuse->regd == 0xff)
1999 efuse->regd = 0;
2000 if (efuse->tx_bb_swing_setting_2g == 0xff)
2001 efuse->tx_bb_swing_setting_2g = 0;
2002 if (efuse->tx_bb_swing_setting_5g == 0xff)
2003 efuse->tx_bb_swing_setting_5g = 0;
2005 efuse->btcoex = (efuse->rf_board_option & 0xe0) == 0x20;
2006 efuse->ext_pa_2g = efuse->pa_type_2g & BIT(4) ? 1 : 0;
2007 efuse->ext_lna_2g = efuse->lna_type_2g & BIT(3) ? 1 : 0;
2008 efuse->ext_pa_5g = efuse->pa_type_5g & BIT(0) ? 1 : 0;
2009 efuse->ext_lna_2g = efuse->lna_type_5g & BIT(3) ? 1 : 0;
2050 rtw_err(rtwdev, "failed to setup chip efuse info\n");
2258 SET_IEEE80211_PERM_ADDR(hw, rtwdev->efuse.addr);