Message ID | 1382819655-30430-2-git-send-email-pali.rohar@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Pali Rohár <pali.rohar@gmail.com> writes: > From: David Gnedt <david.gnedt@davizone.at> > > Count TX packets and bytes also for monitor interfaces. > > Signed-of-by: David Gnedt <david.gnedt@davizone.at> You should send mac80211 patches separately, not inside a wl1251 patchset.
On Sat, 2013-10-26 at 22:34 +0200, Pali Rohár wrote: > + dev->stats.tx_packets++; > + dev->stats.tx_bytes += skb->len; We can still easily drop the packet after this - we can't guarantee it'll go out but maybe we shouldn't do it here? johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 3456c04..674db8e 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1593,6 +1593,9 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, if (unlikely(skb->len < len_rthdr)) goto fail; /* skb too short for claimed rt header extent */ + dev->stats.tx_packets++; + dev->stats.tx_bytes += skb->len; + /* * fix up the pointers accounting for the radiotap * header still being in there. We are being given
From: David Gnedt <david.gnedt@davizone.at> Count TX packets and bytes also for monitor interfaces. Signed-of-by: David Gnedt <david.gnedt@davizone.at> --- net/mac80211/tx.c | 3 +++ 1 file changed, 3 insertions(+)