lwfinger / rtl8723ds

Linux driver for RTL8723DS.
GNU General Public License v2.0
50 stars 45 forks source link

Fails to compile against v6.1.0-rc3 #28

Closed sehraf closed 2 years ago

sehraf commented 2 years ago

When building against https://github.com/smaeul/linux/commits/d1/all the following errors occur:

In function '__nat25_add_pppoe_tag',
    inlined from 'nat25_db_handle' at /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/core/rtw_br_ext.c:1170:11:
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/core/rtw_br_ext.c:125:9: warning: 'memcpy' reading between 2052 and 9220 bytes from a region of size 40 [-Wstringop-overread]
  125 |         memcpy((unsigned char *)ph->tag, tag, data_len);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/core/rtw_br_ext.c: In function 'nat25_db_handle':
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/core/rtw_br_ext.c:1139:63: note: source object 'tag_buf' of size 40
 1139 |                                                 unsigned char tag_buf[40];
      |                                                               ^~~~~~~
  CC [M]  /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/mlme_linux.o
  CC [M]  /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/recv_linux.o
  CC [M]  /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.o
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/osdep_service.c: In function 'rtw_random32':
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/osdep_service.c:1607:16: error: implicit declaration of function 'prandom_u32'; did you mean 'prandom_u32_max'? [-Werror=implicit-function-declaration]
 1607 |         return prandom_u32();
      |                ^~~~~~~~~~~
      |                prandom_u32_max
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/os_intfs.c: In function 'rtw_os_ndev_register':
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/os_intfs.c:1379:9: error: too many arguments to function 'netif_napi_add'
 1379 |         netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
      |         ^~~~~~~~~~~~~~
In file included from /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/include/osdep_service_linux.h:35,
                 from /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/include/osdep_service.h:35,
                 from /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/include/drv_types.h:32,
                 from /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/os_intfs.c:22:
/home/user/Projects/risc-v-lichee-rv/image_builder/build/linux/include/linux/netdevice.h:2562:1: note: declared here
 2562 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
make[2]: *** [/home/user/Projects/risc-v-lichee-rv/image_builder/build/linux/scripts/Makefile.build:250: /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/os_intfs.o] Fehler 1
make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....
cc1: some warnings being treated as errors
make[2]: *** [/home/user/Projects/risc-v-lichee-rv/image_builder/build/linux/scripts/Makefile.build:250: /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/osdep_service.o] Fehler 1
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c: In function 'rtw_cfg80211_indicate_connect':
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:748:26: error: 'struct cfg80211_roam_info' has no member named 'bssid'
  748 |                 roam_info.bssid = cur_network->network.MacAddress;
      |                          ^
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c: In function 'cfg80211_rtw_scan':
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:2350:33: warning: the comparison will always evaluate as 'true' for the address of 'ssid' will never be NULL [-Waddress]
 2350 |                 if (ssids->ssid != NULL
      |                                 ^~
In file included from /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/include/osdep_service_linux.h:93,
                 from /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/include/osdep_service.h:35,
                 from /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/include/drv_types.h:32,
                 from /home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:22:
/home/user/Projects/risc-v-lichee-rv/image_builder/build/linux/include/net/cfg80211.h:2359:12: note: 'ssid' declared here
 2359 |         u8 ssid[IEEE80211_MAX_SSID_LEN];
      |            ^~~~
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c: At top level:
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:6793:20: error: initialization of 'int (*)(struct wiphy *, struct net_device *, int,  u8,  bool,  const u8 *, struct key_params *)' {aka 'int (*)(struct wiphy *, struct net_device *, int,  unsigned char,  _Bool,  const unsigned char *, struct key_params *)'} from incompatible pointer type 'int (*)(struct wiphy *, struct net_device *, u8,  bool,  const u8 *, struct key_params *)' {aka 'int (*)(struct wiphy *, struct net_device *, unsigned char,  _Bool,  const unsigned char *, struct key_params *)'} [-Werror=incompatible-pointer-types]
 6793 |         .add_key = cfg80211_rtw_add_key,
      |                    ^~~~~~~~~~~~~~~~~~~~
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:6793:20: note: (near initialization for 'rtw_cfg80211_ops.add_key')
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:6794:20: error: initialization of 'int (*)(struct wiphy *, struct net_device *, int,  u8,  bool,  const u8 *, void *, void (*)(void *, struct key_params *))' {aka 'int (*)(struct wiphy *, struct net_device *, int,  unsigned char,  _Bool,  const unsigned char *, void *, void (*)(void *, struct key_params *))'} from incompatible pointer type 'int (*)(struct wiphy *, struct net_device *, u8,  bool,  const u8 *, void *, void (*)(void *, struct key_params *))' {aka 'int (*)(struct wiphy *, struct net_device *, unsigned char,  _Bool,  const unsigned char *, void *, void (*)(void *, struct key_params *))'} [-Werror=incompatible-pointer-types]
 6794 |         .get_key = cfg80211_rtw_get_key,
      |                    ^~~~~~~~~~~~~~~~~~~~
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:6794:20: note: (near initialization for 'rtw_cfg80211_ops.get_key')
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:6795:20: error: initialization of 'int (*)(struct wiphy *, struct net_device *, int,  u8,  bool,  const u8 *)' {aka 'int (*)(struct wiphy *, struct net_device *, int,  unsigned char,  _Bool,  const unsigned char *)'} from incompatible pointer type 'int (*)(struct wiphy *, struct net_device *, u8,  bool,  const u8 *)' {aka 'int (*)(struct wiphy *, struct net_device *, unsigned char,  _Bool,  const unsigned char *)'} [-Werror=incompatible-pointer-types]
 6795 |         .del_key = cfg80211_rtw_del_key,
      |                    ^~~~~~~~~~~~~~~~~~~~
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:6795:20: note: (near initialization for 'rtw_cfg80211_ops.del_key')
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:6796:28: error: initialization of 'int (*)(struct wiphy *, struct net_device *, int,  u8,  bool,  bool)' {aka 'int (*)(struct wiphy *, struct net_device *, int,  unsigned char,  _Bool,  _Bool)'} from incompatible pointer type 'int (*)(struct wiphy *, struct net_device *, u8,  bool,  bool)' {aka 'int (*)(struct wiphy *, struct net_device *, unsigned char,  _Bool,  _Bool)'} [-Werror=incompatible-pointer-types]
 6796 |         .set_default_key = cfg80211_rtw_set_default_key,
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Projects/risc-v-lichee-rv/image_builder/build/rtl8723ds/os_dep/linux/ioctl_cfg80211.c:6796:28: note: (near initialization for 'rtw_cfg80211_ops.set_default_key')
cc1: some warnings being treated as errors
lwfinger commented 2 years ago

Fixes pushed.

sehraf commented 2 years ago

Thanks a lot!