/linux-6.1.9/drivers/net/wireless/realtek/rtw88/ |
D | ps.c | 13 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_set_channel(rtwdev); in rtw_ips_pwr_up() 26 int rtw_enter_ips(struct rtw_dev *rtwdev) in rtw_enter_ips() argument 28 if (test_and_set_bit(RTW_FLAG_INACTIVE_PS, rtwdev->flags)) in rtw_enter_ips() 31 rtw_coex_ips_notify(rtwdev, COEX_IPS_ENTER); in rtw_enter_ips() 33 rtw_core_stop(rtwdev); in rtw_enter_ips() 34 rtw_hci_link_ps(rtwdev, true); in rtw_enter_ips() 42 struct rtw_dev *rtwdev = data; in rtw_restore_port_cfg_iter() local [all …]
|
D | wow.c | 13 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 …]
|
D | rtw8822c.c | 23 static void rtw8822c_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path, 32 static int rtw8822c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map) in rtw8822c_read_efuse() argument 34 struct rtw_efuse *efuse = &rtwdev->efuse; in rtw8822c_read_efuse() 57 switch (rtw_hci_type(rtwdev)) { in rtw8822c_read_efuse() 69 static void rtw8822c_header_file_init(struct rtw_dev *rtwdev, bool pre) in rtw8822c_header_file_init() argument 71 rtw_write32_set(rtwdev, REG_3WIRE, BIT_3WIRE_TX_EN | BIT_3WIRE_RX_EN); in rtw8822c_header_file_init() 72 rtw_write32_set(rtwdev, REG_3WIRE, BIT_3WIRE_PI_ON); in rtw8822c_header_file_init() 73 rtw_write32_set(rtwdev, REG_3WIRE2, BIT_3WIRE_TX_EN | BIT_3WIRE_RX_EN); in rtw8822c_header_file_init() 74 rtw_write32_set(rtwdev, REG_3WIRE2, BIT_3WIRE_PI_ON); in rtw8822c_header_file_init() 77 rtw_write32_clr(rtwdev, REG_ENCCK, BIT_CCK_OFDM_BLK_EN); in rtw8822c_header_file_init() [all …]
|
D | hci.h | 10 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); 22 int (*write_data_rsvd_page)(struct rtw_dev *rtwdev, u8 *buf, u32 size); [all …]
|
D | mac.c | 11 void rtw_set_channel_mac(struct rtw_dev *rtwdev, u8 channel, u8 bw, in rtw_set_channel_mac() argument 25 rtw_write8(rtwdev, REG_DATA_SC, in rtw_set_channel_mac() 28 value32 = rtw_read32(rtwdev, REG_WMAC_TRXPTCL_CTL); in rtw_set_channel_mac() 41 rtw_write32(rtwdev, REG_WMAC_TRXPTCL_CTL, value32); in rtw_set_channel_mac() 43 if (rtw_chip_wcpu_11n(rtwdev)) in rtw_set_channel_mac() 46 value32 = rtw_read32(rtwdev, REG_AFE_CTRL1) & ~(BIT_MAC_CLK_SEL); in rtw_set_channel_mac() 48 rtw_write32(rtwdev, REG_AFE_CTRL1, value32); in rtw_set_channel_mac() 50 rtw_write8(rtwdev, REG_USTIME_TSF, MAC_CLK_SPEED); in rtw_set_channel_mac() 51 rtw_write8(rtwdev, REG_USTIME_EDCA, MAC_CLK_SPEED); in rtw_set_channel_mac() 53 value8 = rtw_read8(rtwdev, REG_CCK_CHECK); in rtw_set_channel_mac() [all …]
|
D | rtw8723d.c | 68 static void rtw8723d_lck(struct rtw_dev *rtwdev) in rtw8723d_lck() argument 74 val_ctx = rtw_read8(rtwdev, REG_CTX); in rtw8723d_lck() 76 rtw_write8(rtwdev, REG_CTX, val_ctx & ~BIT_MASK_CTX_TYPE); in rtw8723d_lck() 78 rtw_write8(rtwdev, REG_TXPAUSE, 0xFF); in rtw8723d_lck() 79 lc_cal = rtw_read_rf(rtwdev, RF_PATH_A, RF_CFGCH, RFREG_MASK); in rtw8723d_lck() 81 rtw_write_rf(rtwdev, RF_PATH_A, RF_CFGCH, RFREG_MASK, lc_cal | BIT_LCK); in rtw8723d_lck() 85 rtwdev, RF_PATH_A, RF_CFGCH, BIT_LCK); in rtw8723d_lck() 87 rtw_warn(rtwdev, "failed to poll LCK status bit\n"); in rtw8723d_lck() 89 rtw_write_rf(rtwdev, RF_PATH_A, RF_CFGCH, RFREG_MASK, lc_cal); in rtw8723d_lck() 91 rtw_write8(rtwdev, REG_CTX, val_ctx); in rtw8723d_lck() [all …]
|
D | mac80211.c | 22 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() 46 queue_work(rtwdev->tx_wq, &rtwdev->tx_work); in rtw_ops_wake_tx_queue() 51 struct rtw_dev *rtwdev = hw->priv; in rtw_ops_start() local [all …]
|
D | coex.c | 13 static u8 rtw_coex_next_rssi_state(struct rtw_dev *rtwdev, u8 pre_state, in rtw_coex_next_rssi_state() argument 16 const struct rtw_chip_info *chip = rtwdev->chip; in rtw_coex_next_rssi_state() 36 static void rtw_coex_limited_tx(struct rtw_dev *rtwdev, in rtw_coex_limited_tx() argument 39 const struct rtw_chip_info *chip = rtwdev->chip; in rtw_coex_limited_tx() 40 struct rtw_coex *coex = &rtwdev->coex; in rtw_coex_limited_tx() 53 coex_stat->darfrc = rtw_read32(rtwdev, REG_DARFRC); in rtw_coex_limited_tx() 54 coex_stat->darfrch = rtw_read32(rtwdev, REG_DARFRCH); in rtw_coex_limited_tx() 55 coex_stat->retry_limit = rtw_read16(rtwdev, REG_RETRY_LIMIT); in rtw_coex_limited_tx() 60 rtw_read8(rtwdev, REG_AMPDU_MAX_TIME_V1); in rtw_coex_limited_tx() 69 rtw_write8_set(rtwdev, REG_TX_HANG_CTRL, BIT_EN_GNT_BT_AWAKE); in rtw_coex_limited_tx() [all …]
|
D | main.c | 145 struct rtw_dev *rtwdev; member 149 static void rtw_dynamic_csi_rate(struct rtw_dev *rtwdev, struct rtw_vif *rtwvif) in rtw_dynamic_csi_rate() argument 151 struct rtw_bf_info *bf_info = &rtwdev->bf_info; in rtw_dynamic_csi_rate() 159 rtw_chip_cfg_csi_rate(rtwdev, rtwdev->dm_info.min_rssi, in rtw_dynamic_csi_rate() 177 rtw_dynamic_csi_rate(iter_data->rtwdev, rtwvif); in rtw_vif_watch_dog_iter() 190 struct rtw_dev *rtwdev = container_of(work, struct rtw_dev, in rtw_watch_dog_work() local 192 struct rtw_traffic_stats *stats = &rtwdev->stats; in rtw_watch_dog_work() 194 bool busy_traffic = test_bit(RTW_FLAG_BUSY_TRAFFIC, rtwdev->flags); in rtw_watch_dog_work() 197 mutex_lock(&rtwdev->mutex); in rtw_watch_dog_work() 199 if (!test_bit(RTW_FLAG_RUNNING, rtwdev->flags)) in rtw_watch_dog_work() [all …]
|
D | rtw8822b.c | 20 static void rtw8822b_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path, 29 static int rtw8822b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map) in rtw8822b_read_efuse() argument 31 struct rtw_efuse *efuse = &rtwdev->efuse; in rtw8822b_read_efuse() 55 switch (rtw_hci_type(rtwdev)) { in rtw8822b_read_efuse() 67 static void rtw8822b_phy_rfe_init(struct rtw_dev *rtwdev) in rtw8822b_phy_rfe_init() argument 70 rtw_write32_mask(rtwdev, 0x64, BIT(29) | BIT(28), 0x3); in rtw8822b_phy_rfe_init() 71 rtw_write32_mask(rtwdev, 0x4c, BIT(26) | BIT(25), 0x0); in rtw8822b_phy_rfe_init() 72 rtw_write32_mask(rtwdev, 0x40, BIT(2), 0x1); in rtw8822b_phy_rfe_init() 75 rtw_write32_mask(rtwdev, 0x1990, 0x3f, 0x30); in rtw8822b_phy_rfe_init() 76 rtw_write32_mask(rtwdev, 0x1990, (BIT(11) | BIT(10)), 0x3); in rtw8822b_phy_rfe_init() [all …]
|
D | pci.c | 49 static u8 rtw_pci_read8(struct rtw_dev *rtwdev, u32 addr) in rtw_pci_read8() argument 51 struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv; in rtw_pci_read8() 56 static u16 rtw_pci_read16(struct rtw_dev *rtwdev, u32 addr) in rtw_pci_read16() argument 58 struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv; in rtw_pci_read16() 63 static u32 rtw_pci_read32(struct rtw_dev *rtwdev, u32 addr) in rtw_pci_read32() argument 65 struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv; in rtw_pci_read32() 70 static void rtw_pci_write8(struct rtw_dev *rtwdev, u32 addr, u8 val) in rtw_pci_write8() argument 72 struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv; in rtw_pci_write8() 77 static void rtw_pci_write16(struct rtw_dev *rtwdev, u32 addr, u16 val) in rtw_pci_write16() argument 79 struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv; in rtw_pci_write16() [all …]
|
D | rtw8821c.c | 36 static int rtw8821c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map) in rtw8821c_read_efuse() argument 38 struct rtw_efuse *efuse = &rtwdev->efuse; in rtw8821c_read_efuse() 64 if (rtwdev->efuse.rfe_option == 2 || rtwdev->efuse.rfe_option == 4) in rtw8821c_read_efuse() 67 switch (rtw_hci_type(rtwdev)) { in rtw8821c_read_efuse() 86 static u8 rtw8821c_get_swing_index(struct rtw_dev *rtwdev) in rtw8821c_get_swing_index() argument 91 swing = rtw_read32_mask(rtwdev, REG_TXSCALE_A, 0xffe00000); in rtw8821c_get_swing_index() 101 static void rtw8821c_pwrtrack_init(struct rtw_dev *rtwdev) in rtw8821c_pwrtrack_init() argument 103 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw8821c_pwrtrack_init() 104 u8 swing_idx = rtw8821c_get_swing_index(rtwdev); in rtw8821c_pwrtrack_init() 116 dm_info->thermal_meter_k = rtwdev->efuse.thermal_meter_k; in rtw8821c_pwrtrack_init() [all …]
|
D | fw.c | 20 static void rtw_fw_c2h_cmd_handle_ext(struct rtw_dev *rtwdev, in rtw_fw_c2h_cmd_handle_ext() argument 31 rtw_tx_report_handle(rtwdev, skb, C2H_CCX_RPT); in rtw_fw_c2h_cmd_handle_ext() 34 rtw_hw_scan_status_report(rtwdev, skb); in rtw_fw_c2h_cmd_handle_ext() 37 rtw_hw_scan_chan_switch(rtwdev, skb); in rtw_fw_c2h_cmd_handle_ext() 67 struct rtw_dev *rtwdev; member 124 static void rtw_fw_ra_report_handle(struct rtw_dev *rtwdev, u8 *payload, in rtw_fw_ra_report_handle() argument 132 rtwdev->dm_info.tx_rate = GET_RA_REPORT_RATE(payload); in rtw_fw_ra_report_handle() 133 ra_data.rtwdev = rtwdev; in rtw_fw_ra_report_handle() 135 rtw_iterate_stas_atomic(rtwdev, rtw_fw_ra_report_iter, &ra_data); in rtw_fw_ra_report_handle() 139 struct rtw_dev *rtwdev; member [all …]
|
D | bf.c | 10 void rtw_bf_disassoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, in rtw_bf_disassoc() argument 15 struct rtw_bf_info *bfinfo = &rtwdev->bf_info; in rtw_bf_disassoc() 25 rtw_chip_config_bfee(rtwdev, rtwvif, bfee, false); in rtw_bf_disassoc() 30 void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, in rtw_bf_assoc() argument 33 const struct rtw_chip_info *chip = rtwdev->chip; in rtw_bf_assoc() 34 struct ieee80211_hw *hw = rtwdev->hw; in rtw_bf_assoc() 37 struct rtw_bf_info *bfinfo = &rtwdev->bf_info; in rtw_bf_assoc() 52 rtw_warn(rtwdev, "failed to find station entry for bss %pM\n", in rtw_bf_assoc() 63 rtw_dbg(rtwdev, RTW_DBG_BF, "mu bfer number over limit\n"); in rtw_bf_assoc() 73 rtw_chip_config_bfee(rtwdev, rtwvif, bfee, true); in rtw_bf_assoc() [all …]
|
/linux-6.1.9/drivers/net/wireless/realtek/rtw89/ |
D | rtw8852a_rfk.c | 15 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 …]
|
D | rtw8852c_rfk.c | 63 static u8 _kpath(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx) in _kpath() argument 65 rtw89_debug(rtwdev, RTW89_DBG_RFK, "[RFK]dbcc_en: %x, PHY%d\n", in _kpath() 66 rtwdev->dbcc_en, phy_idx); in _kpath() 68 if (!rtwdev->dbcc_en) in _kpath() 77 static void _rfk_backup_bb_reg(struct rtw89_dev *rtwdev, u32 backup_bb_reg_val[]) in _rfk_backup_bb_reg() argument 83 rtw89_phy_read32_mask(rtwdev, rtw8852c_backup_bb_regs[i], in _rfk_backup_bb_reg() 85 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_backup_bb_reg() 91 static void _rfk_backup_rf_reg(struct rtw89_dev *rtwdev, u32 backup_rf_reg_val[], in _rfk_backup_rf_reg() argument 98 rtw89_read_rf(rtwdev, rf_path, in _rfk_backup_rf_reg() 100 rtw89_debug(rtwdev, RTW89_DBG_RFK, in _rfk_backup_rf_reg() [all …]
|
D | mac.c | 36 static void rtw89_mac_mem_write(struct rtw89_dev *rtwdev, u32 offset, in rtw89_mac_mem_write() argument 41 rtw89_write32(rtwdev, R_AX_FILTER_MODEL_ADDR, addr); in rtw89_mac_mem_write() 42 rtw89_write32(rtwdev, R_AX_INDIR_ACCESS_ENTRY, val); in rtw89_mac_mem_write() 45 static u32 rtw89_mac_mem_read(struct rtw89_dev *rtwdev, u32 offset, in rtw89_mac_mem_read() argument 50 rtw89_write32(rtwdev, R_AX_FILTER_MODEL_ADDR, addr); in rtw89_mac_mem_read() 51 return rtw89_read32(rtwdev, R_AX_INDIR_ACCESS_ENTRY); in rtw89_mac_mem_read() 54 int rtw89_mac_check_mac_en(struct rtw89_dev *rtwdev, u8 mac_idx, in rtw89_mac_check_mac_en() argument 60 r_val = rtw89_read32(rtwdev, R_AX_DMAC_FUNC_EN); in rtw89_mac_check_mac_en() 63 r_val = rtw89_read32(rtwdev, R_AX_CMAC_FUNC_EN); in rtw89_mac_check_mac_en() 66 r_val = rtw89_read32(rtwdev, R_AX_SYS_ISO_CTRL_EXTEND); in rtw89_mac_check_mac_en() [all …]
|
D | ps.c | 14 static int rtw89_fw_leave_lps_check(struct rtw89_dev *rtwdev, u8 macid) in rtw89_fw_leave_lps_check() argument 22 1000, 50000, false, rtwdev, in rtw89_fw_leave_lps_check() 25 rtw89_info(rtwdev, "rtw89: failed to leave lps state\n"); in rtw89_fw_leave_lps_check() 32 static void rtw89_ps_power_mode_change_with_hci(struct rtw89_dev *rtwdev, in rtw89_ps_power_mode_change_with_hci() argument 35 ieee80211_stop_queues(rtwdev->hw); in rtw89_ps_power_mode_change_with_hci() 36 rtwdev->hci.paused = true; in rtw89_ps_power_mode_change_with_hci() 37 flush_work(&rtwdev->txq_work); in rtw89_ps_power_mode_change_with_hci() 38 ieee80211_wake_queues(rtwdev->hw); in rtw89_ps_power_mode_change_with_hci() 40 rtw89_hci_pause(rtwdev, true); in rtw89_ps_power_mode_change_with_hci() 41 rtw89_mac_power_mode_change(rtwdev, enter); in rtw89_ps_power_mode_change_with_hci() [all …]
|
D | mac80211.c | 22 struct rtw89_dev *rtwdev = hw->priv; in rtw89_ops_tx() local 28 ret = rtw89_core_tx_write(rtwdev, vif, sta, skb, &qsel); in rtw89_ops_tx() 30 rtw89_err(rtwdev, "failed to transmit skb: %d\n", ret); in rtw89_ops_tx() 34 rtw89_core_tx_kick_off(rtwdev, qsel); in rtw89_ops_tx() 40 struct rtw89_dev *rtwdev = hw->priv; in rtw89_ops_wake_tx_queue() local 43 queue_work(rtwdev->txq_wq, &rtwdev->txq_work); in rtw89_ops_wake_tx_queue() 48 struct rtw89_dev *rtwdev = hw->priv; in rtw89_ops_start() local 51 mutex_lock(&rtwdev->mutex); in rtw89_ops_start() 52 ret = rtw89_core_start(rtwdev); in rtw89_ops_start() 53 mutex_unlock(&rtwdev->mutex); in rtw89_ops_start() [all …]
|
D | pci.c | 22 static int rtw89_pci_rst_bdram_pcie(struct rtw89_dev *rtwdev) in rtw89_pci_rst_bdram_pcie() argument 27 rtw89_write32(rtwdev, R_AX_PCIE_INIT_CFG1, in rtw89_pci_rst_bdram_pcie() 28 rtw89_read32(rtwdev, R_AX_PCIE_INIT_CFG1) | B_AX_RST_BDRAM); in rtw89_pci_rst_bdram_pcie() 32 rtwdev, R_AX_PCIE_INIT_CFG1); in rtw89_pci_rst_bdram_pcie() 40 static u32 rtw89_pci_dma_recalc(struct rtw89_dev *rtwdev, in rtw89_pci_dma_recalc() argument 61 static u32 rtw89_pci_txbd_recalc(struct rtw89_dev *rtwdev, in rtw89_pci_txbd_recalc() argument 68 idx = rtw89_read32(rtwdev, addr_idx); in rtw89_pci_txbd_recalc() 69 cnt = rtw89_pci_dma_recalc(rtwdev, bd_ring, idx, true); in rtw89_pci_txbd_recalc() 74 static void rtw89_pci_release_fwcmd(struct rtw89_dev *rtwdev, in rtw89_pci_release_fwcmd() argument 85 rtw89_err(rtwdev, "failed to pre-release fwcmd\n"); in rtw89_pci_release_fwcmd() [all …]
|
D | rtw8852c.c | 160 static void rtw8852c_ctrl_btg(struct rtw89_dev *rtwdev, bool btg); 161 static void rtw8852c_ctrl_tx_path_tmac(struct rtw89_dev *rtwdev, u8 tx_path, 164 static int rtw8852c_pwr_on_func(struct rtw89_dev *rtwdev) in rtw8852c_pwr_on_func() argument 169 val32 = rtw89_read32_mask(rtwdev, R_AX_SYS_STATUS1, B_AX_PAD_HCI_SEL_V2_MASK); in rtw8852c_pwr_on_func() 171 rtw89_write32_set(rtwdev, R_AX_LDO_AON_CTRL0, B_AX_PD_REGU_L); in rtw8852c_pwr_on_func() 173 rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_AFSM_WLSUS_EN | in rtw8852c_pwr_on_func() 175 rtw89_write32_set(rtwdev, R_AX_SYS_PW_CTRL, B_AX_DIS_WLBT_PDNSUSEN_SOPC); in rtw8852c_pwr_on_func() 176 rtw89_write32_set(rtwdev, R_AX_WLLPS_CTRL, B_AX_DIS_WLBT_LPSEN_LOPC); in rtw8852c_pwr_on_func() 177 rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_APDM_HPDN); in rtw8852c_pwr_on_func() 178 rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_APFM_SWLPS); in rtw8852c_pwr_on_func() [all …]
|
D | rtw8852a.c | 490 static void rtw8852a_efuse_parsing_tssi(struct rtw89_dev *rtwdev, in rtw8852a_efuse_parsing_tssi() argument 493 struct rtw89_tssi_info *tssi = &rtwdev->tssi; in rtw8852a_efuse_parsing_tssi() 505 rtw89_debug(rtwdev, RTW89_DBG_TSSI, in rtw8852a_efuse_parsing_tssi() 515 rtw89_debug(rtwdev, RTW89_DBG_TSSI, in rtw8852a_efuse_parsing_tssi() 521 static int rtw8852a_read_efuse(struct rtw89_dev *rtwdev, u8 *log_map) in rtw8852a_read_efuse() argument 523 struct rtw89_efuse *efuse = &rtwdev->efuse; in rtw8852a_read_efuse() 530 rtw8852a_efuse_parsing_tssi(rtwdev, map); in rtw8852a_read_efuse() 532 switch (rtwdev->hci.type) { in rtw8852a_read_efuse() 540 rtw89_info(rtwdev, "chip rfe_type is %d\n", efuse->rfe_type); in rtw8852a_read_efuse() 545 static void rtw8852a_phycap_parsing_tssi(struct rtw89_dev *rtwdev, u8 *phycap_map) in rtw8852a_phycap_parsing_tssi() argument [all …]
|
D | efuse.c | 15 static int rtw89_switch_efuse_bank(struct rtw89_dev *rtwdev, in rtw89_switch_efuse_bank() argument 20 if (rtwdev->chip->chip_id != RTL8852A) in rtw89_switch_efuse_bank() 23 val = rtw89_read32_mask(rtwdev, R_AX_EFUSE_CTRL_1, in rtw89_switch_efuse_bank() 28 rtw89_write32_mask(rtwdev, R_AX_EFUSE_CTRL_1, B_AX_EF_CELL_SEL_MASK, in rtw89_switch_efuse_bank() 31 val = rtw89_read32_mask(rtwdev, R_AX_EFUSE_CTRL_1, in rtw89_switch_efuse_bank() 39 static void rtw89_enable_otp_burst_mode(struct rtw89_dev *rtwdev, bool en) in rtw89_enable_otp_burst_mode() argument 42 rtw89_write32_set(rtwdev, R_AX_EFUSE_CTRL_1_V1, B_AX_EF_BURST); in rtw89_enable_otp_burst_mode() 44 rtw89_write32_clr(rtwdev, R_AX_EFUSE_CTRL_1_V1, B_AX_EF_BURST); in rtw89_enable_otp_burst_mode() 47 static void rtw89_enable_efuse_pwr_cut_ddv(struct rtw89_dev *rtwdev) in rtw89_enable_efuse_pwr_cut_ddv() argument 49 enum rtw89_core_chip_id chip_id = rtwdev->chip->chip_id; in rtw89_enable_efuse_pwr_cut_ddv() [all …]
|
D | core.c | 159 bool rtw89_ra_report_to_bitrate(struct rtw89_dev *rtwdev, u8 rpt_rate, u16 *bitrate) in rtw89_ra_report_to_bitrate() argument 164 rtw89_debug(rtwdev, RTW89_DBG_UNEXP, "invalid rpt rate %d\n", rpt_rate); in rtw89_ra_report_to_bitrate() 206 static void rtw89_traffic_stats_accu(struct rtw89_dev *rtwdev, in rtw89_traffic_stats_accu() argument 294 void rtw89_core_set_chip_txpwr(struct rtw89_dev *rtwdev) in rtw89_core_set_chip_txpwr() argument 296 const struct rtw89_chip_info *chip = rtwdev->chip; in rtw89_core_set_chip_txpwr() 303 entity_active = rtw89_get_entity_state(rtwdev); in rtw89_core_set_chip_txpwr() 307 mode = rtw89_get_entity_mode(rtwdev); in rtw89_core_set_chip_txpwr() 313 chan = rtw89_chan_get(rtwdev, sub_entity_idx); in rtw89_core_set_chip_txpwr() 315 chip->ops->set_txpwr(rtwdev, chan, phy_idx); in rtw89_core_set_chip_txpwr() 318 void rtw89_set_channel(struct rtw89_dev *rtwdev) in rtw89_set_channel() argument [all …]
|
D | phy.c | 14 static u16 get_max_amsdu_len(struct rtw89_dev *rtwdev, in get_max_amsdu_len() argument 39 return rtwdev->chip->max_amsdu_limit; in get_max_amsdu_len() 91 static u64 rtw89_phy_ra_mask_rssi(struct rtw89_dev *rtwdev, u8 rssi, in rtw89_phy_ra_mask_rssi() argument 134 static u64 rtw89_phy_ra_mask_cfg(struct rtw89_dev *rtwdev, struct rtw89_sta *rtwsta) in rtw89_phy_ra_mask_cfg() argument 137 const struct rtw89_chan *chan = rtw89_chan_get(rtwdev, RTW89_SUB_ENTITY_0); in rtw89_phy_ra_mask_cfg() 162 rtw89_warn(rtwdev, "unhandled band type %d\n", chan->band_type); in rtw89_phy_ra_mask_cfg() 196 static void rtw89_phy_ra_gi_ltf(struct rtw89_dev *rtwdev, in rtw89_phy_ra_gi_ltf() argument 200 const struct rtw89_chan *chan = rtw89_chan_get(rtwdev, RTW89_SUB_ENTITY_0); in rtw89_phy_ra_gi_ltf() 230 static void rtw89_phy_ra_sta_update(struct rtw89_dev *rtwdev, in rtw89_phy_ra_sta_update() argument 237 const struct rtw89_chan *chan = rtw89_chan_get(rtwdev, RTW89_SUB_ENTITY_0); in rtw89_phy_ra_sta_update() [all …]
|