From 19df6cd9b1d361d90a261548ba8bdbc194e9c067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fin=20Maa=C3=9F?= Date: Wed, 3 Apr 2024 11:42:12 +0200 Subject: [PATCH] drivers: modem: use sys_rand_get directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit use sys_rand_get() directly. Signed-off-by: Fin Maaß --- drivers/modem/wncm14a2a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/modem/wncm14a2a.c b/drivers/modem/wncm14a2a.c index 5b60d0aaff..12b9b4b341 100644 --- a/drivers/modem/wncm14a2a.c +++ b/drivers/modem/wncm14a2a.c @@ -1760,8 +1760,7 @@ static inline uint8_t *wncm14a2a_get_mac(const struct device *dev) ctx->mac_addr[0] = 0x00; ctx->mac_addr[1] = 0x10; - UNALIGNED_PUT(sys_cpu_to_be32(sys_rand32_get()), - (uint32_t *)(ctx->mac_addr + 2)); + sys_rand_get(&ctx->mac_addr[2], 4U); return ctx->mac_addr; }