rtlwifi: Don't clear num_rx_inperiod too early
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Tue, 8 Jan 2019 22:50:09 +0000 (22:50 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 1 Feb 2019 12:07:31 +0000 (14:07 +0200)
This patch moves the clearing of rtlpriv->link_info.num_rx_inperiod in
rtl_watchdog_wq_callback a few lines down.

This is necessary since it is still used in the "AP off" detection
code block. Moved clearing of rtlpriv->link_info.num_rx_inperiod
as well for consistency.

Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/base.c

index ef9b502..7aa68fe 100644 (file)
@@ -2172,8 +2172,6 @@ label_lps_done:
                ;
        }
 
-       rtlpriv->link_info.num_rx_inperiod = 0;
-       rtlpriv->link_info.num_tx_inperiod = 0;
        for (tid = 0; tid <= 7; tid++)
                rtlpriv->link_info.tidtx_inperiod[tid] = 0;
 
@@ -2236,6 +2234,8 @@ label_lps_done:
                        rtlpriv->btcoexist.btc_info.in_4way = false;
        }
 
+       rtlpriv->link_info.num_rx_inperiod = 0;
+       rtlpriv->link_info.num_tx_inperiod = 0;
        rtlpriv->link_info.bcn_rx_inperiod = 0;
 
        /* <6> scan list */