aircrack-ng / rtl8188eus

RealTek RTL8188eus WiFi driver with monitor mode & frame injection support
925 stars 397 forks source link

Compilation Error Kernel v4.4.x #253

Closed IamCOD3X closed 1 year ago

IamCOD3X commented 1 year ago

Logs

 CC [M]  drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.o
  CC [M]  drivers/staging/rtl8188eus/os_dep/linux/rtw_cfgvendor.o
  CC [M]  drivers/staging/rtl8188eus/os_dep/linux/wifi_regd.o
  CC [M]  drivers/staging/rtl8188eus/hal/hal_com.o
  CC [M]  drivers/staging/rtl8188eus/hal/hal_com_phycfg.o
  CC [M]  drivers/staging/rtl8188eus/hal/hal_phy.o
  CC [M]  drivers/staging/rtl8188eus/hal/hal_dm.o
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/wifi_regd.c:270:18: error: use of undeclared identifier 'IEEE80211_NUM_BANDS'
        for (i = 0; i < NUM_NL80211_BANDS; i++) {
                        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:393:27: note: expanded from macro 'NUM_NL80211_BANDS'
#define NUM_NL80211_BANDS IEEE80211_NUM_BANDS
                          ^
1 error generated.
make[4]: *** [/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/scripts/Makefile.build:285: drivers/staging/rtl8188eus/os_dep/linux/wifi_regd.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/rtw_cfgvendor.c:177:25: error: implicit conversion from 'unsigned int' to 'u16' (aka 'unsigned short') changes value from 34078752 to 32 [-Werror,-Wconstant-conversion]
        kflags = in_atomic() ? GFP_ATOMIC : GFP_KERNEL;
               ~               ^~~~~~~~~~
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/include/linux/gfp.h:239:44: note: expanded from macro 'GFP_ATOMIC'
#define GFP_ATOMIC      (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM)
                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/rtw_cfgvendor.c:177:38: error: implicit conversion from 'unsigned int' to 'u16' (aka 'unsigned short') changes value from 37748928 to 192 [-Werror,-Wconstant-conversion]
        kflags = in_atomic() ? GFP_ATOMIC : GFP_KERNEL;
               ~                            ^~~~~~~~~~
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/include/linux/gfp.h:240:46: note: expanded from macro 'GFP_KERNEL'
#define GFP_KERNEL      (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
                         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
2 errors generated.
make[4]: *** [/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/scripts/Makefile.build:285: drivers/staging/rtl8188eus/os_dep/linux/rtw_cfgvendor.o] Error 1
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:168:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(1, 2412, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:169:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(2, 2417, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:170:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(3, 2422, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:171:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(4, 2427, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:172:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(5, 2432, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:173:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(6, 2437, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:174:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(7, 2442, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:175:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(8, 2447, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:176:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(9, 2452, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:177:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(10, 2457, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:178:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(11, 2462, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:179:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(12, 2467, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:180:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(13, 2472, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:181:2: error: use of undeclared identifier 'IEEE80211_BAND_2GHZ'
        CHAN2G(14, 2484, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:112:13: note: expanded from macro 'CHAN2G'
                .band                   = NL80211_BAND_2GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:388:27: note: expanded from macro 'NL80211_BAND_2GHZ'
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:186:2: error: use of undeclared identifier 'IEEE80211_BAND_5GHZ'
        CHAN5G(36, 0),  CHAN5G(40, 0),  CHAN5G(44, 0),  CHAN5G(48, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:121:13: note: expanded from macro 'CHAN5G'
                .band                   = NL80211_BAND_5GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:389:27: note: expanded from macro 'NL80211_BAND_5GHZ'
#define NL80211_BAND_5GHZ IEEE80211_BAND_5GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:186:17: error: use of undeclared identifier 'IEEE80211_BAND_5GHZ'
        CHAN5G(36, 0),  CHAN5G(40, 0),  CHAN5G(44, 0),  CHAN5G(48, 0),
                        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:121:13: note: expanded from macro 'CHAN5G'
                .band                   = NL80211_BAND_5GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:389:27: note: expanded from macro 'NL80211_BAND_5GHZ'
#define NL80211_BAND_5GHZ IEEE80211_BAND_5GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:186:32: error: use of undeclared identifier 'IEEE80211_BAND_5GHZ'
        CHAN5G(36, 0),  CHAN5G(40, 0),  CHAN5G(44, 0),  CHAN5G(48, 0),
                                        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:121:13: note: expanded from macro 'CHAN5G'
                .band                   = NL80211_BAND_5GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:389:27: note: expanded from macro 'NL80211_BAND_5GHZ'
#define NL80211_BAND_5GHZ IEEE80211_BAND_5GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:186:47: error: use of undeclared identifier 'IEEE80211_BAND_5GHZ'
        CHAN5G(36, 0),  CHAN5G(40, 0),  CHAN5G(44, 0),  CHAN5G(48, 0),
                                                        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:121:13: note: expanded from macro 'CHAN5G'
                .band                   = NL80211_BAND_5GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:389:27: note: expanded from macro 'NL80211_BAND_5GHZ'
#define NL80211_BAND_5GHZ IEEE80211_BAND_5GHZ
                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:188:2: error: use of undeclared identifier 'IEEE80211_BAND_5GHZ'
        CHAN5G(52, 0),  CHAN5G(56, 0),  CHAN5G(60, 0),  CHAN5G(64, 0),
        ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:121:13: note: expanded from macro 'CHAN5G'
                .band                   = NL80211_BAND_5GHZ,            \
                                          ^
/home/cod3x/Android/Kernels/kernel_xiaomi_sdm660/drivers/staging/rtl8188eus/include/../os_dep/linux/ioctl_cfg80211.h:389:27: note: expanded from macro 'NL80211_BAND_5GHZ'
#define NL80211_BAND_5GHZ IEEE80211_BAND_5GHZ
                          ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
gglluukk commented 1 year ago

namaste!

it seems you're trying to compile driver for specific platform and non-standard kernel, since those defines and part of codes causing errors could be found at vanilla 4.4.x tree, example as for 1st mistake: https://elixir.bootlin.com/linux/v4.4.1/source/include/net/cfg80211.h#L87

so the only way to compile the driver: dig into kernel sources, patch it and try to solve your errors by your own ^_*

IamCOD3X commented 1 year ago

Thanks for the reply @gglluukk. Namaste!! I have solved the compilation issue by making changes to the source code

gglluukk commented 1 year ago

congratulations with the achievement, bhai!