diff options
| author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2023-10-06 22:04:54 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-07 12:13:56 +0300 |
| commit | 02584b2aea67a06707f1a4fe40d119082a47af87 (patch) | |
| tree | 33eababb0820c2031b8cdd98004a3e837dee79f0 | |
| parent | a84ff259bfc10e473a2b1b2dc6f2aadfb498dbed (diff) | |
| download | linux-02584b2aea67a06707f1a4fe40d119082a47af87.tar.xz | |
staging: rtl8192e: Remove constant variable reg_max_lps_awake_intvl
Remove constant variable reg_max_lps_awake_intvl as this value is just
written to MaxPeriod. Function _rtl92e_init_priv_constant() is then empty
and can be removed as well.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d5b2ccc0f10c28f960552dd2b2c5ec83aa62041f.1696548527.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 10 | ||||
| -rw-r--r-- | drivers/staging/rtl8192e/rtllib.h | 1 | ||||
| -rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 8 |
3 files changed, 1 insertions, 18 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index f46cb152930a..7db01d68000a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -712,15 +712,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev) priv->rtllib->ScanOperationBackupHandler = rtl92e_scan_op_backup; } -static void _rtl92e_init_priv_constant(struct net_device *dev) -{ - struct r8192_priv *priv = rtllib_priv(dev); - struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *) - &priv->rtllib->pwr_save_ctrl; - - psc->reg_max_lps_awake_intvl = 5; -} - static void _rtl92e_init_priv_variable(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); @@ -838,7 +829,6 @@ static short _rtl92e_init(struct net_device *dev) memset(&priv->stats, 0, sizeof(struct rt_stats)); _rtl92e_init_priv_handler(dev); - _rtl92e_init_priv_constant(dev); _rtl92e_init_priv_variable(dev); _rtl92e_init_priv_lock(priv); _rtl92e_init_priv_task(dev); diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 6d54c03f5680..307bcbb7fbb6 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1079,7 +1079,6 @@ struct rt_pwr_save_ctrl { bool bLeisurePs; u8 LpsIdleCount; - u8 reg_max_lps_awake_intvl; u8 LPSAwakeIntvl; u32 CurPsLevel; diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 206f8e05d5d0..f84133744bc3 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1588,16 +1588,10 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time) if (ieee->bAwakePktSent) { psc->LPSAwakeIntvl = 1; } else { - u8 MaxPeriod = 1; + u8 MaxPeriod = 5; if (psc->LPSAwakeIntvl == 0) psc->LPSAwakeIntvl = 1; - if (psc->reg_max_lps_awake_intvl == 0) - MaxPeriod = 1; - else if (psc->reg_max_lps_awake_intvl == 0xFF) - MaxPeriod = ieee->current_network.dtim_period; - else - MaxPeriod = psc->reg_max_lps_awake_intvl; psc->LPSAwakeIntvl = (psc->LPSAwakeIntvl >= MaxPeriod) ? MaxPeriod : (psc->LPSAwakeIntvl + 1); |
