/drivers/net/wireless/realtek/rtlwifi/ |
D | ps.c | 13 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_ps_enable_nic() local 30 RT_CLEAR_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC); in rtl_ps_enable_nic() 70 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_ps_set_rf_state() local 80 if (ppsc->rfchange_inprogress) { in rtl_ps_set_rf_state() 88 while (ppsc->rfchange_inprogress) { in rtl_ps_set_rf_state() 98 ppsc->rfchange_inprogress = true; in rtl_ps_set_rf_state() 106 ppsc->rfoff_reason &= (~changesource); in rtl_ps_set_rf_state() 109 (ppsc->hwradiooff)) { in rtl_ps_set_rf_state() 110 ppsc->hwradiooff = false; in rtl_ps_set_rf_state() 113 if (!ppsc->rfoff_reason) { in rtl_ps_set_rf_state() [all …]
|
D | pci.c | 64 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl_pci_update_default_setting() local 69 ppsc->reg_rfps_level = 0; in _rtl_pci_update_default_setting() 70 ppsc->support_aspm = false; in _rtl_pci_update_default_setting() 73 ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm; in _rtl_pci_update_default_setting() 81 ppsc->reg_rfps_level |= RT_RF_LPS_LEVEL_ASPM; in _rtl_pci_update_default_setting() 86 ppsc->reg_rfps_level |= (RT_RF_LPS_LEVEL_ASPM | in _rtl_pci_update_default_setting() 94 ppsc->reg_rfps_level &= ~(RT_RF_LPS_LEVEL_ASPM); in _rtl_pci_update_default_setting() 95 ppsc->reg_rfps_level |= (RT_RF_PS_LEVEL_ALWAYS_ASPM | in _rtl_pci_update_default_setting() 103 ppsc->reg_rfps_level &= ~(RT_RF_LPS_LEVEL_ASPM | in _rtl_pci_update_default_setting() 105 ppsc->reg_rfps_level |= RT_RF_PS_LEVEL_ALWAYS_ASPM; in _rtl_pci_update_default_setting() [all …]
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/ |
D | phy.c | 435 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92ce_phy_set_rf_power_state() local 442 if ((ppsc->rfpwr_state == ERFOFF) && in _rtl92ce_phy_set_rf_power_state() 443 RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC)) { in _rtl92ce_phy_set_rf_power_state() 453 RT_CLEAR_PS_LEVEL(ppsc, in _rtl92ce_phy_set_rf_power_state() 459 ppsc->last_sleep_jiffies)); in _rtl92ce_phy_set_rf_power_state() 460 ppsc->last_awake_jiffies = jiffies; in _rtl92ce_phy_set_rf_power_state() 473 if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_HALT_NIC) { in _rtl92ce_phy_set_rf_power_state() 477 RT_SET_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC); in _rtl92ce_phy_set_rf_power_state() 479 if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) { in _rtl92ce_phy_set_rf_power_state() 490 if (ppsc->rfpwr_state == ERFOFF) in _rtl92ce_phy_set_rf_power_state() [all …]
|
D | hw.c | 74 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92ce_get_hw_reg() local 82 *((enum rf_pwrstate *)(val)) = ppsc->rfpwr_state; in rtl92ce_get_hw_reg() 104 *((bool *) (val)) = ppsc->fw_current_inpsmode; in rtl92ce_get_hw_reg() 133 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92ce_set_hw_reg() local 413 ppsc->fw_current_inpsmode = *((bool *) val); in rtl92ce_set_hw_reg() 504 &ppsc->fwctrl_psmode); in rtl92ce_set_hw_reg() 641 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92ce_gen_refresh_led_state() local 647 if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) in _rtl92ce_gen_refresh_led_state() 649 else if (ppsc->rfoff_reason == RF_CHANGE_BY_INIT) in _rtl92ce_gen_refresh_led_state() 863 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92ce_enable_aspm_back_door() local [all …]
|
D | led.c | 110 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92ce_led_control() local 112 if ((ppsc->rfoff_reason > RF_CHANGE_BY_PS) && in rtl92ce_led_control()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/ |
D | phy.c | 379 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92cu_phy_set_rf_power_state() local 386 if ((ppsc->rfpwr_state == ERFOFF) && in _rtl92cu_phy_set_rf_power_state() 387 RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC)) { in _rtl92cu_phy_set_rf_power_state() 397 RT_CLEAR_PS_LEVEL(ppsc, in _rtl92cu_phy_set_rf_power_state() 403 ppsc->last_sleep_jiffies)); in _rtl92cu_phy_set_rf_power_state() 404 ppsc->last_awake_jiffies = jiffies; in _rtl92cu_phy_set_rf_power_state() 441 if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_HALT_NIC) { in _rtl92cu_phy_set_rf_power_state() 445 RT_SET_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC); in _rtl92cu_phy_set_rf_power_state() 447 if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) { in _rtl92cu_phy_set_rf_power_state() 457 if (ppsc->rfpwr_state == ERFOFF) in _rtl92cu_phy_set_rf_power_state() [all …]
|
D | hw.c | 938 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92cu_hw_init() local 986 ppsc->rfpwr_state = ERFON; in rtl92cu_hw_init() 988 if (ppsc->rfpwr_state == ERFON) { in rtl92cu_hw_init() 1329 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92cu_card_disable() local 1338 RT_SET_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC); in rtl92cu_card_disable() 1475 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92cu_get_hw_reg() local 1483 *((enum rf_pwrstate *)(val)) = ppsc->rfpwr_state; in rtl92cu_get_hw_reg() 1504 *((bool *) (val)) = ppsc->fw_current_inpsmode; in rtl92cu_get_hw_reg() 1555 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92cu_set_hw_reg() local 1824 ppsc->fw_current_inpsmode = *((bool *) val); in rtl92cu_set_hw_reg() [all …]
|
D | led.c | 104 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92cu_led_control() local 106 if ((ppsc->rfoff_reason > RF_CHANGE_BY_PS) && in rtl92cu_led_control()
|
/drivers/staging/rtl8188eu/include/ |
D | rtw_pwrctrl.h | 117 #define RT_IN_PS_LEVEL(ppsc, _PS_FLAG) \ argument 118 ((ppsc->cur_ps_level & _PS_FLAG) ? true : false) 119 #define RT_CLEAR_PS_LEVEL(ppsc, _PS_FLAG) \ argument 120 (ppsc->cur_ps_level &= (~(_PS_FLAG))) 121 #define RT_SET_PS_LEVEL(ppsc, _PS_FLAG) \ argument 122 (ppsc->cur_ps_level |= _PS_FLAG)
|
/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/ |
D | hw.c | 250 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl88ee_fwlps_leave() local 255 if (ppsc->low_power_enable) { in _rtl88ee_fwlps_leave() 276 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl88ee_fwlps_enter() local 281 if (ppsc->low_power_enable) { in _rtl88ee_fwlps_enter() 286 &ppsc->fwctrl_psmode); in _rtl88ee_fwlps_enter() 294 &ppsc->fwctrl_psmode); in _rtl88ee_fwlps_enter() 302 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl88ee_get_hw_reg() local 310 *((enum rf_pwrstate *)(val)) = ppsc->rfpwr_state; in rtl88ee_get_hw_reg() 331 *((bool *)(val)) = ppsc->fw_current_inpsmode; in rtl88ee_get_hw_reg() 357 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl88ee_set_hw_reg() local [all …]
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192de/ |
D | hw.c | 94 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92de_get_hw_reg() local 102 *((enum rf_pwrstate *)(val)) = ppsc->rfpwr_state; in rtl92de_get_hw_reg() 123 *((bool *) (val)) = ppsc->fw_current_inpsmode; in rtl92de_get_hw_reg() 156 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92de_set_hw_reg() local 382 ppsc->fw_current_inpsmode = *((bool *) val); in rtl92de_set_hw_reg() 597 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92de_gen_refresh_led_state() local 602 if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) in _rtl92de_gen_refresh_led_state() 604 else if (ppsc->rfoff_reason == RF_CHANGE_BY_INIT) in _rtl92de_gen_refresh_led_state() 836 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92de_enable_aspm_back_door() local 841 if (ppsc->support_backdoor) in _rtl92de_enable_aspm_back_door() [all …]
|
D | led.c | 119 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92de_led_control() local 121 if ((ppsc->rfoff_reason > RF_CHANGE_BY_PS) && in rtl92de_led_control()
|
/drivers/staging/rtl8723bs/include/ |
D | rtw_pwrctrl.h | 123 #define RT_IN_PS_LEVEL(ppsc, _PS_FLAG) ((ppsc->cur_ps_level & _PS_FLAG) ? true : false) argument 124 #define RT_CLEAR_PS_LEVEL(ppsc, _PS_FLAG) (ppsc->cur_ps_level &= (~(_PS_FLAG))) argument 125 #define RT_SET_PS_LEVEL(ppsc, _PS_FLAG) (ppsc->cur_ps_level |= _PS_FLAG) argument
|
/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/ |
D | hw.c | 78 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8723e_get_hw_reg() local 86 *((enum rf_pwrstate *)(val)) = ppsc->rfpwr_state; in rtl8723e_get_hw_reg() 108 *((bool *)(val)) = ppsc->fw_current_inpsmode; in rtl8723e_get_hw_reg() 137 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8723e_set_hw_reg() local 415 ppsc->fw_current_inpsmode = *((bool *)val); in rtl8723e_set_hw_reg() 506 (u8 *)(&ppsc->fwctrl_psmode)); in rtl8723e_set_hw_reg() 645 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl8723e_gen_refresh_led_state() local 651 if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) in _rtl8723e_gen_refresh_led_state() 653 else if (ppsc->rfoff_reason == RF_CHANGE_BY_INIT) in _rtl8723e_gen_refresh_led_state() 861 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl8723e_enable_aspm_back_door() local [all …]
|
D | phy.c | 1558 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl8723e_phy_set_rf_power_state() local 1565 if ((ppsc->rfpwr_state == ERFOFF) && in _rtl8723e_phy_set_rf_power_state() 1566 RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC)) { in _rtl8723e_phy_set_rf_power_state() 1576 RT_CLEAR_PS_LEVEL(ppsc, in _rtl8723e_phy_set_rf_power_state() 1582 ppsc->last_sleep_jiffies)); in _rtl8723e_phy_set_rf_power_state() 1583 ppsc->last_awake_jiffies = jiffies; in _rtl8723e_phy_set_rf_power_state() 1595 if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_HALT_NIC) { in _rtl8723e_phy_set_rf_power_state() 1599 RT_SET_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC); in _rtl8723e_phy_set_rf_power_state() 1601 if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) { in _rtl8723e_phy_set_rf_power_state() 1611 if (ppsc->rfpwr_state == ERFOFF) in _rtl8723e_phy_set_rf_power_state() [all …]
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192se/ |
D | hw.c | 22 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92se_get_hw_reg() local 31 *((enum rf_pwrstate *)(val)) = ppsc->rfpwr_state; in rtl92se_get_hw_reg() 35 *((bool *) (val)) = ppsc->fw_current_inpsmode; in rtl92se_get_hw_reg() 69 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92se_set_hw_reg() local 322 ppsc->fw_current_inpsmode = *((bool *) val); in rtl92se_set_hw_reg() 390 &ppsc->fwctrl_psmode); in rtl92se_set_hw_reg() 532 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92se_macconfig_before_fwdownload() local 687 if (ppsc->support_aspm && !ppsc->support_backdoor) in _rtl92se_macconfig_before_fwdownload() 732 if ((ppsc->rfoff_reason == RF_CHANGE_BY_IPS) || in _rtl92se_macconfig_before_fwdownload() 733 (ppsc->rfoff_reason == 0)) { in _rtl92se_macconfig_before_fwdownload() [all …]
|
D | phy.c | 504 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92s_phy_set_rf_power_state() local 509 if (rfpwr_state == ppsc->rfpwr_state) in rtl92s_phy_set_rf_power_state() 514 if ((ppsc->rfpwr_state == ERFOFF) && in rtl92s_phy_set_rf_power_state() 515 RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC)) { in rtl92s_phy_set_rf_power_state() 526 RT_CLEAR_PS_LEVEL(ppsc, in rtl92s_phy_set_rf_power_state() 532 ppsc->last_sleep_jiffies), in rtl92s_phy_set_rf_power_state() 534 ppsc->last_awake_jiffies = jiffies; in rtl92s_phy_set_rf_power_state() 549 if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_HALT_NIC) { in rtl92s_phy_set_rf_power_state() 553 RT_SET_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC); in rtl92s_phy_set_rf_power_state() 555 if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) in rtl92s_phy_set_rf_power_state() [all …]
|
D | led.c | 110 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92se_led_control() local 112 if ((ppsc->rfoff_reason > RF_CHANGE_BY_PS) && in rtl92se_led_control()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/ |
D | hw.c | 235 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl8821ae_fwlps_leave() local 240 if (ppsc->low_power_enable) { in _rtl8821ae_fwlps_leave() 262 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl8821ae_fwlps_enter() local 267 if (ppsc->low_power_enable) { in _rtl8821ae_fwlps_enter() 274 (u8 *)(&ppsc->fwctrl_psmode)); in _rtl8821ae_fwlps_enter() 284 (u8 *)(&ppsc->fwctrl_psmode)); in _rtl8821ae_fwlps_enter() 394 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8821ae_get_hw_reg() local 423 *((enum rf_pwrstate *)(val)) = ppsc->rfpwr_state; in rtl8821ae_get_hw_reg() 444 *((bool *)(val)) = ppsc->fw_current_inpsmode; in rtl8821ae_get_hw_reg() 458 if (ppsc->wo_wlan_mode) in rtl8821ae_get_hw_reg() [all …]
|
D | fw.c | 199 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8821ae_set_fw_related_for_wowlan() local 212 ppsc->fw_current_inpsmode = false; in rtl8821ae_set_fw_related_for_wowlan() 469 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8821ae_set_fw_pwrmode_cmd() local 495 awake_intvl = ppsc->reg_max_lps_awakeintvl; in rtl8821ae_set_fw_pwrmode_cmd() 537 ppsc->smart_ps : 1)); in rtl8821ae_set_fw_pwrmode_cmd() 590 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8821ae_set_fw_wowlan_mode() local 599 ((ppsc->wo_wlan_mode & WAKE_ON_PATTERN_MATCH) ? 1 : 0)); in rtl8821ae_set_fw_wowlan_mode() 601 ((ppsc->wo_wlan_mode & WAKE_ON_MAGIC_PACKET) ? 1 : 0)); in rtl8821ae_set_fw_wowlan_mode() 623 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8821ae_set_fw_remote_wake_ctrl_cmd() local 629 enable, ppsc->arp_offload_enable, ppsc->gtk_offload_enable); in rtl8821ae_set_fw_remote_wake_ctrl_cmd() [all …]
|
/drivers/net/wireless/realtek/rtlwifi/rtl8723be/ |
D | hw.c | 236 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl8723be_fwlps_leave() local 241 if (ppsc->low_power_enable) { in _rtl8723be_fwlps_leave() 264 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl8723be_fwlps_enter() local 269 if (ppsc->low_power_enable) { in _rtl8723be_fwlps_enter() 274 (u8 *)(&ppsc->fwctrl_psmode)); in _rtl8723be_fwlps_enter() 282 (u8 *)(&ppsc->fwctrl_psmode)); in _rtl8723be_fwlps_enter() 292 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8723be_get_hw_reg() local 300 *((enum rf_pwrstate *)(val)) = ppsc->rfpwr_state; in rtl8723be_get_hw_reg() 321 *((bool *)(val)) = ppsc->fw_current_inpsmode; in rtl8723be_get_hw_reg() 399 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8723be_set_hw_reg() local [all …]
|
D | led.c | 118 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl8723be_led_control() local 120 if ((ppsc->rfoff_reason > RF_CHANGE_BY_PS) && in rtl8723be_led_control()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/ |
D | hw.c | 223 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92ee_fwlps_leave() local 228 if (ppsc->low_power_enable) { in _rtl92ee_fwlps_leave() 250 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92ee_fwlps_enter() local 255 if (ppsc->low_power_enable) { in _rtl92ee_fwlps_enter() 260 (u8 *)(&ppsc->fwctrl_psmode)); in _rtl92ee_fwlps_enter() 268 (u8 *)(&ppsc->fwctrl_psmode)); in _rtl92ee_fwlps_enter() 277 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92ee_get_hw_reg() local 285 *((enum rf_pwrstate *)(val)) = ppsc->rfpwr_state; in rtl92ee_get_hw_reg() 306 *((bool *)(val)) = ppsc->fw_current_inpsmode; in rtl92ee_get_hw_reg() 413 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92ee_set_hw_reg() local [all …]
|
D | fw.c | 168 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl92ee_fill_h2c_command() local 181 if (ppsc->dot11_psmode != EACTIVE || in _rtl92ee_fill_h2c_command() 182 ppsc->inactive_pwrstate == ERFOFF) { in _rtl92ee_fill_h2c_command() 399 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92ee_set_fw_pwrmode_cmd() local 425 awake_intvl = ppsc->reg_max_lps_awakeintvl; in rtl92ee_set_fw_pwrmode_cmd() 467 ppsc->smart_ps : 1)); in rtl92ee_set_fw_pwrmode_cmd()
|
D | led.c | 109 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl92ee_led_control() local 111 if ((ppsc->rfoff_reason > RF_CHANGE_BY_PS) && in rtl92ee_led_control()
|