diff --git a/drivers/ieee802154/ieee802154_cc13xx_cc26xx.c b/drivers/ieee802154/ieee802154_cc13xx_cc26xx.c index 00902e7e53..2068e08a47 100644 --- a/drivers/ieee802154/ieee802154_cc13xx_cc26xx.c +++ b/drivers/ieee802154/ieee802154_cc13xx_cc26xx.c @@ -527,7 +527,7 @@ static void ieee802154_cc13xx_cc26xx_data_init(const struct device *dev) mac = (uint8_t *)(FCFG1_BASE + FCFG1_O_MAC_15_4_0); } - memcpy(&drv_data->mac, mac, sizeof(drv_data->mac)); + sys_memcpy_swap(&drv_data->mac, mac, sizeof(drv_data->mac)); /* Setup circular RX queue (TRM 25.3.2.7) */ memset(&drv_data->rx_entry[0], 0, sizeof(drv_data->rx_entry[0])); diff --git a/drivers/ieee802154/ieee802154_cc13xx_cc26xx.h b/drivers/ieee802154/ieee802154_cc13xx_cc26xx.h index f1ae365af7..ac3cc29a63 100644 --- a/drivers/ieee802154/ieee802154_cc13xx_cc26xx.h +++ b/drivers/ieee802154/ieee802154_cc13xx_cc26xx.h @@ -65,7 +65,7 @@ struct ieee802154_cc13xx_cc26xx_data { struct net_if *iface; - uint8_t mac[8]; + uint8_t mac[8]; /* in big endian */ struct k_mutex tx_mutex; diff --git a/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c b/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c index 0e1dece181..e06ab05207 100644 --- a/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c +++ b/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c @@ -757,7 +757,7 @@ static void ieee802154_cc13xx_cc26xx_subg_data_init( mac = (uint8_t *)(FCFG1_BASE + FCFG1_O_MAC_15_4_0); } - memcpy(&drv_data->mac, mac, sizeof(drv_data->mac)); + sys_memcpy_swap(&drv_data->mac, mac, sizeof(drv_data->mac)); /* Setup circular RX queue (TRM 25.3.2.7) */ ieee802154_cc13xx_cc26xx_subg_setup_rx_buffers(drv_data); diff --git a/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.h b/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.h index 408d326ff8..2c150b4ebd 100644 --- a/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.h +++ b/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.h @@ -36,7 +36,7 @@ struct ieee802154_cc13xx_cc26xx_subg_data { RF_Object rf_object; struct net_if *iface; - uint8_t mac[8]; + uint8_t mac[8]; /* in big endian */ struct k_mutex tx_mutex;