Revert "net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()"

This reverts commit 77cfeb27b8 which is
commit b8ec0dc3845f6c9089573cb5c2c4b05f7fc10728 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I08cf60f05f5db95e255ce111e9556b0671b0cc09
This commit is contained in:
Greg Kroah-Hartman
2024-08-11 14:29:20 +00:00
parent da78120b92
commit 954c8472e0

View File

@@ -42,8 +42,8 @@ void ieee802154_xmit_worker(struct work_struct *work)
if (res) if (res)
goto err_tx; goto err_tx;
DEV_STATS_INC(dev, tx_packets); dev->stats.tx_packets++;
DEV_STATS_ADD(dev, tx_bytes, skb->len); dev->stats.tx_bytes += skb->len;
ieee802154_xmit_complete(&local->hw, skb, false); ieee802154_xmit_complete(&local->hw, skb, false);
@@ -94,8 +94,8 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
goto err_tx; goto err_tx;
} }
DEV_STATS_INC(dev, tx_packets); dev->stats.tx_packets++;
DEV_STATS_ADD(dev, tx_bytes, len); dev->stats.tx_bytes += len;
} else { } else {
local->tx_skb = skb; local->tx_skb = skb;
queue_work(local->workqueue, &local->tx_work); queue_work(local->workqueue, &local->tx_work);