Lines Matching +full:0 +full:x0fffff
107 for (rf_path = 0; rf_path < 2; rf_path++) { in _rtl92cu_read_txpower_info_from_hwpg()
108 for (i = 0; i < 3; i++) { in _rtl92cu_read_txpower_info_from_hwpg()
127 for (i = 0; i < 3; i++) { in _rtl92cu_read_txpower_info_from_hwpg()
133 (tempval & 0xf); in _rtl92cu_read_txpower_info_from_hwpg()
135 ((tempval & 0xf0) >> 4); in _rtl92cu_read_txpower_info_from_hwpg()
137 for (rf_path = 0; rf_path < 2; rf_path++) in _rtl92cu_read_txpower_info_from_hwpg()
138 for (i = 0; i < 3; i++) in _rtl92cu_read_txpower_info_from_hwpg()
140 "RF(%d) EEPROM CCK Area(%d) = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
144 for (rf_path = 0; rf_path < 2; rf_path++) in _rtl92cu_read_txpower_info_from_hwpg()
145 for (i = 0; i < 3; i++) in _rtl92cu_read_txpower_info_from_hwpg()
147 "RF(%d) EEPROM HT40 1S Area(%d) = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
151 for (rf_path = 0; rf_path < 2; rf_path++) in _rtl92cu_read_txpower_info_from_hwpg()
152 for (i = 0; i < 3; i++) in _rtl92cu_read_txpower_info_from_hwpg()
154 "RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
158 for (rf_path = 0; rf_path < 2; rf_path++) { in _rtl92cu_read_txpower_info_from_hwpg()
159 for (i = 0; i < 14; i++) { in _rtl92cu_read_txpower_info_from_hwpg()
170 > 0) { in _rtl92cu_read_txpower_info_from_hwpg()
178 rtlefuse->txpwrlevel_ht40_2s[rf_path][i] = 0; in _rtl92cu_read_txpower_info_from_hwpg()
181 for (i = 0; i < 14; i++) { in _rtl92cu_read_txpower_info_from_hwpg()
183 "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", rf_path, i, in _rtl92cu_read_txpower_info_from_hwpg()
189 for (i = 0; i < 3; i++) { in _rtl92cu_read_txpower_info_from_hwpg()
196 rtlefuse->eeprom_pwrlimit_ht40[i] = 0; in _rtl92cu_read_txpower_info_from_hwpg()
197 rtlefuse->eeprom_pwrlimit_ht20[i] = 0; in _rtl92cu_read_txpower_info_from_hwpg()
200 for (rf_path = 0; rf_path < 2; rf_path++) { in _rtl92cu_read_txpower_info_from_hwpg()
201 for (i = 0; i < 14; i++) { in _rtl92cu_read_txpower_info_from_hwpg()
206 & 0xf); in _rtl92cu_read_txpower_info_from_hwpg()
209 & 0xf); in _rtl92cu_read_txpower_info_from_hwpg()
213 & 0xf0) >> 4); in _rtl92cu_read_txpower_info_from_hwpg()
216 & 0xf0) >> 4); in _rtl92cu_read_txpower_info_from_hwpg()
219 "RF-%d pwrgroup_ht20[%d] = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
223 "RF-%d pwrgroup_ht40[%d] = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
228 for (i = 0; i < 14; i++) { in _rtl92cu_read_txpower_info_from_hwpg()
234 rtlefuse->txpwr_ht20diff[RF90_PATH_A][i] = (tempval & 0xF); in _rtl92cu_read_txpower_info_from_hwpg()
236 ((tempval >> 4) & 0xF); in _rtl92cu_read_txpower_info_from_hwpg()
238 rtlefuse->txpwr_ht20diff[RF90_PATH_A][i] |= 0xF0; in _rtl92cu_read_txpower_info_from_hwpg()
240 rtlefuse->txpwr_ht20diff[RF90_PATH_B][i] |= 0xF0; in _rtl92cu_read_txpower_info_from_hwpg()
246 rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i] = (tempval & 0xF); in _rtl92cu_read_txpower_info_from_hwpg()
248 ((tempval >> 4) & 0xF); in _rtl92cu_read_txpower_info_from_hwpg()
252 for (i = 0; i < 14; i++) in _rtl92cu_read_txpower_info_from_hwpg()
254 "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
256 for (i = 0; i < 14; i++) in _rtl92cu_read_txpower_info_from_hwpg()
258 "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
260 for (i = 0; i < 14; i++) in _rtl92cu_read_txpower_info_from_hwpg()
262 "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
264 for (i = 0; i < 14; i++) in _rtl92cu_read_txpower_info_from_hwpg()
266 "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
269 rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); in _rtl92cu_read_txpower_info_from_hwpg()
271 rtlefuse->eeprom_regulatory = 0; in _rtl92cu_read_txpower_info_from_hwpg()
273 "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); in _rtl92cu_read_txpower_info_from_hwpg()
282 "TSSI_A = 0x%x, TSSI_B = 0x%x\n", in _rtl92cu_read_txpower_info_from_hwpg()
289 rtlefuse->eeprom_thermalmeter = (tempval & 0x1f); in _rtl92cu_read_txpower_info_from_hwpg()
290 if (rtlefuse->eeprom_thermalmeter < 0x06 || in _rtl92cu_read_txpower_info_from_hwpg()
291 rtlefuse->eeprom_thermalmeter > 0x1c) in _rtl92cu_read_txpower_info_from_hwpg()
292 rtlefuse->eeprom_thermalmeter = 0x12; in _rtl92cu_read_txpower_info_from_hwpg()
293 if (rtlefuse->eeprom_thermalmeter == 0x1f || autoload_fail) in _rtl92cu_read_txpower_info_from_hwpg()
295 rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; in _rtl92cu_read_txpower_info_from_hwpg()
297 "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); in _rtl92cu_read_txpower_info_from_hwpg()
327 0}; in _rtl92cu_read_adapter_info()
345 if (rtlefuse->eeprom_did == 0x8176) { in _rtl92cu_read_adapter_info()
346 if ((rtlefuse->eeprom_svid == 0x103C && in _rtl92cu_read_adapter_info()
347 rtlefuse->eeprom_smid == 0x1629)) in _rtl92cu_read_adapter_info()
389 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "RT Customized ID: 0x%02X\n", in _rtl92cu_hal_customized_behavior()
419 int status = 0; in _rtl92cu_init_power_on()
423 u32 pollingcount = 0; in _rtl92cu_init_power_on()
436 /* 0. RSV_CTRL 0x1C[7:0] = 0 unlock ISO/CLK/Power control register */ in _rtl92cu_init_power_on()
437 rtl_write_byte(rtlpriv, REG_RSV_CTRL, 0x0); in _rtl92cu_init_power_on()
440 rtl_write_byte(rtlpriv, REG_SPS0_CTRL, 0x2b); in _rtl92cu_init_power_on()
443 if (0 == (value8 & LDV12_EN)) { in _rtl92cu_init_power_on()
447 " power-on :REG_LDOV12D_CTRL Reg0x21:0x%02x\n", in _rtl92cu_init_power_on()
455 pollingcount = 0; in _rtl92cu_init_power_on()
470 rtl_write_word(rtlpriv, REG_APS_FSMCO, 0x0812); in _rtl92cu_init_power_on()
476 pollingcount = 0; in _rtl92cu_init_power_on()
499 u32 numhq = 0; in _rtl92cu_init_queue_reserved_page()
500 u32 numlq = 0; in _rtl92cu_init_queue_reserved_page()
501 u32 numnq = 0; in _rtl92cu_init_queue_reserved_page()
545 rtl_write_word(rtlpriv, (REG_TRXFF_BNDY + 2), 0x27FF); in _rtl92c_init_trx_buffer()
555 u16 value16 = (rtl_read_word(rtlpriv, REG_TRXDMA_CTRL) & 0x7); in _rtl92c_init_chipn_reg_priority()
584 pr_info("Tx queue select: 0x%02x\n", queue_sel); in _rtl92cu_init_chipn_one_out_ep_priority()
620 pr_info("Tx queue select: 0x%02x\n", queue_sel); in _rtl92cu_init_chipn_two_out_ep_priority()
636 pr_info("Tx queue select :0x%02x..\n", queue_sel); in _rtl92cu_init_chipn_three_out_ep_priority()
663 u8 hq_sele = 0; in _rtl92cu_init_chipt_queue_priority()
673 hq_sele = 0; in _rtl92cu_init_chipt_queue_priority()
685 pr_info("Tx queue select :0x%02x..\n", hq_sele); in _rtl92cu_init_chipt_queue_priority()
711 rtl_write_dword(rtlpriv, REG_MAR, 0xFFFFFFFF); in _rtl92cu_init_wmac_setting()
712 rtl_write_dword(rtlpriv, REG_MAR + 4, 0xFFFFFFFF); in _rtl92cu_init_wmac_setting()
714 value16 = 0xFFFF; in _rtl92cu_init_wmac_setting()
717 /* Reject all control frame - default value is 0 */ in _rtl92cu_init_wmac_setting()
718 value16 = 0x0; in _rtl92cu_init_wmac_setting()
722 value16 = 0xFFFF; in _rtl92cu_init_wmac_setting()
732 rtl_write_word(rtlpriv, REG_BCN_CTRL, 0x1010); in _rtl92cu_init_beacon_parameters()
735 rtl_write_word(rtlpriv, REG_TBTT_PROHIBIT, 0x6404); in _rtl92cu_init_beacon_parameters()
742 rtl_write_word(rtlpriv, REG_BCNTCFG, 0x660F); in _rtl92cu_init_beacon_parameters()
744 rtl_write_word(rtlpriv, REG_BCNTCFG, 0x66FF); in _rtl92cu_init_beacon_parameters()
753 int err = 0; in _rtl92cu_init_mac()
791 u8 sec_reg_value = 0x0; in rtl92cu_enable_hw_security_config()
810 rtl_write_byte(rtlpriv, REG_CR + 1, 0x02); in rtl92cu_enable_hw_security_config()
822 rtl_write_byte(rtlpriv, REG_LDOHCI12_CTRL, 0x0f); in _rtl92cu_hw_configure()
823 rtl_write_byte(rtlpriv, 0x15, 0xe9); in _rtl92cu_hw_configure()
825 /* set 0x0 to 0xFF by tynli. Default enable HW SEQ NUM. */ in _rtl92cu_hw_configure()
826 rtl_write_byte(rtlpriv, REG_HWSEQ_CTRL, 0xFF); in _rtl92cu_hw_configure()
828 rtl_write_byte(rtlpriv, 0xfe40, 0xe0); in _rtl92cu_hw_configure()
829 rtl_write_byte(rtlpriv, 0xfe41, 0x8d); in _rtl92cu_hw_configure()
830 rtl_write_byte(rtlpriv, 0xfe42, 0x80); in _rtl92cu_hw_configure()
831 rtlusb->reg_bcn_ctrl_val = 0x18; in _rtl92cu_hw_configure()
842 pa_setting = efuse_read_1byte(hw, 0x1FA); in _initpabias()
843 if (!(pa_setting & BIT(0))) { in _initpabias()
844 rtl_set_rfreg(hw, RF90_PATH_A, 0x15, 0x0FFFFF, 0x0F406); in _initpabias()
845 rtl_set_rfreg(hw, RF90_PATH_A, 0x15, 0x0FFFFF, 0x4F406); in _initpabias()
846 rtl_set_rfreg(hw, RF90_PATH_A, 0x15, 0x0FFFFF, 0x8F406); in _initpabias()
847 rtl_set_rfreg(hw, RF90_PATH_A, 0x15, 0x0FFFFF, 0xCF406); in _initpabias()
851 rtl_set_rfreg(hw, RF90_PATH_B, 0x15, 0x0FFFFF, 0x0F406); in _initpabias()
852 rtl_set_rfreg(hw, RF90_PATH_B, 0x15, 0x0FFFFF, 0x4F406); in _initpabias()
853 rtl_set_rfreg(hw, RF90_PATH_B, 0x15, 0x0FFFFF, 0x8F406); in _initpabias()
854 rtl_set_rfreg(hw, RF90_PATH_B, 0x15, 0x0FFFFF, 0xCF406); in _initpabias()
857 pa_setting = rtl_read_byte(rtlpriv, 0x16); in _initpabias()
858 pa_setting &= 0x0F; in _initpabias()
859 rtl_write_byte(rtlpriv, 0x16, pa_setting | 0x90); in _initpabias()
870 int err = 0; in rtl92cu_hw_init()
899 rtlhal->last_hmeboxnum = 0; /* h2c */ in rtl92cu_hw_init()
907 rtl_set_rfreg(hw, RF90_PATH_A, RF_RX_G1, MASKDWORD, 0x30255); in rtl92cu_hw_init()
908 rtl_set_rfreg(hw, RF90_PATH_A, RF_RX_G2, MASKDWORD, 0x50a00); in rtl92cu_hw_init()
910 rtlphy->rfreg_chnlval[0] = rtl_get_rfreg(hw, (enum radio_path)0, in rtl92cu_hw_init()
943 a. TXPAUSE 0x522[7:0] = 0xFF Pause MAC TX queue in disable_rfafeandresetbb()
944 b. RF path 0 offset 0x00 = 0x00 disable RF in disable_rfafeandresetbb()
945 c. APSD_CTRL 0x600[7:0] = 0x40 in disable_rfafeandresetbb()
946 d. SYS_FUNC_EN 0x02[7:0] = 0x16 reset BB state machine in disable_rfafeandresetbb()
947 e. SYS_FUNC_EN 0x02[7:0] = 0x14 reset BB state machine in disable_rfafeandresetbb()
949 u8 erfpath = 0, value8 = 0; in disable_rfafeandresetbb()
951 rtl_write_byte(rtlpriv, REG_TXPAUSE, 0xFF); in disable_rfafeandresetbb()
952 rtl_set_rfreg(hw, (enum radio_path)erfpath, 0x0, MASKBYTE0, 0x0); in disable_rfafeandresetbb()
955 rtl_write_byte(rtlpriv, REG_APSD_CTRL, value8); /*0x40*/ in disable_rfafeandresetbb()
956 value8 = 0; in disable_rfafeandresetbb()
958 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, value8);/*0x16*/ in disable_rfafeandresetbb()
960 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN, value8); /*0x14*/ in disable_rfafeandresetbb()
968 if (rtlhal->fw_version <= 0x20) { in _resetdigitalprocedure1()
970 f. MCUFWDL 0x80[7:0]=0 reset MCU ready status in _resetdigitalprocedure1()
971 g. SYS_FUNC_EN 0x02[10]= 0 reset MCU reg, (8051 reset) in _resetdigitalprocedure1()
972 h. SYS_FUNC_EN 0x02[15-12]= 5 reset MAC reg, DCORE in _resetdigitalprocedure1()
973 i. SYS_FUNC_EN 0x02[10]= 1 enable MCU reg, (8051 enable) in _resetdigitalprocedure1()
975 u16 valu16 = 0; in _resetdigitalprocedure1()
977 rtl_write_byte(rtlpriv, REG_MCUFWDL, 0); in _resetdigitalprocedure1()
981 valu16 = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN)&0x0FFF; in _resetdigitalprocedure1()
988 u8 retry_cnts = 0; in _resetdigitalprocedure1()
993 rtl_write_byte(rtlpriv, REG_MCUFWDL, 0); in _resetdigitalprocedure1()
995 rtl_write_byte(rtlpriv, REG_HMETFR+3, 0x20); in _resetdigitalprocedure1()
1006 0x50); in _resetdigitalprocedure1()
1011 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, 0x54); in _resetdigitalprocedure1()
1012 rtl_write_byte(rtlpriv, REG_MCUFWDL, 0); in _resetdigitalprocedure1()
1017 g.SYS_CLKR 0x08[15:0] = 0x30A3 disable MAC clock in _resetdigitalprocedure1()
1018 h.AFE_PLL_CTRL 0x28[7:0] = 0x80 disable AFE PLL in _resetdigitalprocedure1()
1019 i.AFE_XTAL_CTRL 0x24[15:0] = 0x880F gated AFE DIG_CLOCK in _resetdigitalprocedure1()
1020 j.SYS_ISu_CTRL 0x00[7:0] = 0xF9 isolated digital to PON in _resetdigitalprocedure1()
1022 rtl_write_word(rtlpriv, REG_SYS_CLKR, 0x70A3); in _resetdigitalprocedure1()
1023 rtl_write_byte(rtlpriv, REG_AFE_PLL_CTRL, 0x80); in _resetdigitalprocedure1()
1024 rtl_write_word(rtlpriv, REG_AFE_XTAL_CTRL, 0x880F); in _resetdigitalprocedure1()
1025 rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL, 0xF9); in _resetdigitalprocedure1()
1033 k. SYS_FUNC_EN 0x03[7:0] = 0x44 disable ELDR runction in _resetdigitalprocedure2()
1034 l. SYS_CLKR 0x08[15:0] = 0x3083 disable ELDR clock in _resetdigitalprocedure2()
1035 m. SYS_ISO_CTRL 0x01[7:0] = 0x83 isolated ELDR to PON in _resetdigitalprocedure2()
1037 rtl_write_word(rtlpriv, REG_SYS_CLKR, 0x70A3); in _resetdigitalprocedure2()
1038 rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL+1, 0x82); in _resetdigitalprocedure2()
1045 j. GPIO_PIN_CTRL 0x44[31:0]=0x000 in _disablegpio()
1046 k. Value = GPIO_PIN_CTRL[7:0] in _disablegpio()
1047 l. GPIO_PIN_CTRL 0x44[31:0] = 0x00FF0000 | (value <<8); write ext PIN level in _disablegpio()
1048 m. GPIO_MUXCFG 0x42 [15:0] = 0x0780 in _disablegpio()
1049 n. LEDCFG 0x4C[15:0] = 0x8080 in _disablegpio()
1055 /* 1. Disable GPIO[7:0] */ in _disablegpio()
1056 rtl_write_word(rtlpriv, REG_GPIO_PIN_CTRL+2, 0x0000); in _disablegpio()
1057 value32 = rtl_read_dword(rtlpriv, REG_GPIO_PIN_CTRL) & 0xFFFF00FF; in _disablegpio()
1058 value8 = (u8)(value32&0x000000FF); in _disablegpio()
1059 value32 |= ((value8<<8) | 0x00FF0000); in _disablegpio()
1062 rtl_write_byte(rtlpriv, REG_GPIO_MUXCFG+3, 0x00); in _disablegpio()
1063 value16 = rtl_read_word(rtlpriv, REG_GPIO_MUXCFG+2) & 0xFF0F; in _disablegpio()
1064 value8 = (u8)(value16&0x000F); in _disablegpio()
1065 value16 |= ((value8<<4) | 0x0780); in _disablegpio()
1068 rtl_write_word(rtlpriv, REG_LEDCFG0, 0x8080); in _disablegpio()
1074 u16 value16 = 0; in disable_analog()
1075 u8 value8 = 0; in disable_analog()
1079 n. LDOA15_CTRL 0x20[7:0] = 0x04 disable A15 power in disable_analog()
1080 o. LDOV12D_CTRL 0x21[7:0] = 0x54 disable digital core power in disable_analog()
1084 rtl_write_byte(rtlpriv, REG_LDOA15_CTRL, 0x04); in disable_analog()
1091 h. SPS0_CTRL 0x11[7:0] = 0x23 enter PFM mode in disable_analog()
1092 i. APS_FSMCO 0x04[15:0] = 0x4802 set USB suspend in disable_analog()
1094 rtl_write_byte(rtlpriv, REG_SPS0_CTRL, 0x23); in disable_analog()
1097 rtl_write_byte(rtlpriv, REG_RSV_CTRL, 0x0E); in disable_analog()
1141 u8 tmp1byte = 0; in _rtl92cu_stop_tx_beacon()
1147 rtl_write_byte(rtlpriv, REG_TBTT_PROHIBIT + 1, 0x64); in _rtl92cu_stop_tx_beacon()
1149 tmp1byte &= ~(BIT(0)); in _rtl92cu_stop_tx_beacon()
1161 u8 tmp1byte = 0; in _rtl92cu_resume_tx_beacon()
1167 rtl_write_byte(rtlpriv, REG_TBTT_PROHIBIT + 1, 0xff); in _rtl92cu_resume_tx_beacon()
1169 tmp1byte |= BIT(0); in _rtl92cu_resume_tx_beacon()
1183 _rtl92cu_set_bcn_ctrl_reg(hw, 0, BIT(1)); in _rtl92cu_enable_bcn_sub_func()
1185 _rtl92cu_set_bcn_ctrl_reg(hw, 0, BIT(4)); in _rtl92cu_enable_bcn_sub_func()
1194 _rtl92cu_set_bcn_ctrl_reg(hw, BIT(1), 0); in _rtl92cu_disable_bcn_sub_func()
1196 _rtl92cu_set_bcn_ctrl_reg(hw, BIT(4), 0); in _rtl92cu_disable_bcn_sub_func()
1206 bt_msr &= 0xfc; in _rtl92cu_set_media_status()
1249 rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00); in _rtl92cu_set_media_status()
1251 rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66); in _rtl92cu_set_media_status()
1252 return 0; in _rtl92cu_set_media_status()
1302 _rtl92cu_set_bcn_ctrl_reg(hw, 0, tmp); in rtl92cu_set_check_bssid()
1316 _rtl92cu_set_bcn_ctrl_reg(hw, tmp, 0); in rtl92cu_set_check_bssid()
1336 return 0; in rtl92cu_set_network_type()
1343 _rtl92cu_set_bcn_ctrl_reg(hw, (BIT(4) | BIT(3) | BIT(1)), 0x00); in _beacon_function_enable()
1344 rtl_write_byte(rtlpriv, REG_RD_CTRL+1, 0x6F); in _beacon_function_enable()
1360 rtl_write_byte(rtlpriv, REG_SLOT, 0x09); in rtl92cu_set_beacon_related_registers()
1381 rtl_write_byte(rtlpriv, REG_RXTSF_OFFSET_CCK, 0x50); in rtl92cu_set_beacon_related_registers()
1382 rtl_write_byte(rtlpriv, REG_RXTSF_OFFSET_OFDM, 0x50); in rtl92cu_set_beacon_related_registers()
1426 val_rcr &= 0x00070000; in rtl92cu_get_hw_reg()
1487 u8 idx = 0; in rtl92cu_set_hw_reg()
1491 for (idx = 0; idx < ETH_ALEN; idx++) { in rtl92cu_set_hw_reg()
1498 u16 rate_cfg = ((u16 *) val)[0]; in rtl92cu_set_hw_reg()
1499 u8 rate_index = 0; in rtl92cu_set_hw_reg()
1501 rate_cfg &= 0x15f; in rtl92cu_set_hw_reg()
1504 * && ((rate_cfg & 0x150) == 0)) { in rtl92cu_set_hw_reg()
1505 * rate_cfg |= 0x010; in rtl92cu_set_hw_reg()
1507 rate_cfg |= 0x01; in rtl92cu_set_hw_reg()
1508 rtl_write_byte(rtlpriv, REG_RRSR, rate_cfg & 0xff); in rtl92cu_set_hw_reg()
1510 (rate_cfg >> 8) & 0xff); in rtl92cu_set_hw_reg()
1511 while (rate_cfg > 0x1) { in rtl92cu_set_hw_reg()
1520 for (idx = 0; idx < ETH_ALEN; idx++) { in rtl92cu_set_hw_reg()
1527 rtl_write_byte(rtlpriv, REG_SIFS_CCK + 1, val[0]); in rtl92cu_set_hw_reg()
1529 rtl_write_byte(rtlpriv, REG_SPEC_SIFS + 1, val[0]); in rtl92cu_set_hw_reg()
1530 rtl_write_byte(rtlpriv, REG_MAC_SPEC_SIFS + 1, val[0]); in rtl92cu_set_hw_reg()
1531 rtl_write_byte(rtlpriv, REG_R2T_SIFS+1, val[0]); in rtl92cu_set_hw_reg()
1532 rtl_write_byte(rtlpriv, REG_T2T_SIFS+1, val[0]); in rtl92cu_set_hw_reg()
1539 rtl_write_byte(rtlpriv, REG_SLOT, val[0]); in rtl92cu_set_hw_reg()
1541 "HW_VAR_SLOT_TIME %x\n", val[0]); in rtl92cu_set_hw_reg()
1543 for (e_aci = 0; e_aci < AC_MAX; e_aci++) in rtl92cu_set_hw_reg()
1553 reg_tmp = 0; in rtl92cu_set_hw_reg()
1555 reg_tmp |= 0x80; in rtl92cu_set_hw_reg()
1568 sec_min_space = 0; in rtl92cu_set_hw_reg()
1582 0xf8) | in rtl92cu_set_hw_reg()
1597 density_to_set &= 0x1f; in rtl92cu_set_hw_reg()
1598 mac->min_space_cfg &= 0x07; in rtl92cu_set_hw_reg()
1608 u8 regtoset_normal[4] = {0x41, 0xa8, 0x72, 0xb9}; in rtl92cu_set_hw_reg()
1611 u8 index = 0; in rtl92cu_set_hw_reg()
1617 if (factor_toset > 0xf) in rtl92cu_set_hw_reg()
1618 factor_toset = 0xf; in rtl92cu_set_hw_reg()
1619 for (index = 0; index < 4; index++) { in rtl92cu_set_hw_reg()
1620 if ((p_regtoset[index] & 0xf0) > in rtl92cu_set_hw_reg()
1623 (p_regtoset[index] & 0x0f) in rtl92cu_set_hw_reg()
1625 if ((p_regtoset[index] & 0x0f) > in rtl92cu_set_hw_reg()
1628 (p_regtoset[index] & 0xf0) in rtl92cu_set_hw_reg()
1648 u4b_ac_param |= (u32) ((cw_min & 0xF) << in rtl92cu_set_hw_reg()
1650 u4b_ac_param |= (u32) ((cw_max & 0xF) << in rtl92cu_set_hw_reg()
1681 rtl_write_dword(rtlpriv, REG_RCR, ((u32 *) (val))[0]); in rtl92cu_set_hw_reg()
1682 mac->rx_conf = ((u32 *) (val))[0]; in rtl92cu_set_hw_reg()
1684 "### Set RCR(0x%08x) ###\n", mac->rx_conf); in rtl92cu_set_hw_reg()
1688 u8 retry_limit = val[0]; in rtl92cu_set_hw_reg()
1694 "Set HW_VAR_RETRY_LIMIT(0x%08x)\n", in rtl92cu_set_hw_reg()
1699 rtl_write_byte(rtlpriv, REG_DUAL_TSF_RST, (BIT(0) | BIT(1))); in rtl92cu_set_hw_reg()
1743 rtl_write_byte(rtlpriv, REG_CR + 1, 0x03); in rtl92cu_set_hw_reg()
1744 _rtl92cu_set_bcn_ctrl_reg(hw, 0, BIT(3)); in rtl92cu_set_hw_reg()
1745 _rtl92cu_set_bcn_ctrl_reg(hw, BIT(4), 0); in rtl92cu_set_hw_reg()
1754 _rtl92cu_set_bcn_ctrl_reg(hw, BIT(3), 0); in rtl92cu_set_hw_reg()
1755 _rtl92cu_set_bcn_ctrl_reg(hw, 0, BIT(4)); in rtl92cu_set_hw_reg()
1760 rtl_write_byte(rtlpriv, REG_CR + 1, 0x02); in rtl92cu_set_hw_reg()
1769 u2btmp &= 0xC000; in rtl92cu_set_hw_reg()
1775 u8 btype_ibss = val[0]; in rtl92cu_set_hw_reg()
1779 _rtl92cu_set_bcn_ctrl_reg(hw, 0, BIT(3)); in rtl92cu_set_hw_reg()
1781 0xffffffff)); in rtl92cu_set_hw_reg()
1783 (u32)((mac->tsf >> 32) & 0xffffffff)); in rtl92cu_set_hw_reg()
1784 _rtl92cu_set_bcn_ctrl_reg(hw, BIT(3), 0); in rtl92cu_set_hw_reg()
1804 array[0] = 0xff; in rtl92cu_set_hw_reg()
1824 u8 ratr_index = 0; in rtl92cu_update_hal_rate_table()
1831 1 : 0; in rtl92cu_update_hal_rate_table()
1833 1 : 0; in rtl92cu_update_hal_rate_table()
1839 ratr_value = sta->deflink.supp_rates[0]; in rtl92cu_update_hal_rate_table()
1841 ratr_value = 0xfff; in rtl92cu_update_hal_rate_table()
1844 sta->deflink.ht_cap.mcs.rx_mask[0] << 12); in rtl92cu_update_hal_rate_table()
1847 if (ratr_value & 0x0000000c) in rtl92cu_update_hal_rate_table()
1848 ratr_value &= 0x0000000d; in rtl92cu_update_hal_rate_table()
1850 ratr_value &= 0x0000000f; in rtl92cu_update_hal_rate_table()
1853 ratr_value &= 0x00000FF5; in rtl92cu_update_hal_rate_table()
1859 ratr_value &= 0x0007F005; in rtl92cu_update_hal_rate_table()
1865 ratr_mask = 0x000ff005; in rtl92cu_update_hal_rate_table()
1867 ratr_mask = 0x0f0ff005; in rtl92cu_update_hal_rate_table()
1874 ratr_value &= 0x000ff0ff; in rtl92cu_update_hal_rate_table()
1876 ratr_value &= 0x0f0ff0ff; in rtl92cu_update_hal_rate_table()
1881 ratr_value &= 0x0FFFFFFF; in rtl92cu_update_hal_rate_table()
1886 ratr_value |= 0x10000000; in rtl92cu_update_hal_rate_table()
1889 for (shortgi_rate = 15; shortgi_rate > 0; shortgi_rate--) { in rtl92cu_update_hal_rate_table()
1915 u8 curtxbw_40mhz = (sta->deflink.bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0; in rtl92cu_update_hal_rate_mask()
1918 1 : 0; in rtl92cu_update_hal_rate_mask()
1920 1 : 0; in rtl92cu_update_hal_rate_mask()
1921 enum wireless_mode wirelessmode = 0; in rtl92cu_update_hal_rate_mask()
1924 u8 macid = 0; in rtl92cu_update_hal_rate_mask()
1939 ratr_bitmap = sta->deflink.supp_rates[0]; in rtl92cu_update_hal_rate_mask()
1941 ratr_bitmap = 0xfff; in rtl92cu_update_hal_rate_mask()
1943 sta->deflink.ht_cap.mcs.rx_mask[0] << 12); in rtl92cu_update_hal_rate_mask()
1947 if (ratr_bitmap & 0x0000000c) in rtl92cu_update_hal_rate_mask()
1948 ratr_bitmap &= 0x0000000d; in rtl92cu_update_hal_rate_mask()
1950 ratr_bitmap &= 0x0000000f; in rtl92cu_update_hal_rate_mask()
1956 ratr_bitmap &= 0x00000f00; in rtl92cu_update_hal_rate_mask()
1958 ratr_bitmap &= 0x00000ff0; in rtl92cu_update_hal_rate_mask()
1960 ratr_bitmap &= 0x00000ff5; in rtl92cu_update_hal_rate_mask()
1964 ratr_bitmap &= 0x00000ff0; in rtl92cu_update_hal_rate_mask()
1972 ratr_bitmap &= 0x00070000; in rtl92cu_update_hal_rate_mask()
1974 ratr_bitmap &= 0x0007f000; in rtl92cu_update_hal_rate_mask()
1976 ratr_bitmap &= 0x0007f005; in rtl92cu_update_hal_rate_mask()
1982 ratr_bitmap &= 0x000f0000; in rtl92cu_update_hal_rate_mask()
1984 ratr_bitmap &= 0x000ff000; in rtl92cu_update_hal_rate_mask()
1986 ratr_bitmap &= 0x000ff015; in rtl92cu_update_hal_rate_mask()
1989 ratr_bitmap &= 0x000f0000; in rtl92cu_update_hal_rate_mask()
1991 ratr_bitmap &= 0x000ff000; in rtl92cu_update_hal_rate_mask()
1993 ratr_bitmap &= 0x000ff005; in rtl92cu_update_hal_rate_mask()
1998 ratr_bitmap &= 0x0f0f0000; in rtl92cu_update_hal_rate_mask()
2000 ratr_bitmap &= 0x0f0ff000; in rtl92cu_update_hal_rate_mask()
2002 ratr_bitmap &= 0x0f0ff015; in rtl92cu_update_hal_rate_mask()
2005 ratr_bitmap &= 0x0f0f0000; in rtl92cu_update_hal_rate_mask()
2007 ratr_bitmap &= 0x0f0ff000; in rtl92cu_update_hal_rate_mask()
2009 ratr_bitmap &= 0x0f0ff005; in rtl92cu_update_hal_rate_mask()
2017 if (macid == 0) in rtl92cu_update_hal_rate_mask()
2027 ratr_bitmap &= 0x000ff0ff; in rtl92cu_update_hal_rate_mask()
2029 ratr_bitmap &= 0x0f0ff0ff; in rtl92cu_update_hal_rate_mask()
2036 *(u32 *)&rate_mask = (ratr_bitmap & 0x0fffffff) | in rtl92cu_update_hal_rate_mask()
2038 rate_mask[4] = macid | (shortgi ? 0x20 : 0x00) | 0x80; in rtl92cu_update_hal_rate_mask()
2047 if (macid != 0) in rtl92cu_update_hal_rate_mask()
2072 sifs_timer = 0x0a0a; in rtl92cu_update_channel_access_setting()
2074 sifs_timer = 0x0e0e; in rtl92cu_update_channel_access_setting()
2083 u8 u1tmp = 0; in rtl92cu_gpio_radio_on_off_checking()
2085 unsigned long flag = 0; in rtl92cu_gpio_radio_on_off_checking()
2087 u8 usb_autosuspend = 0; in rtl92cu_gpio_radio_on_off_checking()
2108 "pwrdown, 0x5c(BIT7)=%02x\n", u1tmp); in rtl92cu_gpio_radio_on_off_checking()
2152 * contrl reg at 0x1c. Then enable power down control bit in rtl92cu_gpio_radio_on_off_checking()
2153 * of register 0x04 BIT4 and BIT15 as 1. in rtl92cu_gpio_radio_on_off_checking()
2156 /* Enable register area 0x0-0xc. */ in rtl92cu_gpio_radio_on_off_checking()
2157 rtl_write_byte(rtlpriv, REG_RSV_CTRL, 0x0); in rtl92cu_gpio_radio_on_off_checking()
2158 rtl_write_word(rtlpriv, REG_APS_FSMCO, 0x8812); in rtl92cu_gpio_radio_on_off_checking()