diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2020-05-02 12:20:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-05 12:28:00 +0200 |
commit | d95c8695e0d91d60867d971009862299c53b5fb6 (patch) | |
tree | 30e9f6479043a358813af95b84081f135a5b805b /drivers/staging/vt6656/power.c | |
parent | 986da7debb04225221d8876b405c4088614ae5f4 (diff) |
staging: vt6656: refactor power save operation
At present the power save wake uses the listening interval and
the slow path to wake up.
The following using a beacon interval of 100 and
listen interval of 5.
The TBTT set at 100 wake-up sequence;
100 TBTT wake-up set to listen interval.
200 TBTT
300 TBTT
400 TBTT --> call vnt_next_tbtt_wakeup on slow path
Beacon heard and passed through at the approx 500 interval.
500 TBTT
600 TBTT wake-up set to listen interval
The TBTT set at 500 wake-up sequence and always listen flagged on;
100 No TBTT
200 No TBTT
300 No TBTT
400 No TBTT
500 TBTT - beacon heard and passed through
600 No TBTT
A further enhancement because the TBTT is more precise
the dtim_period can be used instead.
When Power save is off the TBTT continues to run at the listen
interval but all the other beacons are passed.
The code in vnt_int_process_data is no longer required.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/5a188bd8-7049-8063-f24d-96768ce9a6ed@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/power.c')
-rw-r--r-- | drivers/staging/vt6656/power.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c index d160a0773943..2f49c870272a 100644 --- a/drivers/staging/vt6656/power.c +++ b/drivers/staging/vt6656/power.c @@ -63,16 +63,8 @@ void vnt_enable_power_saving(struct vnt_private *priv, u16 listen_interval) */ vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_GO2DOZE); - if (listen_interval >= 2) { - /* clear always listen beacon */ - vnt_mac_reg_bits_off(priv, MAC_REG_PSCTL, PSCTL_ALBCN); - - /* first time set listen next beacon */ - vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN); - } else { - /* always listen beacon */ - vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN); - } + /* always listen beacon */ + vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN); dev_dbg(&priv->usb->dev, "PS:Power Saving Mode Enable...\n"); } |