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

José Alamos notifications at github.com
Fri Jul 16 18:12:05 CEST 2021


@jia200x commented on this pull request.



> @@ -414,6 +414,13 @@ static int _get(gnrc_netif_t *netif, gnrc_netapi_opt_t *opt)
             memcpy(opt->data, &tmp, sizeof(uint32_t));
             res = sizeof(uint32_t);
             break;
+        case NETOPT_LORAWAN_ADR:
+            mlme_request.type = MLME_GET;
+            mlme_request.mib.type = MIB_ADR;
+            gnrc_lorawan_mlme_request(&netif->lorawan.mac, &mlme_request,
+                                      &mlme_confirm);
+            *((bool *)opt->data) = mlme_confirm.mib.adr;

you should also update `res` accordingly

-- 
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#pullrequestreview-708549618
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210716/db76642a/attachment.htm>


More information about the notifications mailing list