summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.c
diff options
context:
space:
mode:
authorNguyen Dinh Phi <phind.uet@gmail.com>2021-06-22 17:24:29 +0200
committerJohannes Berg <johannes.berg@intel.com>2021-06-23 11:29:13 +0200
commit93efeeea0fe6b3352e492e855a7262bc5645af14 (patch)
treee031f176b819f2322857c7c093253d413bc42810 /drivers/net/wireless/mac80211_hwsim.c
parentmac80211_hwsim: add concurrent channels scanning support over virtio (diff)
downloadlinux-93efeeea0fe6b3352e492e855a7262bc5645af14.tar.xz
linux-93efeeea0fe6b3352e492e855a7262bc5645af14.zip
mac80211_hwsim: record stats in non-netlink path
The data go through mac80211_hwsim_tx_frame_no_nl() wasn't counted. Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com> Link: https://lore.kernel.org/r/20210622152429.881230-1-phind.uet@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 7a5764003f81..ffa894f7312a 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1779,6 +1779,8 @@ static void mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
if (_pid || hwsim_virtio_enabled)
return mac80211_hwsim_tx_frame_nl(hw, skb, _pid, chan);
+ data->tx_pkts++;
+ data->tx_bytes += skb->len;
mac80211_hwsim_tx_frame_no_nl(hw, skb, chan);
dev_kfree_skb(skb);
}