[riot-notifications] [RIOT-OS/RIOT] ieee802154/submac: fix initialization code (#16533)

Jean Pierre Dudey notifications at github.com
Mon Jun 7 14:12:59 CEST 2021

@jeandudey requested changes on this pull request.

> +    uint16_t chan = CONFIG_IEEE802154_DEFAULT_CHANNEL;
+    int16_t tx_power = CONFIG_IEEE802154_DEFAULT_TXPOWER;

    uint16_t chan = submac->channel_num;
    int16_t tx_power = submac->tx_pow;

Maybe get it from the submac values? so we don't lose sync between netdev and submac in case a change is made to `ieee802154_submac_init`.

>        .channel = CONFIG_IEEE802154_DEFAULT_CHANNEL,
-      .page = CONFIG_IEEE802154_DEFAULT_CHANNEL,
       .pow = CONFIG_IEEE802154_DEFAULT_TXPOWER };

Currently a different channel page is saved to `submac->channel_page` (and `channel_num` too) when 2.4 GHz or Sub-1-GHz is supported, maybe we can use these values there?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210607/765cf44d/attachment.htm>

More information about the notifications mailing list