Skip to content

Commit dc6be0b

Browse files
committed
Merge tag 'ieee802154-for-net-2024-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan into main
2 parents 109e2f5 + b8ec0dc commit dc6be0b

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

net/mac802154/main.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ void ieee802154_configure_durations(struct wpan_phy *phy,
161161
}
162162

163163
phy->symbol_duration = duration;
164-
phy->lifs_period = (IEEE802154_LIFS_PERIOD * phy->symbol_duration) / NSEC_PER_SEC;
165-
phy->sifs_period = (IEEE802154_SIFS_PERIOD * phy->symbol_duration) / NSEC_PER_SEC;
164+
phy->lifs_period =
165+
(IEEE802154_LIFS_PERIOD * phy->symbol_duration) / NSEC_PER_USEC;
166+
phy->sifs_period =
167+
(IEEE802154_SIFS_PERIOD * phy->symbol_duration) / NSEC_PER_USEC;
166168
}
167169
EXPORT_SYMBOL(ieee802154_configure_durations);
168170

@@ -184,10 +186,10 @@ static void ieee802154_setup_wpan_phy_pib(struct wpan_phy *wpan_phy)
184186
* Should be done when all drivers sets this value.
185187
*/
186188

187-
wpan_phy->lifs_period =
188-
(IEEE802154_LIFS_PERIOD * wpan_phy->symbol_duration) / 1000;
189-
wpan_phy->sifs_period =
190-
(IEEE802154_SIFS_PERIOD * wpan_phy->symbol_duration) / 1000;
189+
wpan_phy->lifs_period = (IEEE802154_LIFS_PERIOD *
190+
wpan_phy->symbol_duration) / NSEC_PER_USEC;
191+
wpan_phy->sifs_period = (IEEE802154_SIFS_PERIOD *
192+
wpan_phy->symbol_duration) / NSEC_PER_USEC;
191193
}
192194

193195
int ieee802154_register_hw(struct ieee802154_hw *hw)

net/mac802154/tx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ void ieee802154_xmit_sync_worker(struct work_struct *work)
3434
if (res)
3535
goto err_tx;
3636

37-
dev->stats.tx_packets++;
38-
dev->stats.tx_bytes += skb->len;
37+
DEV_STATS_INC(dev, tx_packets);
38+
DEV_STATS_ADD(dev, tx_bytes, skb->len);
3939

4040
ieee802154_xmit_complete(&local->hw, skb, false);
4141

@@ -90,8 +90,8 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
9090
if (ret)
9191
goto err_wake_netif_queue;
9292

93-
dev->stats.tx_packets++;
94-
dev->stats.tx_bytes += len;
93+
DEV_STATS_INC(dev, tx_packets);
94+
DEV_STATS_ADD(dev, tx_bytes, len);
9595
} else {
9696
local->tx_skb = skb;
9797
queue_work(local->workqueue, &local->sync_tx_work);

0 commit comments

Comments
 (0)