diff options
author | 2020-05-01 11:43:25 +0100 | |
---|---|---|
committer | 2020-05-05 12:28:00 +0200 | |
commit | 986da7debb04225221d8876b405c4088614ae5f4 (patch) | |
tree | 0c8a045ea9394267114e0cff1748e80bfb0bf944 /drivers/staging/vt6656 | |
parent | staging: vt6656: use struct wiphy retry short and long settings. (diff) | |
download | linux-986da7debb04225221d8876b405c4088614ae5f4.tar.gz linux-986da7debb04225221d8876b405c4088614ae5f4.tar.bz2 linux-986da7debb04225221d8876b405c4088614ae5f4.zip |
staging: vt6656: Return on isr0 when zero.
When isr0 is zero there is nothing more todo so return and
pull following code in.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/8dccc74d-d0bb-e8e7-df81-dfd81e3fd7d8@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r-- | drivers/staging/vt6656/usbpipe.c | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index 91b62c3dff7b..e8efdeadb1a7 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -196,32 +196,31 @@ static void vnt_int_process_data(struct vnt_private *priv) if (int_data->tsr3 & TSR_VALID) vnt_int_report_rate(priv, int_data->pkt3, int_data->tsr3); - if (int_data->isr0 != 0) { - if (int_data->isr0 & ISR_BNTX && - priv->op_mode == NL80211_IFTYPE_AP) - vnt_schedule_command(priv, WLAN_CMD_BECON_SEND); - - if (int_data->isr0 & ISR_TBTT && - priv->hw->conf.flags & IEEE80211_CONF_PS) { - if (!priv->wake_up_count) - priv->wake_up_count = - priv->hw->conf.listen_interval; - - if (priv->wake_up_count) - --priv->wake_up_count; - - /* Turn on wake up to listen next beacon */ - if (priv->wake_up_count == 1) - vnt_schedule_command(priv, - WLAN_CMD_TBTT_WAKEUP); - } - priv->current_tsf = le64_to_cpu(int_data->tsf); + if (!int_data->isr0) + return; + + if (int_data->isr0 & ISR_BNTX && priv->op_mode == NL80211_IFTYPE_AP) + vnt_schedule_command(priv, WLAN_CMD_BECON_SEND); + + if (int_data->isr0 & ISR_TBTT && + priv->hw->conf.flags & IEEE80211_CONF_PS) { + if (!priv->wake_up_count) + priv->wake_up_count = priv->hw->conf.listen_interval; - low_stats->dot11RTSSuccessCount += int_data->rts_success; - low_stats->dot11RTSFailureCount += int_data->rts_fail; - low_stats->dot11ACKFailureCount += int_data->ack_fail; - low_stats->dot11FCSErrorCount += int_data->fcs_err; + if (priv->wake_up_count) + --priv->wake_up_count; + + /* Turn on wake up to listen next beacon */ + if (priv->wake_up_count == 1) + vnt_schedule_command(priv, WLAN_CMD_TBTT_WAKEUP); } + + priv->current_tsf = le64_to_cpu(int_data->tsf); + + low_stats->dot11RTSSuccessCount += int_data->rts_success; + low_stats->dot11RTSFailureCount += int_data->rts_fail; + low_stats->dot11ACKFailureCount += int_data->ack_fail; + low_stats->dot11FCSErrorCount += int_data->fcs_err; } static void vnt_start_interrupt_urb_complete(struct urb *urb) |