diff --git a/model/network/wifi/Makefile b/model/network/wifi/Makefile index 5b2ce1522dcd4222a4d521f4c84cef02e2a8549f..396c41d70b07a173a40ab0aaf3402587476b9e21 100755 --- a/model/network/wifi/Makefile +++ b/model/network/wifi/Makefile @@ -18,9 +18,9 @@ HDF_DIR_PREFIX := ../../../../../../ include drivers/hdf/khdf/model/network/wifi/hdfwifi.mk -WAP_PATH := core/compoments/softap -WSTA_PATH := core/compoments/sta -WEAPOL_PATH := core/compoments/eapol +WAP_PATH := core/components/softap +WSTA_PATH := core/components/sta +WEAPOL_PATH := core/components/eapol NETDEV_PATH := ../common/netdevice MODULE_PATH := core/module QOS_PATH := platform/src/qos @@ -28,7 +28,6 @@ MESSAGE_PATH := platform/src/message PLATFORM_PATH := platform/src CORE_PATH := core - obj-$(CONFIG_DRIVERS_HDF_WIFI) += $(MODULE_NAME).o $(MODULE_NAME)-objs := $(HDF_WIFI_FRAMEWORKS_ROOT)/$(WAP_PATH)/ap.o \ $(HDF_WIFI_FRAMEWORKS_ROOT)/$(WEAPOL_PATH)/eapol.o \ diff --git a/model/network/wifi/hdfwifi.mk b/model/network/wifi/hdfwifi.mk index 180ebdbd45a0e21960d6ca0df5294554cb33f6e3..f82be363e1d890ed92446c752778ec77a9beb1cc 100755 --- a/model/network/wifi/hdfwifi.mk +++ b/model/network/wifi/hdfwifi.mk @@ -14,8 +14,11 @@ HDF_WIFI_FRAMEWORKS_ROOT = $(HDF_DIR_PREFIX)/framework/model/network/wifi HDF_WIFI_KHDF_FRAMEWORKS_ROOT = $(HDF_DIR_PREFIX)/adapter/khdf/linux/model/network/wifi +ifeq ($(TARGET_PRODUCT), Hi3516DV300) +HDF_WIFI_VENDOR_ROOT = $(HDF_VENDOR_PREFIX)/device/hisilicon/drivers/wifi/driver +else ifeq ($(TARGET_PRODUCT), hi3516dv300) HDF_WIFI_VENDOR_ROOT = $(HDF_VENDOR_PREFIX)/device/hisilicon/drivers/huawei_proprietary/wifi/driver - +endif HDF_FRAMEWORKS_INC := \ -Idrivers/hdf/framework/ability/sbuf/include \ -Idrivers/hdf/framework/core/common/include/host \ @@ -37,9 +40,9 @@ HDF_FRAMEWORKS_INC := \ -Iinclude/hdf/utils HDF_WIFI_FRAMEWORKS_INC := \ - -Idrivers/hdf/framework/model/network/wifi/core/compoments/eapol \ - -Idrivers/hdf/framework/model/network/wifi/core/compoments/softap \ - -Idrivers/hdf/framework/model/network/wifi/core/compoments/sta \ + -Idrivers/hdf/framework/model/network/wifi/core/components/eapol \ + -Idrivers/hdf/framework/model/network/wifi/core/components/softap \ + -Idrivers/hdf/framework/model/network/wifi/core/components/sta \ -Idrivers/hdf/framework/model/network/wifi/include \ -Idrivers/hdf/framework/model/network/wifi/core \ -Idrivers/hdf/framework/model/network/wifi/core/module \ @@ -53,8 +56,16 @@ HDF_WIFI_FRAMEWORKS_INC := \ HDF_WIFI_ADAPTER_INC := \ -Idrivers/hdf/khdf/network/include +ifeq ($(TARGET_PRODUCT), Hi3516DV300) +HDF_WIFI_VENDOR_INC := \ + -I../../../../../device/hisilicon/drivers/wifi/driver/core + +SECURE_LIB_INC := \ + -I../../../../../third_party/bounds_checking_function/include +else ifeq ($(TARGET_PRODUCT), hi3516dv300) HDF_WIFI_VENDOR_INC := \ -I../../../../device/hisilicon/drivers/huawei_proprietary/wifi/driver/core SECURE_LIB_INC := \ -I../../../../third_party/bounds_checking_function/include +endif diff --git a/model/network/wifi/platform/src/hdf_wlan_queue.c b/model/network/wifi/platform/src/hdf_wlan_queue.c index 864a6b8102f85b9433aa2d587e9cb04e978be856..5852a379194b78c8ee1ec71209e341cde5206019 100644 --- a/model/network/wifi/platform/src/hdf_wlan_queue.c +++ b/model/network/wifi/platform/src/hdf_wlan_queue.c @@ -55,13 +55,15 @@ HdfWlanQueue *CreateQueue(uint16_t maxQueueSize) } return (HdfWlanQueue*)impl; } + void DestroyQueue(HdfWlanQueue *queue) { int32_t ret; - HdfWlanQueueImpl *impl = (HdfWlanQueueImpl *)queue; + HdfWlanQueueImpl *impl = NULL; if (queue == NULL) { return; } + impl = (HdfWlanQueueImpl *)queue; ret = OsalMutexDestroy(&impl->lock); if (ret != HDF_SUCCESS) { HDF_LOGE("%s: OsalSpinDestroy failed!ret=%d", __func__, ret); @@ -72,7 +74,11 @@ void DestroyQueue(HdfWlanQueue *queue) void *PopQueue(HdfWlanQueue *queue) { int32_t ret; - HdfWlanQueueImpl *impl = (HdfWlanQueueImpl *)queue; + HdfWlanQueueImpl *impl = NULL; + if (queue == NULL) { + return NULL; + } + impl = (HdfWlanQueueImpl *)queue; void *result = NULL; if (queue == NULL) { return NULL; @@ -82,29 +88,27 @@ void *PopQueue(HdfWlanQueue *queue) HDF_LOGE("%s:Get lock failed!ret=%d", __func__, ret); return NULL; } - do { - if (impl->elementCount > 0) { - uint16_t headIndex = impl->headIndex; - - result = impl->elements[headIndex++]; - - impl->headIndex = ((headIndex >= impl->maxElements) ? 0 : headIndex); - impl->elementCount--; - } - } while (false); + if (impl->elementCount > 0) { + uint16_t headIndex = impl->headIndex; + result = impl->elements[headIndex++]; + impl->headIndex = ((headIndex >= impl->maxElements) ? 0 : headIndex); + impl->elementCount--; + } ret = OsalMutexUnlock(&impl->lock); if (ret != HDF_SUCCESS) { HDF_LOGE("%s:Release lock failed!ret=%d", __func__, ret); } return result; } + int32_t PushQueue(HdfWlanQueue *queue, void *context) { int32_t ret; - HdfWlanQueueImpl *impl = (HdfWlanQueueImpl *)queue; + HdfWlanQueueImpl *impl = NULL; if (queue == NULL) { return HDF_FAILURE; } + impl = (HdfWlanQueueImpl *)queue; ret = OsalMutexLock(&impl->lock); if (ret != HDF_SUCCESS) { HDF_LOGE("%s:Get lock failed!ret=%d", __func__, ret); diff --git a/model/network/wifi/vendor/hi3881/Makefile b/model/network/wifi/vendor/hi3881/Makefile index 879133f9ae53f34cdd80ce81089852f8e5d14945..9344e14fa217f20d888894ddc9d85c87faca9eed 100755 --- a/model/network/wifi/vendor/hi3881/Makefile +++ b/model/network/wifi/vendor/hi3881/Makefile @@ -18,8 +18,13 @@ HDF_VENDOR_PREFIX := ../../../../../../../../../ include drivers/hdf/khdf/model/network/wifi/hdfwifi.mk +ifeq ($(TARGET_PRODUCT), Hi3516DV300) +INC_TOP_PATH := ../../../../../ +VENDOR_WIFI_PATH := device/hisilicon/drivers/wifi/driver +else ifeq ($(TARGET_PRODUCT), hi3516dv300) INC_TOP_PATH := ../../../../ VENDOR_WIFI_PATH := device/hisilicon/drivers/huawei_proprietary/wifi/driver +endif WIFI_DRIVER_DIR := hi3881 ##################path of compile file :start############### diff --git a/model/network/wifi/vendor/hi3881/env_config.mk b/model/network/wifi/vendor/hi3881/env_config.mk index 42686839b0108e4712ac85796aa3ad6b16b8f57f..f206ca72b32407caa4dea3232cf5db363ea64d5f 100644 --- a/model/network/wifi/vendor/hi3881/env_config.mk +++ b/model/network/wifi/vendor/hi3881/env_config.mk @@ -91,7 +91,6 @@ else HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_CHIP_VERSION=_HI_BOARD_FPGA endif - ifeq ($(QUICK_START),y) HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_QUICK_START endif @@ -189,7 +188,6 @@ endif ifeq ($(CFG_BTCOEX_ROM), y) HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_BTCOEX_ROM endif -#HI1131_WIFI_CFLAGS +=-D_PRE_PSM_DEBUG_MODE ifeq ($(CFG_RF_110X_CALI_DPD), y) HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_RF_110X_CALI_DPD endif diff --git a/model/sensor/Makefile b/model/sensor/Makefile index 10da304e6e8f3cbb5ec2ae8ffd940d585905cee8..9b80d994fda30e3166913c10cc5305cfb5dcf6e3 100644 --- a/model/sensor/Makefile +++ b/model/sensor/Makefile @@ -37,4 +37,4 @@ ccflags-y += -Idrivers/hdf/framework/model/sensor/driver/include \ -Idrivers/hdf/framework/include/platform \ -Idrivers/hdf/framework/include/config \ -Idrivers/hdf/khdf/osal/include \ - -I../../../../third_party/bounds_checking_function/include + -I$(PROJECT_ROOT)/third_party/bounds_checking_function/include diff --git a/network/include/netbuf_adapter.h b/network/include/netbuf_adapter.h index a80ffbb2bd3da780ac5ecdf8c7b5484d9df0c1d9..a9f5df3fc6691428179c1f39c2b065dd15655174 100644 --- a/network/include/netbuf_adapter.h +++ b/network/include/netbuf_adapter.h @@ -1,5 +1,5 @@ /* - * netbuf_adatper.h + * netbuf_adapter.h * * net buffer adapter of linux * diff --git a/network/src/Makefile b/network/src/Makefile index 038be616baf04d607fb38f89193305fa5a3f5085..a660f0aa8f280c8fa0f4f2dcd2debfcdb568fb48 100755 --- a/network/src/Makefile +++ b/network/src/Makefile @@ -22,4 +22,4 @@ ccflags-$(CONFIG_DRIVERS_HDF_WIFI) += \ -Iinclude/hdf/wifi \ -Iinclude/hdf/utils \ -Iinclude/hdf/osal \ - -I../../../../third_party/bounds_checking_function/include + -Iinclude/../../../../../../third_party/bounds_checking_function/include diff --git a/network/src/net_device_adapter.c b/network/src/net_device_adapter.c index d9fc5127d8c7cd0083bcfe21fdd37a197c12601a..d9e054c279e96e00efee6359a3a1b01a64e5d15d 100644 --- a/network/src/net_device_adapter.c +++ b/network/src/net_device_adapter.c @@ -105,7 +105,7 @@ static struct net_device_ops g_netDeviceOps = { .ndo_stop = NetDevStop }; -static struct net_device *CreateNetDevice(const struct NetDevice *hdfDev) +static struct net_device *CreateNetDevice(struct NetDevice *hdfDev) { struct net_device *dev = NULL; diff --git a/network/src/netbuf_adapter.c b/network/src/netbuf_adapter.c index 261465d23f2eff7b58757573755f7a128ef3a1f7..7cd08084fdbc9d53bcff643a8d26bfdfcebf6a37 100644 --- a/network/src/netbuf_adapter.c +++ b/network/src/netbuf_adapter.c @@ -1,5 +1,5 @@ /* - * netbuf_adapter.h + * netbuf_adapter.c * * net buffer adapter of linux * diff --git a/test/test_khdf.mk b/test/test_khdf.mk index 0ad5cf6b3923b6146d7008033b6937387d3bb3e9..7d59c2043abc31650b6810ba7c6fec15ecba5a52 100644 --- a/test/test_khdf.mk +++ b/test/test_khdf.mk @@ -53,10 +53,10 @@ ccflags-$(CONFIG_DRIVERS_HDF_TEST) += -Idrivers/hdf/framework/include/platform \ -I$(HDF_FRAMEWORK_ROOT)/model/network/common/netdevice \ -I$(HDF_FRAMEWORK_ROOT)/model/network/wifi/core/module \ -I$(HDF_FRAMEWORK_ROOT)/model/network/wifi/platfrom/src/qos \ - -I$(HDF_FRAMEWORK_ROOT)/model/network/wifi/core/compoments/softap \ - -I$(HDF_FRAMEWORK_ROOT)/model/network/wifi/core/compoments/sta \ + -I$(HDF_FRAMEWORK_ROOT)/model/network/wifi/core/components/softap \ + -I$(HDF_FRAMEWORK_ROOT)/model/network/wifi/core/components/sta \ -I$(HDF_FRAMEWORK_ROOT)/model/network/wifi/platform/include \ - -I../../../../third_party/bounds_checking_function/include \ + -I$(PROJECT_ROOT)/third_party/bounds_checking_function/include \ -I$(HDF_FRAMEWORK_TEST_ROOT)/platform \ -I$(HDF_FRAMEWORK_TEST_ROOT)/wifi \ -I$(HDF_FRAMEWORK_TEST_ROOT)/platform/common \