Home
last modified time | relevance | path

Searched refs:rtwdev (Results 1 – 25 of 108) sorted by relevance

12345

/linux/drivers/net/wireless/realtek/rtw88/
H A Dps.c13 static int rtw_ips_pwr_up(struct rtw_dev *rtwdev) in rtw_ips_pwr_up() argument
17 ret = rtw_core_start(rtwdev); in rtw_ips_pwr_up()
19 rtw_err(rtwdev, "leave idle state failed\n"); in rtw_ips_pwr_up()
21 rtw_coex_ips_notify(rtwdev, COEX_IPS_LEAVE); in rtw_ips_pwr_up()
22 rtw_set_channel(rtwdev); in rtw_ips_pwr_up()
27 int rtw_enter_ips(struct rtw_dev *rtwdev) in rtw_enter_ips() argument
29 if (!test_bit(RTW_FLAG_POWERON, rtwdev->flags)) in rtw_enter_ips()
32 rtw_coex_ips_notify(rtwdev, COEX_IPS_ENTER); in rtw_enter_ips()
34 rtw_core_stop(rtwdev); in rtw_enter_ips()
35 rtw_hci_link_ps(rtwdev, true); in rtw_enter_ips()
[all …]
H A Dwow.c13 static void rtw_wow_show_wakeup_reason(struct rtw_dev *rtwdev) in rtw_wow_show_wakeup_reason() argument
21 reason = rtw_read8(rtwdev, REG_WOWLAN_WAKE_REASON); in rtw_wow_show_wakeup_reason()
26 rtw_dbg(rtwdev, RTW_DBG_WOW, "WOW: Rx deauth\n"); in rtw_wow_show_wakeup_reason()
30 rtw_dbg(rtwdev, RTW_DBG_WOW, "WOW: AP is off\n"); in rtw_wow_show_wakeup_reason()
34 rtw_dbg(rtwdev, RTW_DBG_WOW, "WOW: Rx magic packet\n"); in rtw_wow_show_wakeup_reason()
38 rtw_dbg(rtwdev, RTW_DBG_WOW, "WOW: Rx gtk rekey\n"); in rtw_wow_show_wakeup_reason()
45 rtw_dbg(rtwdev, RTW_DBG_WOW, "WOW: Rx pattern match packet\n"); in rtw_wow_show_wakeup_reason()
53 rtw_dbg(rtwdev, RTW_DBG_WOW, "Rx NLO\n"); in rtw_wow_show_wakeup_reason()
56 rtw_warn(rtwdev, "Unknown wakeup reason %x\n", reason); in rtw_wow_show_wakeup_reason()
57 ieee80211_report_wowlan_wakeup(rtwdev->wow.wow_vif, NULL, in rtw_wow_show_wakeup_reason()
[all …]
H A Dmac.c12 void rtw_set_channel_mac(struct rtw_dev *rtwdev, u8 channel, u8 bw, in rtw_set_channel_mac() argument
26 rtw_write8(rtwdev, REG_DATA_SC, in rtw_set_channel_mac()
29 value32 = rtw_read32(rtwdev, REG_WMAC_TRXPTCL_CTL); in rtw_set_channel_mac()
42 rtw_write32(rtwdev, REG_WMAC_TRXPTCL_CTL, value32); in rtw_set_channel_mac()
44 if (rtw_chip_wcpu_11n(rtwdev)) in rtw_set_channel_mac()
47 value32 = rtw_read32(rtwdev, REG_AFE_CTRL1) & ~(BIT_MAC_CLK_SEL); in rtw_set_channel_mac()
49 rtw_write32(rtwdev, REG_AFE_CTRL1, value32); in rtw_set_channel_mac()
51 rtw_write8(rtwdev, REG_USTIME_TSF, MAC_CLK_SPEED); in rtw_set_channel_mac()
52 rtw_write8(rtwdev, REG_USTIME_EDCA, MAC_CLK_SPEED); in rtw_set_channel_mac()
54 value8 = rtw_read8(rtwdev, REG_CCK_CHECK); in rtw_set_channel_mac()
[all …]
H A Dhci.h10 int (*tx_write)(struct rtw_dev *rtwdev,
13 void (*tx_kick_off)(struct rtw_dev *rtwdev);
14 void (*flush_queues)(struct rtw_dev *rtwdev, u32 queues, bool drop);
15 int (*setup)(struct rtw_dev *rtwdev);
16 int (*start)(struct rtw_dev *rtwdev);
17 void (*stop)(struct rtw_dev *rtwdev);
18 void (*deep_ps)(struct rtw_dev *rtwdev, bool enter);
19 void (*link_ps)(struct rtw_dev *rtwdev, bool enter);
20 void (*interface_cfg)(struct rtw_dev *rtwdev);
21 void (*dynamic_rx_agg)(struct rtw_dev *rtwdev, bool enable);
[all …]
H A Drtw8822c.c23 static void rtw8822c_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path,
44 static int rtw8822c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map) in rtw8822c_read_efuse() argument
46 struct rtw_efuse *efuse = &rtwdev->efuse; in rtw8822c_read_efuse()
70 switch (rtw_hci_type(rtwdev)) { in rtw8822c_read_efuse()
88 static void rtw8822c_header_file_init(struct rtw_dev *rtwdev, bool pre) in rtw8822c_header_file_init() argument
90 rtw_write32_set(rtwdev, REG_3WIRE, BIT_3WIRE_TX_EN | BIT_3WIRE_RX_EN); in rtw8822c_header_file_init()
91 rtw_write32_set(rtwdev, REG_3WIRE, BIT_3WIRE_PI_ON); in rtw8822c_header_file_init()
92 rtw_write32_set(rtwdev, REG_3WIRE2, BIT_3WIRE_TX_EN | BIT_3WIRE_RX_EN); in rtw8822c_header_file_init()
93 rtw_write32_set(rtwdev, REG_3WIRE2, BIT_3WIRE_PI_ON); in rtw8822c_header_file_init()
96 rtw_write32_clr(rtwdev, REG_ENCCK, BIT_CCK_OFDM_BLK_EN); in rtw8822c_header_file_init()
[all …]
H A Dmac80211.c22 struct rtw_dev *rtwdev = hw->priv; in rtw_ops_tx() local
24 if (!test_bit(RTW_FLAG_RUNNING, rtwdev->flags)) { in rtw_ops_tx()
29 rtw_tx(rtwdev, control, skb); in rtw_ops_tx()
35 struct rtw_dev *rtwdev = hw->priv; in rtw_ops_wake_tx_queue() local
38 if (!test_bit(RTW_FLAG_RUNNING, rtwdev->flags)) in rtw_ops_wake_tx_queue()
41 spin_lock_bh(&rtwdev->txq_lock); in rtw_ops_wake_tx_queue()
43 list_add_tail(&rtwtxq->list, &rtwdev->txqs); in rtw_ops_wake_tx_queue()
44 spin_unlock_bh(&rtwdev->txq_lock); in rtw_ops_wake_tx_queue()
48 __rtw_tx_work(rtwdev); in rtw_ops_wake_tx_queue()
50 queue_work(rtwdev->tx_wq, &rtwdev->tx_work); in rtw_ops_wake_tx_queue()
[all …]
H A Drtw8703b.c539 static void try_mac_from_devicetree(struct rtw_dev *rtwdev) in try_mac_from_devicetree() argument
541 struct device_node *node = rtwdev->dev->of_node; in try_mac_from_devicetree()
542 struct rtw_efuse *efuse = &rtwdev->efuse; in try_mac_from_devicetree()
548 rtw_dbg(rtwdev, RTW_DBG_EFUSE, in try_mac_from_devicetree()
555 #define DBG_EFUSE_FIX(rtwdev, name) \ argument
556 rtw_dbg(rtwdev, RTW_DBG_EFUSE, "Fixed invalid EFUSE value: " \
557 # name "=0x%x\n", rtwdev->efuse.name)
559 static int rtw8703b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map) in rtw8703b_read_efuse() argument
561 struct rtw_efuse *efuse = &rtwdev->efuse; in rtw8703b_read_efuse()
566 ret = rtw8723x_read_efuse(rtwdev, log_map); in rtw8703b_read_efuse()
[all …]
H A Drtw8723d.c67 static void rtw8723d_pwrtrack_init(struct rtw_dev *rtwdev) in rtw8723d_pwrtrack_init() argument
69 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw8723d_pwrtrack_init()
74 for (path = RF_PATH_A; path < rtwdev->hal.rf_path_num; path++) { in rtw8723d_pwrtrack_init()
80 dm_info->thermal_meter_k = rtwdev->efuse.thermal_meter_k; in rtw8723d_pwrtrack_init()
85 static void rtw8723d_phy_set_param(struct rtw_dev *rtwdev) in rtw8723d_phy_set_param() argument
91 rtw_write16_set(rtwdev, REG_SYS_FUNC_EN, in rtw8723d_phy_set_param()
93 rtw_write8_set(rtwdev, REG_RF_CTRL, in rtw8723d_phy_set_param()
95 rtw_write8(rtwdev, REG_AFE_CTRL1 + 1, 0x80); in rtw8723d_phy_set_param()
97 rtw_phy_load_tables(rtwdev); in rtw8723d_phy_set_param()
100 rtw_write32_clr(rtwdev, REG_RCR, BIT_RCR_ADF); in rtw8723d_phy_set_param()
[all …]
H A Dsdio.c34 static u32 rtw_sdio_to_bus_offset(struct rtw_dev *rtwdev, u32 addr) in rtw_sdio_to_bus_offset() argument
48 rtw_warn(rtwdev, "Cannot convert addr 0x%08x to bus offset", in rtw_sdio_to_bus_offset()
55 static bool rtw_sdio_use_memcpy_io(struct rtw_dev *rtwdev, u32 addr, in rtw_sdio_use_memcpy_io() argument
59 test_bit(RTW_FLAG_POWERON, rtwdev->flags); in rtw_sdio_use_memcpy_io()
62 static void rtw_sdio_writel(struct rtw_dev *rtwdev, u32 val, u32 addr, in rtw_sdio_writel() argument
65 struct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv; in rtw_sdio_writel()
69 if (rtw_sdio_use_memcpy_io(rtwdev, addr, 4)) { in rtw_sdio_writel()
83 static void rtw_sdio_writew(struct rtw_dev *rtwdev, u16 val, u32 addr, in rtw_sdio_writew() argument
86 struct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv; in rtw_sdio_writew()
99 static u32 rtw_sdio_readl(struct rtw_dev *rtwdev, u32 addr, int *err_ret) in rtw_sdio_readl() argument
[all …]
/linux/drivers/net/wireless/realtek/rtw89/
H A Drtw8851b_rfk.c122 static void _set_ch(struct rtw89_dev *rtwdev, u32 val);
135 static u8 _kpath(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx) in _kpath() argument
140 static void _adc_fifo_rst(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx, in _adc_fifo_rst() argument
143 rtw89_phy_write32_mask(rtwdev, R_ADC_FIFO, B_ADC_FIFO_RXK, 0x0101); in _adc_fifo_rst()
145 rtw89_phy_write32_mask(rtwdev, R_ADC_FIFO, B_ADC_FIFO_RXK, 0x1111); in _adc_fifo_rst()
148 static void _rfk_rf_direct_cntrl(struct rtw89_dev *rtwdev, in _rfk_rf_direct_cntrl() argument
152 rtw89_write_rf(rtwdev, path, RR_RSV1, RR_RSV1_RST, 0x1); in _rfk_rf_direct_cntrl()
154 rtw89_write_rf(rtwdev, path, RR_RSV1, RR_RSV1_RST, 0x0); in _rfk_rf_direct_cntrl()
157 static void _rfk_drf_direct_cntrl(struct rtw89_dev *rtwdev, in _rfk_drf_direct_cntrl() argument
161 rtw89_write_rf(rtwdev, path, RR_BBDC, RR_BBDC_SEL, 0x1); in _rfk_drf_direct_cntrl()
[all …]
H A Drtw8852b_rfk.c176 static void _rfk_backup_bb_reg(struct rtw89_dev *rtwdev, u32 backup_bb_reg_val[]) in _rfk_backup_bb_reg() argument
182 rtw89_phy_read32_mask(rtwdev, rtw8852b_backup_bb_regs[i], in _rfk_backup_bb_reg()
184 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_backup_bb_reg()
190 static void _rfk_backup_rf_reg(struct rtw89_dev *rtwdev, u32 backup_rf_reg_val[], in _rfk_backup_rf_reg() argument
197 rtw89_read_rf(rtwdev, rf_path, in _rfk_backup_rf_reg()
199 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_backup_rf_reg()
205 static void _rfk_restore_bb_reg(struct rtw89_dev *rtwdev, in _rfk_restore_bb_reg() argument
211 rtw89_phy_write32_mask(rtwdev, rtw8852b_backup_bb_regs[i], in _rfk_restore_bb_reg()
213 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_restore_bb_reg()
219 static void _rfk_restore_rf_reg(struct rtw89_dev *rtwdev, in _rfk_restore_rf_reg() argument
[all …]
H A Drtw8852a_rfk.c15 static u8 _kpath(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx) in _kpath() argument
17 rtw89_debug(rtwdev, RTW89_DBG_RFK, "[RFK]dbcc_en: %x, PHY%d\n", in _kpath()
18 rtwdev->dbcc_en, phy_idx); in _kpath()
20 if (!rtwdev->dbcc_en) in _kpath()
34 static void _rfk_backup_bb_reg(struct rtw89_dev *rtwdev, u32 backup_bb_reg_val[]) in _rfk_backup_bb_reg() argument
40 rtw89_phy_read32_mask(rtwdev, rtw8852a_backup_bb_regs[i], in _rfk_backup_bb_reg()
42 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_backup_bb_reg()
48 static void _rfk_backup_rf_reg(struct rtw89_dev *rtwdev, u32 backup_rf_reg_val[], in _rfk_backup_rf_reg() argument
55 rtw89_read_rf(rtwdev, rf_path, in _rfk_backup_rf_reg()
57 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_backup_rf_reg()
[all …]
H A Drtw8852bt_rfk.c134 static void _rfk_get_thermal(struct rtw89_dev *rtwdev, u8 kidx, enum rtw89_rf_path path) in _rfk_get_thermal() argument
136 struct rtw89_dpk_info *dpk = &rtwdev->dpk; in _rfk_get_thermal()
138 rtw89_write_rf(rtwdev, path, RR_TM, RR_TM_TRI, 0x1); in _rfk_get_thermal()
139 rtw89_write_rf(rtwdev, path, RR_TM, RR_TM_TRI, 0x0); in _rfk_get_thermal()
140 rtw89_write_rf(rtwdev, path, RR_TM, RR_TM_TRI, 0x1); in _rfk_get_thermal()
144 dpk->bp[path][kidx].ther_dpk = rtw89_read_rf(rtwdev, path, RR_TM, RR_TM_VAL); in _rfk_get_thermal()
146 rtw89_debug(rtwdev, RTW89_DBG_RFK, "[DPK] thermal@DPK = 0x%x\n", in _rfk_get_thermal()
150 static void _rfk_backup_bb_reg(struct rtw89_dev *rtwdev, u32 backup_bb_reg_val[]) in _rfk_backup_bb_reg() argument
156 rtw89_phy_read32_mask(rtwdev, rtw8852bt_backup_bb_regs[i], MASKDWORD); in _rfk_backup_bb_reg()
157 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_backup_bb_reg()
[all …]
H A Dmac_be.c63 static int rtw89_mac_check_mac_en_be(struct rtw89_dev *rtwdev, u8 mac_idx, in rtw89_mac_check_mac_en_be() argument
67 test_bit(RTW89_FLAG_DMAC_FUNC, rtwdev->flags)) in rtw89_mac_check_mac_en_be()
70 test_bit(RTW89_FLAG_CMAC0_FUNC, rtwdev->flags)) in rtw89_mac_check_mac_en_be()
73 test_bit(RTW89_FLAG_CMAC1_FUNC, rtwdev->flags)) in rtw89_mac_check_mac_en_be()
79 static bool is_qta_poh(struct rtw89_dev *rtwdev) in is_qta_poh() argument
81 return rtwdev->hci.type == RTW89_HCI_TYPE_PCIE; in is_qta_poh()
84 static void hfc_get_mix_info_be(struct rtw89_dev *rtwdev) in hfc_get_mix_info_be() argument
86 struct rtw89_hfc_param *param = &rtwdev->mac.hfc_param; in hfc_get_mix_info_be()
92 val = rtw89_read32(rtwdev, R_BE_PUB_PAGE_INFO1); in hfc_get_mix_info_be()
96 val = rtw89_read32(rtwdev, R_BE_PUB_PAGE_INFO3); in hfc_get_mix_info_be()
[all …]
H A Dpci_be.c22 static void rtw89_pci_aspm_set_be(struct rtw89_dev *rtwdev, bool enable) in rtw89_pci_aspm_set_be() argument
24 struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv; in rtw89_pci_aspm_set_be()
31 rtw89_warn(rtwdev, "failed to read ASPM Delay\n"); in rtw89_pci_aspm_set_be()
37 rtw89_warn(rtwdev, "failed to write ASPM Delay\n"); in rtw89_pci_aspm_set_be()
40 rtw89_write32_set(rtwdev, R_AX_PCIE_MIX_CFG_V1, in rtw89_pci_aspm_set_be()
43 rtw89_write32_clr(rtwdev, R_AX_PCIE_MIX_CFG_V1, in rtw89_pci_aspm_set_be()
47 static void rtw89_pci_l1ss_set_be(struct rtw89_dev *rtwdev, bool enable) in rtw89_pci_l1ss_set_be() argument
50 rtw89_write32_set(rtwdev, R_BE_PCIE_MIX_CFG, in rtw89_pci_l1ss_set_be()
53 rtw89_write32_clr(rtwdev, R_BE_PCIE_MIX_CFG, in rtw89_pci_l1ss_set_be()
57 static void rtw89_pci_clkreq_set_be(struct rtw89_dev *rtwdev, bool enable) in rtw89_pci_clkreq_set_be() argument
[all …]
H A Dmac80211.c23 struct rtw89_dev *rtwdev = hw->priv; in rtw89_ops_tx() local
34 rtw89_debug(rtwdev, RTW89_DBG_TXRX, "ops_tx during offchan\n"); in rtw89_ops_tx()
39 ret = rtw89_core_tx_write(rtwdev, vif, sta, skb, &qsel); in rtw89_ops_tx()
41 rtw89_err(rtwdev, "failed to transmit skb: %d\n", ret); in rtw89_ops_tx()
45 rtw89_core_tx_kick_off(rtwdev, qsel); in rtw89_ops_tx()
51 struct rtw89_dev *rtwdev = hw->priv; in rtw89_ops_wake_tx_queue() local
54 queue_work(rtwdev->txq_wq, &rtwdev->txq_work); in rtw89_ops_wake_tx_queue()
59 struct rtw89_dev *rtwdev = hw->priv; in rtw89_ops_start() local
62 mutex_lock(&rtwdev->mutex); in rtw89_ops_start()
63 ret = rtw89_core_start(rtwdev); in rtw89_ops_start()
[all …]
H A Dmac.c40 static void rtw89_mac_mem_write(struct rtw89_dev *rtwdev, u32 offset, in rtw89_mac_mem_write() argument
43 const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def; in rtw89_mac_mem_write()
46 rtw89_write32(rtwdev, mac->filter_model_addr, addr); in rtw89_mac_mem_write()
47 rtw89_write32(rtwdev, mac->indir_access_addr, val); in rtw89_mac_mem_write()
50 static u32 rtw89_mac_mem_read(struct rtw89_dev *rtwdev, u32 offset, in rtw89_mac_mem_read() argument
53 const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def; in rtw89_mac_mem_read()
56 rtw89_write32(rtwdev, mac->filter_model_addr, addr); in rtw89_mac_mem_read()
57 return rtw89_read32(rtwdev, mac->indir_access_addr); in rtw89_mac_mem_read()
60 static int rtw89_mac_check_mac_en_ax(struct rtw89_dev *rtwdev, u8 mac_idx, in rtw89_mac_check_mac_en_ax() argument
66 r_val = rtw89_read32(rtwdev, R_AX_DMAC_FUNC_EN); in rtw89_mac_check_mac_en_ax()
[all …]
H A Drtw8852c_rfk.c80 static u8 _kpath(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx) in _kpath() argument
82 rtw89_debug(rtwdev, RTW89_DBG_RFK, "[RFK]dbcc_en: %x, PHY%d\n", in _kpath()
83 rtwdev->dbcc_en, phy_idx); in _kpath()
85 if (!rtwdev->dbcc_en) in _kpath()
94 static void _rfk_backup_bb_reg(struct rtw89_dev *rtwdev, u32 backup_bb_reg_val[]) in _rfk_backup_bb_reg() argument
100 rtw89_phy_read32_mask(rtwdev, rtw8852c_backup_bb_regs[i], in _rfk_backup_bb_reg()
102 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_backup_bb_reg()
108 static void _rfk_backup_rf_reg(struct rtw89_dev *rtwdev, u32 backup_rf_reg_val[], in _rfk_backup_rf_reg() argument
115 rtw89_read_rf(rtwdev, rf_path, in _rfk_backup_rf_reg()
117 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_backup_rf_reg()
[all …]
H A Drtw8852b_common.c182 static void rtw8852bx_efuse_parsing_tssi(struct rtw89_dev *rtwdev, in rtw8852bx_efuse_parsing_tssi() argument
185 struct rtw89_tssi_info *tssi = &rtwdev->tssi; in rtw8852bx_efuse_parsing_tssi()
197 rtw89_debug(rtwdev, RTW89_DBG_TSSI, in rtw8852bx_efuse_parsing_tssi()
207 rtw89_debug(rtwdev, RTW89_DBG_TSSI, in rtw8852bx_efuse_parsing_tssi()
223 static void rtw8852bx_efuse_parsing_gain_offset(struct rtw89_dev *rtwdev, in rtw8852bx_efuse_parsing_gain_offset() argument
226 struct rtw89_phy_efuse_gain *gain = &rtwdev->efuse_gain; in rtw8852bx_efuse_parsing_gain_offset()
248 static int __rtw8852bx_read_efuse(struct rtw89_dev *rtwdev, u8 *log_map, in __rtw8852bx_read_efuse() argument
251 struct rtw89_efuse *efuse = &rtwdev->efuse; in __rtw8852bx_read_efuse()
258 rtw8852bx_efuse_parsing_tssi(rtwdev, map); in __rtw8852bx_read_efuse()
259 rtw8852bx_efuse_parsing_gain_offset(rtwdev, map); in __rtw8852bx_read_efuse()
[all …]
H A Drtw8852c.c197 static void rtw8852c_ctrl_btg_bt_rx(struct rtw89_dev *rtwdev, bool en,
200 static void rtw8852c_ctrl_tx_path_tmac(struct rtw89_dev *rtwdev, u8 tx_path,
203 static int rtw8852c_pwr_on_func(struct rtw89_dev *rtwdev) in rtw8852c_pwr_on_func() argument
208 val32 = rtw89_read32_mask(rtwdev, R_AX_SYS_STATUS1, B_AX_PAD_HCI_SEL_V2_MASK); in rtw8852c_pwr_on_func()
210 rtw89_write32_set(rtwdev, R_AX_LDO_AON_CTRL0, B_AX_PD_REGU_L); in rtw8852c_pwr_on_func()
212 rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_AFSM_WLSUS_EN | in rtw8852c_pwr_on_func()
214 rtw89_write32_set(rtwdev, R_AX_SYS_PW_CTRL, B_AX_DIS_WLBT_PDNSUSEN_SOPC); in rtw8852c_pwr_on_func()
215 rtw89_write32_set(rtwdev, R_AX_WLLPS_CTRL, B_AX_DIS_WLBT_LPSEN_LOPC); in rtw8852c_pwr_on_func()
216 rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_APDM_HPDN); in rtw8852c_pwr_on_func()
217 rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_APFM_SWLPS); in rtw8852c_pwr_on_func()
[all …]
H A Drtw8922a_rfk.c13 static void rtw8922a_tssi_cont_en(struct rtw89_dev *rtwdev, bool en, in rtw8922a_tssi_cont_en() argument
19 rtw89_phy_write32_mask(rtwdev, tssi_trk_man[path], B_TSSI_CONT_EN, 0); in rtw8922a_tssi_cont_en()
21 rtw89_phy_write32_mask(rtwdev, tssi_trk_man[path], B_TSSI_CONT_EN, 1); in rtw8922a_tssi_cont_en()
24 void rtw8922a_tssi_cont_en_phyidx(struct rtw89_dev *rtwdev, bool en, u8 phy_idx) in rtw8922a_tssi_cont_en_phyidx() argument
26 if (rtwdev->mlo_dbcc_mode == MLO_1_PLUS_1_1RF) { in rtw8922a_tssi_cont_en_phyidx()
28 rtw8922a_tssi_cont_en(rtwdev, en, RF_PATH_A); in rtw8922a_tssi_cont_en_phyidx()
30 rtw8922a_tssi_cont_en(rtwdev, en, RF_PATH_B); in rtw8922a_tssi_cont_en_phyidx()
32 rtw8922a_tssi_cont_en(rtwdev, en, RF_PATH_A); in rtw8922a_tssi_cont_en_phyidx()
33 rtw8922a_tssi_cont_en(rtwdev, en, RF_PATH_B); in rtw8922a_tssi_cont_en_phyidx()
38 void rtw8922a_ctl_band_ch_bw(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy, in rtw8922a_ctl_band_ch_bw() argument
[all …]
H A Dpci.c22 static int rtw89_pci_get_phy_offset_by_link_speed(struct rtw89_dev *rtwdev, in rtw89_pci_get_phy_offset_by_link_speed() argument
25 struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv; in rtw89_pci_get_phy_offset_by_link_speed()
40 rtw89_warn(rtwdev, "Unknown PCI link speed %d\n", val); in rtw89_pci_get_phy_offset_by_link_speed()
47 static int rtw89_pci_rst_bdram_ax(struct rtw89_dev *rtwdev) in rtw89_pci_rst_bdram_ax() argument
52 rtw89_write32_set(rtwdev, R_AX_PCIE_INIT_CFG1, B_AX_RST_BDRAM); in rtw89_pci_rst_bdram_ax()
56 rtwdev, R_AX_PCIE_INIT_CFG1); in rtw89_pci_rst_bdram_ax()
61 static u32 rtw89_pci_dma_recalc(struct rtw89_dev *rtwdev, in rtw89_pci_dma_recalc() argument
65 const struct rtw89_pci_info *info = rtwdev->pci_info; in rtw89_pci_dma_recalc()
87 static u32 rtw89_pci_txbd_recalc(struct rtw89_dev *rtwdev, in rtw89_pci_txbd_recalc() argument
94 idx = rtw89_read32(rtwdev, addr_idx); in rtw89_pci_txbd_recalc()
[all …]
H A Drtw8922a.c228 static void rtw8922a_ctrl_btg_bt_rx(struct rtw89_dev *rtwdev, bool en, in rtw8922a_ctrl_btg_bt_rx() argument
232 rtw89_phy_write32_idx(rtwdev, R_BT_SHARE_A, B_BT_SHARE_A, 0x1, phy_idx); in rtw8922a_ctrl_btg_bt_rx()
233 rtw89_phy_write32_idx(rtwdev, R_BT_SHARE_A, B_BTG_PATH_A, 0x0, phy_idx); in rtw8922a_ctrl_btg_bt_rx()
234 rtw89_phy_write32_idx(rtwdev, R_BT_SHARE_B, B_BT_SHARE_B, 0x1, phy_idx); in rtw8922a_ctrl_btg_bt_rx()
235 rtw89_phy_write32_idx(rtwdev, R_BT_SHARE_B, B_BTG_PATH_B, 0x1, phy_idx); in rtw8922a_ctrl_btg_bt_rx()
236 rtw89_phy_write32_idx(rtwdev, R_LNA_OP, B_LNA6, 0x20, phy_idx); in rtw8922a_ctrl_btg_bt_rx()
237 rtw89_phy_write32_idx(rtwdev, R_LNA_TIA, B_TIA0_B, 0x30, phy_idx); in rtw8922a_ctrl_btg_bt_rx()
238 rtw89_phy_write32_idx(rtwdev, R_PMAC_GNT, B_PMAC_GNT_P1, 0x0, phy_idx); in rtw8922a_ctrl_btg_bt_rx()
239 rtw89_phy_write32_idx(rtwdev, R_ANT_CHBW, B_ANT_BT_SHARE, 0x1, phy_idx); in rtw8922a_ctrl_btg_bt_rx()
240 rtw89_phy_write32_idx(rtwdev, R_FC0INV_SBW, B_RX_BT_SG0, 0x2, phy_idx); in rtw8922a_ctrl_btg_bt_rx()
[all …]
H A Drtw8851b.c281 static int rtw8851b_pwr_on_func(struct rtw89_dev *rtwdev) in rtw8851b_pwr_on_func() argument
287 rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_AFSM_WLSUS_EN | in rtw8851b_pwr_on_func()
289 rtw89_write32_set(rtwdev, R_AX_SYS_PW_CTRL, B_AX_DIS_WLBT_PDNSUSEN_SOPC); in rtw8851b_pwr_on_func()
290 rtw89_write32_set(rtwdev, R_AX_WLLPS_CTRL, B_AX_DIS_WLBT_LPSEN_LOPC); in rtw8851b_pwr_on_func()
291 rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_APDM_HPDN); in rtw8851b_pwr_on_func()
292 rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_APFM_SWLPS); in rtw8851b_pwr_on_func()
295 1000, 20000, false, rtwdev, R_AX_SYS_PW_CTRL); in rtw8851b_pwr_on_func()
299 rtw89_write32_set(rtwdev, R_AX_SYS_PW_CTRL, B_AX_EN_WLON); in rtw8851b_pwr_on_func()
300 rtw89_write32_set(rtwdev, R_AX_SYS_PW_CTRL, B_AX_APFN_ONMAC); in rtw8851b_pwr_on_func()
303 1000, 20000, false, rtwdev, R_AX_SYS_PW_CTRL); in rtw8851b_pwr_on_func()
[all …]
H A Dps.c15 static int rtw89_fw_leave_lps_check(struct rtw89_dev *rtwdev, u8 macid) in rtw89_fw_leave_lps_check() argument
17 const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def; in rtw89_fw_leave_lps_check()
24 1000, 50000, false, rtwdev, in rtw89_fw_leave_lps_check()
27 rtw89_info(rtwdev, "rtw89: failed to leave lps state\n"); in rtw89_fw_leave_lps_check()
34 static void rtw89_ps_power_mode_change_with_hci(struct rtw89_dev *rtwdev, in rtw89_ps_power_mode_change_with_hci() argument
37 ieee80211_stop_queues(rtwdev->hw); in rtw89_ps_power_mode_change_with_hci()
38 rtwdev->hci.paused = true; in rtw89_ps_power_mode_change_with_hci()
39 flush_work(&rtwdev->txq_work); in rtw89_ps_power_mode_change_with_hci()
40 ieee80211_wake_queues(rtwdev->hw); in rtw89_ps_power_mode_change_with_hci()
42 rtw89_hci_pause(rtwdev, true); in rtw89_ps_power_mode_change_with_hci()
[all …]

12345