chuanjinpang/esp32s2_linux_80211_wifi_driver

请教——编译驱动报错问题

Opened this issue · 1 comments

您好,编译您的驱动,遇到这样的报错,请问是缺少头文件么?我该如何解决问题?
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:258:65: error: 'name' undeclared (first use in this function)
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:278:9: error: 'NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK' undeclared (first use in this function)
(详情见附件截图)

报错内容如下:
make -C /lib/modules/4.9.88/build KCPPFLAGS="-g -I/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/src -I/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/../common" M=/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver modules
make[1]: Entering directory '/opt/100Ask/100ask_stm32mp157_pro-sdk/Linux-4.9.88_IMX6ULL'
CC [M] /home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.o
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:25:0: warning: "LINUX_VERSION_CODE" redefined
#define LINUX_VERSION_CODE KERNEL_VERSION(4, 4, 0)
^
In file included from /home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:22:0:
./include/generated/uapi/linux/version.h:1:0: note: this is the location of the previous definition
#define LINUX_VERSION_CODE 264536
^
In file included from ./include/linux/etherdevice.h:26:0,
from /home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:11:
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c: In function 'init_adapter':
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:258:65: error: 'name' undeclared (first use in this function)
apt->ndev = alloc_netdev(sizeof(struct xfz_ndev_priv_context), name, NDEV_NAME, ether_setup);
^
./include/linux/netdevice.h:3749:32: note: in definition of macro 'alloc_netdev'
alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1)
^
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:258:65: note: each undeclared identifier is reported only once for each function it appears in
apt->ndev = alloc_netdev(sizeof(struct xfz_ndev_priv_context), name, NDEV_NAME, ether_setup);
^
./include/linux/netdevice.h:3749:32: note: in definition of macro 'alloc_netdev'
alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1)
^
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:45:19: warning: passing argument 3 of 'alloc_netdev_mqs' makes integer from pointer without a cast [-Wint-conversion]
#define NDEV_NAME "xwifi%d"
^
./include/linux/netdevice.h:3749:38: note: in definition of macro 'alloc_netdev'
alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1)
^
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:258:71: note: in expansion of macro 'NDEV_NAME'
apt->ndev = alloc_netdev(sizeof(struct xfz_ndev_priv_context), name, NDEV_NAME, ether_setup);
^
./include/linux/netdevice.h:3741:20: note: expected 'unsigned char' but argument is of type 'char *'
struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
^
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:269:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct wireless_dev *wdev = &ndev_get_xfz_context(apt->ndev)->wdev;
^
/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.c:278:9: error: 'NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK' undeclared (first use in this function)
NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK);
^
make[2]: *** [scripts/Makefile.build:294: /home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver/main.o] Error 1
make[1]: *** [Makefile:1499: module/home/wxp/esp32s2_linux_80211_wifi_driver-main/linux_host_usb_80211_wifi_driver] Error 2
make[1]: Leaving directory '/opt/100Ask/100ask_stm32mp157_pro-sdk/Linux-4.9.88_IMX6ULL'
make: *** [Makefile:23: modules] Error 2