Lines Matching refs:rtlpriv
21 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_get_hw_reg() local
43 *ptsf_high = rtl_read_dword(rtlpriv, (TSFR + 4)); in rtl92se_get_hw_reg()
44 *ptsf_low = rtl_read_dword(rtlpriv, TSFR); in rtl92se_get_hw_reg()
51 *((bool *)(val)) = rtlpriv->dm.current_mrc_switch; in rtl92se_get_hw_reg()
64 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_set_hw_reg() local
73 rtl_write_dword(rtlpriv, IDR0, ((u32 *)(val))[0]); in rtl92se_set_hw_reg()
74 rtl_write_word(rtlpriv, IDR4, ((u16 *)(val + 4))[0]); in rtl92se_set_hw_reg()
88 rtl_write_byte(rtlpriv, RRSR, rate_cfg & 0xff); in rtl92se_set_hw_reg()
89 rtl_write_byte(rtlpriv, RRSR + 1, in rtl92se_set_hw_reg()
96 rtl_write_byte(rtlpriv, INIRTSMCS_SEL, rate_index); in rtl92se_set_hw_reg()
101 rtl_write_dword(rtlpriv, BSSIDR, ((u32 *)(val))[0]); in rtl92se_set_hw_reg()
102 rtl_write_word(rtlpriv, BSSIDR + 4, in rtl92se_set_hw_reg()
107 rtl_write_byte(rtlpriv, SIFS_OFDM, val[0]); in rtl92se_set_hw_reg()
108 rtl_write_byte(rtlpriv, SIFS_OFDM + 1, val[1]); in rtl92se_set_hw_reg()
114 rtl_dbg(rtlpriv, COMP_MLME, DBG_LOUD, in rtl92se_set_hw_reg()
117 rtl_write_byte(rtlpriv, SLOT_TIME, val[0]); in rtl92se_set_hw_reg()
120 rtlpriv->cfg->ops->set_hw_reg(hw, in rtl92se_set_hw_reg()
133 rtl_write_byte(rtlpriv, RRSR + 2, reg_tmp); in rtl92se_set_hw_reg()
142 if (rtlpriv->sec.pairwise_enc_algorithm == in rtl92se_set_hw_reg()
159 rtl_dbg(rtlpriv, COMP_MLME, DBG_LOUD, in rtl92se_set_hw_reg()
163 rtl_write_byte(rtlpriv, AMPDU_MIN_SPACE, in rtl92se_set_hw_reg()
172 mac->min_space_cfg = rtlpriv->rtlhal.minspace_cfg; in rtl92se_set_hw_reg()
175 rtl_dbg(rtlpriv, COMP_MLME, DBG_LOUD, in rtl92se_set_hw_reg()
179 rtl_write_byte(rtlpriv, AMPDU_MIN_SPACE, in rtl92se_set_hw_reg()
209 rtl_write_byte(rtlpriv, in rtl92se_set_hw_reg()
216 rtl_write_byte(rtlpriv, AGGLEN_LMT_H, regtoset); in rtl92se_set_hw_reg()
218 rtl_dbg(rtlpriv, COMP_MLME, DBG_LOUD, in rtl92se_set_hw_reg()
229 rtlpriv->cfg->ops->set_hw_reg(hw, in rtl92se_set_hw_reg()
239 u8 acm_ctrl = rtl_read_byte(rtlpriv, ACMHWCTRL); in rtl92se_set_hw_reg()
256 rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING, in rtl92se_set_hw_reg()
279 rtl_dbg(rtlpriv, COMP_QOS, DBG_TRACE, in rtl92se_set_hw_reg()
281 rtl_write_byte(rtlpriv, ACMHWCTRL, acm_ctrl); in rtl92se_set_hw_reg()
285 rtl_write_dword(rtlpriv, RCR, ((u32 *) (val))[0]); in rtl92se_set_hw_reg()
292 rtl_write_word(rtlpriv, RETRY_LIMIT, in rtl92se_set_hw_reg()
312 rtl_write_byte(rtlpriv, REG_SECR, *val); in rtl92se_set_hw_reg()
355 rtlpriv->dm.current_mrc_switch = bmrc_toset; in rtl92se_set_hw_reg()
372 rtlpriv->dm.current_mrc_switch = bmrc_toset; in rtl92se_set_hw_reg()
385 rtlpriv->cfg->ops->set_hw_reg(hw, in rtl92se_set_hw_reg()
388 rtlpriv->cfg->ops->set_hw_reg(hw, in rtl92se_set_hw_reg()
392 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SET_RPWM, in rtl92se_set_hw_reg()
398 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SET_RPWM, in rtl92se_set_hw_reg()
400 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_H2C_FW_PWRMODE, in rtl92se_set_hw_reg()
403 rtlpriv->cfg->ops->set_hw_reg(hw, in rtl92se_set_hw_reg()
417 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_enable_hw_security_config() local
420 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, in rtl92se_enable_hw_security_config()
422 rtlpriv->sec.pairwise_enc_algorithm, in rtl92se_enable_hw_security_config()
423 rtlpriv->sec.group_enc_algorithm); in rtl92se_enable_hw_security_config()
425 if (rtlpriv->cfg->mod_params->sw_crypto || rtlpriv->sec.use_sw_sec) { in rtl92se_enable_hw_security_config()
426 rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, in rtl92se_enable_hw_security_config()
433 if (rtlpriv->sec.use_defaultkey) { in rtl92se_enable_hw_security_config()
438 rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD, "The SECR-value %x\n", in rtl92se_enable_hw_security_config()
441 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_WPA_CONFIG, &sec_reg_value); in rtl92se_enable_hw_security_config()
447 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92se_halset_sysclk() local
452 rtl_write_byte(rtlpriv, SYS_CLKR + 1, data); in _rtl92se_halset_sysclk()
458 tmpvalue = rtl_read_byte(rtlpriv, SYS_CLKR + 1); in _rtl92se_halset_sysclk()
468 tmpvalue = rtl_read_byte(rtlpriv, SYS_CLKR + 1); in _rtl92se_halset_sysclk()
490 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl8192se_gpiobit3_cfg_inputmode() local
494 rtl_write_byte(rtlpriv, MAC_PINMUX_CFG, (GPIOMUX_EN | GPIOSEL_GPIO)); in rtl8192se_gpiobit3_cfg_inputmode()
495 u1tmp = rtl_read_byte(rtlpriv, GPIO_IO_SEL); in rtl8192se_gpiobit3_cfg_inputmode()
499 rtl_write_byte(rtlpriv, GPIO_IO_SEL, u1tmp); in rtl8192se_gpiobit3_cfg_inputmode()
505 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92se_rf_onoff_detect() local
510 rtl_write_byte(rtlpriv, MAC_PINMUX_CFG, (GPIOMUX_EN | GPIOSEL_GPIO)); in _rtl92se_rf_onoff_detect()
511 u1tmp = rtl_read_byte(rtlpriv, GPIO_IO_SEL); in _rtl92se_rf_onoff_detect()
515 rtl_write_byte(rtlpriv, GPIO_IO_SEL, u1tmp); in _rtl92se_rf_onoff_detect()
522 u1tmp = rtl_read_byte(rtlpriv, GPIO_IN_SE); in _rtl92se_rf_onoff_detect()
530 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92se_macconfig_before_fwdownload() local
541 tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); in _rtl92se_macconfig_before_fwdownload()
543 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b); in _rtl92se_macconfig_before_fwdownload()
545 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b | BIT(0)); in _rtl92se_macconfig_before_fwdownload()
549 tmpu1b = rtl_read_byte(rtlpriv, (SYS_CLKR + 1)); in _rtl92se_macconfig_before_fwdownload()
558 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, 0x0); in _rtl92se_macconfig_before_fwdownload()
560 rtl_write_byte(rtlpriv, LDOA15_CTRL, 0x34); in _rtl92se_macconfig_before_fwdownload()
564 rtl_write_byte(rtlpriv, RPWM, 0x0); in _rtl92se_macconfig_before_fwdownload()
567 tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); in _rtl92se_macconfig_before_fwdownload()
569 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b); in _rtl92se_macconfig_before_fwdownload()
573 rtl_write_byte(rtlpriv, CMDR, 0); in _rtl92se_macconfig_before_fwdownload()
574 rtl_write_byte(rtlpriv, TCR, 0); in _rtl92se_macconfig_before_fwdownload()
577 tmpu1b = rtl_read_byte(rtlpriv, 0x562); in _rtl92se_macconfig_before_fwdownload()
579 rtl_write_byte(rtlpriv, 0x562, tmpu1b); in _rtl92se_macconfig_before_fwdownload()
581 rtl_write_byte(rtlpriv, 0x562, tmpu1b); in _rtl92se_macconfig_before_fwdownload()
584 tmpu1b = rtl_read_byte(rtlpriv, AFE_XTAL_CTRL); in _rtl92se_macconfig_before_fwdownload()
585 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL, (tmpu1b | 0x01)); in _rtl92se_macconfig_before_fwdownload()
588 tmpu1b = rtl_read_byte(rtlpriv, AFE_XTAL_CTRL + 1); in _rtl92se_macconfig_before_fwdownload()
589 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL + 1, (tmpu1b & 0xfb)); in _rtl92se_macconfig_before_fwdownload()
592 tmpu1b = rtl_read_byte(rtlpriv, AFE_MISC); in _rtl92se_macconfig_before_fwdownload()
593 rtl_write_byte(rtlpriv, AFE_MISC, (tmpu1b | BIT(0))); in _rtl92se_macconfig_before_fwdownload()
597 tmpu1b = rtl_read_byte(rtlpriv, AFE_MISC); in _rtl92se_macconfig_before_fwdownload()
598 rtl_write_byte(rtlpriv, AFE_MISC, (tmpu1b | 0x02)); in _rtl92se_macconfig_before_fwdownload()
602 tmpu1b = rtl_read_byte(rtlpriv, LDOA15_CTRL); in _rtl92se_macconfig_before_fwdownload()
603 rtl_write_byte(rtlpriv, LDOA15_CTRL, (tmpu1b | BIT(0))); in _rtl92se_macconfig_before_fwdownload()
606 tmpu2b = rtl_read_word(rtlpriv, REG_SYS_ISO_CTRL); in _rtl92se_macconfig_before_fwdownload()
607 rtl_write_word(rtlpriv, REG_SYS_ISO_CTRL, (tmpu2b | BIT(11))); in _rtl92se_macconfig_before_fwdownload()
610 tmpu2b = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN); in _rtl92se_macconfig_before_fwdownload()
611 rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(13))); in _rtl92se_macconfig_before_fwdownload()
613 rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL + 1, 0x68); in _rtl92se_macconfig_before_fwdownload()
618 tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL); in _rtl92se_macconfig_before_fwdownload()
619 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, (tmpu1b | BIT(0) | BIT(4))); in _rtl92se_macconfig_before_fwdownload()
623 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, (tmpu1b | BIT(0) | in _rtl92se_macconfig_before_fwdownload()
626 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, (tmpu1b | BIT(0) | BIT(4))); in _rtl92se_macconfig_before_fwdownload()
630 tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL + 1); in _rtl92se_macconfig_before_fwdownload()
631 rtl_write_byte(rtlpriv, AFE_PLL_CTRL + 1, (tmpu1b | BIT(0))); in _rtl92se_macconfig_before_fwdownload()
635 rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL, 0xA6); in _rtl92se_macconfig_before_fwdownload()
638 tmpu2b = rtl_read_word(rtlpriv, SYS_CLKR); in _rtl92se_macconfig_before_fwdownload()
639 rtl_write_word(rtlpriv, SYS_CLKR, (tmpu2b | BIT(12) | BIT(11))); in _rtl92se_macconfig_before_fwdownload()
642 tmpu2b = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN); in _rtl92se_macconfig_before_fwdownload()
643 rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(11))); in _rtl92se_macconfig_before_fwdownload()
645 tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); in _rtl92se_macconfig_before_fwdownload()
646 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b & ~(BIT(7))); in _rtl92se_macconfig_before_fwdownload()
649 rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(11) | BIT(15))); in _rtl92se_macconfig_before_fwdownload()
652 tmpu2b = rtl_read_word(rtlpriv, SYS_CLKR); in _rtl92se_macconfig_before_fwdownload()
653 rtl_write_word(rtlpriv, SYS_CLKR, (tmpu2b & (~BIT(2)))); in _rtl92se_macconfig_before_fwdownload()
655 tmpu1b = rtl_read_byte(rtlpriv, (SYS_CLKR + 1)); in _rtl92se_macconfig_before_fwdownload()
660 rtl_write_word(rtlpriv, CMDR, 0x07FC); in _rtl92se_macconfig_before_fwdownload()
665 rtl_write_byte(rtlpriv, 0x6, 0x30); in _rtl92se_macconfig_before_fwdownload()
666 rtl_write_byte(rtlpriv, 0x49, 0xf0); in _rtl92se_macconfig_before_fwdownload()
668 rtl_write_byte(rtlpriv, 0x4b, 0x81); in _rtl92se_macconfig_before_fwdownload()
670 rtl_write_byte(rtlpriv, 0xb5, 0x21); in _rtl92se_macconfig_before_fwdownload()
672 rtl_write_byte(rtlpriv, 0xdc, 0xff); in _rtl92se_macconfig_before_fwdownload()
673 rtl_write_byte(rtlpriv, 0xdd, 0xff); in _rtl92se_macconfig_before_fwdownload()
674 rtl_write_byte(rtlpriv, 0xde, 0xff); in _rtl92se_macconfig_before_fwdownload()
675 rtl_write_byte(rtlpriv, 0xdf, 0xff); in _rtl92se_macconfig_before_fwdownload()
677 rtl_write_byte(rtlpriv, 0x11a, 0x00); in _rtl92se_macconfig_before_fwdownload()
678 rtl_write_byte(rtlpriv, 0x11b, 0x00); in _rtl92se_macconfig_before_fwdownload()
681 rtl_write_byte(rtlpriv, INIMCS_SEL + i, 0x1b); in _rtl92se_macconfig_before_fwdownload()
683 rtl_write_byte(rtlpriv, 0x236, 0xff); in _rtl92se_macconfig_before_fwdownload()
685 rtl_write_byte(rtlpriv, 0x503, 0x22); in _rtl92se_macconfig_before_fwdownload()
688 rtl_write_byte(rtlpriv, 0x560, 0x40); in _rtl92se_macconfig_before_fwdownload()
690 rtl_write_byte(rtlpriv, 0x560, 0x00); in _rtl92se_macconfig_before_fwdownload()
692 rtl_write_byte(rtlpriv, DBG_PORT, 0x91); in _rtl92se_macconfig_before_fwdownload()
695 rtl_write_dword(rtlpriv, RDQDA, rtlpci->rx_ring[RX_MPDU_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
696 rtl_write_dword(rtlpriv, RCDA, rtlpci->rx_ring[RX_CMD_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
699 rtl_write_dword(rtlpriv, TBKDA, rtlpci->tx_ring[BK_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
700 rtl_write_dword(rtlpriv, TBEDA, rtlpci->tx_ring[BE_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
701 rtl_write_dword(rtlpriv, TVIDA, rtlpci->tx_ring[VI_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
702 rtl_write_dword(rtlpriv, TVODA, rtlpci->tx_ring[VO_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
703 rtl_write_dword(rtlpriv, TBDA, rtlpci->tx_ring[BEACON_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
704 rtl_write_dword(rtlpriv, TCDA, rtlpci->tx_ring[TXCMD_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
705 rtl_write_dword(rtlpriv, TMDA, rtlpci->tx_ring[MGNT_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
706 rtl_write_dword(rtlpriv, THPDA, rtlpci->tx_ring[HIGH_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
707 rtl_write_dword(rtlpriv, HDA, rtlpci->tx_ring[HCCA_QUEUE].dma); in _rtl92se_macconfig_before_fwdownload()
709 rtl_write_word(rtlpriv, CMDR, 0x37FC); in _rtl92se_macconfig_before_fwdownload()
714 tmpu1b = rtl_read_byte(rtlpriv, TCR); in _rtl92se_macconfig_before_fwdownload()
724 tmpu1b = rtl_read_byte(rtlpriv, CMDR); in _rtl92se_macconfig_before_fwdownload()
725 rtl_write_byte(rtlpriv, CMDR, tmpu1b & (~TXDMA_EN)); in _rtl92se_macconfig_before_fwdownload()
728 rtl_write_byte(rtlpriv, CMDR, tmpu1b | TXDMA_EN); in _rtl92se_macconfig_before_fwdownload()
734 enum rtl_led_pin pin0 = rtlpriv->ledctl.sw_led0; in _rtl92se_macconfig_before_fwdownload()
745 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92se_macconfig_after_fwdownload() local
756 rtl_write_word(rtlpriv, CMDR, (BBRSTN | BB_GLB_RSTN | in _rtl92se_macconfig_after_fwdownload()
761 rtl_write_dword(rtlpriv, TCR, rtl_read_dword(rtlpriv, TCR) | in _rtl92se_macconfig_after_fwdownload()
765 rtl_write_dword(rtlpriv, RCR, rtlpci->receive_config); in _rtl92se_macconfig_after_fwdownload()
772 rtl_write_word(rtlpriv, SIFS_CCK, 0x0a0a); in _rtl92se_macconfig_after_fwdownload()
773 rtl_write_word(rtlpriv, SIFS_OFDM, 0x1010); in _rtl92se_macconfig_after_fwdownload()
776 rtl_write_byte(rtlpriv, ACK_TIMEOUT, 0x40); in _rtl92se_macconfig_after_fwdownload()
779 rtl_write_word(rtlpriv, BCN_INTERVAL, 100); in _rtl92se_macconfig_after_fwdownload()
780 rtl_write_word(rtlpriv, ATIMWND, 2); in _rtl92se_macconfig_after_fwdownload()
789 rtl_write_byte(rtlpriv, RXDMA, rtl_read_byte(rtlpriv, RXDMA) | BIT(6)); in _rtl92se_macconfig_after_fwdownload()
800 rtl_write_byte(rtlpriv, RRSR, 0xf0); in _rtl92se_macconfig_after_fwdownload()
802 rtl_write_byte(rtlpriv, RRSR, 0xff); in _rtl92se_macconfig_after_fwdownload()
803 rtl_write_byte(rtlpriv, RRSR + 1, 0x01); in _rtl92se_macconfig_after_fwdownload()
804 rtl_write_byte(rtlpriv, RRSR + 2, 0x00); in _rtl92se_macconfig_after_fwdownload()
811 rtl_write_dword(rtlpriv, ARFR0 + i * 4, 0x1f0ff0f0); in _rtl92se_macconfig_after_fwdownload()
816 rtl_write_byte(rtlpriv, AGGLEN_LMT_H, 0x0f); in _rtl92se_macconfig_after_fwdownload()
818 rtl_write_word(rtlpriv, AGGLEN_LMT_L, 0x7442); in _rtl92se_macconfig_after_fwdownload()
820 rtl_write_word(rtlpriv, AGGLEN_LMT_L + 2, 0xddd7); in _rtl92se_macconfig_after_fwdownload()
822 rtl_write_word(rtlpriv, AGGLEN_LMT_L + 4, 0xd772); in _rtl92se_macconfig_after_fwdownload()
824 rtl_write_word(rtlpriv, AGGLEN_LMT_L + 6, 0xfffd); in _rtl92se_macconfig_after_fwdownload()
827 rtl_write_dword(rtlpriv, DARFRC, 0x04010000); in _rtl92se_macconfig_after_fwdownload()
828 rtl_write_dword(rtlpriv, DARFRC + 4, 0x09070605); in _rtl92se_macconfig_after_fwdownload()
829 rtl_write_dword(rtlpriv, RARFRC, 0x04010000); in _rtl92se_macconfig_after_fwdownload()
830 rtl_write_dword(rtlpriv, RARFRC + 4, 0x09070605); in _rtl92se_macconfig_after_fwdownload()
834 rtl_write_word(rtlpriv, SG_RATE, 0xFFFF); in _rtl92se_macconfig_after_fwdownload()
838 rtl_write_word(rtlpriv, NAV_PROT_LEN, 0x0080); in _rtl92se_macconfig_after_fwdownload()
840 rtl_write_byte(rtlpriv, CFEND_TH, 0xFF); in _rtl92se_macconfig_after_fwdownload()
842 rtl_write_byte(rtlpriv, AMPDU_MIN_SPACE, 0x07); in _rtl92se_macconfig_after_fwdownload()
844 rtl_write_byte(rtlpriv, TXOP_STALL_CTRL, 0x00); in _rtl92se_macconfig_after_fwdownload()
853 rtl_write_byte(rtlpriv, RXDRVINFO_SZ, 4); in _rtl92se_macconfig_after_fwdownload()
857 tmpu2b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN); in _rtl92se_macconfig_after_fwdownload()
858 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, tmpu2b | BIT(13)); in _rtl92se_macconfig_after_fwdownload()
859 tmpu2b = rtl_read_byte(rtlpriv, REG_SYS_ISO_CTRL); in _rtl92se_macconfig_after_fwdownload()
860 rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL, tmpu2b & (~BIT(8))); in _rtl92se_macconfig_after_fwdownload()
867 tempval = rtl_read_byte(rtlpriv, REG_SYS_ISO_CTRL + 1); in _rtl92se_macconfig_after_fwdownload()
869 rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL + 1, tempval); in _rtl92se_macconfig_after_fwdownload()
872 rtl_write_byte(rtlpriv, REG_EFUSE_CTRL + 3, 0x72); in _rtl92se_macconfig_after_fwdownload()
873 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "EFUSE CONFIG OK\n"); in _rtl92se_macconfig_after_fwdownload()
876 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "OK\n"); in _rtl92se_macconfig_after_fwdownload()
882 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92se_hw_configure() local
884 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92se_hw_configure()
894 regtmp = rtl_read_byte(rtlpriv, INIRTSMCS_SEL); in _rtl92se_hw_configure()
896 rtl_write_dword(rtlpriv, INIRTSMCS_SEL, reg_rrsr); in _rtl92se_hw_configure()
897 rtl_write_byte(rtlpriv, BW_OPMODE, reg_bw_opmode); in _rtl92se_hw_configure()
900 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RETRY_LIMIT, in _rtl92se_hw_configure()
903 rtl_write_byte(rtlpriv, MLT, 0x8f); in _rtl92se_hw_configure()
916 rtl_write_byte(rtlpriv, AMPDU_MIN_SPACE, rtlhal->minspace_cfg); in _rtl92se_hw_configure()
921 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_hw_init() local
923 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92se_hw_init()
949 rtlpriv->intf_ops->disable_aspm(hw); in rtl92se_hw_init()
955 rtlhal->version = (enum version_8192s)((rtl_read_dword(rtlpriv, in rtl92se_hw_init()
963 rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING, in rtl92se_hw_init()
973 rtlhal->fwcmd_iomap = rtl_read_word(rtlpriv, LBUS_MON_ADDR); in rtl92se_hw_init()
974 rtlhal->fwcmd_ioparam = rtl_read_dword(rtlpriv, LBUS_ADDR_MASK); in rtl92se_hw_init()
988 rtlpci->receive_config = rtl_read_dword(rtlpriv, RCR); in rtl92se_hw_init()
990 rtl_write_dword(rtlpriv, RCR, rtlpci->receive_config); in rtl92se_hw_init()
994 rtl_write_dword(rtlpriv, CMDR, 0x37FC); in rtl92se_hw_init()
1009 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL + 1, 0xDB); in rtl92se_hw_init()
1011 rtl_write_byte(rtlpriv, SPS1_CTRL + 3, 0x07); in rtl92se_hw_init()
1013 rtl_write_byte(rtlpriv, RF_CTRL, 0x07); in rtl92se_hw_init()
1016 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "RF Config failed\n"); in rtl92se_hw_init()
1049 rtl_write_byte(rtlpriv, MACIDR0 + i, rtlefuse->dev_addr[i]); in rtl92se_hw_init()
1052 tmp_u1b = rtl_read_byte(rtlpriv, MAC_PINMUX_CFG); in rtl92se_hw_init()
1053 rtl_write_byte(rtlpriv, MAC_PINMUX_CFG, tmp_u1b & (~BIT(3))); in rtl92se_hw_init()
1055 rtl_write_byte(rtlpriv, 0x4d, 0x0); in rtl92se_hw_init()
1057 if (hal_get_firmwareversion(rtlpriv) >= 0x49) { in rtl92se_hw_init()
1058 tmp_byte = rtl_read_byte(rtlpriv, FW_RSVD_PG_CRTL) & (~BIT(4)); in rtl92se_hw_init()
1060 rtl_write_byte(rtlpriv, FW_RSVD_PG_CRTL, tmp_byte); in rtl92se_hw_init()
1061 rtl_write_dword(rtlpriv, TXDESC_MSK, 0xFFFFCFFF); in rtl92se_hw_init()
1066 if (hal_get_firmwareversion(rtlpriv) >= 0x35) { in rtl92se_hw_init()
1069 } else if (hal_get_firmwareversion(rtlpriv) == 0x34) { in rtl92se_hw_init()
1071 rtl_write_dword(rtlpriv, WFM5, FW_RA_INIT); in rtl92se_hw_init()
1075 rtl_write_dword(rtlpriv, WFM5, FW_RA_RESET); in rtl92se_hw_init()
1077 rtl_write_dword(rtlpriv, WFM5, FW_RA_ACTIVE); in rtl92se_hw_init()
1079 rtl_write_dword(rtlpriv, WFM5, FW_RA_REFRESH); in rtl92se_hw_init()
1094 rtl_write_byte(rtlpriv, REG_SECR, secr_value); in rtl92se_hw_init()
1097 rtl_write_dword(rtlpriv, wdcapra_add[i], 0x5e4322); in rtl92se_hw_init()
1102 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_MRC, (u8 *)&mrc2set); in rtl92se_hw_init()
1105 rtlpriv->cfg->ops->led_control(hw, LED_CTL_POWER_ON); in rtl92se_hw_init()
1120 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_set_check_bssid() local
1123 if (rtlpriv->psc.rfpwr_state != ERFON) in rtl92se_set_check_bssid()
1126 rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr)); in rtl92se_set_check_bssid()
1130 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr)); in rtl92se_set_check_bssid()
1133 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr)); in rtl92se_set_check_bssid()
1141 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92se_set_media_status() local
1142 u8 bt_msr = rtl_read_byte(rtlpriv, MSR); in _rtl92se_set_media_status()
1149 rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, in _rtl92se_set_media_status()
1154 rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, in _rtl92se_set_media_status()
1159 rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, in _rtl92se_set_media_status()
1164 rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, in _rtl92se_set_media_status()
1174 rtlpriv->mac80211.link_state < MAC80211_LINKED) in _rtl92se_set_media_status()
1175 bt_msr = rtl_read_byte(rtlpriv, MSR) & ~MSR_LINK_MASK; in _rtl92se_set_media_status()
1176 rtl_write_byte(rtlpriv, MSR, bt_msr); in _rtl92se_set_media_status()
1178 temp = rtl_read_dword(rtlpriv, TCR); in _rtl92se_set_media_status()
1179 rtl_write_dword(rtlpriv, TCR, temp & (~BIT(8))); in _rtl92se_set_media_status()
1180 rtl_write_dword(rtlpriv, TCR, temp | BIT(8)); in _rtl92se_set_media_status()
1189 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_set_network_type() local
1194 if (rtlpriv->mac80211.link_state == MAC80211_LINKED) { in rtl92se_set_network_type()
1207 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_set_qos() local
1212 rtl_write_dword(rtlpriv, EDCAPARA_BK, 0xa44f); in rtl92se_set_qos()
1218 rtl_write_dword(rtlpriv, EDCAPARA_VI, 0x5e4322); in rtl92se_set_qos()
1221 rtl_write_dword(rtlpriv, EDCAPARA_VO, 0x2f3222); in rtl92se_set_qos()
1231 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_enable_interrupt() local
1234 rtl_write_dword(rtlpriv, INTA_MASK, rtlpci->irq_mask[0]); in rtl92se_enable_interrupt()
1236 rtl_write_dword(rtlpriv, INTA_MASK + 4, rtlpci->irq_mask[1] & 0x3F); in rtl92se_enable_interrupt()
1242 struct rtl_priv *rtlpriv; in rtl92se_disable_interrupt() local
1245 rtlpriv = rtl_priv(hw); in rtl92se_disable_interrupt()
1247 if (!rtlpriv || !rtlpriv->max_fw_size) in rtl92se_disable_interrupt()
1250 rtl_write_dword(rtlpriv, INTA_MASK, 0); in rtl92se_disable_interrupt()
1251 rtl_write_dword(rtlpriv, INTA_MASK + 4, 0); in rtl92se_disable_interrupt()
1257 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92s_set_sysclk() local
1262 rtl_write_byte(rtlpriv, SYS_CLKR + 1, data); in _rtl92s_set_sysclk()
1268 tmp = rtl_read_byte(rtlpriv, SYS_CLKR + 1); in _rtl92s_set_sysclk()
1277 tmp = rtl_read_byte(rtlpriv, SYS_CLKR + 1); in _rtl92s_set_sysclk()
1300 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92s_phy_set_rfhalt() local
1306 rtl_write_byte(rtlpriv, 0x560, 0x0); in _rtl92s_phy_set_rfhalt()
1309 u1btmp = rtl_read_byte(rtlpriv, LDOV12D_CTRL); in _rtl92s_phy_set_rfhalt()
1311 rtl_write_byte(rtlpriv, LDOV12D_CTRL, u1btmp); in _rtl92s_phy_set_rfhalt()
1312 rtl_write_byte(rtlpriv, SPS1_CTRL, 0x0); in _rtl92s_phy_set_rfhalt()
1313 rtl_write_byte(rtlpriv, TXPAUSE, 0xFF); in _rtl92s_phy_set_rfhalt()
1314 rtl_write_word(rtlpriv, CMDR, 0x57FC); in _rtl92s_phy_set_rfhalt()
1316 rtl_write_word(rtlpriv, CMDR, 0x77FC); in _rtl92s_phy_set_rfhalt()
1317 rtl_write_byte(rtlpriv, PHY_CCA, 0x0); in _rtl92s_phy_set_rfhalt()
1319 rtl_write_word(rtlpriv, CMDR, 0x37FC); in _rtl92s_phy_set_rfhalt()
1321 rtl_write_word(rtlpriv, CMDR, 0x77FC); in _rtl92s_phy_set_rfhalt()
1323 rtl_write_word(rtlpriv, CMDR, 0x57FC); in _rtl92s_phy_set_rfhalt()
1324 rtl_write_word(rtlpriv, CMDR, 0x0000); in _rtl92s_phy_set_rfhalt()
1327 u1btmp = rtl_read_byte(rtlpriv, (REG_SYS_FUNC_EN + 1)); in _rtl92s_phy_set_rfhalt()
1329 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, u1btmp); in _rtl92s_phy_set_rfhalt()
1332 u1btmp = rtl_read_byte(rtlpriv, (SYS_CLKR + 1)); in _rtl92s_phy_set_rfhalt()
1350 rtl_write_byte(rtlpriv, 0x03, 0xF9); in _rtl92s_phy_set_rfhalt()
1358 rtl_write_byte(rtlpriv, 0x03, 0xF9); in _rtl92s_phy_set_rfhalt()
1361 rtl_write_byte(rtlpriv, SYS_CLKR + 1, 0x70); in _rtl92s_phy_set_rfhalt()
1362 rtl_write_byte(rtlpriv, AFE_PLL_CTRL + 1, 0x68); in _rtl92s_phy_set_rfhalt()
1363 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, 0x00); in _rtl92s_phy_set_rfhalt()
1364 rtl_write_byte(rtlpriv, LDOA15_CTRL, 0x34); in _rtl92s_phy_set_rfhalt()
1365 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL, 0x0E); in _rtl92s_phy_set_rfhalt()
1372 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92se_gen_refreshledstate() local
1374 enum rtl_led_pin pin0 = rtlpriv->ledctl.sw_led0; in _rtl92se_gen_refreshledstate()
1379 if (rtlpriv->psc.rfoff_reason == RF_CHANGE_BY_IPS) in _rtl92se_gen_refreshledstate()
1388 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92se_power_domain_init() local
1392 rtlpriv->psc.pwrdomain_protect = true; in _rtl92se_power_domain_init()
1394 tmpu1b = rtl_read_byte(rtlpriv, (SYS_CLKR + 1)); in _rtl92se_power_domain_init()
1398 rtlpriv->psc.pwrdomain_protect = false; in _rtl92se_power_domain_init()
1403 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, 0x0); in _rtl92se_power_domain_init()
1404 rtl_write_byte(rtlpriv, LDOA15_CTRL, 0x34); in _rtl92se_power_domain_init()
1407 tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); in _rtl92se_power_domain_init()
1411 if (rtlpriv->psc.rfoff_reason & (RF_CHANGE_BY_IPS | RF_CHANGE_BY_HW)) in _rtl92se_power_domain_init()
1416 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b); in _rtl92se_power_domain_init()
1420 rtl_write_byte(rtlpriv, CMDR, 0); in _rtl92se_power_domain_init()
1421 rtl_write_byte(rtlpriv, TCR, 0); in _rtl92se_power_domain_init()
1424 tmpu1b = rtl_read_byte(rtlpriv, 0x562); in _rtl92se_power_domain_init()
1426 rtl_write_byte(rtlpriv, 0x562, tmpu1b); in _rtl92se_power_domain_init()
1428 rtl_write_byte(rtlpriv, 0x562, tmpu1b); in _rtl92se_power_domain_init()
1431 tmpu1b = rtl_read_byte(rtlpriv, AFE_XTAL_CTRL); in _rtl92se_power_domain_init()
1432 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL, (tmpu1b | 0x01)); in _rtl92se_power_domain_init()
1435 tmpu1b = rtl_read_byte(rtlpriv, AFE_XTAL_CTRL + 1); in _rtl92se_power_domain_init()
1436 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL + 1, (tmpu1b & 0xfb)); in _rtl92se_power_domain_init()
1439 tmpu1b = rtl_read_byte(rtlpriv, AFE_MISC); in _rtl92se_power_domain_init()
1440 rtl_write_byte(rtlpriv, AFE_MISC, (tmpu1b | BIT(0))); in _rtl92se_power_domain_init()
1444 tmpu1b = rtl_read_byte(rtlpriv, AFE_MISC); in _rtl92se_power_domain_init()
1445 rtl_write_byte(rtlpriv, AFE_MISC, (tmpu1b | 0x02)); in _rtl92se_power_domain_init()
1449 tmpu1b = rtl_read_byte(rtlpriv, LDOA15_CTRL); in _rtl92se_power_domain_init()
1450 rtl_write_byte(rtlpriv, LDOA15_CTRL, (tmpu1b | BIT(0))); in _rtl92se_power_domain_init()
1453 tmpu2b = rtl_read_word(rtlpriv, REG_SYS_ISO_CTRL); in _rtl92se_power_domain_init()
1454 rtl_write_word(rtlpriv, REG_SYS_ISO_CTRL, (tmpu2b | BIT(11))); in _rtl92se_power_domain_init()
1458 tmpu2b = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN); in _rtl92se_power_domain_init()
1459 rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(13))); in _rtl92se_power_domain_init()
1461 rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL + 1, 0x68); in _rtl92se_power_domain_init()
1464 tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL); in _rtl92se_power_domain_init()
1465 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, (tmpu1b | BIT(0) | BIT(4))); in _rtl92se_power_domain_init()
1467 tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL + 1); in _rtl92se_power_domain_init()
1468 rtl_write_byte(rtlpriv, AFE_PLL_CTRL + 1, (tmpu1b | BIT(0))); in _rtl92se_power_domain_init()
1472 rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL, 0xA6); in _rtl92se_power_domain_init()
1475 tmpu2b = rtl_read_word(rtlpriv, SYS_CLKR); in _rtl92se_power_domain_init()
1476 rtl_write_word(rtlpriv, SYS_CLKR, (tmpu2b | BIT(12) | BIT(11))); in _rtl92se_power_domain_init()
1479 tmpu2b = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN); in _rtl92se_power_domain_init()
1480 rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(11))); in _rtl92se_power_domain_init()
1482 rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(11) | BIT(15))); in _rtl92se_power_domain_init()
1485 tmpu2b = rtl_read_word(rtlpriv, SYS_CLKR); in _rtl92se_power_domain_init()
1486 rtl_write_word(rtlpriv, SYS_CLKR, (tmpu2b & (~BIT(2)))); in _rtl92se_power_domain_init()
1488 tmpu1b = rtl_read_byte(rtlpriv, (SYS_CLKR + 1)); in _rtl92se_power_domain_init()
1491 rtlpriv->psc.pwrdomain_protect = false; in _rtl92se_power_domain_init()
1495 rtl_write_word(rtlpriv, CMDR, 0x37FC); in _rtl92se_power_domain_init()
1500 rtlpriv->psc.pwrdomain_protect = false; in _rtl92se_power_domain_init()
1505 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_card_disable() local
1512 rtlpriv->intf_ops->enable_aspm(hw); in rtl92se_card_disable()
1516 rtlpriv->cfg->ops->led_control(hw, LED_CTL_POWER_OFF); in rtl92se_card_disable()
1523 while (wait-- >= 10 && rtlpriv->psc.pwrdomain_protect) { in rtl92se_card_disable()
1524 if (rtlpriv->psc.pwrdomain_protect) in rtl92se_card_disable()
1541 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_interrupt_recognized() local
1544 intvec->inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0]; in rtl92se_interrupt_recognized()
1545 rtl_write_dword(rtlpriv, ISR, intvec->inta); in rtl92se_interrupt_recognized()
1547 intvec->intb = rtl_read_dword(rtlpriv, ISR + 4) & rtlpci->irq_mask[1]; in rtl92se_interrupt_recognized()
1548 rtl_write_dword(rtlpriv, ISR + 4, intvec->intb); in rtl92se_interrupt_recognized()
1553 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_set_beacon_related_registers() local
1558 rtl_write_word(rtlpriv, ATIMWND, atim_window); in rtl92se_set_beacon_related_registers()
1561 rtl_write_word(rtlpriv, BCN_INTERVAL, mac->beacon_interval); in rtl92se_set_beacon_related_registers()
1566 rtl_write_word(rtlpriv, BCN_DRV_EARLY_INT, 10 << 4); in rtl92se_set_beacon_related_registers()
1570 rtl_write_word(rtlpriv, BCN_DMATIME, 256); in rtl92se_set_beacon_related_registers()
1575 rtl_write_byte(rtlpriv, BCN_ERR_THRESH, 100); in rtl92se_set_beacon_related_registers()
1583 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_set_beacon_interval() local
1588 rtl_write_word(rtlpriv, BCN_INTERVAL, bcn_interval); in rtl92se_set_beacon_interval()
1596 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_update_interrupt_mask() local
1599 rtl_dbg(rtlpriv, COMP_INTR, DBG_LOUD, "add_msr:%x, rm_msr:%x\n", in rtl92se_update_interrupt_mask()
1632 struct rtl_priv *rtlpriv = rtl_priv(hw); in _rtl92se_read_adapter_info() local
1634 struct rtl_phy *rtlphy = &(rtlpriv->phy); in _rtl92se_read_adapter_info()
1659 RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, "MAP", in _rtl92se_read_adapter_info()
1664 rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING, in _rtl92se_read_adapter_info()
1668 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "Autoload OK\n"); in _rtl92se_read_adapter_info()
1685 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl92se_read_adapter_info()
1687 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl92se_read_adapter_info()
1689 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl92se_read_adapter_info()
1691 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl92se_read_adapter_info()
1693 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl92se_read_adapter_info()
1702 rtl_write_byte(rtlpriv, MACIDR0 + i, rtlefuse->dev_addr[i]); in _rtl92se_read_adapter_info()
1704 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "%pM\n", rtlefuse->dev_addr); in _rtl92se_read_adapter_info()
1728 RTPRINT(rtlpriv, FINIT, INIT_EEPROM, in _rtl92se_read_adapter_info()
1735 RTPRINT(rtlpriv, FINIT, INIT_EEPROM, in _rtl92se_read_adapter_info()
1742 RTPRINT(rtlpriv, FINIT, INIT_EEPROM, in _rtl92se_read_adapter_info()
1776 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1813 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1817 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1872 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1876 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1880 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1884 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1888 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1892 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1902 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1911 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, "TSSI_A = 0x%x, TSSI_B = 0x%x\n", in _rtl92se_read_adapter_info()
1919 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1936 RTPRINT(rtlpriv, FINIT, INIT_TXPOWER, in _rtl92se_read_adapter_info()
1954 tempval = rtl_read_byte(rtlpriv, 0x07); in _rtl92se_read_adapter_info()
1957 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, in _rtl92se_read_adapter_info()
1964 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "EEPROM Customer ID: 0x%2x\n", in _rtl92se_read_adapter_info()
1973 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_read_eeprom_info() local
1977 tmp_u1b = rtl_read_byte(rtlpriv, EPROM_CMD); in rtl92se_read_eeprom_info()
1980 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "Boot from EEPROM\n"); in rtl92se_read_eeprom_info()
1983 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "Boot from EFUSE\n"); in rtl92se_read_eeprom_info()
1988 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "Autoload OK\n"); in rtl92se_read_eeprom_info()
2000 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_update_hal_rate_table() local
2001 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92se_update_hal_rate_table()
2065 if (rtlpriv->rtlhal.version >= VERSION_8192S_BCUT) in rtl92se_update_hal_rate_table()
2067 else if (rtlpriv->rtlhal.version == VERSION_8192S_ACUT) in rtl92se_update_hal_rate_table()
2085 rtl_write_byte(rtlpriv, SG_RATE, shortgi_rate); in rtl92se_update_hal_rate_table()
2088 rtl_write_dword(rtlpriv, ARFR0 + ratr_index * 4, ratr_value); in rtl92se_update_hal_rate_table()
2094 rtl_dbg(rtlpriv, COMP_RATR, DBG_DMESG, "%x\n", in rtl92se_update_hal_rate_table()
2095 rtl_read_dword(rtlpriv, ARFR0)); in rtl92se_update_hal_rate_table()
2102 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_update_hal_rate_mask() local
2103 struct rtl_phy *rtlphy = &(rtlpriv->phy); in rtl92se_update_hal_rate_mask()
2228 if (rtlpriv->rtlhal.version >= VERSION_8192S_BCUT) in rtl92se_update_hal_rate_mask()
2230 else if (rtlpriv->rtlhal.version == VERSION_8192S_ACUT) in rtl92se_update_hal_rate_mask()
2244 rtl_write_byte(rtlpriv, SG_RATE, shortgi_rate); in rtl92se_update_hal_rate_mask()
2249 rtl_dbg(rtlpriv, COMP_RATR, DBG_TRACE, "mask = %x, bitmap = %x\n", in rtl92se_update_hal_rate_mask()
2251 rtl_write_dword(rtlpriv, 0x2c4, ratr_bitmap); in rtl92se_update_hal_rate_mask()
2252 rtl_write_dword(rtlpriv, WFM5, (FW_RA_UPDATE_MASK | (mask << 8))); in rtl92se_update_hal_rate_mask()
2261 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_update_hal_rate_tbl() local
2263 if (rtlpriv->dm.useramask) in rtl92se_update_hal_rate_tbl()
2271 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_update_channel_access_setting() local
2275 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SLOT_TIME, in rtl92se_update_channel_access_setting()
2278 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SIFS, (u8 *)&sifs_timer); in rtl92se_update_channel_access_setting()
2287 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_gpio_radio_on_off_checking() local
2302 spin_lock_irqsave(&rtlpriv->locks.rf_ps_lock, flag); in rtl92se_gpio_radio_on_off_checking()
2304 spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flag); in rtl92se_gpio_radio_on_off_checking()
2308 spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flag); in rtl92se_gpio_radio_on_off_checking()
2325 rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG, in rtl92se_gpio_radio_on_off_checking()
2332 rtl_dbg(rtlpriv, COMP_RF, in rtl92se_gpio_radio_on_off_checking()
2341 spin_lock_irqsave(&rtlpriv->locks.rf_ps_lock, flag); in rtl92se_gpio_radio_on_off_checking()
2343 spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flag); in rtl92se_gpio_radio_on_off_checking()
2359 spin_lock_irqsave(&rtlpriv->locks.rf_ps_lock, flag); in rtl92se_gpio_radio_on_off_checking()
2361 spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flag); in rtl92se_gpio_radio_on_off_checking()
2374 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl92se_set_key() local
2397 rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, "clear_all\n"); in rtl92se_set_key()
2404 memset(rtlpriv->sec.key_buf[idx], 0, in rtl92se_set_key()
2406 rtlpriv->sec.key_len[idx] = 0; in rtl92se_set_key()
2431 if (is_wepkey || rtlpriv->sec.use_defaultkey) { in rtl92se_set_key()
2455 if (rtlpriv->sec.key_len[key_index] == 0) { in rtl92se_set_key()
2456 rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, in rtl92se_set_key()
2463 rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, in rtl92se_set_key()
2466 rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, in rtl92se_set_key()
2472 rtlpriv->sec.key_buf[key_index]); in rtl92se_set_key()
2474 rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, in rtl92se_set_key()
2483 rtlpriv->sec.key_buf[entry_id]); in rtl92se_set_key()
2489 rtlpriv->sec.key_buf[entry_id]); in rtl92se_set_key()