From d70a1ab7458390ac97fe875487788b8104abaab6 Mon Sep 17 00:00:00 2001 From: juchenyang Date: Mon, 9 Aug 2021 13:42:55 +0000 Subject: [PATCH] Description: Eliminate the difference between liteos_a and liteos_m in driver adapter. Feature or Bugfix:Feature Binary Source: No Signed-off-by: juchenyang --- model/network/ethernet/src/eth_device.c | 1 + model/network/ethernet/src/hdf_eth_core.c | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/model/network/ethernet/src/eth_device.c b/model/network/ethernet/src/eth_device.c index 1080d83e7..3b2f09e81 100755 --- a/model/network/ethernet/src/eth_device.c +++ b/model/network/ethernet/src/eth_device.c @@ -13,6 +13,7 @@ #include "hdf_log.h" #include "los_vm_zone.h" #include "osal_mem.h" +#include "securec.h" #define HDF_LOG_TAG eth_device diff --git a/model/network/ethernet/src/hdf_eth_core.c b/model/network/ethernet/src/hdf_eth_core.c index b75e66382..96abacd06 100755 --- a/model/network/ethernet/src/hdf_eth_core.c +++ b/model/network/ethernet/src/hdf_eth_core.c @@ -8,8 +8,7 @@ #include "eth_chip_driver.h" #include "eth_device.h" -#include "hdf_log.h" -#include "osal_mem.h" +#include "osal.h" #define HDF_LOG_TAG eth_core struct EthConfig *g_ethConfig = NULL; @@ -139,7 +138,7 @@ static int32_t InitEth(struct EthDevice *ethDevice, const uint8_t isSetDefault, ReleaseEthDevice(ethDevice); return HDF_FAILURE; } - LOS_Msleep(DELAY_TIME_LONG); + OsalMSleep(DELAY_TIME_LONG); ethChipDriverFact->GetMacAddr(enaddr, MAC_ADDR_SIZE); NetIfSetMacAddr(ethDevice->netdev, enaddr, MAC_ADDR_SIZE); @@ -147,7 +146,7 @@ static int32_t InitEth(struct EthDevice *ethDevice, const uint8_t isSetDefault, #if (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION) ret = SetEthNetworkAddr(ethDevice->netdev); if (ret != HDF_SUCCESS) { - PRINTK("%s set eth network addr fail\n", __func__); + HDF_LOGE("%s set eth network addr fail", __func__); DeinitEth(ethDevice); ReleaseEthDevice(ethDevice); return ret; @@ -189,7 +188,7 @@ static int32_t HdfEthDriverInit(struct HdfDeviceObject *deviceObject) return ret; } } - PRINTK("%s hdf eth driver framework init success\n", __func__); + HDF_LOGE("%s hdf eth driver framework init success", __func__); return ret; } -- Gitee