[riot-notifications] [RIOT-OS/RIOT] gnrc_lorawan : Add ADR support (#15995)

Akshai M (Augustus Diode) notifications at github.com
Tue Jul 20 18:12:08 CEST 2021


@akshaim commented on this pull request.



> +        channel_mask = 0;
+        for (unsigned i = 0; i < GNRC_LORAWAN_MAX_CHANNELS; i++) {
+            if (mac->channel[i]) {
+                channel_mask |= 1;
+            }
+            channel_mask = channel_mask << 1;
+        }
+        int res = gnrc_lorawan_phy_set_channel_mask(mac, channel_mask);
+        (void) res;
+        assert(res >= 0);
+        status |= 0x1;
+    }
+    else if (chmask_ctrl == 0) {
+        /* Try to apply channel mask */
+        if (gnrc_lorawan_phy_set_channel_mask(mac, channel_mask) >= 0) {
+            status |= 0x1;

One is enabling all channels irrespective of the `ChMask` value in  `LinkADRReq`, other is setting the same based on `ChMask` in  `LinkADRReq`. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15995#discussion_r673266209
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210720/411527d7/attachment-0001.htm>


More information about the notifications mailing list