Skip to content

Commit

Permalink
mac80211_hwsim: record stats in non-netlink path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nguyen Dinh Phi authored and Johannes Berg committed Jun 23, 2021
1 parent 626c30f commit 93efeee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 93efeee

Please sign in to comment.