Skip to content

Commit

Permalink
net: ieee802154: mcr20a: Fix lifs/sifs periods
Browse files Browse the repository at this point in the history
commit d753c40 upstream.

These periods are expressed in time units (microseconds) while 40 and 12
are the number of symbol durations these periods will last. We need to
multiply them both with phy->symbol_duration in order to get these
values in microseconds.

Fixes: 8c6ad9c ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20220125121426.848337-3-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
miquelraynal authored and gregkh committed Feb 8, 2022
1 parent 75bbda3 commit 0bfe50d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ieee802154/mcr20a.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,8 @@ static void mcr20a_hw_setup(struct mcr20a_local *lp)
dev_dbg(printdev(lp), "%s\n", __func__);

phy->symbol_duration = 16;
phy->lifs_period = 40;
phy->sifs_period = 12;
phy->lifs_period = 40 * phy->symbol_duration;
phy->sifs_period = 12 * phy->symbol_duration;

hw->flags = IEEE802154_HW_TX_OMIT_CKSUM |
IEEE802154_HW_AFILT |
Expand Down

0 comments on commit 0bfe50d

Please sign in to comment.