提交 74451b93 编写于 作者: P Ping-Ke Shih 提交者: Kalle Valo

rtlwifi: Add TX/RX throughput statistics in period

The statistic variables use u64 to get higher precision.
Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 c1816f17
...@@ -1998,6 +1998,22 @@ void rtl_watchdog_wq_callback(void *data) ...@@ -1998,6 +1998,22 @@ void rtl_watchdog_wq_callback(void *data)
rtlpriv->link_info.tx_busy_traffic = tx_busy_traffic; rtlpriv->link_info.tx_busy_traffic = tx_busy_traffic;
rtlpriv->link_info.higher_busyrxtraffic = higher_busyrxtraffic; rtlpriv->link_info.higher_busyrxtraffic = higher_busyrxtraffic;
rtlpriv->stats.txbytesunicast_inperiod =
rtlpriv->stats.txbytesunicast -
rtlpriv->stats.txbytesunicast_last;
rtlpriv->stats.rxbytesunicast_inperiod =
rtlpriv->stats.rxbytesunicast -
rtlpriv->stats.rxbytesunicast_last;
rtlpriv->stats.txbytesunicast_last = rtlpriv->stats.txbytesunicast;
rtlpriv->stats.rxbytesunicast_last = rtlpriv->stats.rxbytesunicast;
rtlpriv->stats.txbytesunicast_inperiod_tp =
(u32)(rtlpriv->stats.txbytesunicast_inperiod * 8 / 2 /
1024 / 1024);
rtlpriv->stats.rxbytesunicast_inperiod_tp =
(u32)(rtlpriv->stats.rxbytesunicast_inperiod * 8 / 2 /
1024 / 1024);
/* <3> DM */ /* <3> DM */
if (!rtlpriv->cfg->mod_params->disable_watchdog) if (!rtlpriv->cfg->mod_params->disable_watchdog)
rtlpriv->cfg->ops->dm_watchdog(hw); rtlpriv->cfg->ops->dm_watchdog(hw);
......
...@@ -1013,10 +1013,17 @@ struct init_gain { ...@@ -1013,10 +1013,17 @@ struct init_gain {
}; };
struct wireless_stats { struct wireless_stats {
unsigned long txbytesunicast; u64 txbytesunicast;
unsigned long txbytesmulticast; u64 txbytesmulticast;
unsigned long txbytesbroadcast; u64 txbytesbroadcast;
unsigned long rxbytesunicast; u64 rxbytesunicast;
u64 txbytesunicast_inperiod;
u64 rxbytesunicast_inperiod;
u32 txbytesunicast_inperiod_tp;
u32 rxbytesunicast_inperiod_tp;
u64 txbytesunicast_last;
u64 rxbytesunicast_last;
long rx_snr_db[4]; long rx_snr_db[4];
/*Correct smoothed ss in Dbm, only used /*Correct smoothed ss in Dbm, only used
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册