aircrack-ng / rtl8188eus

RealTek RTL8188eus WiFi driver with monitor mode & frame injection support
968 stars 407 forks source link

Raspberry Pi warnings and errors compiling RTL8188EU for kernel 5.4 #35

Open MrEngman opened 4 years ago

MrEngman commented 4 years ago

Raspberry Pi are just about to start using kernel 5.4 and have provided an initial version 5.4.29

I tried compiling for the 4 different kernel versions used by the different Raspberry Pi types.

The driver compiles for kernel versions 5.4.29+ and 5.4.29-v8+ with a number of similar warnings. Compiling for kernel versions 5.4.29-v7+ and 5.4.29-v7l+ produces similar warning but also fails to create the wifi module as it reports an error with an undefined modules reference.

Warnings which appear to be the same for all kernel versions

  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_cmd.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_security.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_debug.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_io.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_ioctl_query.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_ioctl_set.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_ieee80211.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_mlme.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_mlme_ext.o
/home/pi/wifi-src20/rtl8188eus/core/rtw_mlme_ext.c: In function ‘rtw_txpwr_init_regd’:
/home/pi/wifi-src20/rtl8188eus/core/rtw_mlme_ext.c:261:3: warning: empty declaration
   __attribute__ ((__fallthrough__));
   ^
/home/pi/wifi-src20/rtl8188eus/core/rtw_mlme_ext.c:261:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
/home/pi/wifi-src20/rtl8188eus/core/rtw_mlme_ext.c: In function ‘mgt_dispatcher’:
/home/pi/wifi-src20/rtl8188eus/core/rtw_mlme_ext.c:1353:4: warning: empty declaration
    __attribute__ ((__fallthrough__));
    ^
/home/pi/wifi-src20/rtl8188eus/core/rtw_mlme_ext.c:1353:4: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_mi.o
/home/pi/wifi-src20/rtl8188eus/core/rtw_ieee80211.c: In function ‘dump_ht_cap_ie’:
/home/pi/wifi-src20/rtl8188eus/core/rtw_ieee80211.c:1680:2: warning: ‘ht_cap_ielen’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  dump_ht_cap_ie_content(sel, ht_cap_ie + 2, ht_cap_ielen);
  ^
/home/pi/wifi-src20/rtl8188eus/core/rtw_ieee80211.c: In function ‘dump_ht_op_ie’:
/home/pi/wifi-src20/rtl8188eus/core/rtw_ieee80211.c:1713:2: warning: ‘ht_op_ielen’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  dump_ht_op_ie_content(sel, ht_op_ie + 2, ht_op_ielen);
  ^
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_wlan_util.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_vht.o
.
.
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_linux.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/xmit_linux.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/mlme_linux.o
/home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_linux.c: In function ‘rtw_priv_mp_get’:
/home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_linux.c:10173:2: warning: empty declaration
  __attribute__ ((__fallthrough__));
  ^
/home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_linux.c:10173:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/recv_linux.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/rtw_cfgvendor.o
/home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_cfg80211.c: In function ‘cfg80211_rtw_change_iface’:
/home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:2393:2: warning: empty declaration
  __attribute__ ((__fallthrough__));
  ^
/home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:2393:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
/home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:2418:2: warning: empty declaration
  __attribute__ ((__fallthrough__));
  ^
/home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:2418:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/wifi_regd.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/rtw_android.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/rtw_proc.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/rtw_rhashtable.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/os_dep/linux/ioctl_mp.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/hal_intf.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/hal_com.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/hal_com_phycfg.o
/home/pi/wifi-src20/rtl8188eus/hal/hal_intf.c: In function ‘c2h_handler’:
/home/pi/wifi-src20/rtl8188eus/hal/hal_intf.c:1064:3: warning: empty declaration
   __attribute__ ((__fallthrough__));
   ^
/home/pi/wifi-src20/rtl8188eus/hal/hal_intf.c:1064:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/hal_phy.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/hal_dm.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/hal_dm_acs.o
.
.
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_dynamictxpower.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_adaptivity.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_cfotracking.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_noisemonitor.o
/home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_rainfo.c: In function ‘phydm_get_ofdm_qam_order’:
/home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_rainfo.c:1598:18: warning: array subscript is above array bounds [-Warray-bounds]
   qam_order = qam[tmp_idx];
                  ^
/home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_rainfo.c:1609:18: warning: array subscript is above array bounds [-Warray-bounds]
   qam_order = qam[tmp_idx];
                  ^
/home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_rainfo.c:1613:19: warning: array subscript is above array bounds [-Warray-bounds]
    qam_order = qam[tmp_idx - 1];
                   ^
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_beamforming.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/phydm/phydm_direct_bf.o
.
.
  CC [M]  /home/pi/wifi-src20/rtl8188eus/hal/phydm/rtl8188e/phydm_rtl8188e.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/platform/platform_ops.o
  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_mp.o
  LD [M]  /home/pi/wifi-src20/rtl8188eus/8188eu.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /home/pi/wifi-src20/rtl8188eus/8188eu.mod.o
  LD [M]  /home/pi/wifi-src20/rtl8188eus/8188eu.ko
make[1]: Leaving directory '/home/pi/src/linux'

The compile for kernel versions 5.4.29-v7+ and 5.4.29-v7l+ fail with the following error

  CC [M]  /home/pi/wifi-src20/rtl8188eus/core/rtw_mp.o
  LD [M]  /home/pi/wifi-src20/rtl8188eus/8188eu.o
  Building modules, stage 2.
  MODPOST 1 modules
ERROR: "__stack_chk_guard" [/home/pi/wifi-src20/rtl8188eus/8188eu.ko] undefined!
scripts/Makefile.modpost:93: recipe for target '__modpost' failed
make[2]: *** [__modpost] Error 1
Makefile:1607: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/home/pi/src/linux'
Makefile:2313: recipe for target 'modules' failed
make: *** [modules] Error 2

Not sure if this error is a driver or kernel error issue but I have also raised this issue with Raspberry Pi.

MrEngman

MrEngman commented 4 years ago

Appears the compile failure is a problem with the Raspberry Pi data in the Module.symvers files for kernels -v7+ and -v7l+ and I've managed to sort a fix. I have raised a further issue with the Raspberry Pi team to try and get the issue sorted.

However, sorting out the warnings would be useful.

MrEngman