mirror of
https://gitee.com/openharmony/drivers_adapter_khdf_linux
synced 2024-11-27 06:40:24 +00:00
IssueNo:#I3RW19
Description:sync L2 peripheral code to L1 Feature or Bugfix:Bugfix Binary Source: NO Change-Id: Ic4ff341a54e736b149e5225a8c0e4745ef1b45f7
This commit is contained in:
parent
51c6ea46b8
commit
153984b30f
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
5
model/network/wifi/vendor/hi3881/Makefile
vendored
5
model/network/wifi/vendor/hi3881/Makefile
vendored
@ -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###############
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* netbuf_adatper.h
|
||||
* netbuf_adapter.h
|
||||
*
|
||||
* net buffer adapter of linux
|
||||
*
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* netbuf_adapter.h
|
||||
* netbuf_adapter.c
|
||||
*
|
||||
* net buffer adapter of linux
|
||||
*
|
||||
|
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user