Skip to content

Commit

Permalink
Update to get mac address for ethernet
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-hh committed Oct 19, 2023
1 parent 462aa94 commit be1d300
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/platform/bouffalolab/BL702/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI

#if CHIP_DEVICE_CONFIG_ENABLE_ETHERNET
extern "C" {
#include <eth_bd.h>
}
#include "EthernetInterface.h"
#endif // CHIP_DEVICE_CONFIG_ENABLE_ETHERNET

namespace chip {
Expand All @@ -45,8 +43,8 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryMACAddress(MutableByteSpan buf)
if (buf.size() != ConfigurationManager::kPrimaryMACAddressLength)
return CHIP_ERROR_INVALID_ARGUMENT;

eth_get_mac(buf.data());

memcpy(buf.data(), deviceInterface_getNetif()->hwaddr, ConfigurationManager::kPrimaryMACAddressLength);
return CHIP_NO_ERROR;
}
#endif // CHIP_DEVICE_CONFIG_ENABLE_ETHERNET
Expand Down

0 comments on commit be1d300

Please sign in to comment.