aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2022-02-01 19:06:27 +0100
committerStefan Schmidt <stefan@datenfreihafen.org>2022-02-10 15:41:58 +0100
commit731cddce6dd110fb2cdee34eddb48599e7251517 (patch)
tree54ba2afeedaa1a2a7a96fdc9201acb79aace6037 /net/mac802154
parentcfa1e01ecf516511bfc0fa87f96aa19bc6ee401f (diff)
downloadlinux-731cddce6dd110fb2cdee34eddb48599e7251517.tar.gz
net: mac802154: Convert the symbol duration into nanoseconds
Tdsym is often given in the spec as pretty small numbers in microseconds and hence was reflected in the code as symbol_duration and was stored as a u8. Actually, for UWB PHYs, the symbol duration is given in nanoseconds and are as precise as picoseconds. In order to handle better these PHYs, change the type of symbol_duration to u32 and store this value in nanoseconds. All the users of this variable are updated in a mechanical way. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Alexander Aring <aahringo@redhat.com> Link: https://lore.kernel.org/r/20220201180629.93410-3-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 520cedc594e1e..53153367f9d05 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -131,10 +131,10 @@ static void ieee802154_setup_wpan_phy_pib(struct wpan_phy *wpan_phy)
* Should be done when all drivers sets this value.
*/
- wpan_phy->lifs_period = IEEE802154_LIFS_PERIOD *
- wpan_phy->symbol_duration;
- wpan_phy->sifs_period = IEEE802154_SIFS_PERIOD *
- wpan_phy->symbol_duration;
+ wpan_phy->lifs_period =
+ (IEEE802154_LIFS_PERIOD * wpan_phy->symbol_duration) / 1000;
+ wpan_phy->sifs_period =
+ (IEEE802154_SIFS_PERIOD * wpan_phy->symbol_duration) / 1000;
}
int ieee802154_register_hw(struct ieee802154_hw *hw)